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 30 matching lines...) Expand all Loading... |
41 #include "core/layout/LayoutView.h" | 41 #include "core/layout/LayoutView.h" |
42 #include "core/svg/SVGElement.h" | 42 #include "core/svg/SVGElement.h" |
43 #include "platform/RuntimeEnabledFeatures.h" | 43 #include "platform/RuntimeEnabledFeatures.h" |
44 | 44 |
45 namespace blink { | 45 namespace blink { |
46 | 46 |
47 LayoutTreeBuilderForElement::LayoutTreeBuilderForElement(Element& element, Compu
tedStyle* style) | 47 LayoutTreeBuilderForElement::LayoutTreeBuilderForElement(Element& element, Compu
tedStyle* style) |
48 : LayoutTreeBuilder(element, nullptr) | 48 : LayoutTreeBuilder(element, nullptr) |
49 , m_style(style) | 49 , m_style(style) |
50 { | 50 { |
51 ASSERT(!isActiveInsertionPoint(element)); | 51 ASSERT(!element.isSlotOrActiveInsertionPoint()); |
52 if (element.isFirstLetterPseudoElement()) { | 52 if (element.isFirstLetterPseudoElement()) { |
53 if (LayoutObject* nextLayoutObject = FirstLetterPseudoElement::firstLett
erTextLayoutObject(element)) | 53 if (LayoutObject* nextLayoutObject = FirstLetterPseudoElement::firstLett
erTextLayoutObject(element)) |
54 m_layoutObjectParent = nextLayoutObject->parent(); | 54 m_layoutObjectParent = nextLayoutObject->parent(); |
55 } else if (ContainerNode* containerNode = LayoutTreeBuilderTraversal::parent
(element)) { | 55 } else if (ContainerNode* containerNode = LayoutTreeBuilderTraversal::parent
(element)) { |
56 m_layoutObjectParent = containerNode->layoutObject(); | 56 m_layoutObjectParent = containerNode->layoutObject(); |
57 } | 57 } |
58 } | 58 } |
59 | 59 |
60 LayoutObject* LayoutTreeBuilderForElement::nextLayoutObject() const | 60 LayoutObject* LayoutTreeBuilderForElement::nextLayoutObject() const |
61 { | 61 { |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
163 newLayoutObject->setIsInsideFlowThread(m_layoutObjectParent->isInsideFlowThr
ead()); | 163 newLayoutObject->setIsInsideFlowThread(m_layoutObjectParent->isInsideFlowThr
ead()); |
164 | 164 |
165 LayoutObject* nextLayoutObject = this->nextLayoutObject(); | 165 LayoutObject* nextLayoutObject = this->nextLayoutObject(); |
166 m_node->setLayoutObject(newLayoutObject); | 166 m_node->setLayoutObject(newLayoutObject); |
167 // Parent takes care of the animations, no need to call setAnimatableStyle. | 167 // Parent takes care of the animations, no need to call setAnimatableStyle. |
168 newLayoutObject->setStyle(&style); | 168 newLayoutObject->setStyle(&style); |
169 m_layoutObjectParent->addChild(newLayoutObject, nextLayoutObject); | 169 m_layoutObjectParent->addChild(newLayoutObject, nextLayoutObject); |
170 } | 170 } |
171 | 171 |
172 } | 172 } |
OLD | NEW |