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

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

Issue 2107153002: SVG object with same idrefs get conflicted even they are under different shadow root Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rename the method in TreeScope class Created 4 years, 5 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org> 2 * Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org>
3 * Copyright (C) 2004, 2005 Rob Buis <buis@kde.org> 3 * Copyright (C) 2004, 2005 Rob Buis <buis@kde.org>
4 * Copyright (C) 2010 Dirk Schulze <krit@webkit.org> 4 * Copyright (C) 2010 Dirk Schulze <krit@webkit.org>
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 clearResourceReferences(); 89 clearResourceReferences();
90 if (!inShadowIncludingDocument()) 90 if (!inShadowIncludingDocument())
91 return; 91 return;
92 92
93 AtomicString id; 93 AtomicString id;
94 Element* target = SVGURIReference::targetElementFromIRIString(hrefString(), treeScope(), &id); 94 Element* target = SVGURIReference::targetElementFromIRIString(hrefString(), treeScope(), &id);
95 if (!target) { 95 if (!target) {
96 if (id.isEmpty()) { 96 if (id.isEmpty()) {
97 fetchImageResource(); 97 fetchImageResource();
98 } else { 98 } else {
99 document().accessSVGExtensions().addPendingResource(id, this); 99 treeScope().accessSVGTreeScopedResources().addPendingResource(id, th is);
100 ASSERT(hasPendingResources()); 100 ASSERT(hasPendingResources());
101 } 101 }
102 } else if (target->isSVGElement()) { 102 } else if (target->isSVGElement()) {
103 // Register us with the target in the dependencies map. Any change of hr efElement 103 // Register us with the target in the dependencies map. Any change of hr efElement
104 // that leads to relayout/repainting now informs us, so we can react to it. 104 // that leads to relayout/repainting now informs us, so we can react to it.
105 addReferenceTo(toSVGElement(target)); 105 addReferenceTo(toSVGElement(target));
106 } 106 }
107 107
108 invalidate(); 108 invalidate();
109 } 109 }
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 // Don't use the broken image icon on image loading errors. 158 // Don't use the broken image icon on image loading errors.
159 RefPtr<Image> image = m_cachedImage->errorOccurred() ? 159 RefPtr<Image> image = m_cachedImage->errorOccurred() ?
160 nullptr : m_cachedImage->getImage(); 160 nullptr : m_cachedImage->getImage();
161 return FEImage::createWithImage(filter, image, m_preserveAspectRatio->cu rrentValue()); 161 return FEImage::createWithImage(filter, image, m_preserveAspectRatio->cu rrentValue());
162 } 162 }
163 163
164 return FEImage::createWithIRIReference(filter, treeScope(), hrefString(), m_ preserveAspectRatio->currentValue()); 164 return FEImage::createWithIRIReference(filter, treeScope(), hrefString(), m_ preserveAspectRatio->currentValue());
165 } 165 }
166 166
167 } // namespace blink 167 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/svg/SVGElement.cpp ('k') | third_party/WebKit/Source/core/svg/SVGMPathElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698