Changeset 121162 in webkit
- Timestamp:
- Jun 25, 2012 9:59:25 AM (12 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r121157 r121162 1 2012-06-25 Shinya Kawanaka <shinyak@chromium.org> 2 3 [Shadow] Executing Italic and InsertUnorderedList in Shadow DOM causes a crash 4 https://bugs.webkit.org/show_bug.cgi?id=88495 5 6 Reviewed by Ryosuke Niwa. 7 8 * editing/shadow/insertorderedlist-crash-expected.txt: Added. 9 * editing/shadow/insertorderedlist-crash.html: Added. 10 1 11 2012-06-25 Allan Sandfeld Jensen <allan.jensen@nokia.com> 2 12 -
trunk/Source/WebCore/ChangeLog
r121161 r121162 1 2012-06-25 Shinya Kawanaka <shinyak@chromium.org> 2 3 [Shadow] Executing Italic and InsertUnorderedList in Shadow DOM causes a crash 4 https://bugs.webkit.org/show_bug.cgi?id=88495 5 6 Reviewed by Ryosuke Niwa. 7 8 InsertionPoint::removedFrom(insertionPoint) tries to find its owner ElementShadow from 9 parentNode or insertionPoint. If the parent node exsits but we cannot reach ElementShadow from 10 the parent node, InsertionPoint::removedFrom does not try to find ElementShadow anymore. 11 12 It's OK if the ElementShadow is being destructed, but there is a case ElementShadow is not being 13 destructed in editing. In this case, we should try to find ElementShadow from insertionPoint. 14 Otherwise it will bring inconsistency to Shadow DOM, and causes a crash. 15 16 Actually checking the existence of parentNode() does not make any sense. We should get 17 shadowRoot() directly. 18 19 Test: editing/shadow/insertorderedlist-crash.html 20 21 * html/shadow/InsertionPoint.cpp: 22 (WebCore::InsertionPoint::removedFrom): 23 1 24 2012-06-25 Kinuko Yasuda <kinuko@chromium.org> 2 25 -
trunk/Source/WebCore/html/shadow/InsertionPoint.cpp
r119790 r121162 129 129 { 130 130 if (insertionPoint->inDocument()) { 131 Node* parent = parentNode(); 132 if (!parent) 133 parent = insertionPoint; 134 if (ShadowRoot* root = parent->shadowRoot()) { 135 // host can be null when removedFrom() is called from ElementShadow destructor. 136 if (root->host()) 137 root->owner()->invalidateDistribution(); 138 } 131 ShadowRoot* root = shadowRoot(); 132 if (!root) 133 root = insertionPoint->shadowRoot(); 134 135 // host can be null when removedFrom() is called from ElementShadow destructor. 136 if (root && root->host()) 137 root->owner()->invalidateDistribution(); 139 138 140 139 // Since this insertion point is no longer visible from the shadow subtree, it need to clean itself up.
Note: See TracChangeset
for help on using the changeset viewer.