OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |