testing/web-platform/tests/html/editing/dnd/selection/084.xhtml
author Julian Seward <jseward@acm.org>
Tue, 31 Jan 2023 06:11:20 +0000
changeset 651017 3cb50cbf836e2e371e41a7b3c9ddd60a6010e109
parent 388141 f95a678186b46649eee6cf8c6adbdf46c320f300
permissions -rw-r--r--
Bug 1812285 - wasm::InitExprInterpreter: use inline capacity for `::stack`. r=yury. The Dart Barista-3 benchmark gives the initial expression interpreter a lot of work. Profiling shows that wasm::InitExprInterpreter::stack heap-allocates around 37000 short-lifetime blocks to hold the stacked values. Using a 48-element inline capacity removes all of those allocations. (40 removes almost all, but not all). Similar ridealong fix: for the wasm parser iterator Iter<Policy>::valueStack_, increase inline capacity from 16 to 32. This takes out another 2500 allocations. Differential Revision: https://phabricator.services.mozilla.com/D167926

<?xml version="1.0" encoding="utf-8"?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Events during selection drag and drop to url input</title>
<style type="text/css">
input[placeholder]
  {width:300px;
  height:50px;
  margin-top:20px;}
.hidden
  {visibility:hidden;}
</style>
<script type="application/ecmascript">
function evtChange()
  {document.querySelectorAll('tt')[0].firstChild.nodeValue = 'PASS'}
function evtInput()
  {document.querySelectorAll('tt')[1].firstChild.nodeValue = 'PASS'}
function evtDrop()
  {document.querySelectorAll('tt')[2].firstChild.nodeValue = (event.dataTransfer.getData('text/plain') == 'http://example.org')?'PASS':'FAIL (selection is not properly added to data store)'}
function evtKeypress()
  {document.querySelectorAll('tt')[3].firstChild.nodeValue = 'FAIL (even is not supposed to fire)'}
</script>
</head>
<body onload="window.getSelection().selectAllChildren(document.querySelector('p'))">
<p>http://example.org</p>
<p>Drag selected url to the input below. Follow check results link once you drop selection in the input.</p>
<p><input type="url" placeholder="Drop selection here" onchange="evtChange()" oninput="evtInput()" onkeypress="evtKeypress()" ondrop="evtDrop()"/></p>
<p><a href="javascript:document.querySelector('ul').removeAttribute('class')">Check results</a></p>
<ul class="hidden">
<li>Change event: <tt>FAIL (even did not fire)</tt></li>
<li>Input event: <tt>FAIL (even did not fire)</tt></li>
<li>Drop event: <tt>FAIL (even did not fire)</tt></li>
<li>Keypress event: <tt>PASS</tt></li>
</ul>
</body>
</html>