Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(286)

Side by Side Diff: Source/core/dom/LayoutTreeBuilder.cpp

Issue 1086873002: Rename NodeRenderingTraversal to LayoutTreeBuilderTraversal (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
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(!isActiveInsertionPoint(element));
52 if (element.isFirstLetterPseudoElement()) { 52 if (element.isFirstLetterPseudoElement()) {
53 if (LayoutObject* nextLayoutObject = FirstLetterPseudoElement::firstLett erTextRenderer(element)) 53 if (LayoutObject* nextLayoutObject = FirstLetterPseudoElement::firstLett erTextRenderer(element))
54 m_layoutObjectParent = nextLayoutObject->parent(); 54 m_layoutObjectParent = nextLayoutObject->parent();
55 } else if (ContainerNode* containerNode = NodeRenderingTraversal::parent(ele ment)) { 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 {
62 ASSERT(m_layoutObjectParent); 62 ASSERT(m_layoutObjectParent);
63 63
64 if (m_node->isInTopLayer()) 64 if (m_node->isInTopLayer())
65 return NodeRenderingTraversal::nextInTopLayer(*m_node); 65 return LayoutTreeBuilderTraversal::nextInTopLayer(*m_node);
66 66
67 if (m_node->isFirstLetterPseudoElement()) 67 if (m_node->isFirstLetterPseudoElement())
68 return FirstLetterPseudoElement::firstLetterTextRenderer(*m_node); 68 return FirstLetterPseudoElement::firstLetterTextRenderer(*m_node);
69 69
70 return LayoutTreeBuilder::nextLayoutObject(); 70 return LayoutTreeBuilder::nextLayoutObject();
71 } 71 }
72 72
73 LayoutObject* LayoutTreeBuilderForElement::parentLayoutObject() const 73 LayoutObject* LayoutTreeBuilderForElement::parentLayoutObject() const
74 { 74 {
75 LayoutObject* parentLayoutObject = LayoutTreeBuilder::parentLayoutObject(); 75 LayoutObject* parentLayoutObject = LayoutTreeBuilder::parentLayoutObject();
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 newLayoutObject->setFlowThreadState(parentLayoutObject->flowThreadState()); 166 newLayoutObject->setFlowThreadState(parentLayoutObject->flowThreadState());
167 167
168 LayoutObject* nextLayoutObject = this->nextLayoutObject(); 168 LayoutObject* nextLayoutObject = this->nextLayoutObject();
169 m_node->setLayoutObject(newLayoutObject); 169 m_node->setLayoutObject(newLayoutObject);
170 // Parent takes care of the animations, no need to call setAnimatableStyle. 170 // Parent takes care of the animations, no need to call setAnimatableStyle.
171 newLayoutObject->setStyle(&style); 171 newLayoutObject->setStyle(&style);
172 parentLayoutObject->addChild(newLayoutObject, nextLayoutObject); 172 parentLayoutObject->addChild(newLayoutObject, nextLayoutObject);
173 } 173 }
174 174
175 } 175 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698