| OLD | NEW |
| 1 /* | 1 /* |
| 2 * (C) 1999-2003 Lars Knoll (knoll@kde.org) | 2 * (C) 1999-2003 Lars Knoll (knoll@kde.org) |
| 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All r
ights reserved. | 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All r
ights reserved. |
| 4 * Copyright (C) 2011 Research In Motion Limited. All rights reserved. | 4 * Copyright (C) 2011 Research In Motion Limited. All rights reserved. |
| 5 * | 5 * |
| 6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
| 7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
| 8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
| 9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
| 10 * | 10 * |
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 208 return propertySet()->isPropertyImplicit(propertyID); | 208 return propertySet()->isPropertyImplicit(propertyID); |
| 209 } | 209 } |
| 210 | 210 |
| 211 void AbstractPropertySetCSSStyleDeclaration::setProperty(const String& propertyN
ame, const String& value, const String& priority, ExceptionState& exceptionState
) | 211 void AbstractPropertySetCSSStyleDeclaration::setProperty(const String& propertyN
ame, const String& value, const String& priority, ExceptionState& exceptionState
) |
| 212 { | 212 { |
| 213 StyleAttributeMutationScope mutationScope(this); | 213 StyleAttributeMutationScope mutationScope(this); |
| 214 CSSPropertyID propertyID = cssPropertyID(propertyName); | 214 CSSPropertyID propertyID = cssPropertyID(propertyName); |
| 215 if (!propertyID) | 215 if (!propertyID) |
| 216 return; | 216 return; |
| 217 | 217 |
| 218 bool important = priority.find("important", 0, false) != kNotFound; | 218 bool important = equalIgnoringCase(priority, "important"); |
| 219 if (!important && !priority.isEmpty()) |
| 220 return; |
| 219 | 221 |
| 220 willMutate(); | 222 willMutate(); |
| 221 | 223 |
| 222 bool changed = propertySet()->setProperty(propertyID, value, important, cont
extStyleSheet()); | 224 bool changed = propertySet()->setProperty(propertyID, value, important, cont
extStyleSheet()); |
| 223 | 225 |
| 224 didMutate(changed ? PropertyChanged : NoChanges); | 226 didMutate(changed ? PropertyChanged : NoChanges); |
| 225 | 227 |
| 226 if (changed) { | 228 if (changed) { |
| 227 // CSS DOM requires raising SyntaxError of parsing failed, but this is t
oo dangerous for compatibility, | 229 // CSS DOM requires raising SyntaxError of parsing failed, but this is t
oo dangerous for compatibility, |
| 228 // see <http://bugs.webkit.org/show_bug.cgi?id=7296>. | 230 // see <http://bugs.webkit.org/show_bug.cgi?id=7296>. |
| (...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 388 { | 390 { |
| 389 m_parentElement->ref(); | 391 m_parentElement->ref(); |
| 390 } | 392 } |
| 391 | 393 |
| 392 void InlineCSSStyleDeclaration::deref() | 394 void InlineCSSStyleDeclaration::deref() |
| 393 { | 395 { |
| 394 m_parentElement->deref(); | 396 m_parentElement->deref(); |
| 395 } | 397 } |
| 396 | 398 |
| 397 } // namespace WebCore | 399 } // namespace WebCore |
| OLD | NEW |