Title: [99204] trunk/Source/WebCore
- Revision
- 99204
- Author
- [email protected]
- Date
- 2011-11-03 09:31:26 -0700 (Thu, 03 Nov 2011)
Log Message
CSSRuleList: Move rule orphaning from deleteRule() out to callers.
https://bugs.webkit.org/show_bug.cgi?id=71470
Patch by Andreas Kling <[email protected]> on 2011-11-03
Reviewed by Antti Koivisto.
Rule parenting is the responsibility of the owner rule (the rule containing
the rule list), so move parent clearing out of CSSRuleList::deleteRule() and
into the (two) call sites.
* css/CSSMediaRule.cpp:
(WebCore::CSSMediaRule::deleteRule):
* css/CSSRuleList.cpp:
(WebCore::CSSRuleList::deleteRule):
* css/WebKitCSSKeyframesRule.cpp:
(WebCore::WebKitCSSKeyframesRule::deleteRule):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (99203 => 99204)
--- trunk/Source/WebCore/ChangeLog 2011-11-03 16:28:29 UTC (rev 99203)
+++ trunk/Source/WebCore/ChangeLog 2011-11-03 16:31:26 UTC (rev 99204)
@@ -1,3 +1,21 @@
+2011-11-03 Andreas Kling <[email protected]>
+
+ CSSRuleList: Move rule orphaning from deleteRule() out to callers.
+ https://bugs.webkit.org/show_bug.cgi?id=71470
+
+ Reviewed by Antti Koivisto.
+
+ Rule parenting is the responsibility of the owner rule (the rule containing
+ the rule list), so move parent clearing out of CSSRuleList::deleteRule() and
+ into the (two) call sites.
+
+ * css/CSSMediaRule.cpp:
+ (WebCore::CSSMediaRule::deleteRule):
+ * css/CSSRuleList.cpp:
+ (WebCore::CSSRuleList::deleteRule):
+ * css/WebKitCSSKeyframesRule.cpp:
+ (WebCore::WebKitCSSKeyframesRule::deleteRule):
+
2011-11-03 Pavel Feldman <[email protected]>
Web Inspector: do not map scripts generated with document.write to the document resources.
Modified: trunk/Source/WebCore/css/CSSMediaRule.cpp (99203 => 99204)
--- trunk/Source/WebCore/css/CSSMediaRule.cpp 2011-11-03 16:28:29 UTC (rev 99203)
+++ trunk/Source/WebCore/css/CSSMediaRule.cpp 2011-11-03 16:31:26 UTC (rev 99204)
@@ -104,6 +104,7 @@
return;
}
+ m_lstCSSRules->item(index)->setParentRule(0);
m_lstCSSRules->deleteRule(index);
if (CSSStyleSheet* styleSheet = parentStyleSheet())
Modified: trunk/Source/WebCore/css/CSSRuleList.cpp (99203 => 99204)
--- trunk/Source/WebCore/css/CSSRuleList.cpp 2011-11-03 16:28:29 UTC (rev 99203)
+++ trunk/Source/WebCore/css/CSSRuleList.cpp 2011-11-03 16:31:26 UTC (rev 99204)
@@ -71,8 +71,6 @@
if (index >= m_lstCSSRules.size())
return;
- // FIXME: Orphaning should be the caller's responsibility.
- m_lstCSSRules[index]->setParentRule(0);
m_lstCSSRules.remove(index);
}
Modified: trunk/Source/WebCore/css/WebKitCSSKeyframesRule.cpp (99203 => 99204)
--- trunk/Source/WebCore/css/WebKitCSSKeyframesRule.cpp 2011-11-03 16:28:29 UTC (rev 99203)
+++ trunk/Source/WebCore/css/WebKitCSSKeyframesRule.cpp 2011-11-03 16:31:26 UTC (rev 99204)
@@ -104,6 +104,7 @@
if (CSSMutableStyleDeclaration* style = rule->style())
style->setParentRule(0);
+ rule->setParentRule(0);
m_lstCSSRules->deleteRule(i);
}
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes