Specific styling causes graphic corruption when I drag/scroll fake scrollbar

RESOLVED FIXED in Firefox 49

Status

()

defect
RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: arni2033, Assigned: BenWa)

Tracking

({regression})

48 Branch
mozilla50
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox47 unaffected, firefox48 wontfix, firefox49 fixed, firefox50 fixed)

Details

(Whiteboard: [gfx-noted])

Attachments

(4 attachments)

>>>   My Info:   Win7_64, Nightly 49, 32bit, ID 20160526082509
STR_1:
1. Download and extract attached "testcase 1" in a folder with a short full name
2. Open "2016.04.20 00-40-17 Реклама ВКонтакте.htm" in Firefox
3. Hover mouse over the blue scrollbar (selector ".wcommunity_scrollbar_inner")
4. Hold left mouse button
5. Slowly move mouse down by ~100px without releasing left mouse button

AR:  Scrollbar thumb poorly redraws: displays many transparent lines
ER:  Scrollbar should be rendered in a normal way - solid blue (or lightblue)


STR_2:
1. Download and extract attached "testcase 1" in a folder with a short full name
2. Open "2016.04.20 00-40-17 Реклама ВКонтакте.htm" in Firefox
3. Hover mouse over the scrollable area with blue scrollbar (selector ".wcommunity_scrollbar_inner")
4. Rotate mouse wheel down several times, then up several times

AR:  Scrollbar doesn't redraw correctly: parts of scrollbar thumb are drawn on empty place
ER:  Scrollbar thumb should be drawn only on it's actual position

Notes:
 1) It's better reproducible on HiDPI, e.g. pref layout.css.devPixelsPerPx set to 1.25
 2) The page shows some prompts after a while which temporarily break the testcase (remove graphic
    corruption). Probably this bug only manifests with specific layerization, I don't know.

This is regression from bug 1258558. Regression range:
> https://hg.mozilla.org/integration/mozilla-inbound/pushloghtml?fromchange=826afa1625f49803d32acfaa5db5add1bede9d34&tochange=1cc3d0a27d30363a6e3e3727d67fc05ef758b826
I can't reproduce on Mac Nightly 50.0a1 (2016-07-13). Trying more similar configs...
I see the scrollbar thumb fall out of sync in this testcase and filed bug 1287147 for it.
Can you please include your about:support information? In particular I want to see what rendering options you're using on Windows. I can't reproduce this on windows either. It must be specific to your rendering options.
Flags: needinfo?(bgirard) → needinfo?(arni2033)
Flags: needinfo?(bgirard)
Flags: needinfo?(arni2033)
I just double-checked the regression range - no mistake here.
Some more notes:
3) It happens during opacity transition, so in STR_2 it's better: {1} not to hover scrollbar itself
  {2} do several "scroll sessions", 1 second each   {3} make 2s pauses between "scroll sessions"
4) It also happens with HWA disabled
5) STR_1 isn't reproducible on normal DPI (layout.css.devPixelsPerPx set to 1.0)
   Actually, DPI level in my OS is set to 1.25, maybe this explains Note 1.
> screencast: https://dl.dropboxusercontent.com/s/jfkexheysnk7p97/bug%201287066%20comment%207.webm
Have you been able to reproduce this using the latest nightly build? I've been trying different versions with APZ+D3D11+D2D and I'm still not able to reproduce.

The regression range would explain this kind of bug. But being able to reproduce would really help in understanding why there's a mismatch between empty region equality.
Ok, I can reproduce on Jeff' machine but not mine. I'm unsure what the environment difference is.
Ok, that's great. BTW if I set layers.prefer-d3d9 -> true, the bug disappears, but only with HWA
Benoit, do you have any hope that this bug is going to be fixed for 48? Thanks
We'll try to get the solution in time for 48, then we can decide if the uplift is too risky.
Assignee: nobody → bgirard
We can 'likely' have a solution which is to backout the patch causing a regression and changing how the region builder works. I'd like to understand the issue a bit better before doing that.
Found the culprit:
https://dxr.mozilla.org/mozilla-central/rev/4c05938a64a7fde3ac2d7f4493aee1c5f2ad8a0a/gfx/layers/Layers.h#870

The correctness here depends on IsEqualEdges and causes this bug otherwise.
Comment on attachment 8773037 [details]
Bug 1287066 - Restore Layer::SetVisibleRegion behavior to fix invalidation bug.

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/65674/diff/1-2/
Attachment #8773037 - Attachment description: Bug 1287066 - Use IsEqualEdges in Layer::SetVisibleRegion to fix invalidation bug. → [mq]: 1287066.1
Comment on attachment 8773037 [details]
Bug 1287066 - Restore Layer::SetVisibleRegion behavior to fix invalidation bug.

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/65674/diff/2-3/
Attachment #8773037 - Attachment description: [mq]: 1287066.1 → Bug 1287066 - Use IsEqualEdges in Layer::SetVisibleRegion to fix invalidation bug.
Attachment #8773037 - Flags: review?(mstange) → review+
Comment on attachment 8773037 [details]
Bug 1287066 - Restore Layer::SetVisibleRegion behavior to fix invalidation bug.

https://reviewboard.mozilla.org/r/65674/#review62738

r+ if you change the commit message, and assuming you have tested that this fixes the bug.

Please also file a bug for finding out why this fixes things and add a comment that points to that bug.
See Also: → 1288464
Comment on attachment 8773037 [details]
Bug 1287066 - Restore Layer::SetVisibleRegion behavior to fix invalidation bug.

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/65674/diff/3-4/
Attachment #8773037 - Attachment description: Bug 1287066 - Use IsEqualEdges in Layer::SetVisibleRegion to fix invalidation bug. → Bug 1287066 - Restore Layer::SetVisibleRegion behavior to fix invalidation bug.
Pushed by b56girard@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/67186c2d647e
Restore Layer::SetVisibleRegion behavior to fix invalidation bug. r=mstange
https://hg.mozilla.org/mozilla-central/rev/67186c2d647e
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla50
Comment on attachment 8773037 [details]
Bug 1287066 - Restore Layer::SetVisibleRegion behavior to fix invalidation bug.

Approval Request Comment
[Feature/regressing bug #]: bug 1258558
[User impact if declined]: Corrupted rendering in rare cases (see this bug)
[Describe test coverage new/current, TreeHerder]: This impact general rendering which has extensive coverage in reftest.
[Risks and why]: Fairly low, we're disabling an optimization for a very specific case. This should be lower risk than backing out bug 1258558 as well.
[String/UUID change made/needed]: None
Attachment #8773037 - Flags: approval-mozilla-beta?
Attachment #8773037 - Flags: approval-mozilla-aurora?
The next version is the RC, we do want this patch that late?
Given that AFAIK this is the only test case that can reproduce this it's probably wise to take into aurora but not beta.
Comment on attachment 8773037 [details]
Bug 1287066 - Restore Layer::SetVisibleRegion behavior to fix invalidation bug.

This patch fixes a scrollbar regression but it's too late for 48 beta RC. Take it in aurora.
Attachment #8773037 - Flags: approval-mozilla-beta?
Attachment #8773037 - Flags: approval-mozilla-beta-
Attachment #8773037 - Flags: approval-mozilla-aurora?
Attachment #8773037 - Flags: approval-mozilla-aurora+
Depends on: 1289032
See Also: → 1289829
Flags: needinfo?(bgirard)
See Also: → 1327329
You need to log in before you can comment on or make changes to this bug.