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

Unified Diff: sky/engine/core/css/resolver/StyleAdjuster.cpp

Issue 928393003: Remove the concept of document.documentElement (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 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: 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,
« no previous file with comments | « sky/engine/core/css/resolver/SharedStyleFinder.cpp ('k') | sky/engine/core/css/resolver/StyleBuilderCustom.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698