OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010 Google, Inc. All Rights Reserved. | 2 * Copyright (C) 2010 Google, Inc. All Rights Reserved. |
3 * Copyright (C) 2011 Apple Inc. All rights reserved. | 3 * Copyright (C) 2011 Apple Inc. All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 | 74 |
75 Member<HTMLStackItem> m_item; | 75 Member<HTMLStackItem> m_item; |
76 Member<ElementRecord> m_next; | 76 Member<ElementRecord> m_next; |
77 }; | 77 }; |
78 | 78 |
79 unsigned stackDepth() const { return m_stackDepth; } | 79 unsigned stackDepth() const { return m_stackDepth; } |
80 | 80 |
81 // Inlining this function is a (small) performance win on the parsing | 81 // Inlining this function is a (small) performance win on the parsing |
82 // benchmark. | 82 // benchmark. |
83 Element* top() const { | 83 Element* top() const { |
84 ASSERT(m_top->element()); | 84 DCHECK(m_top->element()); |
85 return m_top->element(); | 85 return m_top->element(); |
86 } | 86 } |
87 | 87 |
88 ContainerNode* topNode() const { | 88 ContainerNode* topNode() const { |
89 ASSERT(m_top->node()); | 89 DCHECK(m_top->node()); |
90 return m_top->node(); | 90 return m_top->node(); |
91 } | 91 } |
92 | 92 |
93 HTMLStackItem* topStackItem() const { | 93 HTMLStackItem* topStackItem() const { |
94 ASSERT(m_top->stackItem()); | 94 DCHECK(m_top->stackItem()); |
95 return m_top->stackItem(); | 95 return m_top->stackItem(); |
96 } | 96 } |
97 | 97 |
98 HTMLStackItem* oneBelowTop() const; | 98 HTMLStackItem* oneBelowTop() const; |
99 ElementRecord* topRecord() const; | 99 ElementRecord* topRecord() const; |
100 ElementRecord* find(Element*) const; | 100 ElementRecord* find(Element*) const; |
101 ElementRecord* furthestBlockForFormattingElement(Element*) const; | 101 ElementRecord* furthestBlockForFormattingElement(Element*) const; |
102 ElementRecord* topmost(const AtomicString& tagName) const; | 102 ElementRecord* topmost(const AtomicString& tagName) const; |
103 | 103 |
104 void insertAbove(HTMLStackItem*, ElementRecord*); | 104 void insertAbove(HTMLStackItem*, ElementRecord*); |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
189 Member<Element> m_headElement; | 189 Member<Element> m_headElement; |
190 Member<Element> m_bodyElement; | 190 Member<Element> m_bodyElement; |
191 unsigned m_stackDepth; | 191 unsigned m_stackDepth; |
192 }; | 192 }; |
193 | 193 |
194 WILL_NOT_BE_EAGERLY_TRACED_CLASS(HTMLElementStack::ElementRecord); | 194 WILL_NOT_BE_EAGERLY_TRACED_CLASS(HTMLElementStack::ElementRecord); |
195 | 195 |
196 } // namespace blink | 196 } // namespace blink |
197 | 197 |
198 #endif // HTMLElementStack_h | 198 #endif // HTMLElementStack_h |
OLD | NEW |