Title: [139808] trunk/Source/WebCore
- Revision
- 139808
- Author
- [email protected]
- Date
- 2013-01-15 16:16:22 -0800 (Tue, 15 Jan 2013)
Log Message
Don't do indiscriminate cast & call in StylePropertySet::PropertyReference::cssName() on release builds.
https://bugs.webkit.org/show_bug.cgi?id=106867
Reviewed by Darin Adler.
Check CSSValue::isVariableValue() before casting to CSSVariableValue.
Covered by existing variables tests.
* css/StylePropertySet.cpp:
(WebCore::StylePropertySet::PropertyReference::cssName):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (139807 => 139808)
--- trunk/Source/WebCore/ChangeLog 2013-01-16 00:14:57 UTC (rev 139807)
+++ trunk/Source/WebCore/ChangeLog 2013-01-16 00:16:22 UTC (rev 139808)
@@ -1,3 +1,17 @@
+2013-01-15 Luke Macpherson <[email protected]>
+
+ Don't do indiscriminate cast & call in StylePropertySet::PropertyReference::cssName() on release builds.
+ https://bugs.webkit.org/show_bug.cgi?id=106867
+
+ Reviewed by Darin Adler.
+
+ Check CSSValue::isVariableValue() before casting to CSSVariableValue.
+
+ Covered by existing variables tests.
+
+ * css/StylePropertySet.cpp:
+ (WebCore::StylePropertySet::PropertyReference::cssName):
+
2013-01-15 Emil A Eklund <[email protected]>
[Sub pixel layout] RTL cells with padding wraps
Modified: trunk/Source/WebCore/css/StylePropertySet.cpp (139807 => 139808)
--- trunk/Source/WebCore/css/StylePropertySet.cpp 2013-01-16 00:14:57 UTC (rev 139807)
+++ trunk/Source/WebCore/css/StylePropertySet.cpp 2013-01-16 00:16:22 UTC (rev 139808)
@@ -1247,6 +1247,8 @@
#if ENABLE(CSS_VARIABLES)
if (id() == CSSPropertyVariable) {
ASSERT(propertyValue()->isVariableValue());
+ if (!propertyValue()->isVariableValue())
+ return emptyString(); // Should not happen, but if it does, avoid a bad cast.
return "-webkit-var-" + static_cast<const CSSVariableValue*>(propertyValue())->name();
}
#endif
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes