Title: [147440] trunk/Source/WebCore
Revision
147440
Author
hay...@chromium.org
Date
2013-04-02 09:00:28 -0700 (Tue, 02 Apr 2013)

Log Message

Report memory usage for ShadowDistributedRules.
https://bugs.webkit.org/show_bug.cgi?id=109882

Reviewed by Dimitri Glazkov.

This is a follow-up patch for r142855.

No new tests, no behavior change for layout tests.

* css/DocumentRuleSets.cpp:
(WebCore):
(WebCore::ShadowDistributedRules::reportMemoryUsage):
(WebCore::DocumentRuleSets::reportMemoryUsage):
* css/DocumentRuleSets.h:
(ShadowDistributedRules):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (147439 => 147440)


--- trunk/Source/WebCore/ChangeLog	2013-04-02 15:58:41 UTC (rev 147439)
+++ trunk/Source/WebCore/ChangeLog	2013-04-02 16:00:28 UTC (rev 147440)
@@ -1,3 +1,21 @@
+2013-04-02  Hayato Ito  <hay...@chromium.org>
+
+        Report memory usage for ShadowDistributedRules.
+        https://bugs.webkit.org/show_bug.cgi?id=109882
+
+        Reviewed by Dimitri Glazkov.
+
+        This is a follow-up patch for r142855.
+
+        No new tests, no behavior change for layout tests.
+
+        * css/DocumentRuleSets.cpp:
+        (WebCore):
+        (WebCore::ShadowDistributedRules::reportMemoryUsage):
+        (WebCore::DocumentRuleSets::reportMemoryUsage):
+        * css/DocumentRuleSets.h:
+        (ShadowDistributedRules):
+
 2013-04-02  Chris Fleizach  <cfleiz...@apple.com>
 
         AX: Need to get line thickness from fraction on web

Modified: trunk/Source/WebCore/css/DocumentRuleSets.cpp (147439 => 147440)


--- trunk/Source/WebCore/css/DocumentRuleSets.cpp	2013-04-02 15:58:41 UTC (rev 147439)
+++ trunk/Source/WebCore/css/DocumentRuleSets.cpp	2013-04-02 16:00:28 UTC (rev 147440)
@@ -55,6 +55,12 @@
     for (ShadowDistributedRuleSetMap::iterator it = m_shadowDistributedRuleSetMap.begin(); it != m_shadowDistributedRuleSetMap.end(); ++it)
         matchRequests.append(MatchRequest(it->value.get(), includeEmptyRules, it->key));
 }
+
+void ShadowDistributedRules::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
+{
+    MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
+    info.addMember(m_shadowDistributedRuleSetMap, "shadowDistributedRuleSetMap");
+}
 #endif
 
 DocumentRuleSets::DocumentRuleSets()
@@ -162,6 +168,9 @@
     info.addMember(m_features, "features");
     info.addMember(m_siblingRuleSet, "siblingRuleSet");
     info.addMember(m_uncommonAttributeRuleSet, "uncommonAttributeRuleSet");
+#if ENABLE(SHADOW_DOM)
+    info.addMember(m_shadowDistributedRules, "shadowDistributedRules");
+#endif
 }
 
 } // namespace WebCore

Modified: trunk/Source/WebCore/css/DocumentRuleSets.h (147439 => 147440)


--- trunk/Source/WebCore/css/DocumentRuleSets.h	2013-04-02 15:58:41 UTC (rev 147439)
+++ trunk/Source/WebCore/css/DocumentRuleSets.h	2013-04-02 16:00:28 UTC (rev 147440)
@@ -48,6 +48,7 @@
     void collectMatchRequests(bool includeEmptyRules, Vector<MatchRequest>&);
     void clear() { m_shadowDistributedRuleSetMap.clear(); }
     bool isEmpty() const { return m_shadowDistributedRuleSetMap.isEmpty(); }
+    void reportMemoryUsage(MemoryObjectInfo*) const;
 private:
     typedef HashMap<const ContainerNode*, OwnPtr<RuleSet> > ShadowDistributedRuleSetMap;
     ShadowDistributedRuleSetMap m_shadowDistributedRuleSetMap;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to