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

Unified Diff: Source/core/css/CSSPrimitiveValue.h

Issue 636993002: [CSS Grid Layout] Upgrade justify-content parsing to CSS3 Box Alignment spec. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 2 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: Source/core/css/CSSPrimitiveValue.h
diff --git a/Source/core/css/CSSPrimitiveValue.h b/Source/core/css/CSSPrimitiveValue.h
index 242fcda4eb610f028626fa919fdf1d52839be092..06b08e928932905d578bff457ea807867b31a881 100644
--- a/Source/core/css/CSSPrimitiveValue.h
+++ b/Source/core/css/CSSPrimitiveValue.h
@@ -213,6 +213,19 @@ public:
bool isValueID() const { return m_primitiveUnitType == CSS_VALUE_ID; }
bool colorIsDerivedFromElement() const;
+ static bool isContentDistributionKeyword(CSSValueID id)
+ {
+ return id == CSSValueSpaceBetween || id == CSSValueSpaceAround
+ || id == CSSValueSpaceEvenly || id == CSSValueStretch;
+ }
+
+ static bool isContentPositionKeyword(CSSValueID id)
+ {
+ return id == CSSValueStart || id == CSSValueEnd || id == CSSValueCenter
+ || id == CSSValueFlexStart || id == CSSValueFlexEnd
+ || id == CSSValueLeft || id == CSSValueRight;
+ }
+
static PassRefPtrWillBeRawPtr<CSSPrimitiveValue> createIdentifier(CSSValueID valueID)
{
return adoptRefWillBeNoop(new CSSPrimitiveValue(valueID));

Powered by Google App Engine
This is Rietveld 408576698