Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(11)

Side by Side Diff: Source/core/svg/SVGElement.cpp

Issue 977113003: Rename renderer() to layoutObject(). (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/svg/SVGClipPathElement.cpp ('k') | Source/core/svg/SVGEllipseElement.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 400 matching lines...) Expand 10 before | Expand all | Expand 10 after
411 void SVGElement::invalidateRelativeLengthClients(SubtreeLayoutScope* layoutScope ) 411 void SVGElement::invalidateRelativeLengthClients(SubtreeLayoutScope* layoutScope )
412 { 412 {
413 if (!inDocument()) 413 if (!inDocument())
414 return; 414 return;
415 415
416 ASSERT(!m_inRelativeLengthClientsInvalidation); 416 ASSERT(!m_inRelativeLengthClientsInvalidation);
417 #if ENABLE(ASSERT) 417 #if ENABLE(ASSERT)
418 TemporaryChange<bool> inRelativeLengthClientsInvalidationChange(m_inRelative LengthClientsInvalidation, true); 418 TemporaryChange<bool> inRelativeLengthClientsInvalidationChange(m_inRelative LengthClientsInvalidation, true);
419 #endif 419 #endif
420 420
421 LayoutObject* renderer = this->renderer(); 421 LayoutObject* renderer = this->layoutObject();
422 if (renderer && selfHasRelativeLengths()) { 422 if (renderer && selfHasRelativeLengths()) {
423 if (renderer->isSVGResourceContainer()) 423 if (renderer->isSVGResourceContainer())
424 toLayoutSVGResourceContainer(renderer)->invalidateCacheAndMarkForLay out(layoutScope); 424 toLayoutSVGResourceContainer(renderer)->invalidateCacheAndMarkForLay out(layoutScope);
425 else 425 else
426 renderer->setNeedsLayoutAndFullPaintInvalidation(MarkContainerChain, layoutScope); 426 renderer->setNeedsLayoutAndFullPaintInvalidation(MarkContainerChain, layoutScope);
427 } 427 }
428 428
429 for (SVGElement* element : m_elementsWithRelativeLengths) { 429 for (SVGElement* element : m_elementsWithRelativeLengths) {
430 if (element != this) 430 if (element != this)
431 element->invalidateRelativeLengthClients(layoutScope); 431 element->invalidateRelativeLengthClients(layoutScope);
(...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after
872 return; 872 return;
873 } 873 }
874 874
875 if (attrName == HTMLNames::classAttr) { 875 if (attrName == HTMLNames::classAttr) {
876 classAttributeChanged(AtomicString(m_className->currentValue()->value()) ); 876 classAttributeChanged(AtomicString(m_className->currentValue()->value()) );
877 invalidateInstances(); 877 invalidateInstances();
878 return; 878 return;
879 } 879 }
880 880
881 if (isIdAttributeName(attrName)) { 881 if (isIdAttributeName(attrName)) {
882 LayoutObject* object = renderer(); 882 LayoutObject* object = layoutObject();
883 // Notify resources about id changes, this is important as we cache reso urces by id in SVGDocumentExtensions 883 // Notify resources about id changes, this is important as we cache reso urces by id in SVGDocumentExtensions
884 if (object && object->isSVGResourceContainer()) 884 if (object && object->isSVGResourceContainer())
885 toLayoutSVGResourceContainer(object)->idChanged(); 885 toLayoutSVGResourceContainer(object)->idChanged();
886 if (inDocument()) 886 if (inDocument())
887 buildPendingResourcesIfNeeded(); 887 buildPendingResourcesIfNeeded();
888 invalidateInstances(); 888 invalidateInstances();
889 return; 889 return;
890 } 890 }
891 } 891 }
892 892
(...skipping 18 matching lines...) Expand all
911 } 911 }
912 } 912 }
913 913
914 PassRefPtr<LayoutStyle> SVGElement::customStyleForRenderer() 914 PassRefPtr<LayoutStyle> SVGElement::customStyleForRenderer()
915 { 915 {
916 if (!correspondingElement()) 916 if (!correspondingElement())
917 return document().ensureStyleResolver().styleForElement(this); 917 return document().ensureStyleResolver().styleForElement(this);
918 918
919 LayoutStyle* style = 0; 919 LayoutStyle* style = 0;
920 if (Element* parent = parentOrShadowHostElement()) { 920 if (Element* parent = parentOrShadowHostElement()) {
921 if (LayoutObject* renderer = parent->renderer()) 921 if (LayoutObject* renderer = parent->layoutObject())
922 style = renderer->style(); 922 style = renderer->style();
923 } 923 }
924 924
925 return document().ensureStyleResolver().styleForElement(correspondingElement (), style, DisallowStyleSharing); 925 return document().ensureStyleResolver().styleForElement(correspondingElement (), style, DisallowStyleSharing);
926 } 926 }
927 927
928 MutableStylePropertySet* SVGElement::animatedSMILStyleProperties() const 928 MutableStylePropertySet* SVGElement::animatedSMILStyleProperties() const
929 { 929 {
930 if (hasSVGRareData()) 930 if (hasSVGRareData())
931 return svgRareData()->animatedSMILStyleProperties(); 931 return svgRareData()->animatedSMILStyleProperties();
(...skipping 11 matching lines...) Expand all
943 svgRareData()->setUseOverrideComputedStyle(value); 943 svgRareData()->setUseOverrideComputedStyle(value);
944 } 944 }
945 945
946 LayoutStyle* SVGElement::computedStyle(PseudoId pseudoElementSpecifier) 946 LayoutStyle* SVGElement::computedStyle(PseudoId pseudoElementSpecifier)
947 { 947 {
948 if (!hasSVGRareData() || !svgRareData()->useOverrideComputedStyle()) 948 if (!hasSVGRareData() || !svgRareData()->useOverrideComputedStyle())
949 return Element::computedStyle(pseudoElementSpecifier); 949 return Element::computedStyle(pseudoElementSpecifier);
950 950
951 LayoutStyle* parentStyle = 0; 951 LayoutStyle* parentStyle = 0;
952 if (Element* parent = parentOrShadowHostElement()) { 952 if (Element* parent = parentOrShadowHostElement()) {
953 if (LayoutObject* renderer = parent->renderer()) 953 if (LayoutObject* renderer = parent->layoutObject())
954 parentStyle = renderer->style(); 954 parentStyle = renderer->style();
955 } 955 }
956 956
957 return svgRareData()->overrideComputedStyle(this, parentStyle); 957 return svgRareData()->overrideComputedStyle(this, parentStyle);
958 } 958 }
959 959
960 bool SVGElement::hasFocusEventListeners() const 960 bool SVGElement::hasFocusEventListeners() const
961 { 961 {
962 return hasEventListeners(EventTypeNames::focusin) || hasEventListeners(Event TypeNames::focusout) 962 return hasEventListeners(EventTypeNames::focusin) || hasEventListeners(Event TypeNames::focusout)
963 || hasEventListeners(EventTypeNames::focus) || hasEventListeners(EventTy peNames::blur); 963 || hasEventListeners(EventTypeNames::focus) || hasEventListeners(EventTy peNames::blur);
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
1191 Element::trace(visitor); 1191 Element::trace(visitor);
1192 } 1192 }
1193 1193
1194 const AtomicString& SVGElement::eventParameterName() 1194 const AtomicString& SVGElement::eventParameterName()
1195 { 1195 {
1196 DEFINE_STATIC_LOCAL(const AtomicString, evtString, ("evt", AtomicString::Con structFromLiteral)); 1196 DEFINE_STATIC_LOCAL(const AtomicString, evtString, ("evt", AtomicString::Con structFromLiteral));
1197 return evtString; 1197 return evtString;
1198 } 1198 }
1199 1199
1200 } // namespace blink 1200 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/svg/SVGClipPathElement.cpp ('k') | Source/core/svg/SVGEllipseElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698