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

Unified Diff: Source/core/html/parser/HTMLTreeBuilder.h

Issue 68893014: Allocate stack item for fragment context elements once (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Get rid of PassRefPtr Created 7 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | Source/core/html/parser/HTMLTreeBuilder.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/parser/HTMLTreeBuilder.h
diff --git a/Source/core/html/parser/HTMLTreeBuilder.h b/Source/core/html/parser/HTMLTreeBuilder.h
index eab7356278ac238256f6ebb0291568ae23e0317b..60ead95f286aa17116115565aa03de634f64b7a3 100644
--- a/Source/core/html/parser/HTMLTreeBuilder.h
+++ b/Source/core/html/parser/HTMLTreeBuilder.h
@@ -169,7 +169,7 @@ private:
void defaultForAfterHead();
void defaultForInTableText();
- inline PassRefPtr<HTMLStackItem> adjustedCurrentStackItem() const;
+ inline HTMLStackItem* adjustedCurrentStackItem() const;
inline bool shouldProcessTokenInForeignContent(AtomicHTMLToken*);
void processTokenInForeignContent(AtomicHTMLToken*);
@@ -201,11 +201,12 @@ private:
~FragmentParsingContext();
DocumentFragment* fragment() const { return m_fragment; }
- Element* contextElement() const { ASSERT(m_fragment); return m_contextElement; }
+ Element* contextElement() const { ASSERT(m_fragment); return m_contextElementStackItem->element(); }
+ HTMLStackItem* contextElementStackItem() const { ASSERT(m_fragment); return m_contextElementStackItem.get(); }
private:
DocumentFragment* m_fragment;
- Element* m_contextElement;
+ RefPtr<HTMLStackItem> m_contextElementStackItem;
};
bool m_framesetOk;
« no previous file with comments | « no previous file | Source/core/html/parser/HTMLTreeBuilder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698