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

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

Issue 62083002: Remove support for the externalResourcesRequired attribute. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebaseline test Created 6 years, 11 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
« no previous file with comments | « Source/core/svg/SVGElement.h ('k') | Source/core/svg/SVGEllipseElement.h » ('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 911 matching lines...) Expand 10 before | Expand all | Expand 10 after
922 return parentNode() && !parentNode()->isSVGElement() && hasTagName(SVGNames: :svgTag) && Element::shouldMoveToFlowThread(styleToUse); 922 return parentNode() && !parentNode()->isSVGElement() && hasTagName(SVGNames: :svgTag) && Element::shouldMoveToFlowThread(styleToUse);
923 } 923 }
924 924
925 void SVGElement::sendSVGLoadEventIfPossible(bool sendParentLoadEvents) 925 void SVGElement::sendSVGLoadEventIfPossible(bool sendParentLoadEvents)
926 { 926 {
927 RefPtr<SVGElement> currentTarget = this; 927 RefPtr<SVGElement> currentTarget = this;
928 while (currentTarget && currentTarget->haveLoadedRequiredResources()) { 928 while (currentTarget && currentTarget->haveLoadedRequiredResources()) {
929 RefPtr<Element> parent; 929 RefPtr<Element> parent;
930 if (sendParentLoadEvents) 930 if (sendParentLoadEvents)
931 parent = currentTarget->parentOrShadowHostElement(); // save the nex t parent to dispatch too incase dispatching the event changes the tree 931 parent = currentTarget->parentOrShadowHostElement(); // save the nex t parent to dispatch too incase dispatching the event changes the tree
932 if (hasLoadListener(currentTarget.get())) 932 if (hasLoadListener(currentTarget.get())
933 && (currentTarget->isStructurallyExternal() || currentTarget->isSVGS VGElement()))
933 currentTarget->dispatchEvent(Event::create(EventTypeNames::load)); 934 currentTarget->dispatchEvent(Event::create(EventTypeNames::load));
934 currentTarget = (parent && parent->isSVGElement()) ? static_pointer_cast <SVGElement>(parent) : RefPtr<SVGElement>(); 935 currentTarget = (parent && parent->isSVGElement()) ? static_pointer_cast <SVGElement>(parent) : RefPtr<SVGElement>();
935 SVGElement* element = currentTarget.get(); 936 SVGElement* element = currentTarget.get();
936 if (!element || !element->isOutermostSVGSVGElement()) 937 if (!element || !element->isOutermostSVGSVGElement())
937 continue; 938 continue;
938 939
939 // Consider <svg onload="foo()"><image xlink:href="foo.png" externalReso urcesRequired="true"/></svg>. 940 // Consider <svg onload="foo()"><image xlink:href="foo.png" externalReso urcesRequired="true"/></svg>.
940 // If foo.png is not yet loaded, the first SVGLoad event will go to the <svg> element, sent through 941 // If foo.png is not yet loaded, the first SVGLoad event will go to the <svg> element, sent through
941 // Document::implicitClose(). Then the SVGLoad event will fire for <imag e>, once its loaded. 942 // Document::implicitClose(). Then the SVGLoad event will fire for <imag e>, once its loaded.
942 ASSERT(sendParentLoadEvents); 943 ASSERT(sendParentLoadEvents);
(...skipping 25 matching lines...) Expand all
968 void SVGElement::finishParsingChildren() 969 void SVGElement::finishParsingChildren()
969 { 970 {
970 Element::finishParsingChildren(); 971 Element::finishParsingChildren();
971 972
972 // The outermost SVGSVGElement SVGLoad event is fired through Document::disp atchWindowLoadEvent. 973 // The outermost SVGSVGElement SVGLoad event is fired through Document::disp atchWindowLoadEvent.
973 if (isOutermostSVGSVGElement()) 974 if (isOutermostSVGSVGElement())
974 return; 975 return;
975 976
976 // finishParsingChildren() is called when the close tag is reached for an el ement (e.g. </svg>) 977 // finishParsingChildren() is called when the close tag is reached for an el ement (e.g. </svg>)
977 // we send SVGLoad events here if we can, otherwise they'll be sent when any required loads finish 978 // we send SVGLoad events here if we can, otherwise they'll be sent when any required loads finish
978 sendSVGLoadEventIfPossible(); 979 if (isSVGSVGElement())
980 sendSVGLoadEventIfPossible();
979 } 981 }
980 982
981 bool SVGElement::childShouldCreateRenderer(const Node& child) const 983 bool SVGElement::childShouldCreateRenderer(const Node& child) const
982 { 984 {
983 DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, invalidTextContent, ()); 985 DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, invalidTextContent, ());
984 986
985 if (invalidTextContent.isEmpty()) { 987 if (invalidTextContent.isEmpty()) {
986 invalidTextContent.add(SVGNames::textPathTag); 988 invalidTextContent.add(SVGNames::textPathTag);
987 #if ENABLE(SVG_FONTS) 989 #if ENABLE(SVG_FONTS)
988 invalidTextContent.add(SVGNames::altGlyphTag); 990 invalidTextContent.add(SVGNames::altGlyphTag);
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
1151 animatableAttributes.add(SVGNames::clipPathUnitsAttr); 1153 animatableAttributes.add(SVGNames::clipPathUnitsAttr);
1152 animatableAttributes.add(SVGNames::cxAttr); 1154 animatableAttributes.add(SVGNames::cxAttr);
1153 animatableAttributes.add(SVGNames::cyAttr); 1155 animatableAttributes.add(SVGNames::cyAttr);
1154 animatableAttributes.add(SVGNames::diffuseConstantAttr); 1156 animatableAttributes.add(SVGNames::diffuseConstantAttr);
1155 animatableAttributes.add(SVGNames::divisorAttr); 1157 animatableAttributes.add(SVGNames::divisorAttr);
1156 animatableAttributes.add(SVGNames::dxAttr); 1158 animatableAttributes.add(SVGNames::dxAttr);
1157 animatableAttributes.add(SVGNames::dyAttr); 1159 animatableAttributes.add(SVGNames::dyAttr);
1158 animatableAttributes.add(SVGNames::edgeModeAttr); 1160 animatableAttributes.add(SVGNames::edgeModeAttr);
1159 animatableAttributes.add(SVGNames::elevationAttr); 1161 animatableAttributes.add(SVGNames::elevationAttr);
1160 animatableAttributes.add(SVGNames::exponentAttr); 1162 animatableAttributes.add(SVGNames::exponentAttr);
1161 animatableAttributes.add(SVGNames::externalResourcesRequiredAttr);
1162 animatableAttributes.add(SVGNames::filterResAttr); 1163 animatableAttributes.add(SVGNames::filterResAttr);
1163 animatableAttributes.add(SVGNames::filterUnitsAttr); 1164 animatableAttributes.add(SVGNames::filterUnitsAttr);
1164 animatableAttributes.add(SVGNames::fxAttr); 1165 animatableAttributes.add(SVGNames::fxAttr);
1165 animatableAttributes.add(SVGNames::fyAttr); 1166 animatableAttributes.add(SVGNames::fyAttr);
1166 animatableAttributes.add(SVGNames::gradientTransformAttr); 1167 animatableAttributes.add(SVGNames::gradientTransformAttr);
1167 animatableAttributes.add(SVGNames::gradientUnitsAttr); 1168 animatableAttributes.add(SVGNames::gradientUnitsAttr);
1168 animatableAttributes.add(SVGNames::heightAttr); 1169 animatableAttributes.add(SVGNames::heightAttr);
1169 animatableAttributes.add(SVGNames::in2Attr); 1170 animatableAttributes.add(SVGNames::in2Attr);
1170 animatableAttributes.add(SVGNames::inAttr); 1171 animatableAttributes.add(SVGNames::inAttr);
1171 animatableAttributes.add(SVGNames::interceptAttr); 1172 animatableAttributes.add(SVGNames::interceptAttr);
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
1238 animatableAttributes.add(SVGNames::zAttr); 1239 animatableAttributes.add(SVGNames::zAttr);
1239 } 1240 }
1240 1241
1241 if (name == classAttr) 1242 if (name == classAttr)
1242 return true; 1243 return true;
1243 1244
1244 return animatableAttributes.contains(name); 1245 return animatableAttributes.contains(name);
1245 } 1246 }
1246 #endif 1247 #endif
1247 } 1248 }
OLDNEW
« no previous file with comments | « Source/core/svg/SVGElement.h ('k') | Source/core/svg/SVGEllipseElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698