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

Unified Diff: Source/core/css/resolver/ScopedStyleResolver.h

Issue 415743005: Move ScopedStyleResolver and ScopedStyleTree to oilpan's heap (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: Source/core/css/resolver/ScopedStyleResolver.h
diff --git a/Source/core/css/resolver/ScopedStyleResolver.h b/Source/core/css/resolver/ScopedStyleResolver.h
index 6efaf5560615945f768905e01a20572eebdb8937..f58e2aaa43d3222047d949b63a6dc0830655baac 100644
--- a/Source/core/css/resolver/ScopedStyleResolver.h
+++ b/Source/core/css/resolver/ScopedStyleResolver.h
@@ -44,18 +44,19 @@ class StyleResolver;
class StyleSheetContents;
// This class selects a RenderStyle for a given element based on a collection of stylesheets.
-class ScopedStyleResolver {
- WTF_MAKE_NONCOPYABLE(ScopedStyleResolver); WTF_MAKE_FAST_ALLOCATED;
+class ScopedStyleResolver FINAL : public NoBaseWillBeGarbageCollected<ScopedStyleResolver> {
+ WTF_MAKE_NONCOPYABLE(ScopedStyleResolver);
+ WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED;
public:
- static PassOwnPtr<ScopedStyleResolver> create(TreeScope& scope)
+ static PassOwnPtrWillBeRawPtr<ScopedStyleResolver> create(TreeScope& scope)
{
- return adoptPtr(new ScopedStyleResolver(scope));
+ return adoptPtrWillBeNoop(new ScopedStyleResolver(scope));
}
static ContainerNode* scopingNodeFor(Document&, const CSSStyleSheet*);
- const ContainerNode& scopingNode() const { return m_scope.rootNode(); }
- const TreeScope& treeScope() const { return m_scope; }
+ const ContainerNode& scopingNode() const { return m_scope->rootNode(); }
+ const TreeScope& treeScope() const { return *m_scope; }
ScopedStyleResolver* parent() const;
public:
@@ -69,17 +70,19 @@ public:
void resetAuthorStyle();
void collectViewportRulesTo(StyleResolver*) const;
+ void trace(Visitor*);
+
private:
explicit ScopedStyleResolver(TreeScope& scope)
: m_scope(scope)
{
}
- TreeScope& m_scope;
+ RawPtrWillBeMember<TreeScope> m_scope;
- WillBePersistentHeapVector<RawPtrWillBeMember<CSSStyleSheet> > m_authorStyleSheets;
+ WillBeHeapVector<RawPtrWillBeMember<CSSStyleSheet> > m_authorStyleSheets;
- typedef WillBePersistentHeapHashMap<const StringImpl*, RefPtrWillBeMember<StyleRuleKeyframes> > KeyframesRuleMap;
+ typedef WillBeHeapHashMap<const StringImpl*, RefPtrWillBeMember<StyleRuleKeyframes> > KeyframesRuleMap;
KeyframesRuleMap m_keyframesRuleMap;
};

Powered by Google App Engine
This is Rietveld 408576698