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

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

Issue 908243002: Move rendering/svg/RenderSVGResource* to layout/svg. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 10 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/SVGDocumentExtensions.cpp ('k') | Source/core/svg/SVGFilterElement.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 22 matching lines...) Expand all
33 #include "core/css/CSSCursorImageValue.h" 33 #include "core/css/CSSCursorImageValue.h"
34 #include "core/css/parser/CSSParser.h" 34 #include "core/css/parser/CSSParser.h"
35 #include "core/css/resolver/StyleResolver.h" 35 #include "core/css/resolver/StyleResolver.h"
36 #include "core/dom/Document.h" 36 #include "core/dom/Document.h"
37 #include "core/dom/ElementTraversal.h" 37 #include "core/dom/ElementTraversal.h"
38 #include "core/dom/shadow/ShadowRoot.h" 38 #include "core/dom/shadow/ShadowRoot.h"
39 #include "core/events/Event.h" 39 #include "core/events/Event.h"
40 #include "core/frame/Settings.h" 40 #include "core/frame/Settings.h"
41 #include "core/html/HTMLElement.h" 41 #include "core/html/HTMLElement.h"
42 #include "core/layout/LayoutObject.h" 42 #include "core/layout/LayoutObject.h"
43 #include "core/rendering/svg/RenderSVGResourceContainer.h" 43 #include "core/layout/svg/LayoutSVGResourceContainer.h"
44 #include "core/svg/SVGCursorElement.h" 44 #include "core/svg/SVGCursorElement.h"
45 #include "core/svg/SVGDocumentExtensions.h" 45 #include "core/svg/SVGDocumentExtensions.h"
46 #include "core/svg/SVGElementRareData.h" 46 #include "core/svg/SVGElementRareData.h"
47 #include "core/svg/SVGGraphicsElement.h" 47 #include "core/svg/SVGGraphicsElement.h"
48 #include "core/svg/SVGSVGElement.h" 48 #include "core/svg/SVGSVGElement.h"
49 #include "core/svg/SVGTitleElement.h" 49 #include "core/svg/SVGTitleElement.h"
50 #include "core/svg/SVGUseElement.h" 50 #include "core/svg/SVGUseElement.h"
51 51
52 #include "wtf/TemporaryChange.h" 52 #include "wtf/TemporaryChange.h"
53 53
(...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after
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->renderer();
422 if (renderer && selfHasRelativeLengths()) { 422 if (renderer && selfHasRelativeLengths()) {
423 if (renderer->isSVGResourceContainer()) 423 if (renderer->isSVGResourceContainer())
424 toRenderSVGResourceContainer(renderer)->invalidateCacheAndMarkForLay out(layoutScope); 424 toLayoutSVGResourceContainer(renderer)->invalidateCacheAndMarkForLay out(layoutScope);
425 else 425 else
426 renderer->setNeedsLayoutAndFullPaintInvalidation(MarkContainingBlock Chain, layoutScope); 426 renderer->setNeedsLayoutAndFullPaintInvalidation(MarkContainingBlock Chain, 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);
432 } 432 }
433 } 433 }
434 434
(...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after
868 if (attrName == HTMLNames::classAttr) { 868 if (attrName == HTMLNames::classAttr) {
869 classAttributeChanged(AtomicString(m_className->currentValue()->value()) ); 869 classAttributeChanged(AtomicString(m_className->currentValue()->value()) );
870 invalidateInstances(); 870 invalidateInstances();
871 return; 871 return;
872 } 872 }
873 873
874 if (isIdAttributeName(attrName)) { 874 if (isIdAttributeName(attrName)) {
875 LayoutObject* object = renderer(); 875 LayoutObject* object = renderer();
876 // Notify resources about id changes, this is important as we cache reso urces by id in SVGDocumentExtensions 876 // Notify resources about id changes, this is important as we cache reso urces by id in SVGDocumentExtensions
877 if (object && object->isSVGResourceContainer()) 877 if (object && object->isSVGResourceContainer())
878 toRenderSVGResourceContainer(object)->idChanged(); 878 toLayoutSVGResourceContainer(object)->idChanged();
879 if (inDocument()) 879 if (inDocument())
880 buildPendingResourcesIfNeeded(); 880 buildPendingResourcesIfNeeded();
881 invalidateInstances(); 881 invalidateInstances();
882 return; 882 return;
883 } 883 }
884 } 884 }
885 885
886 void SVGElement::synchronizeAnimatedSVGAttribute(const QualifiedName& name) cons t 886 void SVGElement::synchronizeAnimatedSVGAttribute(const QualifiedName& name) cons t
887 { 887 {
888 if (!elementData() || !elementData()->m_animatedSVGAttributesAreDirty) 888 if (!elementData() || !elementData()->m_animatedSVGAttributesAreDirty)
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 }
958 958
959 void SVGElement::markForLayoutAndParentResourceInvalidation(LayoutObject* render er) 959 void SVGElement::markForLayoutAndParentResourceInvalidation(LayoutObject* render er)
960 { 960 {
961 ASSERT(renderer); 961 ASSERT(renderer);
962 RenderSVGResourceContainer::markForLayoutAndParentResourceInvalidation(rende rer, true); 962 LayoutSVGResourceContainer::markForLayoutAndParentResourceInvalidation(rende rer, true);
963 } 963 }
964 964
965 void SVGElement::invalidateInstances() 965 void SVGElement::invalidateInstances()
966 { 966 {
967 if (!inDocument()) 967 if (!inDocument())
968 return; 968 return;
969 969
970 if (instanceUpdatesBlocked()) 970 if (instanceUpdatesBlocked())
971 return; 971 return;
972 972
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW
« no previous file with comments | « Source/core/svg/SVGDocumentExtensions.cpp ('k') | Source/core/svg/SVGFilterElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698