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

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

Issue 333423005: [CSS Grid Layout] Implement 'justify-items' parsing (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Patch rebased. Created 6 years, 6 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/resolver/StyleAdjuster.cpp
diff --git a/Source/core/css/resolver/StyleAdjuster.cpp b/Source/core/css/resolver/StyleAdjuster.cpp
index 10c58e882da7a41bdd760ec6278a7533c7b4941d..91edb430ee0bd5e1f29df19ae155d704db5defaa 100644
--- a/Source/core/css/resolver/StyleAdjuster.cpp
+++ b/Source/core/css/resolver/StyleAdjuster.cpp
@@ -126,19 +126,9 @@ static bool isInTopLayer(const Element* element, const RenderStyle* style)
return (element && element->isInTopLayer()) || (style && style->styleType() == BACKDROP);
}
-static bool isDisplayFlexibleBox(EDisplay display)
-{
- return display == FLEX || display == INLINE_FLEX;
-}
-
-static bool isDisplayGridBox(EDisplay display)
-{
- return display == GRID || display == INLINE_GRID;
-}
-
static bool parentStyleForcesZIndexToCreateStackingContext(const RenderStyle* parentStyle)
{
- return isDisplayFlexibleBox(parentStyle->display()) || isDisplayGridBox(parentStyle->display());
+ return parentStyle->isDisplayFlexibleOrGridBox();
}
static bool hasWillChangeThatCreatesStackingContext(const RenderStyle* style)
@@ -408,7 +398,7 @@ void StyleAdjuster::adjustStyleForDisplay(RenderStyle* style, RenderStyle* paren
if (style->writingMode() != TopToBottomWritingMode && (style->display() == BOX || style->display() == INLINE_BOX))
style->setWritingMode(TopToBottomWritingMode);
- if (isDisplayFlexibleBox(parentStyle->display()) || isDisplayGridBox(parentStyle->display())) {
+ if (parentStyle->isDisplayFlexibleOrGridBox()) {
style->setFloating(NoFloat);
style->setDisplay(equivalentBlockDisplay(style->display(), style->isFloating(), !m_useQuirksModeStyles));
}

Powered by Google App Engine
This is Rietveld 408576698