Title: [114455] trunk/Source/WebCore
- Revision
- 114455
- Author
- [email protected]
- Date
- 2012-04-17 15:56:23 -0700 (Tue, 17 Apr 2012)
Log Message
Make CSSParser::parseValue()'s handling of CSSPropertyCursor more obviously correct.
https://bugs.webkit.org/show_bug.cgi?id=83544
Reviewed by Kentaro Hara.
No new tests / code cleanup only.
The code as it stands appears to be correct, but static analysis was concerned that value could become null.
This patch adds a null check and ASSERT_NOT_REACHED() to make the code more obviously correct.
* css/CSSParser.cpp:
(WebCore::CSSParser::parseValue):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (114454 => 114455)
--- trunk/Source/WebCore/ChangeLog 2012-04-17 22:54:11 UTC (rev 114454)
+++ trunk/Source/WebCore/ChangeLog 2012-04-17 22:56:23 UTC (rev 114455)
@@ -1,3 +1,18 @@
+2012-04-17 Luke Macpherson <[email protected]>
+
+ Make CSSParser::parseValue()'s handling of CSSPropertyCursor more obviously correct.
+ https://bugs.webkit.org/show_bug.cgi?id=83544
+
+ Reviewed by Kentaro Hara.
+
+ No new tests / code cleanup only.
+
+ The code as it stands appears to be correct, but static analysis was concerned that value could become null.
+ This patch adds a null check and ASSERT_NOT_REACHED() to make the code more obviously correct.
+
+ * css/CSSParser.cpp:
+ (WebCore::CSSParser::parseValue):
+
2012-04-17 David Reveman <[email protected]>
[Chromium] Add TextureUploader which allows us to use persistent GC3D state for texture uploads.
Modified: trunk/Source/WebCore/css/CSSParser.cpp (114454 => 114455)
--- trunk/Source/WebCore/css/CSSParser.cpp 2012-04-17 22:54:11 UTC (rev 114454)
+++ trunk/Source/WebCore/css/CSSParser.cpp 2012-04-17 22:56:23 UTC (rev 114455)
@@ -1624,18 +1624,22 @@
return false;
} else if (inQuirksMode() && value->id == CSSValueHand) // MSIE 5 compatibility :/
list->append(cssValuePool().createIdentifierValue(CSSValuePointer));
- else if (value && ((value->id >= CSSValueAuto && value->id <= CSSValueWebkitGrabbing) || value->id == CSSValueCopy || value->id == CSSValueNone))
+ else if ((value->id >= CSSValueAuto && value->id <= CSSValueWebkitGrabbing) || value->id == CSSValueCopy || value->id == CSSValueNone)
list->append(cssValuePool().createIdentifierValue(value->id));
m_valueList->next();
parsedValue = list.release();
break;
+ } else if (value) {
+ id = value->id;
+ if (inQuirksMode() && value->id == CSSValueHand) { // MSIE 5 compatibility :/
+ id = CSSValuePointer;
+ validPrimitive = true;
+ } else if ((value->id >= CSSValueAuto && value->id <= CSSValueWebkitGrabbing) || value->id == CSSValueCopy || value->id == CSSValueNone)
+ validPrimitive = true;
+ } else {
+ ASSERT_NOT_REACHED();
+ return false;
}
- id = value->id;
- if (inQuirksMode() && value->id == CSSValueHand) { // MSIE 5 compatibility :/
- id = CSSValuePointer;
- validPrimitive = true;
- } else if ((value->id >= CSSValueAuto && value->id <= CSSValueWebkitGrabbing) || value->id == CSSValueCopy || value->id == CSSValueNone)
- validPrimitive = true;
break;
}
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes