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

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

Issue 2165833006: Merge CSSSVGDocumentValue with CSSURIValue (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixup FilterInterpolationFunctions Created 4 years, 5 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/CSSPropertyParser.h" 5 #include "core/css/parser/CSSPropertyParser.h"
6 6
7 #include "core/StylePropertyShorthand.h" 7 #include "core/StylePropertyShorthand.h"
8 #include "core/css/CSSBasicShapeValues.h" 8 #include "core/css/CSSBasicShapeValues.h"
9 #include "core/css/CSSBorderImage.h" 9 #include "core/css/CSSBorderImage.h"
10 #include "core/css/CSSContentDistributionValue.h" 10 #include "core/css/CSSContentDistributionValue.h"
(...skipping 11 matching lines...) Expand all
22 #include "core/css/CSSGridTemplateAreasValue.h" 22 #include "core/css/CSSGridTemplateAreasValue.h"
23 #include "core/css/CSSImageSetValue.h" 23 #include "core/css/CSSImageSetValue.h"
24 #include "core/css/CSSInheritedValue.h" 24 #include "core/css/CSSInheritedValue.h"
25 #include "core/css/CSSInitialValue.h" 25 #include "core/css/CSSInitialValue.h"
26 #include "core/css/CSSPaintValue.h" 26 #include "core/css/CSSPaintValue.h"
27 #include "core/css/CSSPathValue.h" 27 #include "core/css/CSSPathValue.h"
28 #include "core/css/CSSPendingSubstitutionValue.h" 28 #include "core/css/CSSPendingSubstitutionValue.h"
29 #include "core/css/CSSPrimitiveValueMappings.h" 29 #include "core/css/CSSPrimitiveValueMappings.h"
30 #include "core/css/CSSQuadValue.h" 30 #include "core/css/CSSQuadValue.h"
31 #include "core/css/CSSReflectValue.h" 31 #include "core/css/CSSReflectValue.h"
32 #include "core/css/CSSSVGDocumentValue.h"
33 #include "core/css/CSSShadowValue.h" 32 #include "core/css/CSSShadowValue.h"
34 #include "core/css/CSSStringValue.h" 33 #include "core/css/CSSStringValue.h"
35 #include "core/css/CSSTimingFunctionValue.h" 34 #include "core/css/CSSTimingFunctionValue.h"
36 #include "core/css/CSSURIValue.h" 35 #include "core/css/CSSURIValue.h"
37 #include "core/css/CSSUnicodeRangeValue.h" 36 #include "core/css/CSSUnicodeRangeValue.h"
38 #include "core/css/CSSUnsetValue.h" 37 #include "core/css/CSSUnsetValue.h"
39 #include "core/css/CSSValuePair.h" 38 #include "core/css/CSSValuePair.h"
40 #include "core/css/CSSVariableReferenceValue.h" 39 #include "core/css/CSSVariableReferenceValue.h"
41 #include "core/css/FontFace.h" 40 #include "core/css/FontFace.h"
42 #include "core/css/HashTools.h" 41 #include "core/css/HashTools.h"
(...skipping 1408 matching lines...) Expand 10 before | Expand all | Expand 10 after
1451 } 1450 }
1452 1451
1453 static CSSValue* consumeFilter(CSSParserTokenRange& range, const CSSParserContex t& context) 1452 static CSSValue* consumeFilter(CSSParserTokenRange& range, const CSSParserContex t& context)
1454 { 1453 {
1455 if (range.peek().id() == CSSValueNone) 1454 if (range.peek().id() == CSSValueNone)
1456 return consumeIdent(range); 1455 return consumeIdent(range);
1457 1456
1458 CSSValueList* list = CSSValueList::createSpaceSeparated(); 1457 CSSValueList* list = CSSValueList::createSpaceSeparated();
1459 do { 1458 do {
1460 String url = consumeUrl(range); 1459 String url = consumeUrl(range);
1461 CSSFunctionValue* filterValue = nullptr; 1460 CSSValue* filterValue = nullptr;
1462 if (!url.isNull()) { 1461 if (!url.isNull()) {
1463 filterValue = CSSFunctionValue::create(CSSValueUrl); 1462 filterValue = CSSURIValue::create(url);
1464 filterValue->append(*CSSSVGDocumentValue::create(url));
1465 } else { 1463 } else {
1466 filterValue = consumeFilterFunction(range, context); 1464 filterValue = consumeFilterFunction(range, context);
1467 if (!filterValue) 1465 if (!filterValue)
1468 return nullptr; 1466 return nullptr;
1469 } 1467 }
1470 list->append(*filterValue); 1468 list->append(*filterValue);
1471 } while (!range.atEnd()); 1469 } while (!range.atEnd());
1472 return list; 1470 return list;
1473 } 1471 }
1474 1472
(...skipping 3698 matching lines...) Expand 10 before | Expand all | Expand 10 after
5173 case CSSPropertyGridTemplate: 5171 case CSSPropertyGridTemplate:
5174 return consumeGridTemplateShorthand(CSSPropertyGridTemplate, important); 5172 return consumeGridTemplateShorthand(CSSPropertyGridTemplate, important);
5175 case CSSPropertyGrid: 5173 case CSSPropertyGrid:
5176 return consumeGridShorthand(important); 5174 return consumeGridShorthand(important);
5177 default: 5175 default:
5178 return false; 5176 return false;
5179 } 5177 }
5180 } 5178 }
5181 5179
5182 } // namespace blink 5180 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/CSSValue.cpp ('k') | third_party/WebKit/Source/core/css/resolver/ElementStyleResources.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698