| 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 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 205 return m_propertySet->isPropertyImplicit(propertyID); | 205 return m_propertySet->isPropertyImplicit(propertyID); |
| 206 } | 206 } |
| 207 | 207 |
| 208 void PropertySetCSSStyleDeclaration::setProperty(const String& propertyName, con
st String& value, const String& priority, ExceptionState& es) | 208 void PropertySetCSSStyleDeclaration::setProperty(const String& propertyName, con
st String& value, const String& priority, ExceptionState& es) |
| 209 { | 209 { |
| 210 StyleAttributeMutationScope mutationScope(this); | 210 StyleAttributeMutationScope mutationScope(this); |
| 211 CSSPropertyID propertyID = cssPropertyID(propertyName); | 211 CSSPropertyID propertyID = cssPropertyID(propertyName); |
| 212 if (!propertyID) | 212 if (!propertyID) |
| 213 return; | 213 return; |
| 214 | 214 |
| 215 bool important = priority.find("important", 0, false) != notFound; | 215 bool important = priority.find("important", 0, false) != kNotFound; |
| 216 | 216 |
| 217 willMutate(); | 217 willMutate(); |
| 218 | 218 |
| 219 bool changed = m_propertySet->setProperty(propertyID, value, important, cont
extStyleSheet()); | 219 bool changed = m_propertySet->setProperty(propertyID, value, important, cont
extStyleSheet()); |
| 220 | 220 |
| 221 didMutate(changed ? PropertyChanged : NoChanges); | 221 didMutate(changed ? PropertyChanged : NoChanges); |
| 222 | 222 |
| 223 if (changed) { | 223 if (changed) { |
| 224 // CSS DOM requires raising SyntaxError of parsing failed, but this is t
oo dangerous for compatibility, | 224 // CSS DOM requires raising SyntaxError of parsing failed, but this is t
oo dangerous for compatibility, |
| 225 // see <http://bugs.webkit.org/show_bug.cgi?id=7296>. | 225 // see <http://bugs.webkit.org/show_bug.cgi?id=7296>. |
| (...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 415 m_parentElement->invalidateStyleAttribute(); | 415 m_parentElement->invalidateStyleAttribute(); |
| 416 StyleAttributeMutationScope(this).didInvalidateStyleAttr(); | 416 StyleAttributeMutationScope(this).didInvalidateStyleAttr(); |
| 417 } | 417 } |
| 418 | 418 |
| 419 CSSStyleSheet* InlineCSSStyleDeclaration::parentStyleSheet() const | 419 CSSStyleSheet* InlineCSSStyleDeclaration::parentStyleSheet() const |
| 420 { | 420 { |
| 421 return m_parentElement ? m_parentElement->document().elementSheet() : 0; | 421 return m_parentElement ? m_parentElement->document().elementSheet() : 0; |
| 422 } | 422 } |
| 423 | 423 |
| 424 } // namespace WebCore | 424 } // namespace WebCore |
| OLD | NEW |