| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Nikolas Zimmermann <zimmermann@kde
.org> | 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Nikolas Zimmermann <zimmermann@kde
.org> |
| 3 * Copyright (C) 2004, 2005, 2006, 2008 Rob Buis <buis@kde.org> | 3 * Copyright (C) 2004, 2005, 2006, 2008 Rob Buis <buis@kde.org> |
| 4 * Copyright (C) 2008 Apple Inc. All rights reserved. | 4 * Copyright (C) 2008 Apple Inc. All rights reserved. |
| 5 * Copyright (C) 2008 Alp Toker <alp@atoker.com> | 5 * Copyright (C) 2008 Alp Toker <alp@atoker.com> |
| 6 * Copyright (C) 2009 Cameron McCormack <cam@mcc.id.au> | 6 * Copyright (C) 2009 Cameron McCormack <cam@mcc.id.au> |
| 7 * | 7 * |
| 8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
| 9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
| 10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
| (...skipping 888 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 899 } | 899 } |
| 900 | 900 |
| 901 elementData()->m_animatedSVGAttributesAreDirty = false; | 901 elementData()->m_animatedSVGAttributesAreDirty = false; |
| 902 } else { | 902 } else { |
| 903 RefPtrWillBeRawPtr<SVGAnimatedPropertyBase> property = m_attributeToProp
ertyMap.get(name); | 903 RefPtrWillBeRawPtr<SVGAnimatedPropertyBase> property = m_attributeToProp
ertyMap.get(name); |
| 904 if (property && property->needsSynchronizeAttribute()) | 904 if (property && property->needsSynchronizeAttribute()) |
| 905 property->synchronizeAttribute(); | 905 property->synchronizeAttribute(); |
| 906 } | 906 } |
| 907 } | 907 } |
| 908 | 908 |
| 909 PassRefPtr<LayoutStyle> SVGElement::customStyleForLayoutObject() | 909 PassRefPtr<ComputedStyle> SVGElement::customStyleForLayoutObject() |
| 910 { | 910 { |
| 911 if (!correspondingElement()) | 911 if (!correspondingElement()) |
| 912 return document().ensureStyleResolver().styleForElement(this); | 912 return document().ensureStyleResolver().styleForElement(this); |
| 913 | 913 |
| 914 const LayoutStyle* style = 0; | 914 const ComputedStyle* style = 0; |
| 915 if (Element* parent = parentOrShadowHostElement()) { | 915 if (Element* parent = parentOrShadowHostElement()) { |
| 916 if (LayoutObject* renderer = parent->layoutObject()) | 916 if (LayoutObject* renderer = parent->layoutObject()) |
| 917 style = renderer->style(); | 917 style = renderer->style(); |
| 918 } | 918 } |
| 919 | 919 |
| 920 return document().ensureStyleResolver().styleForElement(correspondingElement
(), style, DisallowStyleSharing); | 920 return document().ensureStyleResolver().styleForElement(correspondingElement
(), style, DisallowStyleSharing); |
| 921 } | 921 } |
| 922 | 922 |
| 923 MutableStylePropertySet* SVGElement::animatedSMILStyleProperties() const | 923 MutableStylePropertySet* SVGElement::animatedSMILStyleProperties() const |
| 924 { | 924 { |
| 925 if (hasSVGRareData()) | 925 if (hasSVGRareData()) |
| 926 return svgRareData()->animatedSMILStyleProperties(); | 926 return svgRareData()->animatedSMILStyleProperties(); |
| 927 return 0; | 927 return 0; |
| 928 } | 928 } |
| 929 | 929 |
| 930 MutableStylePropertySet* SVGElement::ensureAnimatedSMILStyleProperties() | 930 MutableStylePropertySet* SVGElement::ensureAnimatedSMILStyleProperties() |
| 931 { | 931 { |
| 932 return ensureSVGRareData()->ensureAnimatedSMILStyleProperties(); | 932 return ensureSVGRareData()->ensureAnimatedSMILStyleProperties(); |
| 933 } | 933 } |
| 934 | 934 |
| 935 void SVGElement::setUseOverrideComputedStyle(bool value) | 935 void SVGElement::setUseOverrideComputedStyle(bool value) |
| 936 { | 936 { |
| 937 if (hasSVGRareData()) | 937 if (hasSVGRareData()) |
| 938 svgRareData()->setUseOverrideComputedStyle(value); | 938 svgRareData()->setUseOverrideComputedStyle(value); |
| 939 } | 939 } |
| 940 | 940 |
| 941 const LayoutStyle* SVGElement::computedStyle(PseudoId pseudoElementSpecifier) | 941 const ComputedStyle* SVGElement::ensureComputedStyle(PseudoId pseudoElementSpeci
fier) |
| 942 { | 942 { |
| 943 if (!hasSVGRareData() || !svgRareData()->useOverrideComputedStyle()) | 943 if (!hasSVGRareData() || !svgRareData()->useOverrideComputedStyle()) |
| 944 return Element::computedStyle(pseudoElementSpecifier); | 944 return Element::ensureComputedStyle(pseudoElementSpecifier); |
| 945 | 945 |
| 946 LayoutStyle* parentStyle = 0; | 946 ComputedStyle* parentStyle = 0; |
| 947 if (Element* parent = parentOrShadowHostElement()) { | 947 if (Element* parent = parentOrShadowHostElement()) { |
| 948 if (LayoutObject* renderer = parent->layoutObject()) | 948 if (LayoutObject* renderer = parent->layoutObject()) |
| 949 parentStyle = renderer->style(); | 949 parentStyle = renderer->style(); |
| 950 } | 950 } |
| 951 | 951 |
| 952 return svgRareData()->overrideComputedStyle(this, parentStyle); | 952 return svgRareData()->overrideComputedStyle(this, parentStyle); |
| 953 } | 953 } |
| 954 | 954 |
| 955 bool SVGElement::hasFocusEventListeners() const | 955 bool SVGElement::hasFocusEventListeners() const |
| 956 { | 956 { |
| (...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1186 Element::trace(visitor); | 1186 Element::trace(visitor); |
| 1187 } | 1187 } |
| 1188 | 1188 |
| 1189 const AtomicString& SVGElement::eventParameterName() | 1189 const AtomicString& SVGElement::eventParameterName() |
| 1190 { | 1190 { |
| 1191 DEFINE_STATIC_LOCAL(const AtomicString, evtString, ("evt", AtomicString::Con
structFromLiteral)); | 1191 DEFINE_STATIC_LOCAL(const AtomicString, evtString, ("evt", AtomicString::Con
structFromLiteral)); |
| 1192 return evtString; | 1192 return evtString; |
| 1193 } | 1193 } |
| 1194 | 1194 |
| 1195 } // namespace blink | 1195 } // namespace blink |
| OLD | NEW |