diff options
author | Andrei Popescu <andreip@google.com> | 2010-04-12 12:04:22 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2010-04-12 12:04:22 -0700 |
commit | d71ec47fc759286ee28567b4ff2a6dd67fc89dcd (patch) | |
tree | d26024fbbace239946947aa4bbcefa76af0dee88 | |
parent | 30f1407065eeef96453ba46aa338ee7ff6dd2165 (diff) | |
parent | 9152c0d6a990740b55844db9cdcb31ccc2028451 (diff) | |
download | external_webkit-d71ec47fc759286ee28567b4ff2a6dd67fc89dcd.zip external_webkit-d71ec47fc759286ee28567b4ff2a6dd67fc89dcd.tar.gz external_webkit-d71ec47fc759286ee28567b4ff2a6dd67fc89dcd.tar.bz2 |
Merge "Cherry pick http://codereview.chromium.org/1549001" into froyo
-rw-r--r-- | WebCore/css/CSSPrimitiveValue.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/WebCore/css/CSSPrimitiveValue.cpp b/WebCore/css/CSSPrimitiveValue.cpp index 1f2c9ca..012aa56 100644 --- a/WebCore/css/CSSPrimitiveValue.cpp +++ b/WebCore/css/CSSPrimitiveValue.cpp @@ -477,9 +477,8 @@ void CSSPrimitiveValue::setFloatValue(unsigned short unitType, double floatValue { 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; } @@ -568,10 +567,8 @@ void CSSPrimitiveValue::setStringValue(unsigned short stringType, const String& { 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; } |