Title: [97987] trunk/Source/WebCore
- Revision
- 97987
- Author
- andreas.kl...@nokia.com
- Date
- 2011-10-20 09:41:51 -0700 (Thu, 20 Oct 2011)
Log Message
CSSMutableStyleDeclaration: Simplify setNeedsStyleRecalc().
https://bugs.webkit.org/show_bug.cgi?id=70509
Reviewed by Antti Koivisto.
We don't need to climb up the entire parent chain here to find the
Document, just grab it from the parentStyleSheet() (which will do
the climbing for us if necessary.)
* css/CSSMutableStyleDeclaration.cpp:
(WebCore::CSSMutableStyleDeclaration::setNeedsStyleRecalc):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (97986 => 97987)
--- trunk/Source/WebCore/ChangeLog 2011-10-20 16:33:04 UTC (rev 97986)
+++ trunk/Source/WebCore/ChangeLog 2011-10-20 16:41:51 UTC (rev 97987)
@@ -1,5 +1,19 @@
2011-10-20 Andreas Kling <kl...@webkit.org>
+ CSSMutableStyleDeclaration: Simplify setNeedsStyleRecalc().
+ https://bugs.webkit.org/show_bug.cgi?id=70509
+
+ Reviewed by Antti Koivisto.
+
+ We don't need to climb up the entire parent chain here to find the
+ Document, just grab it from the parentStyleSheet() (which will do
+ the climbing for us if necessary.)
+
+ * css/CSSMutableStyleDeclaration.cpp:
+ (WebCore::CSSMutableStyleDeclaration::setNeedsStyleRecalc):
+
+2011-10-20 Andreas Kling <kl...@webkit.org>
+
CSSStyleDeclaration: Remove inheritance from StyleBase.
https://bugs.webkit.org/show_bug.cgi?id=70411
Modified: trunk/Source/WebCore/css/CSSMutableStyleDeclaration.cpp (97986 => 97987)
--- trunk/Source/WebCore/css/CSSMutableStyleDeclaration.cpp 2011-10-20 16:33:04 UTC (rev 97986)
+++ trunk/Source/WebCore/css/CSSMutableStyleDeclaration.cpp 2011-10-20 16:41:51 UTC (rev 97987)
@@ -519,14 +519,8 @@
return;
}
- if (!parentStyleSheet())
- return;
-
- StyleBase* root = parentStyleSheet();
- while (StyleBase* parent = root->parent())
- root = parent;
- if (root->isCSSStyleSheet()) {
- if (Document* document = static_cast<CSSStyleSheet*>(root)->document())
+ if (CSSStyleSheet* styleSheet = parentStyleSheet()) {
+ if (Document* document = styleSheet->document())
document->styleSelectorChanged(DeferRecalcStyle);
}
}
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes