Closed Bug 1542668 Opened 6 years ago Closed 6 months ago

Firefox Maximization bug after opening webrender with TranslucentTB

Categories

(Core :: Graphics: WebRender, defect, P5)

66 Branch
Desktop
Windows 10
defect

Tracking

()

RESOLVED INACTIVE
Tracking Status
firefox67 --- wontfix
firefox68 --- wontfix
firefox69 --- fix-optional

People

(Reporter: jaleo.fu, Unassigned)

References

Details

(Keywords: regression)

Attachments

(1 file, 1 obsolete file)

204.39 KB, image/png
Details
Attached image bug.png

User Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:66.0) Gecko/20100101 Firefox/66.0

Steps to reproduce:

  1. Firefox enable webrender(gfx.webrender.all.qualified = true).
  2. Firefox window maximization.
  3. The taskbar of Windows 10 is placed at the top and set to translucent.(If the taskbar is opaque, you will not see the bug clearly.)

Actual results:

At this point, you will see that the top edge of the Firefox window will have an extra edge, which will go deep into the taskbar of windows 10.

Expected results:

Firefox should be like any other program, with no extra slender edge on the top edge of the window.

Component: Untriaged → Graphics: WebRender
Product: Firefox → Core

Hi Jaleo, thanks for the report. I'm trying to reproduce but I can't figure out how to set my taskbar to transparent. Can you help me out here?

I assume this only occurs with webrender enabled? Is this on a completely fresh profile (other than enabling webrender)? Do you know if this is a recent regression or has it always been this way? Thanks.

Flags: needinfo?(jaleo.fu)

(In reply to Jamie Nicol [:jnicol] from comment #1)

Hi Jaleo, thanks for the report. I'm trying to reproduce but I can't figure out how to set my taskbar to transparent. Can you help me out here?

I assume this only occurs with webrender enabled? Is this on a completely fresh profile (other than enabling webrender)? Do you know if this is a recent regression or has it always been this way? Thanks.

I've had this problem since I enabled webrender on Firefox 64.
I tested it with the latest version of firefox with fresh profile, when i enable webrender, the same result is obtained..

If you want to test this problem, you need a free tool, TranslucentTB. (https://github.com/TranslucentTB/TranslucentTB)
TranslucentTB is a lightweight utility that makes the Windows taskbar translucent. You can download it with this link, https://github.com/TranslucentTB/TranslucentTB/releases/download/2018.2/TranslucentTB-setup.exe

After installation, run it. Right click on the program icon in the taskbar, select “clear” under the Regular menu, and cancel the “enable” option under the Maximised Windows menu.

Flags: needinfo?(jaleo.fu)
Flags: needinfo?(jbonisteel)
Priority: -- → P3

https://www.reddit.com/r/firefox/comments/buwjzp/firefox_bugging_out_tabs/eplhkf2/
Task bar at the top, unexpected drag space visible when Firefox is maximized: https://i.imgur.com/sbHYpiy.png

Keywords: regression
OS: Unspecified → Windows 10
Hardware: Unspecified → Desktop
Status: UNCONFIRMED → NEW
Ever confirmed: true

Alexis, can you help see if you can reproduce this?

Blocks: wr-68
Flags: needinfo?(a.beingessner)

how to reproduce without installing any weird os extensions:

  1. ensure the taskbar is unlocked, always visible, and top-mounted
  2. maximize firefox
  3. drag the task bar down and release, increasing its height (firefox should shrink to fit the new desktop size)
  4. drag the task bar back up, without releasing the mouse. The taskbar will move out of the way, but firefox won't have had a chance to shrink yet, revealing the extra chunk of window.

Confirmed this happens on windows 10, stable (67) and nightly, and only if webrender is enabled.

Flags: needinfo?(a.beingessner)

This is likely the root cause of bug 1510378.

Blocks: 1510378

Maybe bug 1555244 is related too

Blocks: 1555244

Notes from a quick look over the source + wr-capture:

The wr-capture indeed specifies the document size as 16 pixels taller than the window seemingly should be. However this is compensated by something, as we see several items in the wr display list have a position of (xxx, 16). You can visually see this as the tab separators abruptly end before this odd lump.

The document size is acquired from nsWindow(?)::GetClientSize, however there is also GetClientBounds and GetClientOffset (not documented well enough for me to understand exactly), but they all bottom out into winapi calls like ClientToScreen. I haven't verified this yet (need to do a fresh windows build), but I expect that in the case where we're maximized and the toolbar is on top, the window has an extra 16px of height that is compensated by GetClientOffset.

So the question I need to answer is whether the bug is:

  • incorrectly setting the size of the window
  • incorrectly getting the size of the window (GetClientSize instead of GetClientBounds?)
  • failing to explain to webrender that these pixels should just be transparent

Sotaro: ever seen this before, and/or any idea which component should be considered wrong?

Assignee: nobody → a.beingessner
Flags: needinfo?(sotaro.ikeda.g)

hmm nope, Bounds isn't anymore useful.

On my 2160-height display I get offset, height = 187, 1973; which adds back up to 2160. We want offset, height = 203, 1957 to properly match the toolbar.

I could not reproduce the symptom of comment 0. I wonder if Bug 1510378 is related to the problem.

See Also: → 1510378

When window is maximized, position of ui seemed to be adjusted by nsNativeThemeWin::GetWidgetPadding().
GetWidgetPadding() has the following comment.

// XXX Maximized windows have an offscreen offset equal to
// the border padding. This should be addressed in nsWindow,
// but currently can't be, see UpdateNonClientMargins.

https://searchfox.org/mozilla-central/source/widget/windows/nsNativeThemeWin.cpp#2080

See Also: → 1555244

Ok wait the way I was reproducing this with webrender seems to happen in vanilla firefox too, so now I'm confused??

Flags: needinfo?(sotaro.ikeda.g)

Too late for a fix in 68 at this point, but we could still take a patch for 69/70.

Summary: Firefox Maximization bug after opening webrender → Firefox Maximization bug after opening webrender with TranslucentTB

There's some transparency weirdness that happens with WebRender. Perhaps this will be fixed when we figure that out for Win7

No longer blocks: 1510378
No longer blocks: wr-68
Assignee: a.beingessner → nobody
Priority: P3 → P5
Severity: normal → S3
Attachment #9383491 - Attachment is obsolete: true
Status: NEW → RESOLVED
Closed: 6 months ago
Resolution: --- → INACTIVE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: