diff options
author | Ben Murdoch <benm@google.com> | 2011-06-02 12:07:03 +0100 |
---|---|---|
committer | Ben Murdoch <benm@google.com> | 2011-06-10 10:47:21 +0100 |
commit | 2daae5fd11344eaa88a0d92b0f6d65f8d2255c00 (patch) | |
tree | e4964fbd1cb70599f7718ff03e50ea1dab33890b /Source/WebCore/css/CSSMutableStyleDeclaration.cpp | |
parent | 87bdf0060a247bfbe668342b87e0874182e0ffa9 (diff) | |
download | external_webkit-2daae5fd11344eaa88a0d92b0f6d65f8d2255c00.zip external_webkit-2daae5fd11344eaa88a0d92b0f6d65f8d2255c00.tar.gz external_webkit-2daae5fd11344eaa88a0d92b0f6d65f8d2255c00.tar.bz2 |
Merge WebKit at r84325: Initial merge by git.
Change-Id: Ic1a909300ecc0a13ddc6b4e784371d2ac6e3d59b
Diffstat (limited to 'Source/WebCore/css/CSSMutableStyleDeclaration.cpp')
-rw-r--r-- | Source/WebCore/css/CSSMutableStyleDeclaration.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/Source/WebCore/css/CSSMutableStyleDeclaration.cpp b/Source/WebCore/css/CSSMutableStyleDeclaration.cpp index 6485e5b..8c8d5ba 100644 --- a/Source/WebCore/css/CSSMutableStyleDeclaration.cpp +++ b/Source/WebCore/css/CSSMutableStyleDeclaration.cpp @@ -585,8 +585,7 @@ bool CSSMutableStyleDeclaration::setProperty(int propertyID, const String& value // When replacing an existing property value, this moves the property to the end of the list. // Firefox preserves the position, and MSIE moves the property to the beginning. - CSSParser parser(useStrictParsing()); - bool success = parser.parseValue(this, propertyID, value, important); + bool success = CSSParser::parseValue(this, propertyID, value, important, useStrictParsing()); if (!success) { // CSS DOM requires raising SYNTAX_ERR here, but this is too dangerous for compatibility, // see <http://bugs.webkit.org/show_bug.cgi?id=7296>. @@ -619,6 +618,15 @@ bool CSSMutableStyleDeclaration::setProperty(int propertyID, int value, bool imp return true; } +bool CSSMutableStyleDeclaration::setProperty(int propertyID, double value, CSSPrimitiveValue::UnitTypes unit, bool important, bool notifyChanged) +{ + CSSProperty property(propertyID, CSSPrimitiveValue::create(value, unit), important); + setPropertyInternal(property); + if (notifyChanged) + setNeedsStyleRecalc(); + return true; +} + void CSSMutableStyleDeclaration::setStringProperty(int propertyId, const String &value, CSSPrimitiveValue::UnitTypes type, bool important) { ASSERT(!m_iteratorCount); |