Title: [137984] trunk/Source/WebCore
- Revision
- 137984
- Author
- [email protected]
- Date
- 2012-12-17 21:35:34 -0800 (Mon, 17 Dec 2012)
Log Message
Add ASSERTions to ensure that CSSPropertys that are variables only ever refer to CSSValues that are variables.
https://bugs.webkit.org/show_bug.cgi?id=104876
Reviewed by Steve Block.
Add assertions to CSSProperty constructors to make that if it is initialized with CSSPropertyVariable that
the value type associated with it is also a variable. This is already asserted at read time, but ASSERTing
here will produce a more useful backtrace.
No new tests as functionality unchanged.
* css/CSSProperty.h:
(WebCore::CSSProperty::CSSProperty):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (137983 => 137984)
--- trunk/Source/WebCore/ChangeLog 2012-12-18 05:30:10 UTC (rev 137983)
+++ trunk/Source/WebCore/ChangeLog 2012-12-18 05:35:34 UTC (rev 137984)
@@ -1,3 +1,19 @@
+2012-12-17 Luke Macpherson <[email protected]>
+
+ Add ASSERTions to ensure that CSSPropertys that are variables only ever refer to CSSValues that are variables.
+ https://bugs.webkit.org/show_bug.cgi?id=104876
+
+ Reviewed by Steve Block.
+
+ Add assertions to CSSProperty constructors to make that if it is initialized with CSSPropertyVariable that
+ the value type associated with it is also a variable. This is already asserted at read time, but ASSERTing
+ here will produce a more useful backtrace.
+
+ No new tests as functionality unchanged.
+
+ * css/CSSProperty.h:
+ (WebCore::CSSProperty::CSSProperty):
+
2012-12-17 Vsevolod Vlasov <[email protected]>
Web Inspector: Make inspector scripts sourceURL absolute.
Modified: trunk/Source/WebCore/css/CSSProperty.h (137983 => 137984)
--- trunk/Source/WebCore/css/CSSProperty.h 2012-12-18 05:30:10 UTC (rev 137983)
+++ trunk/Source/WebCore/css/CSSProperty.h 2012-12-18 05:35:34 UTC (rev 137984)
@@ -57,6 +57,9 @@
: m_metadata(propertyID, shorthandID, important, implicit, isInheritedProperty(propertyID))
, m_value(value)
{
+#if ENABLE(CSS_VARIABLES)
+ ASSERT((propertyID == CSSPropertyVariable) == (m_value && m_value->isVariableValue()));
+#endif
}
// FIXME: Remove this.
@@ -64,6 +67,9 @@
: m_metadata(metadata)
, m_value(value)
{
+#if ENABLE(CSS_VARIABLES)
+ ASSERT((metadata.m_propertyID == CSSPropertyVariable) == (m_value && m_value->isVariableValue()));
+#endif
}
CSSPropertyID id() const { return static_cast<CSSPropertyID>(m_metadata.m_propertyID); }
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes