| Index: Source/core/html/parser/HTMLElementStack.cpp
|
| diff --git a/Source/core/html/parser/HTMLElementStack.cpp b/Source/core/html/parser/HTMLElementStack.cpp
|
| index ccbbdd87ace9cab855ba06270409954e9d0d9d5d..d20ae57d76fe72cda33e52c350b33b07579f9121 100644
|
| --- a/Source/core/html/parser/HTMLElementStack.cpp
|
| +++ b/Source/core/html/parser/HTMLElementStack.cpp
|
| @@ -119,18 +119,20 @@ inline bool isSelectScopeMarker(HTMLStackItem* item)
|
|
|
| }
|
|
|
| -HTMLElementStack::ElementRecord::ElementRecord(PassRefPtr<HTMLStackItem> item, PassOwnPtr<ElementRecord> next)
|
| +HTMLElementStack::ElementRecord::ElementRecord(PassRefPtrWillBeRawPtr<HTMLStackItem> item, PassOwnPtrWillBeRawPtr<ElementRecord> next)
|
| : m_item(item)
|
| , m_next(next)
|
| {
|
| ASSERT(m_item);
|
| }
|
|
|
| +#if !ENABLE(OILPAN)
|
| HTMLElementStack::ElementRecord::~ElementRecord()
|
| {
|
| }
|
| +#endif
|
|
|
| -void HTMLElementStack::ElementRecord::replaceElement(PassRefPtr<HTMLStackItem> item)
|
| +void HTMLElementStack::ElementRecord::replaceElement(PassRefPtrWillBeRawPtr<HTMLStackItem> item)
|
| {
|
| ASSERT(item);
|
| ASSERT(!m_item || m_item->isElementNode());
|
| @@ -147,6 +149,12 @@ bool HTMLElementStack::ElementRecord::isAbove(ElementRecord* other) const
|
| return false;
|
| }
|
|
|
| +void HTMLElementStack::ElementRecord::trace(Visitor* visitor)
|
| +{
|
| + visitor->trace(m_item);
|
| + visitor->trace(m_next);
|
| +}
|
| +
|
| HTMLElementStack::HTMLElementStack()
|
| : m_rootNode(0)
|
| , m_headElement(0)
|
| @@ -301,19 +309,19 @@ void HTMLElementStack::popUntilForeignContentScopeMarker()
|
| pop();
|
| }
|
|
|
| -void HTMLElementStack::pushRootNode(PassRefPtr<HTMLStackItem> rootItem)
|
| +void HTMLElementStack::pushRootNode(PassRefPtrWillBeRawPtr<HTMLStackItem> rootItem)
|
| {
|
| ASSERT(rootItem->isDocumentFragmentNode());
|
| pushRootNodeCommon(rootItem);
|
| }
|
|
|
| -void HTMLElementStack::pushHTMLHtmlElement(PassRefPtr<HTMLStackItem> item)
|
| +void HTMLElementStack::pushHTMLHtmlElement(PassRefPtrWillBeRawPtr<HTMLStackItem> item)
|
| {
|
| ASSERT(item->hasTagName(htmlTag));
|
| pushRootNodeCommon(item);
|
| }
|
|
|
| -void HTMLElementStack::pushRootNodeCommon(PassRefPtr<HTMLStackItem> rootItem)
|
| +void HTMLElementStack::pushRootNodeCommon(PassRefPtrWillBeRawPtr<HTMLStackItem> rootItem)
|
| {
|
| ASSERT(!m_top);
|
| ASSERT(!m_rootNode);
|
| @@ -321,7 +329,7 @@ void HTMLElementStack::pushRootNodeCommon(PassRefPtr<HTMLStackItem> rootItem)
|
| pushCommon(rootItem);
|
| }
|
|
|
| -void HTMLElementStack::pushHTMLHeadElement(PassRefPtr<HTMLStackItem> item)
|
| +void HTMLElementStack::pushHTMLHeadElement(PassRefPtrWillBeRawPtr<HTMLStackItem> item)
|
| {
|
| ASSERT(item->hasTagName(HTMLNames::headTag));
|
| ASSERT(!m_headElement);
|
| @@ -329,7 +337,7 @@ void HTMLElementStack::pushHTMLHeadElement(PassRefPtr<HTMLStackItem> item)
|
| pushCommon(item);
|
| }
|
|
|
| -void HTMLElementStack::pushHTMLBodyElement(PassRefPtr<HTMLStackItem> item)
|
| +void HTMLElementStack::pushHTMLBodyElement(PassRefPtrWillBeRawPtr<HTMLStackItem> item)
|
| {
|
| ASSERT(item->hasTagName(HTMLNames::bodyTag));
|
| ASSERT(!m_bodyElement);
|
| @@ -337,7 +345,7 @@ void HTMLElementStack::pushHTMLBodyElement(PassRefPtr<HTMLStackItem> item)
|
| pushCommon(item);
|
| }
|
|
|
| -void HTMLElementStack::push(PassRefPtr<HTMLStackItem> item)
|
| +void HTMLElementStack::push(PassRefPtrWillBeRawPtr<HTMLStackItem> item)
|
| {
|
| ASSERT(!item->hasTagName(htmlTag));
|
| ASSERT(!item->hasTagName(headTag));
|
| @@ -346,7 +354,7 @@ void HTMLElementStack::push(PassRefPtr<HTMLStackItem> item)
|
| pushCommon(item);
|
| }
|
|
|
| -void HTMLElementStack::insertAbove(PassRefPtr<HTMLStackItem> item, ElementRecord* recordBelow)
|
| +void HTMLElementStack::insertAbove(PassRefPtrWillBeRawPtr<HTMLStackItem> item, ElementRecord* recordBelow)
|
| {
|
| ASSERT(item);
|
| ASSERT(recordBelow);
|
| @@ -365,7 +373,7 @@ void HTMLElementStack::insertAbove(PassRefPtr<HTMLStackItem> item, ElementRecord
|
| continue;
|
|
|
| m_stackDepth++;
|
| - recordAbove->setNext(adoptPtr(new ElementRecord(item, recordAbove->releaseNext())));
|
| + recordAbove->setNext(adoptPtrWillBeNoop(new ElementRecord(item, recordAbove->releaseNext())));
|
| recordAbove->next()->element()->beginParsingChildren();
|
| return;
|
| }
|
| @@ -556,12 +564,12 @@ ContainerNode* HTMLElementStack::rootNode() const
|
| return m_rootNode;
|
| }
|
|
|
| -void HTMLElementStack::pushCommon(PassRefPtr<HTMLStackItem> item)
|
| +void HTMLElementStack::pushCommon(PassRefPtrWillBeRawPtr<HTMLStackItem> item)
|
| {
|
| ASSERT(m_rootNode);
|
|
|
| m_stackDepth++;
|
| - m_top = adoptPtr(new ElementRecord(item, m_top.release()));
|
| + m_top = adoptPtrWillBeNoop(new ElementRecord(item, m_top.release()));
|
| }
|
|
|
| void HTMLElementStack::popCommon()
|
| @@ -606,6 +614,11 @@ HTMLElementStack::ElementRecord* HTMLElementStack::furthestBlockForFormattingEle
|
| return 0;
|
| }
|
|
|
| +void HTMLElementStack::trace(Visitor* visitor)
|
| +{
|
| + visitor->trace(m_top);
|
| +}
|
| +
|
| #ifndef NDEBUG
|
|
|
| void HTMLElementStack::show()
|
|
|