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

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

Issue 132333018: Revert of Reland r165710 "Replace RenderFullScreen with top layer" (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 10 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 14 matching lines...) Expand all
25 25
26 #include "core/dom/FullscreenElementStack.h" 26 #include "core/dom/FullscreenElementStack.h"
27 #include "core/page/Chrome.h" 27 #include "core/page/Chrome.h"
28 #include "core/page/Page.h" 28 #include "core/page/Page.h"
29 #include "core/rendering/GraphicsContextAnnotator.h" 29 #include "core/rendering/GraphicsContextAnnotator.h"
30 #include "core/rendering/HitTestResult.h" 30 #include "core/rendering/HitTestResult.h"
31 #include "core/rendering/InlineTextBox.h" 31 #include "core/rendering/InlineTextBox.h"
32 #include "core/rendering/LayoutRectRecorder.h" 32 #include "core/rendering/LayoutRectRecorder.h"
33 #include "core/rendering/RenderBlock.h" 33 #include "core/rendering/RenderBlock.h"
34 #include "core/rendering/RenderFlowThread.h" 34 #include "core/rendering/RenderFlowThread.h"
35 #include "core/rendering/RenderFullScreen.h"
35 #include "core/rendering/RenderGeometryMap.h" 36 #include "core/rendering/RenderGeometryMap.h"
36 #include "core/rendering/RenderLayer.h" 37 #include "core/rendering/RenderLayer.h"
37 #include "core/rendering/RenderTheme.h" 38 #include "core/rendering/RenderTheme.h"
38 #include "core/rendering/RenderView.h" 39 #include "core/rendering/RenderView.h"
39 #include "core/rendering/style/StyleInheritedData.h" 40 #include "core/rendering/style/StyleInheritedData.h"
40 #include "platform/geometry/FloatQuad.h" 41 #include "platform/geometry/FloatQuad.h"
41 #include "platform/geometry/TransformState.h" 42 #include "platform/geometry/TransformState.h"
42 #include "platform/graphics/GraphicsContext.h" 43 #include "platform/graphics/GraphicsContext.h"
43 44
44 using namespace std; 45 using namespace std;
(...skipping 293 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 if (FullscreenElementStack* fullscreen = FullscreenElementStack::fromIfExist s(&document())) {
355 const Element* fullScreenElement = fullscreen->webkitCurrentFullScreenEl ement();
356 if (fullScreenElement && beforeChild && beforeChild->node() == fullScree nElement)
357 beforeChild = fullscreen->fullScreenRenderer();
358 }
359
348 // Now take all of the children from beforeChild to the end and remove 360 // Now take all of the children from beforeChild to the end and remove
349 // them from |this| and place them in the clone. 361 // them from |this| and place them in the clone.
350 RenderObject* o = beforeChild; 362 RenderObject* o = beforeChild;
351 while (o) { 363 while (o) {
352 RenderObject* tmp = o; 364 RenderObject* tmp = o;
353 o = tmp->nextSibling(); 365 o = tmp->nextSibling();
354 cloneInline->addChildIgnoringContinuation(children()->removeChildNode(th is, tmp), 0); 366 cloneInline->addChildIgnoringContinuation(children()->removeChildNode(th is, tmp), 0);
355 tmp->setNeedsLayoutAndPrefWidthsRecalc(); 367 tmp->setNeedsLayoutAndPrefWidthsRecalc();
356 } 368 }
357 369
(...skipping 1204 matching lines...) Expand 10 before | Expand all | Expand 10 after
1562 container = this; 1574 container = this;
1563 1575
1564 FloatPoint absPos = container->localToAbsolute(); 1576 FloatPoint absPos = container->localToAbsolute();
1565 region.bounds.setX(absPos.x() + region.bounds.x()); 1577 region.bounds.setX(absPos.x() + region.bounds.x());
1566 region.bounds.setY(absPos.y() + region.bounds.y()); 1578 region.bounds.setY(absPos.y() + region.bounds.y());
1567 1579
1568 regions.append(region); 1580 regions.append(region);
1569 } 1581 }
1570 1582
1571 } // namespace WebCore 1583 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderFullScreen.cpp ('k') | Source/core/rendering/RenderLayerCompositor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698