[webkit-changes] [WebKit/WebKit] 060f71: imported/w3c/web-platform-tests/css/css-nesting/cs...
Chris Dumez
noreply at github.com
Sun Oct 1 14:01:44 PDT 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 060f71cc967fca2975152a97cb8472a06926b031
https://github.com/WebKit/WebKit/commit/060f71cc967fca2975152a97cb8472a06926b031
Author: Chris Dumez <cdumez at apple.com>
Date: 2023-10-01 (Sun, 01 Oct 2023)
Changed paths:
M LayoutTests/imported/w3c/web-platform-tests/css/css-nesting/cssom-expected.txt
M Source/WebCore/dom/CharacterData.cpp
Log Message:
-----------
imported/w3c/web-platform-tests/css/css-nesting/cssom.html is failing in WebKit
https://bugs.webkit.org/show_bug.cgi?id=262459
Reviewed by Ryosuke Niwa.
We have an optimization in CharacterData::setData() that avoids doing some work
when the JS cannot observe it. This optimization was breaking the test.
The test sets the innerHTML of a <style> element, which ends up calling setData()
on the child Text node (as an optimization) and then takes the optimized code
path in CharacterData::setData(). The optimized code path fails to notify the
ancestors that the text has changed. However, HTMLStyleElement::childrenChanged()
has code that needs to run in such case.
As a result, I am now disabling the optimization in CharacterData::setData() if
the parent node is an HTMLStyleElement.
* LayoutTests/imported/w3c/web-platform-tests/css/css-nesting/cssom-expected.txt:
* Source/WebCore/dom/CharacterData.cpp:
(WebCore::canUseSetDataOptimization):
Canonical link: https://commits.webkit.org/268707@main
More information about the webkit-changes
mailing list