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

Unified Diff: third_party/WebKit/Source/core/css/properties/CSSPropertyAPIBackgroundComponent.cpp

Issue 2641223003: Proof of concept that CSSPropertyAPI*::parseSingleValue may need more tahn 2 arguments (Closed)
Patch Set: Created 3 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/css/properties/CSSPropertyAPIBackgroundComponent.cpp
diff --git a/third_party/WebKit/Source/core/css/properties/CSSPropertyAPIBackgroundComponent.cpp b/third_party/WebKit/Source/core/css/properties/CSSPropertyAPIBackgroundComponent.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..a8d49df518d455a885b4ab4e7b70c8af4c73057c
--- /dev/null
+++ b/third_party/WebKit/Source/core/css/properties/CSSPropertyAPIBackgroundComponent.cpp
@@ -0,0 +1,28 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "core/css/properties/CSSPropertyAPIBackgroundComponent.h"
+
+#include "core/css/parser/CSSPropertyParserHelpers.h"
+#include "core/css/properties/CSSPropertyBackgroundComponentUtils.h"
+
+namespace blink {
+
+const CSSValue* CSSPropertyAPIBackgroundComponent::parseSingleValue(
+ CSSPropertyID unresolvedProperty,
+ CSSParserTokenRange& range,
+ const CSSParserContext* context) {
+ CSSValue* result = nullptr;
+ do {
+ CSSValue* value =
+ CSSPropertyBackgroundComponentUtils::consumeBackgroundComponent(
+ unresolvedProperty, range, context);
+ if (!value)
+ return nullptr;
+ CSSPropertyBackgroundComponentUtils::addBackgroundValue(result, value);
+ } while (CSSPropertyParserHelpers::consumeCommaIncludingWhitespace(range));
+ return result;
+}
+
+} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698