Changeset 186390 in webkit
- Timestamp:
- Jul 6, 2015, 6:11:49 PM (10 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r186389 r186390 1 2015-07-06 Simon Fraser <simon.fraser@apple.com> 2 3 Revert use of SVG <mask> elements for -webkit-mask-image (r176798, r177494, r186180) 4 https://bugs.webkit.org/show_bug.cgi?id=146653 5 6 Fixes rdar://problem/21435233. 7 8 This patch reverts r186180, but keeps the layout test. 9 10 This feature caused a number of regressions (bugs 141857, 146509, 146561), added new layering violations, and 11 was not being maintained, so revert it. 12 13 * loader/cache/CachedResourceLoader.cpp: 14 (WebCore::CachedResourceLoader::requestResource): Deleted. 15 * loader/cache/CachedResourceRequest.h: 16 (WebCore::CachedResourceRequest::acceptOverride): Deleted. 17 (WebCore::CachedResourceRequest::setAcceptOverride): Deleted. 18 * loader/cache/CachedSVGDocumentReference.cpp: 19 (WebCore::CachedSVGDocumentReference::load): Deleted. 20 * loader/cache/CachedSVGDocumentReference.h: 21 (WebCore::CachedSVGDocumentReference::setAcceptsAnyImageType): Deleted. 22 * platform/graphics/MaskImageOperation.cpp: 23 (WebCore::MaskImageOperation::ensureCachedSVGDocumentReference): 24 (WebCore::MaskImageOperation::notifyFinished): 25 1 26 2015-07-06 Daniel Bates <dabates@apple.com> 2 27 -
trunk/Source/WebCore/loader/cache/CachedResourceLoader.cpp
r186388 r186390 565 565 566 566 if ((policy != Use || resource->stillNeedsLoad()) && CachedResourceRequest::NoDefer == request.defer()) { 567 if (request.acceptOverride())568 resource->setAccept(request.acceptOverride().value());569 570 567 resource->load(*this, request.options()); 571 568 -
trunk/Source/WebCore/loader/cache/CachedResourceRequest.h
r186180 r186390 54 54 void setOptions(const ResourceLoaderOptions& options) { m_options = options; } 55 55 const Optional<ResourceLoadPriority>& priority() const { return m_priority; } 56 const Optional<String>& acceptOverride() const { return m_acceptOverride; }57 56 bool forPreload() const { return m_forPreload; } 58 57 void setForPreload(bool forPreload) { m_forPreload = forPreload; } … … 61 60 void setInitiator(PassRefPtr<Element>); 62 61 void setInitiator(const AtomicString& name); 63 void setAcceptOverride(const String& accept) { m_acceptOverride = accept; }64 62 const AtomicString& initiatorName() const; 65 63 … … 72 70 ResourceLoaderOptions m_options; 73 71 Optional<ResourceLoadPriority> m_priority; 74 Optional<String> m_acceptOverride;75 72 bool m_forPreload; 76 73 DeferOption m_defer; -
trunk/Source/WebCore/loader/cache/CachedSVGDocumentReference.cpp
r186388 r186390 61 61 CachedResourceRequest request(ResourceRequest(loader.document()->completeURL(m_url)), options); 62 62 request.setInitiator(cachedResourceRequestInitiators().css); 63 if (m_acceptsAnyImageType)64 request.setAcceptOverride("image/*");65 63 m_document = loader.requestSVGDocument(request); 66 64 if (m_document) { -
trunk/Source/WebCore/loader/cache/CachedSVGDocumentReference.h
r186388 r186390 45 45 void load(CachedResourceLoader&, const ResourceLoaderOptions&); 46 46 bool loadRequested() const { return m_loadRequested; } 47 void setAcceptsAnyImageType() { m_acceptsAnyImageType = true; }48 47 49 48 CachedSVGDocument* document() { return m_document.get(); } … … 55 54 CachedSVGDocumentClient* m_additionalDocumentClient; 56 55 bool m_canReuseResource; 57 bool m_acceptsAnyImageType { false };58 56 }; 59 57 -
trunk/Source/WebCore/platform/graphics/MaskImageOperation.cpp
r186180 r186390 194 194 return nullptr; 195 195 196 if (!m_cachedSVGDocumentReference.get()) {196 if (!m_cachedSVGDocumentReference.get()) 197 197 m_cachedSVGDocumentReference = std::make_unique<CachedSVGDocumentReference>(m_url, this, false); 198 // FIXME: For some strange reason we load all mask resources using CachedSVGDocument.199 // This requires overriding SVG mime type in Accept header or server may reject the request.200 m_cachedSVGDocumentReference->setAcceptsAnyImageType();201 }202 198 return m_cachedSVGDocumentReference.get(); 203 199 } … … 224 220 } 225 221 } 226 222 227 223 // If no valid mask was found, this is not a valid SVG document or it specified an invalid fragment identifier. 228 224 // Fallback to the normal way of loading the document in an Image object. 229 // FIXME: This is silly.230 225 if (!validMaskFound) { 231 226 // Get the resource loader, acquire the resource buffer and load it into an image.
Note:
See TracChangeset
for help on using the changeset viewer.