[Webkit-unassigned] [Bug 244559] No-op textContent replacement could be short-circuited, like in Chrome

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Aug 30 19:28:18 PDT 2022


https://bugs.webkit.org/show_bug.cgi?id=244559

Karl Dubost <karlcow at apple.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |karlcow at apple.com

--- Comment #2 from Karl Dubost <karlcow at apple.com> ---
> The textContent setter steps are to, if the given value is null, act as if it was the empty string instead, and then do as described below, switching on the interface this implements:
>
>> 
> CharacterData
> Replace data with node this, offset 0, count this’s length, and data the given value.
in https://dom.spec.whatwg.org/#dom-node-textcontent



and replace data
in https://dom.spec.whatwg.org/#concept-cd-replace

For the chrome optimization
https://github.com/chromium/chromium/blob/924ec189cdfd33c8cee15d918f927afcb88d06db/third_party/blink/renderer/core/dom/node.cc#L2036-L2041

pointing to https://bugs.chromium.org/p/chromium/issues/detail?id=352836
as the source of the optimization.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20220831/b727d038/attachment-0001.htm>


More information about the webkit-unassigned mailing list