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

Side by Side Diff: Source/core/rendering/RenderInline.cpp

Issue 15165002: Fix assert failure in RenderObjectChildList::removeChildNode (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: fix in split Created 7 years, 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « LayoutTests/fullscreen/full-screen-inline-split-crash-expected.txt ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. 4 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 18 matching lines...) Expand all
29 #include "core/page/Frame.h" 29 #include "core/page/Frame.h"
30 #include "core/page/Page.h" 30 #include "core/page/Page.h"
31 #include "core/platform/graphics/FloatQuad.h" 31 #include "core/platform/graphics/FloatQuad.h"
32 #include "core/platform/graphics/GraphicsContext.h" 32 #include "core/platform/graphics/GraphicsContext.h"
33 #include "core/platform/graphics/transforms/TransformState.h" 33 #include "core/platform/graphics/transforms/TransformState.h"
34 #include "core/rendering/HitTestResult.h" 34 #include "core/rendering/HitTestResult.h"
35 #include "core/rendering/InlineTextBox.h" 35 #include "core/rendering/InlineTextBox.h"
36 #include "core/rendering/RenderArena.h" 36 #include "core/rendering/RenderArena.h"
37 #include "core/rendering/RenderBlock.h" 37 #include "core/rendering/RenderBlock.h"
38 #include "core/rendering/RenderFlowThread.h" 38 #include "core/rendering/RenderFlowThread.h"
39 #include "core/rendering/RenderFullScreen.h"
39 #include "core/rendering/RenderGeometryMap.h" 40 #include "core/rendering/RenderGeometryMap.h"
40 #include "core/rendering/RenderLayer.h" 41 #include "core/rendering/RenderLayer.h"
41 #include "core/rendering/RenderTheme.h" 42 #include "core/rendering/RenderTheme.h"
42 #include "core/rendering/RenderView.h" 43 #include "core/rendering/RenderView.h"
43 #include "core/rendering/style/StyleInheritedData.h" 44 #include "core/rendering/style/StyleInheritedData.h"
44 45
45 using namespace std; 46 using namespace std;
46 47
47 namespace WebCore { 48 namespace WebCore {
48 49
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 } 339 }
339 340
340 void RenderInline::splitInlines(RenderBlock* fromBlock, RenderBlock* toBlock, 341 void RenderInline::splitInlines(RenderBlock* fromBlock, RenderBlock* toBlock,
341 RenderBlock* middleBlock, 342 RenderBlock* middleBlock,
342 RenderObject* beforeChild, RenderBoxModelObject* oldCont) 343 RenderObject* beforeChild, RenderBoxModelObject* oldCont)
343 { 344 {
344 // Create a clone of this inline. 345 // Create a clone of this inline.
345 RenderInline* cloneInline = clone(); 346 RenderInline* cloneInline = clone();
346 cloneInline->setContinuation(oldCont); 347 cloneInline->setContinuation(oldCont);
347 348
349 // If we're splitting the inline containing the fullscreened element,
350 // |beforeChild| may be the renderer for the fullscreened element. However,
351 // that renderer is wrapped in a RenderFullScreen, so |this| is not its
352 // parent. Since the splitting logic expects |this| to be the parent, set
353 // |beforeChild| to be the RenderFullScreen.
354 const Element* fullScreenElement = document()->webkitCurrentFullScreenElemen t();
355 if (fullScreenElement && beforeChild && beforeChild->node() == fullScreenEle ment)
356 beforeChild = document()->fullScreenRenderer();
357
348 // Now take all of the children from beforeChild to the end and remove 358 // Now take all of the children from beforeChild to the end and remove
349 // them from |this| and place them in the clone. 359 // them from |this| and place them in the clone.
350 RenderObject* o = beforeChild; 360 RenderObject* o = beforeChild;
351 while (o) { 361 while (o) {
352 RenderObject* tmp = o; 362 RenderObject* tmp = o;
353 o = tmp->nextSibling(); 363 o = tmp->nextSibling();
354 cloneInline->addChildIgnoringContinuation(children()->removeChildNode(th is, tmp), 0); 364 cloneInline->addChildIgnoringContinuation(children()->removeChildNode(th is, tmp), 0);
355 tmp->setNeedsLayoutAndPrefWidthsRecalc(); 365 tmp->setNeedsLayoutAndPrefWidthsRecalc();
356 } 366 }
357 367
(...skipping 1222 matching lines...) Expand 10 before | Expand all | Expand 10 after
1580 1590
1581 void RenderInline::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const 1591 void RenderInline::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
1582 { 1592 {
1583 MemoryClassInfo info(memoryObjectInfo, this, PlatformMemoryTypes::Rendering) ; 1593 MemoryClassInfo info(memoryObjectInfo, this, PlatformMemoryTypes::Rendering) ;
1584 RenderBoxModelObject::reportMemoryUsage(memoryObjectInfo); 1594 RenderBoxModelObject::reportMemoryUsage(memoryObjectInfo);
1585 info.addMember(m_children, "children"); 1595 info.addMember(m_children, "children");
1586 info.addMember(m_lineBoxes, "lineBoxes"); 1596 info.addMember(m_lineBoxes, "lineBoxes");
1587 } 1597 }
1588 1598
1589 } // namespace WebCore 1599 } // namespace WebCore
OLDNEW
« no previous file with comments | « LayoutTests/fullscreen/full-screen-inline-split-crash-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698