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

Side by Side Diff: third_party/WebKit/Source/core/css/resolver/FilterOperationResolver.cpp

Issue 1858753003: Remove RawPtr from core/css (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
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 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 for (auto& currValue : toCSSValueList(inValue)) { 131 for (auto& currValue : toCSSValueList(inValue)) {
132 CSSFunctionValue* filterValue = toCSSFunctionValue(currValue.get()); 132 CSSFunctionValue* filterValue = toCSSFunctionValue(currValue.get());
133 FilterOperation::OperationType operationType = filterOperationForType(fi lterValue->functionType()); 133 FilterOperation::OperationType operationType = filterOperationForType(fi lterValue->functionType());
134 countFilterUse(operationType, state.document()); 134 countFilterUse(operationType, state.document());
135 ASSERT(filterValue->length() <= 1); 135 ASSERT(filterValue->length() <= 1);
136 136
137 if (operationType == FilterOperation::REFERENCE) { 137 if (operationType == FilterOperation::REFERENCE) {
138 CSSSVGDocumentValue* svgDocumentValue = toCSSSVGDocumentValue(filter Value->item(0)); 138 CSSSVGDocumentValue* svgDocumentValue = toCSSSVGDocumentValue(filter Value->item(0));
139 KURL url = state.document().completeURL(svgDocumentValue->url()); 139 KURL url = state.document().completeURL(svgDocumentValue->url());
140 140
141 RawPtr<ReferenceFilterOperation> operation = ReferenceFilterOperatio n::create(svgDocumentValue->url(), AtomicString(url.fragmentIdentifier())); 141 ReferenceFilterOperation* operation = ReferenceFilterOperation::crea te(svgDocumentValue->url(), AtomicString(url.fragmentIdentifier()));
142 if (SVGURIReference::isExternalURIReference(svgDocumentValue->url(), state.document())) { 142 if (SVGURIReference::isExternalURIReference(svgDocumentValue->url(), state.document())) {
143 if (!svgDocumentValue->loadRequested()) 143 if (!svgDocumentValue->loadRequested())
144 state.elementStyleResources().addPendingSVGDocument(operatio n.get(), svgDocumentValue); 144 state.elementStyleResources().addPendingSVGDocument(operatio n, svgDocumentValue);
145 else if (svgDocumentValue->cachedSVGDocument()) 145 else if (svgDocumentValue->cachedSVGDocument())
146 ReferenceFilterBuilder::setDocumentResourceReference(operati on.get(), adoptPtr(new DocumentResourceReference(svgDocumentValue->cachedSVGDocu ment()))); 146 ReferenceFilterBuilder::setDocumentResourceReference(operati on, adoptPtr(new DocumentResourceReference(svgDocumentValue->cachedSVGDocument() )));
147 } 147 }
148 operations.operations().append(operation); 148 operations.operations().append(operation);
149 continue; 149 continue;
150 } 150 }
151 151
152 CSSPrimitiveValue* firstValue = filterValue->length() && filterValue->it em(0)->isPrimitiveValue() ? toCSSPrimitiveValue(filterValue->item(0)) : nullptr; 152 CSSPrimitiveValue* firstValue = filterValue->length() && filterValue->it em(0)->isPrimitiveValue() ? toCSSPrimitiveValue(filterValue->item(0)) : nullptr;
153 switch (filterValue->functionType()) { 153 switch (filterValue->functionType()) {
154 case CSSValueGrayscale: 154 case CSSValueGrayscale:
155 case CSSValueSepia: 155 case CSSValueSepia:
156 case CSSValueSaturate: { 156 case CSSValueSaturate: {
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 default: 207 default:
208 ASSERT_NOT_REACHED(); 208 ASSERT_NOT_REACHED();
209 break; 209 break;
210 } 210 }
211 } 211 }
212 212
213 return operations; 213 return operations;
214 } 214 }
215 215
216 } // namespace blink 216 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698