WebKit Bugzilla
Attachment 358859 Details for
Bug 193343
: Animation and other code is too aggressive about invalidating layer composition
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-193343-20190110185548.patch (text/plain), 8.22 KB, created by
Simon Fraser (smfr)
on 2019-01-10 18:55:48 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Simon Fraser (smfr)
Created:
2019-01-10 18:55:48 PST
Size:
8.22 KB
patch
obsolete
>Subversion Revision: 239693 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 7f29aa7d9879e468dbb575bd40d28ca9a88254eb..65ab305e5e9b549687bb90d5997df277666ca1ed 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,32 @@ >+2019-01-10 Simon Fraser <simon.fraser@apple.com> >+ >+ Animation and other code is too aggressive about invalidating layer composition >+ https://bugs.webkit.org/show_bug.cgi?id=193343 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ No new tests (OOPS!). >+ >+ * animation/KeyframeEffect.cpp: >+ (WebCore::invalidateElement): >+ * page/animation/AnimationBase.cpp: >+ (WebCore::AnimationBase::setNeedsStyleRecalc): >+ * page/animation/CSSAnimationController.cpp: >+ (WebCore::CSSAnimationControllerPrivate::updateAnimations): >+ (WebCore::CSSAnimationControllerPrivate::fireEventsAndUpdateStyle): >+ (WebCore::CSSAnimationControllerPrivate::pauseAnimationAtTime): >+ (WebCore::CSSAnimationControllerPrivate::pauseTransitionAtTime): >+ (WebCore::CSSAnimationController::cancelAnimations): >+ * rendering/RenderImage.cpp: >+ (WebCore::RenderImage::imageChanged): >+ * rendering/RenderLayer.cpp: >+ (WebCore::RenderLayer::calculateClipRects const): >+ * rendering/svg/SVGResourcesCache.cpp: >+ (WebCore::SVGResourcesCache::clientStyleChanged): >+ * svg/SVGAnimateElementBase.cpp: >+ (WebCore::applyCSSPropertyToTarget): >+ (WebCore::removeCSSPropertyFromTarget): >+ > 2019-01-07 David Kilzer <ddkilzer@apple.com> > > PlatformECKey should use a std::unique_ptr >diff --git a/Source/WebCore/animation/KeyframeEffect.cpp b/Source/WebCore/animation/KeyframeEffect.cpp >index 13dbcd0fd133979c92351cfb0460d98211a730c3..a54f65f063191193f4fd65dfc02739e8746b8b32 100644 >--- a/Source/WebCore/animation/KeyframeEffect.cpp >+++ b/Source/WebCore/animation/KeyframeEffect.cpp >@@ -60,7 +60,7 @@ using namespace JSC; > static inline void invalidateElement(Element* element) > { > if (element) >- element->invalidateStyleAndLayerComposition(); >+ element->invalidateStyle(); > } > > static inline String CSSPropertyIDToIDLAttributeName(CSSPropertyID cssPropertyId) >diff --git a/Source/WebCore/page/animation/AnimationBase.cpp b/Source/WebCore/page/animation/AnimationBase.cpp >index 3a74f96934869d33d6c952c12d668ef6306043af..ad5f154d8ec979083bd1455a351db2ee014a23f2 100644 >--- a/Source/WebCore/page/animation/AnimationBase.cpp >+++ b/Source/WebCore/page/animation/AnimationBase.cpp >@@ -90,7 +90,7 @@ void AnimationBase::setNeedsStyleRecalc(Element* element) > return; > > ASSERT(element->document().pageCacheState() == Document::NotInPageCache); >- element->invalidateStyleAndLayerComposition(); >+ element->invalidateStyle(); > } > > double AnimationBase::duration() const >diff --git a/Source/WebCore/page/animation/CSSAnimationController.cpp b/Source/WebCore/page/animation/CSSAnimationController.cpp >index dc1ceab3ab2094a4a627f563df98757eb60104a3..a397ddb1333e55df46851416e2a1494413716f59 100644 >--- a/Source/WebCore/page/animation/CSSAnimationController.cpp >+++ b/Source/WebCore/page/animation/CSSAnimationController.cpp >@@ -145,7 +145,7 @@ Optional<Seconds> CSSAnimationControllerPrivate::updateAnimations(SetChanged cal > break; > Element& element = *compositeAnimation.key; > ASSERT(element.document().pageCacheState() == Document::NotInPageCache); >- element.invalidateStyleAndLayerComposition(); >+ element.invalidateStyle(); > calledSetChanged = true; > } > } >@@ -225,7 +225,7 @@ void CSSAnimationControllerPrivate::fireEventsAndUpdateStyle() > } > > for (auto& change : m_elementChangesToDispatch) >- change->invalidateStyleAndLayerComposition(); >+ change->invalidateStyle(); > > m_elementChangesToDispatch.clear(); > >@@ -412,7 +412,7 @@ bool CSSAnimationControllerPrivate::pauseAnimationAtTime(Element& element, const > { > CompositeAnimation& compositeAnimation = ensureCompositeAnimation(element); > if (compositeAnimation.pauseAnimationAtTime(name, t)) { >- element.invalidateStyleAndLayerComposition(); >+ element.invalidateStyle(); > startUpdateStyleIfNeededDispatcher(); > return true; > } >@@ -424,7 +424,7 @@ bool CSSAnimationControllerPrivate::pauseTransitionAtTime(Element& element, cons > { > CompositeAnimation& compositeAnimation = ensureCompositeAnimation(element); > if (compositeAnimation.pauseTransitionAtTime(cssPropertyID(property), t)) { >- element.invalidateStyleAndLayerComposition(); >+ element.invalidateStyle(); > startUpdateStyleIfNeededDispatcher(); > return true; > } >@@ -607,7 +607,7 @@ void CSSAnimationController::cancelAnimations(Element& element) > if (element.document().renderTreeBeingDestroyed()) > return; > ASSERT(element.document().pageCacheState() == Document::NotInPageCache); >- element.invalidateStyleAndLayerComposition(); >+ element.invalidateStyle(); > } > > AnimationUpdate CSSAnimationController::updateAnimations(Element& element, const RenderStyle& newStyle, const RenderStyle* oldStyle) >diff --git a/Source/WebCore/rendering/RenderImage.cpp b/Source/WebCore/rendering/RenderImage.cpp >index 85a101dc86c563b51c5e3150d3868561914baa91..76441ead18d486ef55819cd16c61d18a956fa541 100644 >--- a/Source/WebCore/rendering/RenderImage.cpp >+++ b/Source/WebCore/rendering/RenderImage.cpp >@@ -284,7 +284,7 @@ void RenderImage::imageChanged(WrappedImagePtr newImage, const IntRect* rect) > ASSERT(element()); > if (element()) { > m_needsToSetSizeForAltText = true; >- element()->invalidateStyleAndLayerComposition(); >+ element()->invalidateStyle(); > } > return; > } >diff --git a/Source/WebCore/rendering/RenderLayer.cpp b/Source/WebCore/rendering/RenderLayer.cpp >index 8ad503e465da8d2273a3a3699e407ec81ce38d4c..c1ca6b9f1c4175af160f7adf584106bf3b824704 100644 >--- a/Source/WebCore/rendering/RenderLayer.cpp >+++ b/Source/WebCore/rendering/RenderLayer.cpp >@@ -6600,7 +6600,7 @@ void RenderLayer::filterNeedsRepaint() > { > // We use the enclosing element so that we recalculate style for the ancestor of an anonymous object. > if (Element* element = enclosingElement()) >- element->invalidateStyleAndLayerComposition(); >+ element->invalidateStyle(); > renderer().repaint(); > } > >diff --git a/Source/WebCore/rendering/svg/SVGResourcesCache.cpp b/Source/WebCore/rendering/svg/SVGResourcesCache.cpp >index 3a231c7e76a1bb18150430ec0005b318f858aa74..da24c07621000228563fcb583c04d05eec0212d4 100644 >--- a/Source/WebCore/rendering/svg/SVGResourcesCache.cpp >+++ b/Source/WebCore/rendering/svg/SVGResourcesCache.cpp >@@ -116,7 +116,7 @@ void SVGResourcesCache::clientStyleChanged(RenderElement& renderer, StyleDiffere > RenderSVGResource::markForLayoutAndParentResourceInvalidation(renderer, false); > > if (renderer.element() && !renderer.element()->isSVGElement()) >- renderer.element()->invalidateStyleAndLayerComposition(); >+ renderer.element()->invalidateStyle(); > } > > void SVGResourcesCache::clientWasAddedToTree(RenderObject& renderer) >diff --git a/Source/WebCore/svg/SVGAnimateElementBase.cpp b/Source/WebCore/svg/SVGAnimateElementBase.cpp >index a4a24faf871504c1d73c3bf20ffd3edc6b6de84d..6fd1bc1097044cb78e9a7d0e0fc57e8c458c3a92 100644 >--- a/Source/WebCore/svg/SVGAnimateElementBase.cpp >+++ b/Source/WebCore/svg/SVGAnimateElementBase.cpp >@@ -249,14 +249,14 @@ static inline void applyCSSPropertyToTarget(SVGElement& targetElement, CSSProper > if (!targetElement.ensureAnimatedSMILStyleProperties().setProperty(id, value, false)) > return; > >- targetElement.invalidateStyleAndLayerComposition(); >+ targetElement.invalidateStyle(); > } > > static inline void removeCSSPropertyFromTarget(SVGElement& targetElement, CSSPropertyID id) > { > ASSERT(!targetElement.m_deletionHasBegun); > targetElement.ensureAnimatedSMILStyleProperties().removeProperty(id); >- targetElement.invalidateStyleAndLayerComposition(); >+ targetElement.invalidateStyle(); > } > > static inline void applyCSSPropertyToTargetAndInstances(SVGElement& targetElement, const QualifiedName& attributeName, const String& valueAsString)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 193343
:
358859
|
358865
|
358867
|
358869
|
358870
|
358874
|
358933
|
358970
|
358972
|
358973