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

Side by Side Diff: third_party/WebKit/Source/core/layout/svg/SVGResources.cpp

Issue 2743293002: Remove <filter> from the chainableResourceTags set (Closed)
Patch Set: Remove include Created 3 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
« no previous file with comments | « no previous file | no next file » | 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) Research In Motion Limited 2010. All rights reserved. 2 * Copyright (C) Research In Motion Limited 2010. All rights reserved.
3 * 3 *
4 * This library is free software; you can redistribute it and/or 4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public 5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either 6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version. 7 * version 2 of the License, or (at your option) any later version.
8 * 8 *
9 * This library is distributed in the hope that it will be useful, 9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Library General Public License for more details. 12 * Library General Public License for more details.
13 * 13 *
14 * You should have received a copy of the GNU Library General Public License 14 * You should have received a copy of the GNU Library General Public License
15 * along with this library; see the file COPYING.LIB. If not, write to 15 * along with this library; see the file COPYING.LIB. If not, write to
16 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 16 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301, USA. 17 * Boston, MA 02110-1301, USA.
18 */ 18 */
19 19
20 #include "core/layout/svg/SVGResources.h" 20 #include "core/layout/svg/SVGResources.h"
21 21
22 #include "core/SVGNames.h" 22 #include "core/SVGNames.h"
23 #include "core/layout/svg/LayoutSVGResourceClipper.h" 23 #include "core/layout/svg/LayoutSVGResourceClipper.h"
24 #include "core/layout/svg/LayoutSVGResourceFilter.h" 24 #include "core/layout/svg/LayoutSVGResourceFilter.h"
25 #include "core/layout/svg/LayoutSVGResourceMarker.h" 25 #include "core/layout/svg/LayoutSVGResourceMarker.h"
26 #include "core/layout/svg/LayoutSVGResourceMasker.h" 26 #include "core/layout/svg/LayoutSVGResourceMasker.h"
27 #include "core/layout/svg/LayoutSVGResourcePaintServer.h" 27 #include "core/layout/svg/LayoutSVGResourcePaintServer.h"
28 #include "core/style/ComputedStyle.h" 28 #include "core/style/ComputedStyle.h"
29 #include "core/svg/SVGFilterElement.h"
30 #include "core/svg/SVGGradientElement.h" 29 #include "core/svg/SVGGradientElement.h"
31 #include "core/svg/SVGPatternElement.h" 30 #include "core/svg/SVGPatternElement.h"
32 #include "core/svg/SVGURIReference.h" 31 #include "core/svg/SVGURIReference.h"
33 #include "wtf/PtrUtil.h" 32 #include "wtf/PtrUtil.h"
34 #include <memory> 33 #include <memory>
35 34
36 #ifndef NDEBUG 35 #ifndef NDEBUG
37 #include <stdio.h> 36 #include <stdio.h>
38 #endif 37 #endif
39 38
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 pathTag.localName(), polygonTag.localName(), polylineTag.localName(), 94 pathTag.localName(), polygonTag.localName(), polylineTag.localName(),
96 rectTag.localName(), textTag.localName(), textPathTag.localName(), 95 rectTag.localName(), textTag.localName(), textPathTag.localName(),
97 tspanTag.localName(), 96 tspanTag.localName(),
98 })); 97 }));
99 return s_tagList; 98 return s_tagList;
100 } 99 }
101 100
102 static HashSet<AtomicString>& chainableResourceTags() { 101 static HashSet<AtomicString>& chainableResourceTags() {
103 DEFINE_STATIC_LOCAL(HashSet<AtomicString>, s_tagList, 102 DEFINE_STATIC_LOCAL(HashSet<AtomicString>, s_tagList,
104 ({ 103 ({
105 linearGradientTag.localName(), filterTag.localName(), 104 linearGradientTag.localName(), patternTag.localName(),
106 patternTag.localName(), radialGradientTag.localName(), 105 radialGradientTag.localName(),
107 })); 106 }));
108 return s_tagList; 107 return s_tagList;
109 } 108 }
110 109
111 static inline AtomicString targetReferenceFromResource(SVGElement& element) { 110 static inline AtomicString targetReferenceFromResource(SVGElement& element) {
112 String target; 111 String target;
113 if (isSVGPatternElement(element)) 112 if (isSVGPatternElement(element))
114 target = toSVGPatternElement(element).href()->currentValue()->value(); 113 target = toSVGPatternElement(element).href()->currentValue()->value();
115 else if (isSVGGradientElement(element)) 114 else if (isSVGGradientElement(element))
116 target = toSVGGradientElement(element).href()->currentValue()->value(); 115 target = toSVGGradientElement(element).href()->currentValue()->value();
117 else if (isSVGFilterElement(element))
118 target = toSVGFilterElement(element).href()->currentValue()->value();
119 else 116 else
120 ASSERT_NOT_REACHED(); 117 ASSERT_NOT_REACHED();
121 118
122 return SVGURIReference::fragmentIdentifierFromIRIString(target, 119 return SVGURIReference::fragmentIdentifierFromIRIString(target,
123 element.treeScope()); 120 element.treeScope());
124 } 121 }
125 122
126 static inline bool svgPaintTypeHasURL(SVGPaintType paintType) { 123 static inline bool svgPaintTypeHasURL(SVGPaintType paintType) {
127 switch (paintType) { 124 switch (paintType) {
128 case SVG_PAINTTYPE_URI_NONE: 125 case SVG_PAINTTYPE_URI_NONE:
(...skipping 541 matching lines...) Expand 10 before | Expand all | Expand 10 after
670 stroke->element()); 667 stroke->element());
671 } 668 }
672 669
673 if (m_linkedResource) 670 if (m_linkedResource)
674 fprintf(stderr, " |-> xlink:href : %p (node=%p)\n", m_linkedResource, 671 fprintf(stderr, " |-> xlink:href : %p (node=%p)\n", m_linkedResource,
675 m_linkedResource->element()); 672 m_linkedResource->element());
676 } 673 }
677 #endif 674 #endif
678 675
679 } // namespace blink 676 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698