mirror of
https://github.com/zen-browser/desktop.git
synced 2026-08-19 21:21:32 +00:00
gh-13844: Fixed boosts not working when anon content exists (gh-13847)
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
diff --git a/gfx/layers/AnimationInfo.cpp b/gfx/layers/AnimationInfo.cpp
|
||||
index 1d330056bd7a4e89aac5e5296a3c164fb42b5c42..38bfbcfcaf0c791ee817aafbd24b1cad67974e62 100644
|
||||
index 1d330056bd7a4e89aac5e5296a3c164fb42b5c42..629fbdd748310c31aeb16b0a8d8e862a99314cc9 100644
|
||||
--- a/gfx/layers/AnimationInfo.cpp
|
||||
+++ b/gfx/layers/AnimationInfo.cpp
|
||||
@@ -14,6 +14,7 @@
|
||||
@@ -10,22 +10,20 @@ index 1d330056bd7a4e89aac5e5296a3c164fb42b5c42..38bfbcfcaf0c791ee817aafbd24b1cad
|
||||
#include "nsIContent.h"
|
||||
#include "nsLayoutUtils.h"
|
||||
#include "nsRefreshDriver.h"
|
||||
@@ -343,7 +344,17 @@ static void SetAnimatable(NonCustomCSSPropertyId aProperty,
|
||||
@@ -341,9 +342,13 @@ static void SetAnimatable(NonCustomCSSPropertyId aProperty,
|
||||
case eCSSProperty_background_color: {
|
||||
// We don't support color animation on the compositor yet so that we can
|
||||
// resolve currentColor at this moment.
|
||||
nscolor foreground =
|
||||
aFrame->Style()->GetVisitedDependentColor(&nsStyleText::mColor);
|
||||
- nscolor foreground =
|
||||
- aFrame->Style()->GetVisitedDependentColor(&nsStyleText::mColor);
|
||||
- aAnimatable = aAnimationValue.GetColor(foreground);
|
||||
+ nscolor foreground = aFrame->Style()->GetVisitedDependentColor(
|
||||
+ &nsStyleText::mColor, nullptr);
|
||||
+ nscolor resolved = aAnimationValue.GetColor(foreground);
|
||||
+ // |foreground| is already boost-resolved through
|
||||
+ // StyleAbsoluteColor::ToColor, so a currentColor keyframe is already
|
||||
+ // filtered; only absolute keyframe colors still need the boost applied
|
||||
+ // here, exactly once, so the composited transition endpoint matches the
|
||||
+ // resting/static paint and doesn't snap when the transition ends.
|
||||
+ aAnimatable =
|
||||
+ aAnimationValue.IsCurrentColor()
|
||||
+ ? resolved
|
||||
+ : zen::nsZenBoostsBackend::FilterColorFromPresContext(
|
||||
+ resolved, aFrame->PresContext());
|
||||
+ aAnimatable = aAnimationValue.IsCurrentColor()
|
||||
+ ? resolved
|
||||
+ : zen::nsZenBoostsBackend::ResolveStyleColor(resolved,
|
||||
+ aFrame);
|
||||
break;
|
||||
}
|
||||
case eCSSProperty_opacity:
|
||||
|
||||
Reference in New Issue
Block a user