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

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

Issue 2533673002: Added CSSPropertyAPI and CSS padding properties which implement this API (Closed)
Patch Set: fix branch 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/parser/CSSPropertyParser.cpp
diff --git a/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp b/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp
index cb27b6b55f89c8eb1707cfce2d21562dcd142272..06ba6a774ad9503b07ee0091b5fddb2d3ef203b6 100644
--- a/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp
+++ b/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp
@@ -40,6 +40,8 @@
#include "core/css/parser/CSSParserIdioms.h"
#include "core/css/parser/CSSPropertyParserHelpers.h"
#include "core/css/parser/CSSVariableParser.h"
+#include "core/css/properties/CSSPaddingProperties.h"
+#include "core/css/properties/CSSPropertyDescriptor.h"
#include "core/frame/UseCounter.h"
#include "core/layout/LayoutTheme.h"
#include "core/svg/SVGPathUtilities.h"
@@ -3425,6 +3427,11 @@ const CSSValue* CSSPropertyParser::parseSingleValue(
m_range.peek().id());
return consumeIdent(m_range);
}
+
+ const CSSPropertyDescriptor& cssPropertyDesc = get(property);
+ if (cssPropertyDesc.isValidProperty)
+ return cssPropertyDesc.parseSingleValue(m_range, m_context);
+
switch (property) {
case CSSPropertyWillChange:
return consumeWillChange(m_range);
@@ -3515,13 +3522,6 @@ const CSSValue* CSSPropertyParser::parseSingleValue(
return consumeLengthOrPercent(m_range, m_context.mode(),
ValueRangeNonNegative,
UnitlessQuirk::Allow);
- case CSSPropertyWebkitPaddingStart:
- case CSSPropertyWebkitPaddingEnd:
- case CSSPropertyWebkitPaddingBefore:
- case CSSPropertyWebkitPaddingAfter:
- return consumeLengthOrPercent(m_range, m_context.mode(),
- ValueRangeNonNegative,
- UnitlessQuirk::Forbid);
case CSSPropertyClip:
return consumeClip(m_range, m_context.mode());
case CSSPropertyTouchAction:

Powered by Google App Engine
This is Rietveld 408576698