Mask layers broken when zooming

RESOLVED FIXED in mozilla26

Status

()

RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: dzbarsky, Assigned: nrc)

Tracking

unspecified
mozilla26
All
Mac OS X
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments, 1 obsolete attachment)

(Reporter)

Description

5 years ago
Created attachment 783540 [details]
scroll-1-ref.html

See attached testcase.  Zoom in (mask is not applied correctly), then refresh.
This happens with the OGL compositor, haven't tested on other platforms.
(Assignee)

Comment 1

5 years ago
Created attachment 787956 [details] [diff] [review]
fix
Assignee: nobody → ncameron
Attachment #787956 - Flags: review?(roc)
(Reporter)

Comment 2

5 years ago
Comment on attachment 787956 [details] [diff] [review]
fix

># HG changeset patch
># Parent 45128af1773980dc890cd698bed16678f9413547
># User Nicholas Cameron <ncameron@mozilla.com>
>Bug 899884. Take into account the app unit to dev pixel ratio when reusing mask layers. r=roc
>

>--- a/layout/style/nsAnimationManager.cpp
>+++ b/layout/style/nsAnimationManager.cpp
>@@ -538,17 +538,21 @@ nsAnimationManager::SizeOfIncludingThis(
> {
>   return aMallocSizeOf(this) + SizeOfExcludingThis(aMallocSizeOf);
> }
> 
> nsIStyleRule*
> nsAnimationManager::CheckAnimationRule(nsStyleContext* aStyleContext,
>                                        mozilla::dom::Element* aElement)
> {
>-  if (!mPresContext->IsProcessingAnimationStyleChange()) {
>+  static int count = 0;
>+  count++;
>+
>+  if (count > 10 && !mPresContext->IsProcessingAnimationStyleChange()) {
>+    count = 0;
>     if (!mPresContext->IsDynamic()) {
>       // For print or print preview, ignore animations.
>       return nullptr;
>     }
> 
>     // Everything that causes our animation data to change triggers a
>     // style change, which in turn triggers a non-animation restyle.
>     // Likewise, when we initially construct frames, we're not in a
>@@ -978,19 +982,20 @@ nsAnimationManager::GetAnimationRule(moz
> 
>     if (ea->mStyleRule) {
>       ea->PostRestyleForAnimation(mPresContext);
>     }
> 
>     return nullptr;
>   }
> 
>-  NS_WARN_IF_FALSE(ea->mStyleRuleRefreshTime ==
>-                     mPresContext->RefreshDriver()->MostRecentRefresh(),
>-                   "should already have refreshed style rule");
>+  if (ea->mStyleRuleRefreshTime !=
>+                     mPresContext->RefreshDriver()->MostRecentRefresh()) {
>+    printf("Whoops!\n");
>+  }
> 
>   return ea->mStyleRule;
> }
> 
> /* virtual */ void
> nsAnimationManager::WillRefresh(mozilla::TimeStamp aTime)
> {
>   NS_ABORT_IF_FALSE(mPresContext,

Oh good, you're trying to figure out the gaia thing! ;)
(Assignee)

Comment 3

5 years ago
Created attachment 787961 [details] [diff] [review]
fix

Without debugging crap from another bug this time. Thanks dzbarsky!
Attachment #787956 - Attachment is obsolete: true
Attachment #787956 - Flags: review?(roc)
Attachment #787961 - Flags: review?(roc)
https://hg.mozilla.org/mozilla-central/rev/ef5be82e9690
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla26
You need to log in before you can comment on or make changes to this bug.