Title: [124435] trunk/Source/WebCore
Revision
124435
Author
[email protected]
Date
2012-08-02 03:16:31 -0700 (Thu, 02 Aug 2012)

Log Message

Web Inspector: rename reportMemoryUsage to reportDescendantMemoryUsage in StyleRuleBase descendants
https://bugs.webkit.org/show_bug.cgi?id=92966

Reviewed by Alexander Pavlov.

Renamed reportMemoryUsage to reportDescendantMemoryUsage in all descendants of
StyleRuleBase to avoid accidental recursive calls to StyleRuleBase::reportMemoryUsage
when a new type of rule is added.

* css/StyleRule.cpp:
(WebCore::StyleRuleBase::reportMemoryUsage):
(WebCore::StyleRule::reportDescendantMemoryUsage):
(WebCore::StyleRulePage::reportDescendantMemoryUsage):
(WebCore::StyleRuleFontFace::reportDescendantMemoryUsage):
(WebCore::StyleRuleBlock::reportDescendantMemoryUsage):
(WebCore::StyleRuleMedia::reportDescendantMemoryUsage):
(WebCore::StyleRuleRegion::reportDescendantMemoryUsage):
* css/StyleRule.h:
(StyleRule):
(StyleRuleFontFace):
(StyleRulePage):
(StyleRuleBlock):
(StyleRuleMedia):
(StyleRuleRegion):
* css/StyleRuleImport.cpp:
(WebCore::StyleRuleImport::reportDescendantMemoryUsage):
* css/StyleRuleImport.h:
(StyleRuleImport):
* css/WebKitCSSKeyframesRule.cpp:
(WebCore::StyleRuleKeyframes::reportDescendantMemoryUsage):
* css/WebKitCSSKeyframesRule.h:
(StyleRuleKeyframes):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (124434 => 124435)


--- trunk/Source/WebCore/ChangeLog	2012-08-02 10:14:04 UTC (rev 124434)
+++ trunk/Source/WebCore/ChangeLog	2012-08-02 10:16:31 UTC (rev 124435)
@@ -1,3 +1,38 @@
+2012-08-02  Yury Semikhatsky  <[email protected]>
+
+        Web Inspector: rename reportMemoryUsage to reportDescendantMemoryUsage in StyleRuleBase descendants
+        https://bugs.webkit.org/show_bug.cgi?id=92966
+
+        Reviewed by Alexander Pavlov.
+
+        Renamed reportMemoryUsage to reportDescendantMemoryUsage in all descendants of
+        StyleRuleBase to avoid accidental recursive calls to StyleRuleBase::reportMemoryUsage
+        when a new type of rule is added.
+
+        * css/StyleRule.cpp:
+        (WebCore::StyleRuleBase::reportMemoryUsage):
+        (WebCore::StyleRule::reportDescendantMemoryUsage):
+        (WebCore::StyleRulePage::reportDescendantMemoryUsage):
+        (WebCore::StyleRuleFontFace::reportDescendantMemoryUsage):
+        (WebCore::StyleRuleBlock::reportDescendantMemoryUsage):
+        (WebCore::StyleRuleMedia::reportDescendantMemoryUsage):
+        (WebCore::StyleRuleRegion::reportDescendantMemoryUsage):
+        * css/StyleRule.h:
+        (StyleRule):
+        (StyleRuleFontFace):
+        (StyleRulePage):
+        (StyleRuleBlock):
+        (StyleRuleMedia):
+        (StyleRuleRegion):
+        * css/StyleRuleImport.cpp:
+        (WebCore::StyleRuleImport::reportDescendantMemoryUsage):
+        * css/StyleRuleImport.h:
+        (StyleRuleImport):
+        * css/WebKitCSSKeyframesRule.cpp:
+        (WebCore::StyleRuleKeyframes::reportDescendantMemoryUsage):
+        * css/WebKitCSSKeyframesRule.h:
+        (StyleRuleKeyframes):
+
 2012-08-02  Hironori Bono  <[email protected]>
 
         [Chromium] Implement hyphenation for Chromium

Modified: trunk/Source/WebCore/css/StyleRule.cpp (124434 => 124435)


--- trunk/Source/WebCore/css/StyleRule.cpp	2012-08-02 10:14:04 UTC (rev 124434)
+++ trunk/Source/WebCore/css/StyleRule.cpp	2012-08-02 10:16:31 UTC (rev 124435)
@@ -56,27 +56,27 @@
 {
     switch (type()) {
     case Style:
-        static_cast<const StyleRule*>(this)->reportMemoryUsage(memoryObjectInfo);
+        static_cast<const StyleRule*>(this)->reportDescendantMemoryUsage(memoryObjectInfo);
         return;
     case Page:
-        static_cast<const StyleRulePage*>(this)->reportMemoryUsage(memoryObjectInfo);
+        static_cast<const StyleRulePage*>(this)->reportDescendantMemoryUsage(memoryObjectInfo);
         return;
     case FontFace:
-        static_cast<const StyleRuleFontFace*>(this)->reportMemoryUsage(memoryObjectInfo);
+        static_cast<const StyleRuleFontFace*>(this)->reportDescendantMemoryUsage(memoryObjectInfo);
         return;
     case Media:
-        static_cast<const StyleRuleMedia*>(this)->reportMemoryUsage(memoryObjectInfo);
+        static_cast<const StyleRuleMedia*>(this)->reportDescendantMemoryUsage(memoryObjectInfo);
         return;
 #if ENABLE(CSS_REGIONS)
     case Region:
-        static_cast<const StyleRuleRegion*>(this)->reportMemoryUsage(memoryObjectInfo);
+        static_cast<const StyleRuleRegion*>(this)->reportDescendantMemoryUsage(memoryObjectInfo);
         return;
 #endif
     case Import:
-        static_cast<const StyleRuleImport*>(this)->reportMemoryUsage(memoryObjectInfo);
+        static_cast<const StyleRuleImport*>(this)->reportDescendantMemoryUsage(memoryObjectInfo);
         return;
     case Keyframes:
-        static_cast<const StyleRuleKeyframes*>(this)->reportMemoryUsage(memoryObjectInfo);
+        static_cast<const StyleRuleKeyframes*>(this)->reportDescendantMemoryUsage(memoryObjectInfo);
         return;
     case Unknown:
     case Charset:
@@ -206,7 +206,7 @@
     return sizeof(StyleRule) + StylePropertySet::averageSizeInBytes();
 }
 
-void StyleRule::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
+void StyleRule::reportDescendantMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
 {
     MemoryClassInfo<StyleRule> info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
     info.addInstrumentedMember(m_properties);
@@ -269,7 +269,7 @@
     m_properties = properties;
 }
 
-void StyleRulePage::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
+void StyleRulePage::reportDescendantMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
 {
     MemoryClassInfo<StyleRulePage> info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
     info.addInstrumentedMember(m_properties);
@@ -303,7 +303,7 @@
     m_properties = properties;
 }
 
-void StyleRuleFontFace::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
+void StyleRuleFontFace::reportDescendantMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
 {
     MemoryClassInfo<StyleRuleFontFace> info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
     info.addInstrumentedMember(m_properties);
@@ -334,7 +334,7 @@
     m_childRules.remove(index);
 }
 
-void StyleRuleBlock::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
+void StyleRuleBlock::reportDescendantMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
 {
     MemoryClassInfo<StyleRuleBlock> info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
     info.addInstrumentedVector(m_childRules);
@@ -353,7 +353,7 @@
         m_mediaQueries = o.m_mediaQueries->copy();
 }
 
-void StyleRuleMedia::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
+void StyleRuleMedia::reportDescendantMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
 {
     MemoryClassInfo<StyleRuleMedia> info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
     info.addInstrumentedMember(m_mediaQueries);
@@ -371,7 +371,7 @@
 {
 }
 
-void StyleRuleRegion::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
+void StyleRuleRegion::reportDescendantMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
 {
     MemoryClassInfo<StyleRuleRegion> info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
     info.addInstrumentedMember(m_selectorList);

Modified: trunk/Source/WebCore/css/StyleRule.h (124434 => 124435)


--- trunk/Source/WebCore/css/StyleRule.h	2012-08-02 10:14:04 UTC (rev 124434)
+++ trunk/Source/WebCore/css/StyleRule.h	2012-08-02 10:16:31 UTC (rev 124435)
@@ -107,7 +107,7 @@
     PassRefPtr<StyleRule> copy() const { return adoptRef(new StyleRule(*this)); }
 
     static unsigned averageSizeInBytes();
-    void reportMemoryUsage(MemoryObjectInfo*) const;
+    void reportDescendantMemoryUsage(MemoryObjectInfo*) const;
 
 private:
     StyleRule(int sourceLine);
@@ -130,7 +130,7 @@
 
     PassRefPtr<StyleRuleFontFace> copy() const { return adoptRef(new StyleRuleFontFace(*this)); }
 
-    void reportMemoryUsage(MemoryObjectInfo*) const;
+    void reportDescendantMemoryUsage(MemoryObjectInfo*) const;
 
 private:
     StyleRuleFontFace();
@@ -155,7 +155,7 @@
 
     PassRefPtr<StyleRulePage> copy() const { return adoptRef(new StyleRulePage(*this)); }
 
-    void reportMemoryUsage(MemoryObjectInfo*) const;
+    void reportDescendantMemoryUsage(MemoryObjectInfo*) const;
 
 private:
     StyleRulePage();
@@ -172,7 +172,7 @@
     void wrapperInsertRule(unsigned, PassRefPtr<StyleRuleBase>);
     void wrapperRemoveRule(unsigned);
 
-    void reportMemoryUsage(MemoryObjectInfo*) const;
+    void reportDescendantMemoryUsage(MemoryObjectInfo*) const;
     
 protected:
     StyleRuleBlock(Type, Vector<RefPtr<StyleRuleBase> >& adoptRule);
@@ -193,7 +193,7 @@
 
     PassRefPtr<StyleRuleMedia> copy() const { return adoptRef(new StyleRuleMedia(*this)); }
 
-    void reportMemoryUsage(MemoryObjectInfo*) const;
+    void reportDescendantMemoryUsage(MemoryObjectInfo*) const;
 
 private:
     StyleRuleMedia(PassRefPtr<MediaQuerySet>, Vector<RefPtr<StyleRuleBase> >& adoptRules);
@@ -213,7 +213,7 @@
 
     PassRefPtr<StyleRuleRegion> copy() const { return adoptRef(new StyleRuleRegion(*this)); }
 
-    void reportMemoryUsage(MemoryObjectInfo*) const;
+    void reportDescendantMemoryUsage(MemoryObjectInfo*) const;
 
 private:
     StyleRuleRegion(Vector<OwnPtr<CSSParserSelector> >*, Vector<RefPtr<StyleRuleBase> >& adoptRules);

Modified: trunk/Source/WebCore/css/StyleRuleImport.cpp (124434 => 124435)


--- trunk/Source/WebCore/css/StyleRuleImport.cpp	2012-08-02 10:14:04 UTC (rev 124434)
+++ trunk/Source/WebCore/css/StyleRuleImport.cpp	2012-08-02 10:16:31 UTC (rev 124435)
@@ -128,7 +128,7 @@
     }
 }
 
-void StyleRuleImport::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
+void StyleRuleImport::reportDescendantMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
 {
     MemoryClassInfo<StyleRuleImport> info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
     info.addString(m_strHref);

Modified: trunk/Source/WebCore/css/StyleRuleImport.h (124434 => 124435)


--- trunk/Source/WebCore/css/StyleRuleImport.h	2012-08-02 10:14:04 UTC (rev 124434)
+++ trunk/Source/WebCore/css/StyleRuleImport.h	2012-08-02 10:16:31 UTC (rev 124435)
@@ -51,7 +51,7 @@
 
     void requestStyleSheet();
 
-    void reportMemoryUsage(MemoryObjectInfo*) const;
+    void reportDescendantMemoryUsage(MemoryObjectInfo*) const;
 
 private:
     // NOTE: We put the CachedStyleSheetClient in a member instead of inheriting from it

Modified: trunk/Source/WebCore/css/WebKitCSSKeyframesRule.cpp (124434 => 124435)


--- trunk/Source/WebCore/css/WebKitCSSKeyframesRule.cpp	2012-08-02 10:14:04 UTC (rev 124434)
+++ trunk/Source/WebCore/css/WebKitCSSKeyframesRule.cpp	2012-08-02 10:16:31 UTC (rev 124435)
@@ -87,7 +87,7 @@
     return -1;
 }
 
-void StyleRuleKeyframes::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
+void StyleRuleKeyframes::reportDescendantMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
 {
     MemoryClassInfo<StyleRuleKeyframes> info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
     info.addInstrumentedVector(m_keyframes);

Modified: trunk/Source/WebCore/css/WebKitCSSKeyframesRule.h (124434 => 124435)


--- trunk/Source/WebCore/css/WebKitCSSKeyframesRule.h	2012-08-02 10:14:04 UTC (rev 124434)
+++ trunk/Source/WebCore/css/WebKitCSSKeyframesRule.h	2012-08-02 10:16:31 UTC (rev 124435)
@@ -59,7 +59,7 @@
 
     PassRefPtr<StyleRuleKeyframes> copy() const { return adoptRef(new StyleRuleKeyframes(*this)); }
 
-    void reportMemoryUsage(MemoryObjectInfo*) const;
+    void reportDescendantMemoryUsage(MemoryObjectInfo*) const;
 
 private:
     StyleRuleKeyframes();
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to