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 * (C) 2001 Dirk Mueller (mueller@kde.org) | 4 * (C) 2001 Dirk Mueller (mueller@kde.org) |
5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r
ights reserved. | 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r
ights reserved. |
6 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) | 6 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) |
7 * Copyright (C) 2011 Google Inc. All rights reserved. | 7 * Copyright (C) 2011 Google Inc. All rights reserved. |
8 * | 8 * |
9 * This library is free software; you can redistribute it and/or | 9 * This library is free software; you can redistribute it and/or |
10 * modify it under the terms of the GNU Library General Public | 10 * modify it under the terms of the GNU Library General Public |
(...skipping 16 matching lines...) Expand all Loading... |
27 #include "core/dom/RenderTreeBuilder.h" | 27 #include "core/dom/RenderTreeBuilder.h" |
28 | 28 |
29 #include "HTMLNames.h" | 29 #include "HTMLNames.h" |
30 #include "RuntimeEnabledFeatures.h" | 30 #include "RuntimeEnabledFeatures.h" |
31 #include "SVGNames.h" | 31 #include "SVGNames.h" |
32 #include "core/css/resolver/StyleResolver.h" | 32 #include "core/css/resolver/StyleResolver.h" |
33 #include "core/dom/FullscreenElementStack.h" | 33 #include "core/dom/FullscreenElementStack.h" |
34 #include "core/dom/Node.h" | 34 #include "core/dom/Node.h" |
35 #include "core/dom/Text.h" | 35 #include "core/dom/Text.h" |
36 #include "core/rendering/FlowThreadController.h" | 36 #include "core/rendering/FlowThreadController.h" |
37 #include "core/rendering/RenderFullScreen.h" | |
38 #include "core/rendering/RenderNamedFlowThread.h" | 37 #include "core/rendering/RenderNamedFlowThread.h" |
39 #include "core/rendering/RenderObject.h" | 38 #include "core/rendering/RenderObject.h" |
40 #include "core/rendering/RenderText.h" | 39 #include "core/rendering/RenderText.h" |
41 #include "core/rendering/RenderView.h" | 40 #include "core/rendering/RenderView.h" |
42 #include "core/svg/SVGElement.h" | 41 #include "core/svg/SVGElement.h" |
43 | 42 |
44 namespace WebCore { | 43 namespace WebCore { |
45 | 44 |
46 RenderObject* RenderTreeBuilder::nextRenderer() const | 45 RenderObject* RenderTreeBuilder::nextRenderer() const |
47 { | 46 { |
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
224 return; | 223 return; |
225 } | 224 } |
226 | 225 |
227 // Make sure the RenderObject already knows it is going to be added to a Ren
derFlowThread before we set the style | 226 // Make sure the RenderObject already knows it is going to be added to a Ren
derFlowThread before we set the style |
228 // for the first time. Otherwise code using inRenderFlowThread() in the styl
eWillChange and styleDidChange will fail. | 227 // for the first time. Otherwise code using inRenderFlowThread() in the styl
eWillChange and styleDidChange will fail. |
229 newRenderer->setFlowThreadState(parentRenderer->flowThreadState()); | 228 newRenderer->setFlowThreadState(parentRenderer->flowThreadState()); |
230 | 229 |
231 RenderObject* nextRenderer = this->nextRenderer(); | 230 RenderObject* nextRenderer = this->nextRenderer(); |
232 element->setRenderer(newRenderer); | 231 element->setRenderer(newRenderer); |
233 newRenderer->setAnimatableStyle(&style); // setAnimatableStyle() can depend
on renderer() already being set. | 232 newRenderer->setAnimatableStyle(&style); // setAnimatableStyle() can depend
on renderer() already being set. |
234 | |
235 if (FullscreenElementStack::isActiveFullScreenElement(element)) { | |
236 newRenderer = RenderFullScreen::wrapRenderer(newRenderer, parentRenderer
, &element->document()); | |
237 if (!newRenderer) | |
238 return; | |
239 } | |
240 | |
241 // Note: Adding newRenderer instead of renderer(). renderer() may be a child
of newRenderer. | |
242 parentRenderer->addChild(newRenderer, nextRenderer); | 233 parentRenderer->addChild(newRenderer, nextRenderer); |
243 } | 234 } |
244 | 235 |
245 void RenderTreeBuilder::createRendererForTextIfNeeded() | 236 void RenderTreeBuilder::createRendererForTextIfNeeded() |
246 { | 237 { |
247 ASSERT(!m_node->renderer()); | 238 ASSERT(!m_node->renderer()); |
248 | 239 |
249 // If we're out of composition then we can't render since there's no parent
to inherit from. | 240 // If we're out of composition then we can't render since there's no parent
to inherit from. |
250 if (!m_renderingParent) | 241 if (!m_renderingParent) |
251 return; | 242 return; |
(...skipping 23 matching lines...) Expand all Loading... |
275 newRenderer->setFlowThreadState(parentRenderer->flowThreadState()); | 266 newRenderer->setFlowThreadState(parentRenderer->flowThreadState()); |
276 | 267 |
277 RenderObject* nextRenderer = this->nextRenderer(); | 268 RenderObject* nextRenderer = this->nextRenderer(); |
278 textNode->setRenderer(newRenderer); | 269 textNode->setRenderer(newRenderer); |
279 // Parent takes care of the animations, no need to call setAnimatableStyle. | 270 // Parent takes care of the animations, no need to call setAnimatableStyle. |
280 newRenderer->setStyle(m_style.release()); | 271 newRenderer->setStyle(m_style.release()); |
281 parentRenderer->addChild(newRenderer, nextRenderer); | 272 parentRenderer->addChild(newRenderer, nextRenderer); |
282 } | 273 } |
283 | 274 |
284 } | 275 } |
OLD | NEW |