Chromium Code Reviews| 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 891 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 902 if (property && property->needsSynchronizeAttribute()) | 902 if (property && property->needsSynchronizeAttribute()) |
| 903 property->synchronizeAttribute(); | 903 property->synchronizeAttribute(); |
| 904 } | 904 } |
| 905 } | 905 } |
| 906 | 906 |
| 907 PassRefPtr<RenderStyle> SVGElement::customStyleForRenderer() | 907 PassRefPtr<RenderStyle> SVGElement::customStyleForRenderer() |
| 908 { | 908 { |
| 909 if (!correspondingElement()) | 909 if (!correspondingElement()) |
| 910 return document().ensureStyleResolver().styleForElement(this); | 910 return document().ensureStyleResolver().styleForElement(this); |
| 911 | 911 |
| 912 RenderStyle* style = 0; | 912 const RenderStyle* style = 0; |
| 913 if (Element* parent = parentOrShadowHostElement()) { | 913 if (Element* parent = parentOrShadowHostElement()) { |
| 914 if (RenderObject* renderer = parent->renderer()) | 914 if (RenderObject* renderer = parent->renderer()) |
| 915 style = renderer->style(); | 915 style = renderer->style(); |
| 916 } | 916 } |
| 917 | 917 |
| 918 return document().ensureStyleResolver().styleForElement(correspondingElement (), style, DisallowStyleSharing); | 918 return document().ensureStyleResolver().styleForElement(correspondingElement (), style, DisallowStyleSharing); |
| 919 } | 919 } |
| 920 | 920 |
| 921 MutableStylePropertySet* SVGElement::animatedSMILStyleProperties() const | 921 MutableStylePropertySet* SVGElement::animatedSMILStyleProperties() const |
| 922 { | 922 { |
| (...skipping 11 matching lines...) Expand all Loading... | |
| 934 { | 934 { |
| 935 if (hasSVGRareData()) | 935 if (hasSVGRareData()) |
| 936 svgRareData()->setUseOverrideComputedStyle(value); | 936 svgRareData()->setUseOverrideComputedStyle(value); |
| 937 } | 937 } |
| 938 | 938 |
| 939 RenderStyle* SVGElement::computedStyle(PseudoId pseudoElementSpecifier) | 939 RenderStyle* SVGElement::computedStyle(PseudoId pseudoElementSpecifier) |
| 940 { | 940 { |
| 941 if (!hasSVGRareData() || !svgRareData()->useOverrideComputedStyle()) | 941 if (!hasSVGRareData() || !svgRareData()->useOverrideComputedStyle()) |
| 942 return Element::computedStyle(pseudoElementSpecifier); | 942 return Element::computedStyle(pseudoElementSpecifier); |
| 943 | 943 |
| 944 RenderStyle* parentStyle = 0; | 944 RenderStyle* parentStyle = 0; |
|
rune
2015/01/29 23:16:32
Can't parentStyle be const, style() used below, an
Julien - ping for review
2015/02/10 07:33:20
You're right. Done.
| |
| 945 if (Element* parent = parentOrShadowHostElement()) { | 945 if (Element* parent = parentOrShadowHostElement()) { |
| 946 if (RenderObject* renderer = parent->renderer()) | 946 if (RenderObject* renderer = parent->renderer()) |
| 947 parentStyle = renderer->style(); | 947 parentStyle = renderer->deprecatedMutableStyle(); |
| 948 } | 948 } |
| 949 | 949 |
| 950 return svgRareData()->overrideComputedStyle(this, parentStyle); | 950 return svgRareData()->overrideComputedStyle(this, parentStyle); |
| 951 } | 951 } |
| 952 | 952 |
| 953 bool SVGElement::hasFocusEventListeners() const | 953 bool SVGElement::hasFocusEventListeners() const |
| 954 { | 954 { |
| 955 return hasEventListeners(EventTypeNames::focusin) || hasEventListeners(Event TypeNames::focusout) | 955 return hasEventListeners(EventTypeNames::focusin) || hasEventListeners(Event TypeNames::focusout) |
| 956 || hasEventListeners(EventTypeNames::focus) || hasEventListeners(EventTy peNames::blur); | 956 || hasEventListeners(EventTypeNames::focus) || hasEventListeners(EventTy peNames::blur); |
| 957 } | 957 } |
| (...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1184 Element::trace(visitor); | 1184 Element::trace(visitor); |
| 1185 } | 1185 } |
| 1186 | 1186 |
| 1187 const AtomicString& SVGElement::eventParameterName() | 1187 const AtomicString& SVGElement::eventParameterName() |
| 1188 { | 1188 { |
| 1189 DEFINE_STATIC_LOCAL(const AtomicString, evtString, ("evt", AtomicString::Con structFromLiteral)); | 1189 DEFINE_STATIC_LOCAL(const AtomicString, evtString, ("evt", AtomicString::Con structFromLiteral)); |
| 1190 return evtString; | 1190 return evtString; |
| 1191 } | 1191 } |
| 1192 | 1192 |
| 1193 } // namespace blink | 1193 } // namespace blink |
| OLD | NEW |