summaryrefslogtreecommitdiffstats
path: root/WebCore
diff options
context:
space:
mode:
authorAndrei Popescu <andreip@google.com>2010-04-12 17:02:10 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2010-04-12 17:02:10 -0700
commitf82f3c6e3b26bc3176d23de7ae7a744895b8d340 (patch)
treed5e608c482c9fb40e40f4d1fc88d4b0748c372cd /WebCore
parentaaced90639fec1cd4c25fa7cb0c98611b6415ffa (diff)
parent3ee9e8979862c9519b068e81d0d51e8e9fcff2b8 (diff)
downloadexternal_webkit-f82f3c6e3b26bc3176d23de7ae7a744895b8d340.zip
external_webkit-f82f3c6e3b26bc3176d23de7ae7a744895b8d340.tar.gz
external_webkit-f82f3c6e3b26bc3176d23de7ae7a744895b8d340.tar.bz2
am 3ee9e897: am d71ec47f: Merge "Cherry pick http://codereview.chromium.org/1549001" into froyo
Diffstat (limited to 'WebCore')
-rw-r--r--WebCore/css/CSSPrimitiveValue.cpp11
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;
}