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)); |
} |