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

Unified Diff: Source/core/css/resolver/StyleBuilderCustom.cpp

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: Rebaseline some tests expectations. 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
« no previous file with comments | « Source/core/css/resolver/StyleAdjuster.cpp ('k') | Source/core/rendering/RenderFlexibleBox.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/resolver/StyleBuilderCustom.cpp
diff --git a/Source/core/css/resolver/StyleBuilderCustom.cpp b/Source/core/css/resolver/StyleBuilderCustom.cpp
index 61f9469503e9409c0ba3b885b951b06d94bc637f..931f706a24100cd80398288ea01c3db982ec1f68 100644
--- a/Source/core/css/resolver/StyleBuilderCustom.cpp
+++ b/Source/core/css/resolver/StyleBuilderCustom.cpp
@@ -43,6 +43,7 @@
#include "core/StyleBuilderFunctions.h"
#include "core/StylePropertyShorthand.h"
#include "core/css/BasicShapeFunctions.h"
+#include "core/css/CSSContentDistributionValue.h"
#include "core/css/CSSCursorImageValue.h"
#include "core/css/CSSFontValue.h"
#include "core/css/CSSGradientValue.h"
@@ -188,6 +189,31 @@ void StyleBuilderFunctions::applyValueCSSPropertyJustifyItems(StyleResolverState
}
}
+void StyleBuilderFunctions::applyInitialCSSPropertyJustifyContent(StyleResolverState& state)
+{
+ state.style()->setJustifyContent(RenderStyle::initialJustifyContent());
+ state.style()->setJustifyContentOverflowAlignment(RenderStyle::initialJustifyContentOverflowAlignment());
+ state.style()->setJustifyContentDistribution(RenderStyle::initialJustifyContentDistribution());
+}
+
+void StyleBuilderFunctions::applyInheritCSSPropertyJustifyContent(StyleResolverState& state)
+{
+ state.style()->setJustifyContent(state.parentStyle()->justifyContent());
+ state.style()->setJustifyContentOverflowAlignment(state.parentStyle()->justifyContentOverflowAlignment());
+ state.style()->setJustifyContentDistribution(state.parentStyle()->justifyContentDistribution());
+}
+
+void StyleBuilderFunctions::applyValueCSSPropertyJustifyContent(StyleResolverState& state, CSSValue* value)
+{
+ CSSContentDistributionValue* contentValue = toCSSContentDistributionValue(value);
+ if (contentValue->distribution()->getValueID() != CSSValueInvalid)
+ state.style()->setJustifyContentDistribution(*contentValue->distribution());
+ if (contentValue->position()->getValueID() != CSSValueInvalid)
+ state.style()->setJustifyContent(*contentValue->position());
+ if (contentValue->overflow()->getValueID() != CSSValueInvalid)
+ state.style()->setJustifyContentOverflowAlignment(*contentValue->overflow());
+}
+
void StyleBuilderFunctions::applyInitialCSSPropertyCursor(StyleResolverState& state)
{
state.style()->clearCursorList();
« no previous file with comments | « Source/core/css/resolver/StyleAdjuster.cpp ('k') | Source/core/rendering/RenderFlexibleBox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698