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

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: fix some failing tests Created 6 years, 11 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 | « Source/core/rendering/RenderFullScreen.cpp ('k') | Source/core/rendering/RenderVideo.h » ('j') | 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 328 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 } 339 }
340 340
341 void RenderInline::splitInlines(RenderBlock* fromBlock, RenderBlock* toBlock, 341 void RenderInline::splitInlines(RenderBlock* fromBlock, RenderBlock* toBlock,
342 RenderBlock* middleBlock, 342 RenderBlock* middleBlock,
343 RenderObject* beforeChild, RenderBoxModelObject* oldCont) 343 RenderObject* beforeChild, RenderBoxModelObject* oldCont)
344 { 344 {
345 // Create a clone of this inline. 345 // Create a clone of this inline.
346 RenderInline* cloneInline = clone(); 346 RenderInline* cloneInline = clone();
347 cloneInline->setContinuation(oldCont); 347 cloneInline->setContinuation(oldCont);
348 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
360 // 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
361 // them from |this| and place them in the clone. 350 // them from |this| and place them in the clone.
362 RenderObject* o = beforeChild; 351 RenderObject* o = beforeChild;
363 while (o) { 352 while (o) {
364 RenderObject* tmp = o; 353 RenderObject* tmp = o;
365 o = tmp->nextSibling(); 354 o = tmp->nextSibling();
366 cloneInline->addChildIgnoringContinuation(children()->removeChildNode(th is, tmp), 0); 355 cloneInline->addChildIgnoringContinuation(children()->removeChildNode(th is, tmp), 0);
367 tmp->setNeedsLayoutAndPrefWidthsRecalc(); 356 tmp->setNeedsLayoutAndPrefWidthsRecalc();
368 } 357 }
369 358
(...skipping 1204 matching lines...) Expand 10 before | Expand all | Expand 10 after
1574 container = this; 1563 container = this;
1575 1564
1576 FloatPoint absPos = container->localToAbsolute(); 1565 FloatPoint absPos = container->localToAbsolute();
1577 region.bounds.setX(absPos.x() + region.bounds.x()); 1566 region.bounds.setX(absPos.x() + region.bounds.x());
1578 region.bounds.setY(absPos.y() + region.bounds.y()); 1567 region.bounds.setY(absPos.y() + region.bounds.y());
1579 1568
1580 regions.append(region); 1569 regions.append(region);
1581 } 1570 }
1582 1571
1583 } // namespace WebCore 1572 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderFullScreen.cpp ('k') | Source/core/rendering/RenderVideo.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698