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

Side by Side Diff: third_party/WebKit/Source/core/css/parser/CSSPropertyParserHelpers.cpp

Issue 2769283004: Remove referrer setter from CSSImageValue (Closed)
Patch Set: 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/css/parser/CSSPropertyParserHelpers.h" 5 #include "core/css/parser/CSSPropertyParserHelpers.h"
6 6
7 #include "core/css/CSSCalculationValue.h" 7 #include "core/css/CSSCalculationValue.h"
8 #include "core/css/CSSColorValue.h" 8 #include "core/css/CSSColorValue.h"
9 #include "core/css/CSSCrossfadeValue.h" 9 #include "core/css/CSSCrossfadeValue.h"
10 #include "core/css/CSSGradientValue.h" 10 #include "core/css/CSSGradientValue.h"
(...skipping 1248 matching lines...) Expand 10 before | Expand all | Expand 10 after
1259 } 1259 }
1260 if (!result || !args.atEnd()) 1260 if (!result || !args.atEnd())
1261 return nullptr; 1261 return nullptr;
1262 range = rangeCopy; 1262 range = rangeCopy;
1263 return result; 1263 return result;
1264 } 1264 }
1265 1265
1266 static CSSValue* createCSSImageValueWithReferrer( 1266 static CSSValue* createCSSImageValueWithReferrer(
1267 const AtomicString& rawValue, 1267 const AtomicString& rawValue,
1268 const CSSParserContext* context) { 1268 const CSSParserContext* context) {
1269 CSSValue* imageValue = 1269 CSSValue* imageValue = CSSImageValue::create(
1270 CSSImageValue::create(rawValue, context->completeURL(rawValue)); 1270 rawValue, context->completeURL(rawValue), context->referrer());
1271 toCSSImageValue(imageValue)->setReferrer(context->referrer());
1272 return imageValue; 1271 return imageValue;
1273 } 1272 }
1274 1273
1275 static CSSValue* consumeImageSet(CSSParserTokenRange& range, 1274 static CSSValue* consumeImageSet(CSSParserTokenRange& range,
1276 const CSSParserContext* context) { 1275 const CSSParserContext* context) {
1277 CSSParserTokenRange rangeCopy = range; 1276 CSSParserTokenRange rangeCopy = range;
1278 CSSParserTokenRange args = consumeFunction(rangeCopy); 1277 CSSParserTokenRange args = consumeFunction(rangeCopy);
1279 CSSImageSetValue* imageSet = CSSImageSetValue::create(); 1278 CSSImageSetValue* imageSet = CSSImageSetValue::create();
1280 do { 1279 do {
1281 AtomicString urlValue = consumeUrlAsStringView(args).toAtomicString(); 1280 AtomicString urlValue = consumeUrlAsStringView(args).toAtomicString();
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
1342 1341
1343 // https://drafts.csswg.org/css-shapes-1/#typedef-shape-box 1342 // https://drafts.csswg.org/css-shapes-1/#typedef-shape-box
1344 CSSIdentifierValue* consumeShapeBox(CSSParserTokenRange& range) { 1343 CSSIdentifierValue* consumeShapeBox(CSSParserTokenRange& range) {
1345 return consumeIdent<CSSValueContentBox, CSSValuePaddingBox, CSSValueBorderBox, 1344 return consumeIdent<CSSValueContentBox, CSSValuePaddingBox, CSSValueBorderBox,
1346 CSSValueMarginBox>(range); 1345 CSSValueMarginBox>(range);
1347 } 1346 }
1348 1347
1349 } // namespace CSSPropertyParserHelpers 1348 } // namespace CSSPropertyParserHelpers
1350 1349
1351 } // namespace blink 1350 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/CSSImageValue.cpp ('k') | third_party/WebKit/Source/core/html/HTMLBodyElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698