Commit 93c71bf1 authored by macpherson@chromium.org's avatar macpherson@chromium.org
Browse files

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):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@114455 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 318fad7d
2012-04-17 Luke Macpherson <macpherson@chromium.org>
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 <reveman@chromium.org>
 
[Chromium] Add TextureUploader which allows us to use persistent GC3D state for texture uploads.
......@@ -1624,18 +1624,22 @@ bool CSSParser::parseValue(CSSPropertyID propId, bool important)
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;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment