Title: [137569] trunk/Source/WebCore
- Revision
- 137569
- Author
- [email protected]
- Date
- 2012-12-12 22:15:10 -0800 (Wed, 12 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 (137568 => 137569)
--- trunk/Source/WebCore/ChangeLog 2012-12-13 05:51:43 UTC (rev 137568)
+++ trunk/Source/WebCore/ChangeLog 2012-12-13 06:15:10 UTC (rev 137569)
@@ -1,3 +1,19 @@
+2012-12-12 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-12 Gyuyoung Kim <[email protected]>
NetworkInfoController needs to support destructor
Modified: trunk/Source/WebCore/css/CSSProperty.h (137568 => 137569)
--- trunk/Source/WebCore/css/CSSProperty.h 2012-12-13 05:51:43 UTC (rev 137568)
+++ trunk/Source/WebCore/css/CSSProperty.h 2012-12-13 06:15:10 UTC (rev 137569)
@@ -57,6 +57,9 @@
: m_metadata(propertyID, shorthandID, important, implicit, isInheritedProperty(propertyID))
, m_value(value)
{
+#if ENABLE(CSS_VARIABLES)
+ ASSERT((propertyID == CSSPropertyVariable) == (value && 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) == (value && 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