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

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

Issue 2065233002: Force flattening for elements with non-initial value of opacity (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix assert. (overflow needs to be adjusted prior to querying used transform-style) Created 4 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: third_party/WebKit/Source/core/css/resolver/StyleAdjuster.cpp
diff --git a/third_party/WebKit/Source/core/css/resolver/StyleAdjuster.cpp b/third_party/WebKit/Source/core/css/resolver/StyleAdjuster.cpp
index 5a226160046d64377ea83ebc6b7850fd4f1d8ad0..b4797ba5d2765b6d63aa8673f81aa273a2180e8b 100644
--- a/third_party/WebKit/Source/core/css/resolver/StyleAdjuster.cpp
+++ b/third_party/WebKit/Source/core/css/resolver/StyleAdjuster.cpp
@@ -184,6 +184,9 @@ void StyleAdjuster::adjustComputedStyle(ComputedStyle& style, const ComputedStyl
if (style.position() == StaticPosition && !parentStyleForcesZIndexToCreateStackingContext(parentStyle))
style.setHasAutoZIndex();
+ if (style.overflowX() != OverflowVisible || style.overflowY() != OverflowVisible)
+ adjustOverflow(style);
+
// 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/masks/reflections.
@@ -207,9 +210,6 @@ void StyleAdjuster::adjustComputedStyle(ComputedStyle& style, const ComputedStyl
style.applyTextDecorations();
- if (style.overflowX() != OverflowVisible || style.overflowY() != OverflowVisible)
- adjustOverflow(style);
-
// Cull out any useless layers and also repeat patterns into additional layers.
style.adjustBackgroundLayers();
style.adjustMaskLayers();
@@ -222,12 +222,6 @@ void StyleAdjuster::adjustComputedStyle(ComputedStyle& style, const ComputedStyl
if (style.hasPseudoStyle(PseudoIdFirstLetter) || style.transitions() || style.animations())
style.setUnique();
- // FIXME: when dropping the -webkit prefix on transform-style, we should also have opacity < 1 cause flattening.
- if (style.preserves3D() && (style.overflowX() != OverflowVisible
- || style.overflowY() != OverflowVisible
- || style.hasFilterInducingProperty()))
- style.setTransformStyle3D(TransformStyle3DFlat);
-
adjustStyleForEditing(style);
bool isSVGElement = element && element->isSVGElement();

Powered by Google App Engine
This is Rietveld 408576698