| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |