dom/base/crashtests/729431-1.xhtml
author Markus Stange <mstange.moz@gmail.com>
Fri, 15 Oct 2021 16:52:33 +0000
changeset 596026 ff6d6594f7b046db57fa377eee3e8760a3ff4751
parent 329664 7b434711753b98a87603453caaa0945791ffe12b
permissions -rw-r--r--
Bug 1736049 - Stop calling `[[NSCursor currentCursor] set]` on every mouse move. r=emilio This was only necessary when we had binary plug-ins overriding the cursor from under us. We no longer support plug-ins. Calling -[NSCursor set] has a performance cost on macOS Monterey when cursor accessibility coloring is enabled, so we want to avoid calling it unnecessarily. It also leaks memory in the current Monterey Beta (see bug 1735345), so calling it less often will leak less memory. I have checked the testcases of bug 496601 and of bug 1423275, they still work as expected with this fix. Differential Revision: https://phabricator.services.mozilla.com/D128612

<html xmlns="http://www.w3.org/1999/xhtml">

<script>
<![CDATA[

function boom()
{
  var d = document.createElementNS("http://www.w3.org/1999/xhtml", "div");
  d.setAttributeNS(null, "contenteditable", "true");
  var s = document.createElementNS("http://www.w3.org/1999/xhtml", "span");
  d.appendChild(s);
  document.documentElement.appendChild(d);

  var textarea = document.createElementNS("http://www.w3.org/1999/xhtml", "textarea");
  var t1 = document.createTextNode("A");
  textarea.appendChild(t1);
  var t2 = document.createTextNode("B");
  textarea.appendChild(t2);
  document.documentElement.appendChild(textarea);

  document.documentElement.offsetHeight;

  d.removeChild(s);
  textarea.removeChild(t2);
  document.documentElement.appendChild(document.createTextNode(" C "));
  document.documentElement.appendChild(t2);
}

window.addEventListener("load", boom);

]]>
</script>

<!-- no body -->

</html>