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

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

Issue 2533673002: Added CSSPropertyAPI and CSS padding properties which implement this API (Closed)
Patch Set: Added comments and made code neater Created 4 years, 1 month 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/CSSPaddingProperties.cpp
diff --git a/third_party/WebKit/Source/core/css/properties/CSSPaddingProperties.cpp b/third_party/WebKit/Source/core/css/properties/CSSPaddingProperties.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..d24654765983e287d4f8708fa5fc30ff89a274eb
--- /dev/null
+++ b/third_party/WebKit/Source/core/css/properties/CSSPaddingProperties.cpp
@@ -0,0 +1,43 @@
+// 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/CSSPaddingProperties.h"
+
+#include "core/css/parser/CSSParserTokenRange.h"
+
+namespace blink {
+
+const CSSValue* CSSPropertyAPIWebkitPaddingStart::parseSingleValue(
+ CSSParserTokenRange& range,
+ const CSSParserContext& context) {
+ return consumeLengthOrPercent(
+ range, context.mode(), ValueRangeNonNegative,
+ CSSPropertyParserHelpers::UnitlessQuirk::Forbid);
+}
+
+const CSSValue* CSSPropertyAPIWebkitPaddingEnd::parseSingleValue(
+ CSSParserTokenRange& range,
+ const CSSParserContext& context) {
+ return consumeLengthOrPercent(
+ range, context.mode(), ValueRangeNonNegative,
+ CSSPropertyParserHelpers::UnitlessQuirk::Forbid);
+}
+
+const CSSValue* CSSPropertyAPIWebkitPaddingBefore::parseSingleValue(
+ CSSParserTokenRange& range,
+ const CSSParserContext& context) {
+ return consumeLengthOrPercent(
+ range, context.mode(), ValueRangeNonNegative,
+ CSSPropertyParserHelpers::UnitlessQuirk::Forbid);
+}
+
+const CSSValue* CSSPropertyAPIWebkitPaddingAfter::parseSingleValue(
+ CSSParserTokenRange& range,
+ const CSSParserContext& context) {
+ return consumeLengthOrPercent(
+ range, context.mode(), ValueRangeNonNegative,
+ CSSPropertyParserHelpers::UnitlessQuirk::Forbid);
+}
+
+} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698