| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
| 4 * (C) 2001 Peter Kelly (pmk@post.com) | 4 * (C) 2001 Peter Kelly (pmk@post.com) |
| 5 * (C) 2001 Dirk Mueller (mueller@kde.org) | 5 * (C) 2001 Dirk Mueller (mueller@kde.org) |
| 6 * (C) 2007 David Smith (catfish.man@gmail.com) | 6 * (C) 2007 David Smith (catfish.man@gmail.com) |
| 7 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc.
All rights reserved. | 7 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc.
All rights reserved. |
| 8 * (C) 2007 Eric Seidel (eric@webkit.org) | 8 * (C) 2007 Eric Seidel (eric@webkit.org) |
| 9 * | 9 * |
| 10 * This library is free software; you can redistribute it and/or | 10 * This library is free software; you can redistribute it and/or |
| (...skipping 1668 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1679 } | 1679 } |
| 1680 | 1680 |
| 1681 void Element::inlineStyleChanged() | 1681 void Element::inlineStyleChanged() |
| 1682 { | 1682 { |
| 1683 ASSERT(isStyledElement()); | 1683 ASSERT(isStyledElement()); |
| 1684 setNeedsStyleRecalc(LocalStyleChange); | 1684 setNeedsStyleRecalc(LocalStyleChange); |
| 1685 ASSERT(elementData()); | 1685 ASSERT(elementData()); |
| 1686 elementData()->m_styleAttributeIsDirty = true; | 1686 elementData()->m_styleAttributeIsDirty = true; |
| 1687 } | 1687 } |
| 1688 | 1688 |
| 1689 bool Element::setInlineStyleProperty(CSSPropertyID propertyID, CSSValueID identi
fier, bool important) | 1689 bool Element::setInlineStyleProperty(CSSPropertyID propertyID, CSSValueID identi
fier) |
| 1690 { | 1690 { |
| 1691 ASSERT(isStyledElement()); | 1691 ASSERT(isStyledElement()); |
| 1692 ensureMutableInlineStyle().setProperty(propertyID, cssValuePool().createIden
tifierValue(identifier), important); | 1692 ensureMutableInlineStyle().setProperty(propertyID, cssValuePool().createIden
tifierValue(identifier)); |
| 1693 inlineStyleChanged(); | 1693 inlineStyleChanged(); |
| 1694 return true; | 1694 return true; |
| 1695 } | 1695 } |
| 1696 | 1696 |
| 1697 bool Element::setInlineStyleProperty(CSSPropertyID propertyID, double value, CSS
PrimitiveValue::UnitType unit, bool important) | 1697 bool Element::setInlineStyleProperty(CSSPropertyID propertyID, double value, CSS
PrimitiveValue::UnitType unit) |
| 1698 { | 1698 { |
| 1699 ASSERT(isStyledElement()); | 1699 ASSERT(isStyledElement()); |
| 1700 ensureMutableInlineStyle().setProperty(propertyID, cssValuePool().createValu
e(value, unit), important); | 1700 ensureMutableInlineStyle().setProperty(propertyID, cssValuePool().createValu
e(value, unit)); |
| 1701 inlineStyleChanged(); | 1701 inlineStyleChanged(); |
| 1702 return true; | 1702 return true; |
| 1703 } | 1703 } |
| 1704 | 1704 |
| 1705 bool Element::setInlineStyleProperty(CSSPropertyID propertyID, const String& val
ue, bool important) | 1705 bool Element::setInlineStyleProperty(CSSPropertyID propertyID, const String& val
ue) |
| 1706 { | 1706 { |
| 1707 ASSERT(isStyledElement()); | 1707 ASSERT(isStyledElement()); |
| 1708 bool changes = ensureMutableInlineStyle().setProperty(propertyID, value, imp
ortant, document().elementSheet().contents()); | 1708 bool changes = ensureMutableInlineStyle().setProperty(propertyID, value, doc
ument().elementSheet().contents()); |
| 1709 if (changes) | 1709 if (changes) |
| 1710 inlineStyleChanged(); | 1710 inlineStyleChanged(); |
| 1711 return changes; | 1711 return changes; |
| 1712 } | 1712 } |
| 1713 | 1713 |
| 1714 bool Element::removeInlineStyleProperty(CSSPropertyID propertyID) | 1714 bool Element::removeInlineStyleProperty(CSSPropertyID propertyID) |
| 1715 { | 1715 { |
| 1716 ASSERT(isStyledElement()); | 1716 ASSERT(isStyledElement()); |
| 1717 if (!inlineStyle()) | 1717 if (!inlineStyle()) |
| 1718 return false; | 1718 return false; |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1786 return false; | 1786 return false; |
| 1787 if (treeScope().scopedStyleResolver().features().hasSelectorForId(idValue)) | 1787 if (treeScope().scopedStyleResolver().features().hasSelectorForId(idValue)) |
| 1788 return true; | 1788 return true; |
| 1789 // Host rules could also have effects. | 1789 // Host rules could also have effects. |
| 1790 if (ShadowRoot* shadowRoot = this->shadowRoot()) | 1790 if (ShadowRoot* shadowRoot = this->shadowRoot()) |
| 1791 return shadowRoot->scopedStyleResolver().features().hasSelectorForId(idV
alue); | 1791 return shadowRoot->scopedStyleResolver().features().hasSelectorForId(idV
alue); |
| 1792 return false; | 1792 return false; |
| 1793 } | 1793 } |
| 1794 | 1794 |
| 1795 } // namespace blink | 1795 } // namespace blink |
| OLD | NEW |