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

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

Issue 18896003: [WIP] Migrate Fullscreen to use top layer instead of RenderFullScreen (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 5 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
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 19 matching lines...) Expand all
30 #include "core/page/Frame.h" 30 #include "core/page/Frame.h"
31 #include "core/page/Page.h" 31 #include "core/page/Page.h"
32 #include "core/platform/graphics/FloatQuad.h" 32 #include "core/platform/graphics/FloatQuad.h"
33 #include "core/platform/graphics/GraphicsContext.h" 33 #include "core/platform/graphics/GraphicsContext.h"
34 #include "core/platform/graphics/transforms/TransformState.h" 34 #include "core/platform/graphics/transforms/TransformState.h"
35 #include "core/rendering/HitTestResult.h" 35 #include "core/rendering/HitTestResult.h"
36 #include "core/rendering/InlineTextBox.h" 36 #include "core/rendering/InlineTextBox.h"
37 #include "core/rendering/RenderArena.h" 37 #include "core/rendering/RenderArena.h"
38 #include "core/rendering/RenderBlock.h" 38 #include "core/rendering/RenderBlock.h"
39 #include "core/rendering/RenderFlowThread.h" 39 #include "core/rendering/RenderFlowThread.h"
40 #include "core/rendering/RenderFullScreen.h"
41 #include "core/rendering/RenderGeometryMap.h" 40 #include "core/rendering/RenderGeometryMap.h"
42 #include "core/rendering/RenderLayer.h" 41 #include "core/rendering/RenderLayer.h"
43 #include "core/rendering/RenderTheme.h" 42 #include "core/rendering/RenderTheme.h"
44 #include "core/rendering/RenderView.h" 43 #include "core/rendering/RenderView.h"
45 #include "core/rendering/style/StyleInheritedData.h" 44 #include "core/rendering/style/StyleInheritedData.h"
46 45
47 using namespace std; 46 using namespace std;
48 47
49 namespace WebCore { 48 namespace WebCore {
50 49
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
340 } 339 }
341 340
342 void RenderInline::splitInlines(RenderBlock* fromBlock, RenderBlock* toBlock, 341 void RenderInline::splitInlines(RenderBlock* fromBlock, RenderBlock* toBlock,
343 RenderBlock* middleBlock, 342 RenderBlock* middleBlock,
344 RenderObject* beforeChild, RenderBoxModelObject* oldCont) 343 RenderObject* beforeChild, RenderBoxModelObject* oldCont)
345 { 344 {
346 // Create a clone of this inline. 345 // Create a clone of this inline.
347 RenderInline* cloneInline = clone(); 346 RenderInline* cloneInline = clone();
348 cloneInline->setContinuation(oldCont); 347 cloneInline->setContinuation(oldCont);
349 348
350 // If we're splitting the inline containing the fullscreened element,
351 // |beforeChild| may be the renderer for the fullscreened element. However,
352 // that renderer is wrapped in a RenderFullScreen, so |this| is not its
353 // parent. Since the splitting logic expects |this| to be the parent, set
354 // |beforeChild| to be the RenderFullScreen.
355 if (FullscreenController* fullscreen = FullscreenController::fromIfExists(do cument())) {
356 const Element* fullScreenElement = fullscreen->webkitCurrentFullScreenEl ement();
357 if (fullScreenElement && beforeChild && beforeChild->node() == fullScree nElement)
358 beforeChild = fullscreen->fullScreenRenderer();
359 }
360
361 // Now take all of the children from beforeChild to the end and remove 349 // Now take all of the children from beforeChild to the end and remove
362 // them from |this| and place them in the clone. 350 // them from |this| and place them in the clone.
363 RenderObject* o = beforeChild; 351 RenderObject* o = beforeChild;
364 while (o) { 352 while (o) {
365 RenderObject* tmp = o; 353 RenderObject* tmp = o;
366 o = tmp->nextSibling(); 354 o = tmp->nextSibling();
367 cloneInline->addChildIgnoringContinuation(children()->removeChildNode(th is, tmp), 0); 355 cloneInline->addChildIgnoringContinuation(children()->removeChildNode(th is, tmp), 0);
368 tmp->setNeedsLayoutAndPrefWidthsRecalc(); 356 tmp->setNeedsLayoutAndPrefWidthsRecalc();
369 } 357 }
370 358
(...skipping 1193 matching lines...) Expand 10 before | Expand all | Expand 10 after
1564 1552
1565 void RenderInline::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const 1553 void RenderInline::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
1566 { 1554 {
1567 MemoryClassInfo info(memoryObjectInfo, this, PlatformMemoryTypes::Rendering) ; 1555 MemoryClassInfo info(memoryObjectInfo, this, PlatformMemoryTypes::Rendering) ;
1568 RenderBoxModelObject::reportMemoryUsage(memoryObjectInfo); 1556 RenderBoxModelObject::reportMemoryUsage(memoryObjectInfo);
1569 info.addMember(m_children, "children"); 1557 info.addMember(m_children, "children");
1570 info.addMember(m_lineBoxes, "lineBoxes"); 1558 info.addMember(m_lineBoxes, "lineBoxes");
1571 } 1559 }
1572 1560
1573 } // namespace WebCore 1561 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698