don't realize widgets for their style

VERIFIED FIXED in Firefox 52

Status

()

defect
VERIFIED FIXED
3 years ago
3 years ago

People

(Reporter: karlt, Assigned: karlt)

Tracking

Trunk
mozilla53
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox52 verified, firefox-esr52 fixed, firefox53 verified)

Details

Attachments

(1 attachment)

Bug 1280951 observed that resource used by cached widgets can be noticeable.
The X resource usage can be reduced, or I guess even removed, by not realizing
the widgets.  This was needed in GTK2 to get the style of the widget, but
styles are almost independent of widgets with GTK3, where realizing is not
necessary to get the style context.
Comment on attachment 8813914 [details]
bug 1319957 don't realize widgets for their style

https://reviewboard.mozilla.org/r/95216/#review95512

<Company> I *think* at some point we used to return default values if widgets were unrealized
<Company> that might have been just during development though and was discarded as a bad idea

So we should be fine here.
Attachment #8813914 - Flags: review?(stransky) → review+
Pushed by ktomlinson@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/99c765086bf4
don't realize widgets for their style r=stransky+263117
https://hg.mozilla.org/mozilla-central/rev/99c765086bf4
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla53
Blocks: 1332914
Comment on attachment 8813914 [details]
bug 1319957 don't realize widgets for their style

Approval Request Comment
[Feature/Bug causing the regression]:
This patch happens to fix bug 1332914, which still exists on 52.
The implementation of animations/transitions for GTK themes changed between
GTK 3.16 and 3.18.  I don't know exactly what GTK change led to the change in
Gecko behavior, but previously Gecko would receive from GTK the style
corresponding to completion of the animation; Gecko did not draw animating
styles but the content drawn represented the new state of the widget.  Since
3.18, the style received from GTK is at other points during the animations,
but there is no invalidation mechanism to draw the entire animation, and so
the final widget state drawn is somewhat random.  Bug 1332914 did not
demonstrate before 99c765086bf4 landed for bug 1282753, but that would have
been mostly good luck.

[User impact if declined]:
Text entries often appear focused when not and vice versa.
[Is this code covered by automated tests?]:
No.
[Has the fix been verified in Nightly?]:
Yes.
[Needs manual test from QE? If yes, steps to reproduce]:
Yes.
1. Use recent distribution.
2. load https://bugzilla.gnome.org/
3. Click "Log in".
4. Click on and hover over "Quick Search", "Login", and "Password" input boxes in various sequences.
5. Check that the most recently clicked box is highlighted, and no others.

[List of other uplifts needed for the feature/fix]:
None.
[Is the change risky?]:
No.
[Why is the change risky/not risky?]:
This change has been on m-c since late November, without any reported issues.
It only removes unnecessary code.
[String changes made/needed]:
None.
Attachment #8813914 - Flags: approval-mozilla-beta?
(In reply to Karl Tomlinson (:karlt) from comment #5)
> 1. Use recent distribution.

Use Fedora, or change GTK theme to Adwaita.

> 2. load https://bugzilla.gnome.org/
> 3. Click "Log in".
> 4. Click on and hover over "Quick Search", "Login", and "Password" input
> boxes in various sequences.
> 5. Check that the most recently clicked box is highlighted, and no others.
Comment on attachment 8813914 [details]
bug 1319957 don't realize widgets for their style

gtk widget fix, beta52+
Attachment #8813914 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Flagging this for verification, instructions in Comment 5.
Flags: qe-verify+
Successfully managed to reproduce this bug using 53.0a1 (2016-11-23) (64-bit) (Build ID: 20161123030208) on Ubuntu 16.04.2 x64 by the following Comment 5's instruction!

This Bug is now Verified as Fixed on Latest Firefox Beta 52.0b8 (64-bit) (Build ID: 20170220070057)

and Also Latest Firefox Developer Edition 53.0a2 (2017-02-23) (64-bit) (Build ID: 20170223084136)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:53.0) Gecko/20100101 Firefox/53.0

OS: Linux 4.8.0-36-generic; Ubuntu 16.04.2 (64 Bit)
QA Whiteboard: [bugday-20170222]
THanks Nazir! Marking verified based on the above comment.
Status: RESOLVED → VERIFIED
Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.