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

Unified Diff: third_party/WebKit/Source/core/style/ComputedStyle.h

Issue 2569113004: [css-align] Dedicated initial functions for {align-justify}-content
Patch Set: Preliminary approach. Created 4 years 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/style/ComputedStyle.h
diff --git a/third_party/WebKit/Source/core/style/ComputedStyle.h b/third_party/WebKit/Source/core/style/ComputedStyle.h
index 2ee781a0144d73908be32b0099d7b765d2edeae9..61150455ce6b203004ce3965d6f0fb1971002792 100644
--- a/third_party/WebKit/Source/core/style/ComputedStyle.h
+++ b/third_party/WebKit/Source/core/style/ComputedStyle.h
@@ -517,13 +517,15 @@ class CORE_EXPORT ComputedStyle : public ComputedStyleBase,
// Non-Inherited properties.
// Content alignment properties.
- static StyleContentAlignmentData initialContentAlignment() {
- return StyleContentAlignmentData(ContentPositionNormal,
- ContentDistributionDefault,
- OverflowAlignmentDefault);
- }
// align-content (aka -webkit-align-content)
+ static StyleContentAlignmentData initialAlignContent() {
+ return StyleContentAlignmentData(
+ ContentPositionNormal, RuntimeEnabledFeatures::cssGridLayoutEnabled()
+ ? ContentDistributionDefault
+ : ContentDistributionStretch,
+ OverflowAlignmentDefault);
+ }
const StyleContentAlignmentData& alignContent() const {
return m_rareNonInheritedData->m_alignContent;
}
@@ -532,6 +534,13 @@ class CORE_EXPORT ComputedStyle : public ComputedStyleBase,
}
// justify-content (aka -webkit-justify-content)
+ static StyleContentAlignmentData initialJustifyContent() {
+ return StyleContentAlignmentData(
+ RuntimeEnabledFeatures::cssGridLayoutEnabled()
+ ? ContentPositionNormal
+ : ContentPositionFlexStart,
+ ContentDistributionDefault, OverflowAlignmentDefault);
+ }
const StyleContentAlignmentData& justifyContent() const {
return m_rareNonInheritedData->m_justifyContent;
}

Powered by Google App Engine
This is Rietveld 408576698