| Index: WebCore/css/CSSPrimitiveValue.cpp
|
| ===================================================================
|
| --- WebCore/css/CSSPrimitiveValue.cpp (revision 42928)
|
| +++ WebCore/css/CSSPrimitiveValue.cpp (working copy)
|
| @@ -479,15 +479,13 @@
|
| {
|
| ec = 0;
|
|
|
| - // FIXME: check if property supports this type
|
| - if (m_type > CSS_DIMENSION) {
|
| - ec = SYNTAX_ERR;
|
| + if (m_type < CSS_NUMBER || m_type > CSS_DIMENSION || unitType < CSS_NUMBER || unitType > CSS_DIMENSION) {
|
| + ec = INVALID_ACCESS_ERR;
|
| return;
|
| }
|
|
|
| cleanup();
|
|
|
| - //if(m_type > CSS_DIMENSION) throw DOMException(INVALID_ACCESS_ERR);
|
| m_value.num = floatValue;
|
| m_type = unitType;
|
| }
|
| @@ -570,10 +568,8 @@
|
| {
|
| ec = 0;
|
|
|
| - //if(m_type < CSS_STRING) throw DOMException(INVALID_ACCESS_ERR);
|
| - //if(m_type > CSS_ATTR) throw DOMException(INVALID_ACCESS_ERR);
|
| - if (m_type < CSS_STRING || m_type > CSS_ATTR) {
|
| - ec = SYNTAX_ERR;
|
| + if (m_type < CSS_STRING || m_type > CSS_ATTR || stringType < CSS_STRING || stringType > CSS_ATTR) {
|
| + ec = INVALID_ACCESS_ERR;
|
| return;
|
| }
|
|
|
|
|