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

Side by Side Diff: Source/WebCore/css/StyleResolver.cpp

Issue 13853009: Reverting base class for CachedSVGDocumentReference to avoid platform layering violations Base URL: https://chromium.googlesource.com/chromium/blink@master
Patch Set: Created 7 years, 8 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 | Source/WebCore/loader/cache/CachedSVGDocumentReference.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) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com) 3 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com)
4 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com) 4 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com)
5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights reserved. 5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights reserved.
6 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> 6 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org>
7 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> 7 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org>
8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/)
9 * Copyright (c) 2011, Code Aurora Forum. All rights reserved. 9 * Copyright (c) 2011, Code Aurora Forum. All rights reserved.
10 * Copyright (C) Research In Motion Limited 2011. All rights reserved. 10 * Copyright (C) Research In Motion Limited 2011. All rights reserved.
(...skipping 3749 matching lines...) Expand 10 before | Expand all | Expand 10 after
3760 ReferenceFilterOperation* referenceFilter = static_cast<ReferenceFil terOperation*>(filterOperation.get()); 3760 ReferenceFilterOperation* referenceFilter = static_cast<ReferenceFil terOperation*>(filterOperation.get());
3761 3761
3762 WebKitCSSSVGDocumentValue* value = state.pendingSVGDocuments().get(r eferenceFilter).get(); 3762 WebKitCSSSVGDocumentValue* value = state.pendingSVGDocuments().get(r eferenceFilter).get();
3763 if (!value) 3763 if (!value)
3764 continue; 3764 continue;
3765 CachedSVGDocument* cachedDocument = value->load(cachedResourceLoader ); 3765 CachedSVGDocument* cachedDocument = value->load(cachedResourceLoader );
3766 if (!cachedDocument) 3766 if (!cachedDocument)
3767 continue; 3767 continue;
3768 3768
3769 // Stash the CachedSVGDocument on the reference filter. 3769 // Stash the CachedSVGDocument on the reference filter.
3770 referenceFilter->setCachedSVGDocumentReference(adoptPtr(new CachedSV GDocumentReference(cachedDocument))); 3770 referenceFilter->setData(adoptPtr(new CachedSVGDocumentReference(cac hedDocument)));
3771 } 3771 }
3772 } 3772 }
3773 state.pendingSVGDocuments().clear(); 3773 state.pendingSVGDocuments().clear();
3774 } 3774 }
3775 #endif 3775 #endif
3776 3776
3777 StyleShader* StyleResolver::styleShader(CSSValue* value) 3777 StyleShader* StyleResolver::styleShader(CSSValue* value)
3778 { 3778 {
3779 if (value->isWebKitCSSShaderValue()) 3779 if (value->isWebKitCSSShaderValue())
3780 return cachedOrPendingStyleShaderFromValue(static_cast<WebKitCSSShaderVa lue*>(value)); 3780 return cachedOrPendingStyleShaderFromValue(static_cast<WebKitCSSShaderVa lue*>(value));
(...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after
4134 continue; 4134 continue;
4135 4135
4136 WebKitCSSSVGDocumentValue* svgDocumentValue = static_cast<WebKitCSSS VGDocumentValue*>(argument); 4136 WebKitCSSSVGDocumentValue* svgDocumentValue = static_cast<WebKitCSSS VGDocumentValue*>(argument);
4137 KURL url = m_state.document()->completeURL(svgDocumentValue->url()); 4137 KURL url = m_state.document()->completeURL(svgDocumentValue->url());
4138 4138
4139 RefPtr<ReferenceFilterOperation> operation = ReferenceFilterOperatio n::create(svgDocumentValue->url(), url.fragmentIdentifier(), operationType); 4139 RefPtr<ReferenceFilterOperation> operation = ReferenceFilterOperatio n::create(svgDocumentValue->url(), url.fragmentIdentifier(), operationType);
4140 if (SVGURIReference::isExternalURIReference(svgDocumentValue->url(), m_state.document())) { 4140 if (SVGURIReference::isExternalURIReference(svgDocumentValue->url(), m_state.document())) {
4141 if (!svgDocumentValue->loadRequested()) 4141 if (!svgDocumentValue->loadRequested())
4142 m_state.pendingSVGDocuments().set(operation.get(), svgDocume ntValue); 4142 m_state.pendingSVGDocuments().set(operation.get(), svgDocume ntValue);
4143 else if (svgDocumentValue->cachedSVGDocument()) 4143 else if (svgDocumentValue->cachedSVGDocument())
4144 operation->setCachedSVGDocumentReference(adoptPtr(new Cached SVGDocumentReference(svgDocumentValue->cachedSVGDocument()))); 4144 operation->setData(adoptPtr(new CachedSVGDocumentReference(s vgDocumentValue->cachedSVGDocument())));
4145 } 4145 }
4146 operations.operations().append(operation); 4146 operations.operations().append(operation);
4147 #endif 4147 #endif
4148 continue; 4148 continue;
4149 } 4149 }
4150 4150
4151 // Check that all parameters are primitive values, with the 4151 // Check that all parameters are primitive values, with the
4152 // exception of drop shadow which has a ShadowValue parameter. 4152 // exception of drop shadow which has a ShadowValue parameter.
4153 if (operationType != FilterOperation::DROP_SHADOW) { 4153 if (operationType != FilterOperation::DROP_SHADOW) {
4154 bool haveNonPrimitiveValue = false; 4154 bool haveNonPrimitiveValue = false;
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
4418 info.addMember(m_state, "state"); 4418 info.addMember(m_state, "state");
4419 4419
4420 // FIXME: move this to a place where it would be called only once? 4420 // FIXME: move this to a place where it would be called only once?
4421 info.addMember(CSSDefaultStyleSheets::defaultStyle, "defaultStyle"); 4421 info.addMember(CSSDefaultStyleSheets::defaultStyle, "defaultStyle");
4422 info.addMember(CSSDefaultStyleSheets::defaultQuirksStyle, "defaultQuirksStyl e"); 4422 info.addMember(CSSDefaultStyleSheets::defaultQuirksStyle, "defaultQuirksStyl e");
4423 info.addMember(CSSDefaultStyleSheets::defaultPrintStyle,"defaultPrintStyle") ; 4423 info.addMember(CSSDefaultStyleSheets::defaultPrintStyle,"defaultPrintStyle") ;
4424 info.addMember(CSSDefaultStyleSheets::defaultViewSourceStyle, "defaultViewSo urceStyle"); 4424 info.addMember(CSSDefaultStyleSheets::defaultViewSourceStyle, "defaultViewSo urceStyle");
4425 } 4425 }
4426 4426
4427 } // namespace WebCore 4427 } // namespace WebCore
OLDNEW
« no previous file with comments | « no previous file | Source/WebCore/loader/cache/CachedSVGDocumentReference.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698