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

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

Issue 1854423002: ASSERT -> {DCHECK|DCHECK_XX}, ENABLE(ASSERT) -> DCHECK_IS_ON() in dom (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: mark svg/as-image/svg-nested.html crash on win Created 4 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
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 27 matching lines...) Expand all
38 class ComputedStyle; 38 class ComputedStyle;
39 39
40 template <typename NodeType> 40 template <typename NodeType>
41 class LayoutTreeBuilder { 41 class LayoutTreeBuilder {
42 STACK_ALLOCATED(); 42 STACK_ALLOCATED();
43 protected: 43 protected:
44 LayoutTreeBuilder(NodeType& node, LayoutObject* layoutObjectParent) 44 LayoutTreeBuilder(NodeType& node, LayoutObject* layoutObjectParent)
45 : m_node(node) 45 : m_node(node)
46 , m_layoutObjectParent(layoutObjectParent) 46 , m_layoutObjectParent(layoutObjectParent)
47 { 47 {
48 ASSERT(!node.layoutObject()); 48 DCHECK(!node.layoutObject());
49 ASSERT(node.needsAttach()); 49 DCHECK(node.needsAttach());
50 ASSERT(node.document().inStyleRecalc()); 50 DCHECK(node.document().inStyleRecalc());
51 ASSERT(node.inActiveDocument()); 51 DCHECK(node.inActiveDocument());
52 } 52 }
53 53
54 LayoutObject* nextLayoutObject() const 54 LayoutObject* nextLayoutObject() const
55 { 55 {
56 ASSERT(m_layoutObjectParent); 56 DCHECK(m_layoutObjectParent);
57 57
58 // Avoid an O(N^2) walk over the children when reattaching all children of a node. 58 // Avoid an O(N^2) walk over the children when reattaching all children of a node.
59 if (m_layoutObjectParent->node() && m_layoutObjectParent->node()->needsA ttach()) 59 if (m_layoutObjectParent->node() && m_layoutObjectParent->node()->needsA ttach())
60 return 0; 60 return 0;
61 61
62 return LayoutTreeBuilderTraversal::nextSiblingLayoutObject(*m_node); 62 return LayoutTreeBuilderTraversal::nextSiblingLayoutObject(*m_node);
63 } 63 }
64 64
65 Member<NodeType> m_node; 65 Member<NodeType> m_node;
66 LayoutObject* m_layoutObjectParent; 66 LayoutObject* m_layoutObjectParent;
(...skipping 23 matching lines...) Expand all
90 public: 90 public:
91 LayoutTreeBuilderForText(Text& text, LayoutObject* layoutParent) 91 LayoutTreeBuilderForText(Text& text, LayoutObject* layoutParent)
92 : LayoutTreeBuilder(text, layoutParent) { } 92 : LayoutTreeBuilder(text, layoutParent) { }
93 93
94 void createLayoutObject(); 94 void createLayoutObject();
95 }; 95 };
96 96
97 } // namespace blink 97 } // namespace blink
98 98
99 #endif 99 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698