Changeset 126275 in webkit
- Timestamp:
- Aug 22, 2012 1:20:40 AM (12 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r126271 r126275 1 2012-08-22 Takashi Sakamoto <tasak@google.com> 2 3 Dynamically styling ShadowDom content on a node distributed to another shadow insertion point fails. 4 https://bugs.webkit.org/show_bug.cgi?id=92899 5 6 Reviewed by Hajime Morita. 7 8 * fast/dom/shadow/shadowdom-dynamic-styling-expected.txt: Added. 9 * fast/dom/shadow/shadowdom-dynamic-styling.html: Added. 10 * editing/shadow/delete-characters-in-distributed-node-crash.html: 11 Made the layout test robust. This patch causes commit-queue- and the 12 failed test is delete-characters-in-distributed-node-crash.html. 13 However the layout test passes when locally running run_webkit_test 14 i.e. no difference between actual and expected texts. And looking at 15 the commit-queue's report, the actual text has "PASS" message (no 16 crash messages). 17 1 18 2012-08-22 Dominic Cooney <dominicc@chromium.org> 2 19 -
trunk/LayoutTests/editing/shadow/delete-characters-in-distributed-node-crash-expected.txt
r120896 r126275 1 1 This tests the deletion of text in distributed node does not crash. To run it outside of DRT, you must delete text, 'foo', manually. 2 2 3 4 3 PASS -
trunk/LayoutTests/editing/shadow/delete-characters-in-distributed-node-crash.html
r124685 r126275 3 3 <body> 4 4 <p id="description">This tests the deletion of text in distributed node does not crash. To run it outside of DRT, you must delete text, 'foo', manually.</p> 5 <div id=" shadowhost" contenteditable><div>foo</div></div>5 <div id="wrapper"><div id="shadowhost" contenteditable><div>foo</div></div></div> 6 6 <script> 7 7 if (window.testRunner) … … 14 14 document.execCommand('Delete'); 15 15 16 document. write('PASS');16 document.getElementById("wrapper").innerHTML = "PASS"; 17 17 </script> 18 18 </body> -
trunk/Source/WebCore/ChangeLog
r126273 r126275 1 2012-08-22 Takashi Sakamoto <tasak@google.com> 2 3 Dynamically styling ShadowDom content on a node distributed to another shadow insertion point fails. 4 https://bugs.webkit.org/show_bug.cgi?id=92899 5 6 Reviewed by Hajime Morita. 7 8 Since childNeedsStyleRecalc is not cleared when parent nodes are 9 attached, setNeedsStyleRecalc flag is not reached Document. So, 10 document() doesn't run re-layout. 11 12 Test: fast/dom/shadow/shadowdom-dynamic-styling.html 13 14 * dom/ContainerNode.h: 15 (ContainerNode): 16 (WebCore::ContainerNode::detachAsNode): 17 Removed detachAsNode, because the below change made the method 18 not-used. 19 * dom/Element.cpp: 20 (WebCore::Element::detach): 21 Modify to invoke ContainerNode::detach when any shadow subtree is 22 attached. ContainerNode::detach takes care of childNeedsStyleRecalc 23 flag. 24 * dom/ElementShadow.cpp: 25 (WebCore::ElementShadow::invalidateDistribution): 26 Use SetAttached for lazyAttach instead of DoNotSetAttached, because 27 it is reuired to invoke ContainerNode::detach. If not, attached() is 28 false and reattach() invokes only attach(). This causes to leave 29 shadow host's childNeedsStyleRecalc flag true after 30 Element::recalcStyle. 31 1 32 2012-08-22 Taiju Tsuiki <tzik@chromium.org> 2 33 -
trunk/Source/WebCore/dom/ContainerNode.h
r125006 r126275 93 93 void attachChildrenIfNeeded(); 94 94 void attachChildrenLazily(); 95 void detachAsNode();96 95 void detachChildren(); 97 96 void detachChildrenIfNeeded(); … … 187 186 if (!child->attached()) 188 187 child->lazyAttach(); 189 }190 191 inline void ContainerNode::detachAsNode()192 {193 Node::detach();194 188 } 195 189 -
trunk/Source/WebCore/dom/Element.cpp
r126258 r126275 1000 1000 detachChildrenIfNeeded(); 1001 1001 shadow->detach(); 1002 detachAsNode(); 1003 } else 1004 ContainerNode::detach(); 1002 } 1003 ContainerNode::detach(); 1005 1004 1006 1005 RenderWidget::resumeWidgetHierarchyUpdates(); -
trunk/Source/WebCore/dom/ElementShadow.cpp
r124196 r126275 207 207 if (needsReattach && host->attached()) { 208 208 host->detach(); 209 host->lazyAttach( Node::DoNotSetAttached);209 host->lazyAttach(); 210 210 } 211 211
Note: See TracChangeset
for help on using the changeset viewer.