Changeset 140307 in webkit
- Timestamp:
- Jan 20, 2013 11:59:39 PM (11 years ago)
- Location:
- trunk
- Files:
-
- 4 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r140306 r140307 1 2013-01-20 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 rollout due to suspected perf regression did not help (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-20 Yury Semikhatsky <yurys@chromium.org> 2 19 -
trunk/Source/WebCore/ChangeLog
r140306 r140307 1 2013-01-20 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 rollout due to suspected perf regression did not help (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-20 Yury Semikhatsky <yurys@chromium.org> 2 26 -
trunk/Source/WebCore/dom/Element.cpp
r140231 r140307 1172 1172 1173 1173 #if ENABLE(DIALOG_ELEMENT) 1174 setIsInTopLayer(false);1174 document()->removeFromTopLayer(this); 1175 1175 #endif 1176 1176 #if ENABLE(FULLSCREEN_API) … … 2391 2391 { 2392 2392 ensureElementRareData()->setIsInTopLayer(inTopLayer); 2393 setNeedsStyleRecalc(SyntheticStyleChange); 2393 2394 // We must ensure a reattach occurs so the renderer is inserted in the correct sibling order under RenderView according to its 2395 // top layer position, or in its usual place if not in the top layer. 2396 reattachIfAttached(); 2394 2397 } 2395 2398 #endif
Note: See TracChangeset
for help on using the changeset viewer.