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 14 matching lines...) Expand all Loading... |
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" | |
36 #include "core/rendering/RenderGeometryMap.h" | 35 #include "core/rendering/RenderGeometryMap.h" |
37 #include "core/rendering/RenderLayer.h" | 36 #include "core/rendering/RenderLayer.h" |
38 #include "core/rendering/RenderTheme.h" | 37 #include "core/rendering/RenderTheme.h" |
39 #include "core/rendering/RenderView.h" | 38 #include "core/rendering/RenderView.h" |
40 #include "core/rendering/style/StyleInheritedData.h" | 39 #include "core/rendering/style/StyleInheritedData.h" |
41 #include "platform/geometry/FloatQuad.h" | 40 #include "platform/geometry/FloatQuad.h" |
42 #include "platform/geometry/TransformState.h" | 41 #include "platform/geometry/TransformState.h" |
43 #include "platform/graphics/GraphicsContext.h" | 42 #include "platform/graphics/GraphicsContext.h" |
44 | 43 |
45 using namespace std; | 44 using namespace std; |
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
339 } | 338 } |
340 | 339 |
341 void RenderInline::splitInlines(RenderBlock* fromBlock, RenderBlock* toBlock, | 340 void RenderInline::splitInlines(RenderBlock* fromBlock, RenderBlock* toBlock, |
342 RenderBlock* middleBlock, | 341 RenderBlock* middleBlock, |
343 RenderObject* beforeChild, RenderBoxModelObject*
oldCont) | 342 RenderObject* beforeChild, RenderBoxModelObject*
oldCont) |
344 { | 343 { |
345 // Create a clone of this inline. | 344 // Create a clone of this inline. |
346 RenderInline* cloneInline = clone(); | 345 RenderInline* cloneInline = clone(); |
347 cloneInline->setContinuation(oldCont); | 346 cloneInline->setContinuation(oldCont); |
348 | 347 |
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 | 348 // Now take all of the children from beforeChild to the end and remove |
361 // them from |this| and place them in the clone. | 349 // them from |this| and place them in the clone. |
362 RenderObject* o = beforeChild; | 350 RenderObject* o = beforeChild; |
363 while (o) { | 351 while (o) { |
364 RenderObject* tmp = o; | 352 RenderObject* tmp = o; |
365 o = tmp->nextSibling(); | 353 o = tmp->nextSibling(); |
366 cloneInline->addChildIgnoringContinuation(children()->removeChildNode(th
is, tmp), 0); | 354 cloneInline->addChildIgnoringContinuation(children()->removeChildNode(th
is, tmp), 0); |
367 tmp->setNeedsLayoutAndPrefWidthsRecalc(); | 355 tmp->setNeedsLayoutAndPrefWidthsRecalc(); |
368 } | 356 } |
369 | 357 |
(...skipping 1204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1574 container = this; | 1562 container = this; |
1575 | 1563 |
1576 FloatPoint absPos = container->localToAbsolute(); | 1564 FloatPoint absPos = container->localToAbsolute(); |
1577 region.bounds.setX(absPos.x() + region.bounds.x()); | 1565 region.bounds.setX(absPos.x() + region.bounds.x()); |
1578 region.bounds.setY(absPos.y() + region.bounds.y()); | 1566 region.bounds.setY(absPos.y() + region.bounds.y()); |
1579 | 1567 |
1580 regions.append(region); | 1568 regions.append(region); |
1581 } | 1569 } |
1582 | 1570 |
1583 } // namespace WebCore | 1571 } // namespace WebCore |
OLD | NEW |