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 18 matching lines...) Expand all Loading... |
29 #include "core/HTMLNames.h" | 29 #include "core/HTMLNames.h" |
30 #include "core/SVGNames.h" | 30 #include "core/SVGNames.h" |
31 #include "core/css/resolver/StyleResolver.h" | 31 #include "core/css/resolver/StyleResolver.h" |
32 #include "core/dom/FirstLetterPseudoElement.h" | 32 #include "core/dom/FirstLetterPseudoElement.h" |
33 #include "core/dom/Fullscreen.h" | 33 #include "core/dom/Fullscreen.h" |
34 #include "core/dom/Node.h" | 34 #include "core/dom/Node.h" |
35 #include "core/dom/PseudoElement.h" | 35 #include "core/dom/PseudoElement.h" |
36 #include "core/dom/Text.h" | 36 #include "core/dom/Text.h" |
37 #include "core/layout/LayoutFullScreen.h" | 37 #include "core/layout/LayoutFullScreen.h" |
38 #include "core/layout/LayoutObject.h" | 38 #include "core/layout/LayoutObject.h" |
| 39 #include "core/layout/LayoutText.h" |
39 #include "core/layout/LayoutView.h" | 40 #include "core/layout/LayoutView.h" |
40 #include "core/rendering/RenderText.h" | |
41 #include "core/svg/SVGElement.h" | 41 #include "core/svg/SVGElement.h" |
42 #include "platform/RuntimeEnabledFeatures.h" | 42 #include "platform/RuntimeEnabledFeatures.h" |
43 | 43 |
44 namespace blink { | 44 namespace blink { |
45 | 45 |
46 RenderTreeBuilderForElement::RenderTreeBuilderForElement(Element& element, Layou
tStyle* style) | 46 RenderTreeBuilderForElement::RenderTreeBuilderForElement(Element& element, Layou
tStyle* style) |
47 : RenderTreeBuilder(element, nullptr) | 47 : RenderTreeBuilder(element, nullptr) |
48 , m_style(style) | 48 , m_style(style) |
49 { | 49 { |
50 if (element.isFirstLetterPseudoElement()) { | 50 if (element.isFirstLetterPseudoElement()) { |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 parentRenderer->addChild(newRenderer, nextRenderer); | 146 parentRenderer->addChild(newRenderer, nextRenderer); |
147 } | 147 } |
148 | 148 |
149 void RenderTreeBuilderForText::createRenderer() | 149 void RenderTreeBuilderForText::createRenderer() |
150 { | 150 { |
151 LayoutObject* parentRenderer = this->parentRenderer(); | 151 LayoutObject* parentRenderer = this->parentRenderer(); |
152 LayoutStyle* style = parentRenderer->style(); | 152 LayoutStyle* style = parentRenderer->style(); |
153 | 153 |
154 ASSERT(m_node->textRendererIsNeeded(*style, *parentRenderer)); | 154 ASSERT(m_node->textRendererIsNeeded(*style, *parentRenderer)); |
155 | 155 |
156 RenderText* newRenderer = m_node->createTextRenderer(style); | 156 LayoutText* newRenderer = m_node->createTextRenderer(style); |
157 if (!parentRenderer->isChildAllowed(newRenderer, *style)) { | 157 if (!parentRenderer->isChildAllowed(newRenderer, *style)) { |
158 newRenderer->destroy(); | 158 newRenderer->destroy(); |
159 return; | 159 return; |
160 } | 160 } |
161 | 161 |
162 // Make sure the LayoutObject already knows it is going to be added to a Lay
outFlowThread before we set the style | 162 // Make sure the LayoutObject already knows it is going to be added to a Lay
outFlowThread before we set the style |
163 // for the first time. Otherwise code using inLayoutFlowThread() in the styl
eWillChange and styleDidChange will fail. | 163 // for the first time. Otherwise code using inLayoutFlowThread() in the styl
eWillChange and styleDidChange will fail. |
164 newRenderer->setFlowThreadState(parentRenderer->flowThreadState()); | 164 newRenderer->setFlowThreadState(parentRenderer->flowThreadState()); |
165 | 165 |
166 LayoutObject* nextRenderer = this->nextRenderer(); | 166 LayoutObject* nextRenderer = this->nextRenderer(); |
167 m_node->setRenderer(newRenderer); | 167 m_node->setRenderer(newRenderer); |
168 // Parent takes care of the animations, no need to call setAnimatableStyle. | 168 // Parent takes care of the animations, no need to call setAnimatableStyle. |
169 newRenderer->setStyle(style); | 169 newRenderer->setStyle(style); |
170 parentRenderer->addChild(newRenderer, nextRenderer); | 170 parentRenderer->addChild(newRenderer, nextRenderer); |
171 } | 171 } |
172 | 172 |
173 } | 173 } |
OLD | NEW |