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

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

Issue 1229273004: Remove Animations and Transitions. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 5 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 a87c5ac0537a63fb448b7f1bdc35a365458d3b3e..fa65ac7062acf421a32725b40671ccc615c0e81c 100644
--- a/sky/engine/core/css/resolver/StyleAdjuster.cpp
+++ b/sky/engine/core/css/resolver/StyleAdjuster.cpp
@@ -96,29 +96,6 @@ static bool parentStyleForcesZIndexToCreateStackingContext(const RenderStyle* pa
return parentStyle->isDisplayFlexibleBox();
}
-static bool hasWillChangeThatCreatesStackingContext(const RenderStyle* style)
-{
- for (size_t i = 0; i < style->willChangeProperties().size(); ++i) {
- switch (style->willChangeProperties()[i]) {
- case CSSPropertyOpacity:
- case CSSPropertyTransform:
- case CSSPropertyWebkitTransform:
- case CSSPropertyTransformStyle:
- case CSSPropertyWebkitTransformStyle:
- case CSSPropertyPerspective:
- case CSSPropertyWebkitPerspective:
- case CSSPropertyWebkitClipPath:
- case CSSPropertyFilter:
- case CSSPropertyZIndex:
- case CSSPropertyPosition:
- return true;
- default:
- break;
- }
- }
- return false;
-}
-
void StyleAdjuster::adjustRenderStyle(RenderStyle* style, RenderStyle* parentStyle, Element& element)
{
ASSERT(parentStyle);
@@ -138,17 +115,9 @@ void StyleAdjuster::adjustRenderStyle(RenderStyle* style, RenderStyle* parentSty
&& (style->hasOpacity()
|| style->hasTransformRelatedProperty()
|| style->clipPath()
- || style->hasFilter()
- || hasWillChangeThatCreatesStackingContext(style)))
+ || style->hasFilter()))
style->setZIndex(0);
- // will-change:transform should result in the same rendering behavior as having a transform,
- // including the creation of a containing block for fixed position descendants.
- if (!style->hasTransform() && (style->willChangeProperties().contains(CSSPropertyWebkitTransform) || style->willChangeProperties().contains(CSSPropertyTransform))) {
- bool makeIdentity = true;
- style->setTransform(TransformOperations(makeIdentity));
- }
-
if (doesNotInheritTextDecoration(style, element))
style->clearAppliedTextDecorations();
@@ -160,10 +129,6 @@ void StyleAdjuster::adjustRenderStyle(RenderStyle* style, RenderStyle* parentSty
// Cull out any useless layers and also repeat patterns into additional layers.
style->adjustBackgroundLayers();
- // If we have transitions, or animations, do not share this style.
- if (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() != OVISIBLE
|| style->overflowY() != OVISIBLE
« 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