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

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

Issue 8218021: Merge 97088 - Exiting fullscreen shouldn't crash if the element that was fullscreened had associa... (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/874/
Patch Set: Created 9 years, 2 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/parent-flow-inline-with-block-child-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 97091)
+++ Source/WebCore/rendering/RenderFullScreen.cpp (working copy)
@@ -124,13 +124,16 @@
void RenderFullScreen::unwrapRenderer()
{
- RenderObject* wrappedRenderer = firstChild();
- if (wrappedRenderer) {
- wrappedRenderer->remove();
- RenderObject* holder = placeholder() ? placeholder() : this;
- RenderObject* parent = holder->parent();
- if (parent)
- parent->addChild(wrappedRenderer, holder);
+ RenderObject* holder = placeholder() ? placeholder() : this;
+ RenderObject* parent = holder->parent();
+ if (parent) {
+ RenderObject* child = firstChild();
+ while (child) {
+ RenderObject* nextChild = child->nextSibling();
+ child->remove();
+ parent->addChild(child, holder);
+ child = nextChild;
+ }
}
remove();
document()->setFullScreenRenderer(0);
« no previous file with comments | « LayoutTests/fullscreen/parent-flow-inline-with-block-child-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698