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

Side by Side Diff: Source/core/html/parser/HTMLElementStack.cpp

Issue 932403002: InlinedVisitor: Migrate html to use inlined tracing (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 10 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) 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 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 142
143 bool HTMLElementStack::ElementRecord::isAbove(ElementRecord* other) const 143 bool HTMLElementStack::ElementRecord::isAbove(ElementRecord* other) const
144 { 144 {
145 for (ElementRecord* below = next(); below; below = below->next()) { 145 for (ElementRecord* below = next(); below; below = below->next()) {
146 if (below == other) 146 if (below == other)
147 return true; 147 return true;
148 } 148 }
149 return false; 149 return false;
150 } 150 }
151 151
152 void HTMLElementStack::ElementRecord::trace(Visitor* visitor) 152 DEFINE_TRACE(HTMLElementStack::ElementRecord)
153 { 153 {
154 #if ENABLE(OILPAN) 154 #if ENABLE(OILPAN)
155 visitor->trace(m_item); 155 visitor->trace(m_item);
156 visitor->trace(m_next); 156 visitor->trace(m_next);
157 #endif 157 #endif
158 } 158 }
159 159
160 HTMLElementStack::HTMLElementStack() 160 HTMLElementStack::HTMLElementStack()
161 : m_rootNode(nullptr) 161 : m_rootNode(nullptr)
162 , m_headElement(nullptr) 162 , m_headElement(nullptr)
(...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after
609 for (ElementRecord* pos = m_top.get(); pos; pos = pos->next()) { 609 for (ElementRecord* pos = m_top.get(); pos; pos = pos->next()) {
610 if (pos->element() == formattingElement) 610 if (pos->element() == formattingElement)
611 return furthestBlock; 611 return furthestBlock;
612 if (pos->stackItem()->isSpecialNode()) 612 if (pos->stackItem()->isSpecialNode())
613 furthestBlock = pos; 613 furthestBlock = pos;
614 } 614 }
615 ASSERT_NOT_REACHED(); 615 ASSERT_NOT_REACHED();
616 return nullptr; 616 return nullptr;
617 } 617 }
618 618
619 void HTMLElementStack::trace(Visitor* visitor) 619 DEFINE_TRACE(HTMLElementStack)
620 { 620 {
621 visitor->trace(m_top); 621 visitor->trace(m_top);
622 visitor->trace(m_rootNode); 622 visitor->trace(m_rootNode);
623 visitor->trace(m_headElement); 623 visitor->trace(m_headElement);
624 visitor->trace(m_bodyElement); 624 visitor->trace(m_bodyElement);
625 } 625 }
626 626
627 #ifndef NDEBUG 627 #ifndef NDEBUG
628 628
629 void HTMLElementStack::show() 629 void HTMLElementStack::show()
630 { 630 {
631 for (ElementRecord* record = m_top.get(); record; record = record->next()) 631 for (ElementRecord* record = m_top.get(); record; record = record->next())
632 record->element()->showNode(); 632 record->element()->showNode();
633 } 633 }
634 634
635 #endif 635 #endif
636 636
637 } 637 }
OLDNEW
« no previous file with comments | « Source/core/html/parser/HTMLElementStack.h ('k') | Source/core/html/parser/HTMLFormattingElementList.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698