Index: sky/engine/core/css/resolver/StyleAdjuster.cpp |
diff --git a/sky/engine/core/css/resolver/StyleAdjuster.cpp b/sky/engine/core/css/resolver/StyleAdjuster.cpp |
index 3ca4fd0b15e16a0608f9ae25d348426058f55092..8e0110d583738df5834ac64f11c084abe72b28c2 100644 |
--- a/sky/engine/core/css/resolver/StyleAdjuster.cpp |
+++ b/sky/engine/core/css/resolver/StyleAdjuster.cpp |
@@ -133,11 +133,7 @@ void StyleAdjuster::adjustRenderStyle(RenderStyle* style, RenderStyle* parentSty |
ASSERT(parentStyle); |
if (style->display() != NONE) { |
- // Absolute/fixed positioned elements, floating elements and the document element need block-like outside display. |
- if (style->hasOutOfFlowPosition() || element.document().documentElement() == element) |
- style->setDisplay(equivalentBlockDisplay(style->display())); |
- |
- if (parentStyle->requiresOnlyBlockChildren()) |
+ if (style->hasOutOfFlowPosition() || parentStyle->requiresOnlyBlockChildren()) |
style->setDisplay(equivalentBlockDisplay(style->display())); |
else |
style->setDisplay(equivalentInlineDisplay(style->display())); |
@@ -147,15 +143,12 @@ void StyleAdjuster::adjustRenderStyle(RenderStyle* style, RenderStyle* parentSty |
if (style->position() == StaticPosition && !parentStyleForcesZIndexToCreateStackingContext(parentStyle)) |
style->setHasAutoZIndex(); |
- // Auto z-index becomes 0 for the root element and transparent objects. This prevents |
- // cases where objects that should be blended as a single unit end up with a non-transparent |
- // object wedged in between them. Auto z-index also becomes 0 for objects that specify transforms. |
- if (style->hasAutoZIndex() && ((element.document().documentElement() == element) |
- || style->hasOpacity() |
- || style->hasTransformRelatedProperty() |
- || style->clipPath() |
- || style->hasFilter() |
- || hasWillChangeThatCreatesStackingContext(style))) |
+ if (style->hasAutoZIndex() |
+ && (style->hasOpacity() |
+ || style->hasTransformRelatedProperty() |
+ || style->clipPath() |
+ || style->hasFilter() |
+ || hasWillChangeThatCreatesStackingContext(style))) |
style->setZIndex(0); |
// will-change:transform should result in the same rendering behavior as having a transform, |