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

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

Issue 1111223002: Invalidate ancestor resources in when relative lengths change (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: TEs. Created 5 years, 7 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
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 405 matching lines...) Expand 10 before | Expand all | Expand 10 after
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->layoutObject(); 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(LayoutInvalidationR eason::Unknown, MarkContainerChain, layoutScope); 426 markForLayoutAndParentResourceInvalidation(renderer, layoutScope);
fs 2015/04/30 13:36:47 So Unknown -> SvgResourceInvalidated; bad -> weird
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
435 SVGSVGElement* SVGElement::ownerSVGElement() const 435 SVGSVGElement* SVGElement::ownerSVGElement() const
436 { 436 {
(...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 {
957 return hasEventListeners(EventTypeNames::focusin) || hasEventListeners(Event TypeNames::focusout) 957 return hasEventListeners(EventTypeNames::focusin) || hasEventListeners(Event TypeNames::focusout)
958 || hasEventListeners(EventTypeNames::focus) || hasEventListeners(EventTy peNames::blur); 958 || hasEventListeners(EventTypeNames::focus) || hasEventListeners(EventTy peNames::blur);
959 } 959 }
960 960
961 void SVGElement::markForLayoutAndParentResourceInvalidation(LayoutObject* render er) 961 void SVGElement::markForLayoutAndParentResourceInvalidation(LayoutObject* render er, SubtreeLayoutScope* layoutScope)
962 { 962 {
963 ASSERT(renderer); 963 ASSERT(renderer);
964 LayoutSVGResourceContainer::markForLayoutAndParentResourceInvalidation(rende rer, true); 964 const bool needsLayout = true;
965 LayoutSVGResourceContainer::markForLayoutAndParentResourceInvalidation(rende rer, needsLayout, layoutScope);
965 } 966 }
966 967
967 void SVGElement::invalidateInstances() 968 void SVGElement::invalidateInstances()
968 { 969 {
969 if (instanceUpdatesBlocked()) 970 if (instanceUpdatesBlocked())
970 return; 971 return;
971 972
972 const WillBeHeapHashSet<RawPtrWillBeWeakMember<SVGElement>>& set = instances ForElement(); 973 const WillBeHeapHashSet<RawPtrWillBeWeakMember<SVGElement>>& set = instances ForElement();
973 if (set.isEmpty()) 974 if (set.isEmpty())
974 return; 975 return;
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
1184 Element::trace(visitor); 1185 Element::trace(visitor);
1185 } 1186 }
1186 1187
1187 const AtomicString& SVGElement::eventParameterName() 1188 const AtomicString& SVGElement::eventParameterName()
1188 { 1189 {
1189 DEFINE_STATIC_LOCAL(const AtomicString, evtString, ("evt", AtomicString::Con structFromLiteral)); 1190 DEFINE_STATIC_LOCAL(const AtomicString, evtString, ("evt", AtomicString::Con structFromLiteral));
1190 return evtString; 1191 return evtString;
1191 } 1192 }
1192 1193
1193 } // namespace blink 1194 } // namespace blink
OLDNEW
« Source/core/layout/svg/LayoutSVGResourceContainer.cpp ('K') | « Source/core/svg/SVGElement.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698