Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(134)

Unified Diff: Source/WebCore/rendering/RenderFullScreen.cpp

Issue 10879084: Merge 124888 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1229/
Patch Set: Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « LayoutTests/fullscreen/full-screen-line-boxes-crash-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/rendering/RenderFullScreen.cpp
===================================================================
--- Source/WebCore/rendering/RenderFullScreen.cpp (revision 126658)
+++ Source/WebCore/rendering/RenderFullScreen.cpp (working copy)
@@ -117,9 +117,20 @@
// |object->parent()| can be null if the object is not yet attached
// to |parent|.
if (RenderObject* parent = object->parent()) {
+ RenderBlock* containingBlock = object->containingBlock();
+ ASSERT(containingBlock);
+ // Since we are moving the |object| to a new parent |fullscreenRenderer|,
+ // the line box tree underneath our |containingBlock| is not longer valid.
+ containingBlock->deleteLineBoxTree();
+
parent->addChild(fullscreenRenderer, object);
object->remove();
+
+ // Always just do a full layout to ensure that line boxes get deleted properly.
+ // Because objects moved from |parent| to |fullscreenRenderer|, we want to
+ // make new line boxes instead of leaving the old ones around.
parent->setNeedsLayoutAndPrefWidthsRecalc();
+ containingBlock->setNeedsLayoutAndPrefWidthsRecalc();
}
fullscreenRenderer->addChild(object);
fullscreenRenderer->setNeedsLayoutAndPrefWidthsRecalc();
« no previous file with comments | « LayoutTests/fullscreen/full-screen-line-boxes-crash-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698