Changeset 140931 in webkit
- Timestamp:
- Jan 27, 2013 5:55:04 PM (11 years ago)
- Location:
- trunk
- Files:
-
- 4 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r140928 r140931 1 2013-01-27 Matt Falkenhagen <falken@chromium.org> 2 3 Elements must be reattached when inserted/removed from top layer 4 https://bugs.webkit.org/show_bug.cgi?id=105489 5 6 Relanding r139402 as the apparent perf regression has been explained as not real (bug 106726). 7 8 Reviewed by Julien Chaffraix. 9 10 * fast/dom/HTMLDialogElement/removed-element-is-removed-from-top-layer-expected.html: Added. 11 * fast/dom/HTMLDialogElement/removed-element-is-removed-from-top-layer.html: Added. 12 This tests that a top layer element removed from the document does not reappear in the top layer if readded. 13 This test actually would pass before this patch, but just by good fortune (see bug). 14 * fast/dom/HTMLDialogElement/top-layer-stacking-correct-order-remove-readd-expected.html: Added. 15 * fast/dom/HTMLDialogElement/top-layer-stacking-correct-order-remove-readd.html: Added. 16 This tests that top layer ordering is correct after removing and readding an element to the top layer. 17 1 18 2013-01-27 Jochen Eisinger <jochen@chromium.org> 2 19 -
trunk/Source/WebCore/ChangeLog
r140930 r140931 1 2013-01-27 Matt Falkenhagen <falken@chromium.org> 2 3 Elements must be reattached when inserted/removed from top layer 4 https://bugs.webkit.org/show_bug.cgi?id=105489 5 6 Relanding r139402 as the apparent perf regression has been explained as not real (bug 106726). 7 8 Reviewed by Julien Chaffraix. 9 10 Ensure a reattach occurs when an element is inserted/removed from top layer, so its renderer can be inserted correctly: 11 as a child of RenderView in top layer sibling order if it's in the top layer, and in the usual place otherwise. 12 13 We previously relied on style recalc to catch when an element is inserted/removed from the top layer, because it 14 only happens on dialog.show/close which toggle display: none. But that is incorrect because, for example, close() 15 followed immediately by show() results in no style change. 16 17 Tests: fast/dom/HTMLDialogElement/removed-element-is-removed-from-top-layer.html 18 fast/dom/HTMLDialogElement/top-layer-stacking-correct-order-remove-readd.html 19 20 * dom/Element.cpp: 21 (WebCore::Element::removedFrom): Call Document::removeFromTopLayer to let the element be removed from the top layer vector. 22 removeFromTopLayer calls Element::setIsInTopLayer(false) itself if needed. 23 (WebCore::Element::setIsInTopLayer): Ensure a reattach occurs if the element is already attached. 24 1 25 2013-01-27 Zoltan Arvai <zarvai@inf.u-szeged.hu> 2 26 -
trunk/Source/WebCore/dom/Element.cpp
r140638 r140931 1184 1184 1185 1185 #if ENABLE(DIALOG_ELEMENT) 1186 setIsInTopLayer(false);1186 document()->removeFromTopLayer(this); 1187 1187 #endif 1188 1188 #if ENABLE(FULLSCREEN_API) … … 2405 2405 return; 2406 2406 ensureElementRareData()->setIsInTopLayer(inTopLayer); 2407 setNeedsStyleRecalc(SyntheticStyleChange); 2407 2408 // We must ensure a reattach occurs so the renderer is inserted in the correct sibling order under RenderView according to its 2409 // top layer position, or in its usual place if not in the top layer. 2410 reattachIfAttached(); 2408 2411 } 2409 2412 #endif
Note: See TracChangeset
for help on using the changeset viewer.