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

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

Issue 2882603002: Implemented remaining non-grouped longhand property APIs (Closed)
Patch Set: implemented single property apis using script Created 3 years, 6 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
Index: third_party/WebKit/Source/core/css/properties/CSSPropertyAPIGridGap.cpp
diff --git a/third_party/WebKit/Source/core/css/properties/CSSPropertyAPIGridGap.cpp b/third_party/WebKit/Source/core/css/properties/CSSPropertyAPIGridGap.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..2cddd1aeb049fc35c62e492916694d3e64d30171
--- /dev/null
+++ b/third_party/WebKit/Source/core/css/properties/CSSPropertyAPIGridGap.cpp
@@ -0,0 +1,36 @@
+// Copyright 2017 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/CSSPropertyAPIGridGap.h"
+
+namespace blink {
+
+class CSSParserContext;
+class CSSParserLocalContext;
+class CSSParserTokenRange;
+class CSSValue;
+
+const CSSValue* CSSPropertyAPIGridGap::parseSingleValue(
Jia 2017/06/08 22:07:14 This is a shorthand, it should impl parseShorthand
+ CSSParserTokenRange& range,
+ const CSSParserContext& context,
+ const CSSParserLocalContext&) {
+ DCHECK(RuntimeEnabledFeatures::CSSGridLayoutEnabled());
+ DCHECK_EQ(shorthandForProperty(CSSPropertyGridGap).length(), 2u);
+ CSSValue* row_gap = ConsumeLengthOrPercent(range, context->Mode(),
+ kValueRangeNonNegative);
+ CSSValue* column_gap = ConsumeLengthOrPercent(range, context->Mode(),
+ kValueRangeNonNegative);
+ if (!row_gap || !range.AtEnd())
+ return false;
+ if (!column_gap)
+ column_gap = row_gap;
+ AddParsedProperty(CSSPropertyGridRowGap, CSSPropertyGridGap, *row_gap,
+ important);
Jia 2017/06/08 22:07:14 AddParsedProperty is a wrapper function private to
Bugs Nash 2017/06/09 00:00:17 no this code certainly doesn't compile! as I menti
Jia 2017/06/09 00:10:07 Ok, so I don't need to lgtm for now. Thanks for th
+ AddParsedProperty(CSSPropertyGridColumnGap, CSSPropertyGridGap,
+ *column_gap, important);
+ return true;
+}
+}
+
+} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698