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

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

Issue 1164923002: Enable ancient assert in LayoutTreeBuilder. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 6 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 30 matching lines...) Expand all
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 ASSERT(!node.layoutObject());
49 ASSERT(node.needsAttach()); 49 ASSERT(node.needsAttach());
50 ASSERT(node.document().inStyleRecalc()); 50 ASSERT(node.document().inStyleRecalc());
51 51 ASSERT(node.inActiveDocument());
52 // FIXME: We should be able to ASSERT(node->inActiveDocument()) but chil drenChanged is called
53 // before ChildNodeInsertionNotifier in ContainerNode's methods and some implementations
54 // will trigger a layout inside childrenChanged.
55 // Mainly HTMLTextAreaElement::childrenChanged calls HTMLTextFormControl Element::setSelectionRange
56 // which does an updateLayoutIgnorePendingStylesheets.
57 } 52 }
58 53
59 LayoutObject* nextLayoutObject() const 54 LayoutObject* nextLayoutObject() const
60 { 55 {
61 ASSERT(m_layoutObjectParent); 56 ASSERT(m_layoutObjectParent);
62 57
63 // 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.
64 if (m_layoutObjectParent->node() && m_layoutObjectParent->node()->needsA ttach()) 59 if (m_layoutObjectParent->node() && m_layoutObjectParent->node()->needsA ttach())
65 return 0; 60 return 0;
66 61
(...skipping 28 matching lines...) Expand all
95 public: 90 public:
96 LayoutTreeBuilderForText(Text& text, LayoutObject* layoutParent) 91 LayoutTreeBuilderForText(Text& text, LayoutObject* layoutParent)
97 : LayoutTreeBuilder(text, layoutParent) { } 92 : LayoutTreeBuilder(text, layoutParent) { }
98 93
99 void createLayoutObject(); 94 void createLayoutObject();
100 }; 95 };
101 96
102 } // namespace blink 97 } // namespace blink
103 98
104 #endif 99 #endif
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698