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

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

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 10 matching lines...) Expand all
21 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 21 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
22 * Boston, MA 02110-1301, USA. 22 * Boston, MA 02110-1301, USA.
23 * 23 *
24 */ 24 */
25 25
26 #ifndef LayoutTreeBuilder_h 26 #ifndef LayoutTreeBuilder_h
27 #define LayoutTreeBuilder_h 27 #define LayoutTreeBuilder_h
28 28
29 #include "core/dom/Document.h" 29 #include "core/dom/Document.h"
30 #include "core/dom/FirstLetterPseudoElement.h" 30 #include "core/dom/FirstLetterPseudoElement.h"
31 #include "core/dom/LayoutTreeBuilderTraversal.h"
31 #include "core/dom/Node.h" 32 #include "core/dom/Node.h"
32 #include "core/dom/NodeRenderingTraversal.h"
33 #include "core/dom/Text.h" 33 #include "core/dom/Text.h"
34 #include "core/layout/LayoutObject.h" 34 #include "core/layout/LayoutObject.h"
35 #include "wtf/RefPtr.h" 35 #include "wtf/RefPtr.h"
36 36
37 namespace blink { 37 namespace blink {
38 38
39 class LayoutObject; 39 class LayoutObject;
40 class ComputedStyle; 40 class ComputedStyle;
41 41
42 template <typename NodeType> 42 template <typename NodeType>
(...skipping 18 matching lines...) Expand all
61 LayoutObject* parentLayoutObject() const { return m_layoutObjectParent; } 61 LayoutObject* parentLayoutObject() const { return m_layoutObjectParent; }
62 62
63 LayoutObject* nextLayoutObject() const 63 LayoutObject* nextLayoutObject() const
64 { 64 {
65 ASSERT(m_layoutObjectParent); 65 ASSERT(m_layoutObjectParent);
66 66
67 // Avoid an O(N^2) walk over the children when reattaching all children of a node. 67 // Avoid an O(N^2) walk over the children when reattaching all children of a node.
68 if (m_layoutObjectParent->node() && m_layoutObjectParent->node()->needsA ttach()) 68 if (m_layoutObjectParent->node() && m_layoutObjectParent->node()->needsA ttach())
69 return 0; 69 return 0;
70 70
71 return NodeRenderingTraversal::nextSiblingRenderer(*m_node); 71 return LayoutTreeBuilderTraversal::nextSiblingRenderer(*m_node);
72 } 72 }
73 73
74 RawPtrWillBeMember<NodeType> m_node; 74 RawPtrWillBeMember<NodeType> m_node;
75 RawPtrWillBeMember<LayoutObject> m_layoutObjectParent; 75 RawPtrWillBeMember<LayoutObject> m_layoutObjectParent;
76 }; 76 };
77 77
78 class LayoutTreeBuilderForElement : public LayoutTreeBuilder<Element> { 78 class LayoutTreeBuilderForElement : public LayoutTreeBuilder<Element> {
79 public: 79 public:
80 LayoutTreeBuilderForElement(Element&, ComputedStyle*); 80 LayoutTreeBuilderForElement(Element&, ComputedStyle*);
81 81
(...skipping 17 matching lines...) Expand all
99 public: 99 public:
100 LayoutTreeBuilderForText(Text& text, LayoutObject* renderingParent) 100 LayoutTreeBuilderForText(Text& text, LayoutObject* renderingParent)
101 : LayoutTreeBuilder(text, renderingParent) { } 101 : LayoutTreeBuilder(text, renderingParent) { }
102 102
103 void createLayoutObject(); 103 void createLayoutObject();
104 }; 104 };
105 105
106 } // namespace blink 106 } // namespace blink
107 107
108 #endif 108 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698