GTK nsWidget gets new look and feel objects in constructor

VERIFIED FIXED

Status

()

Core
XUL
P3
normal
VERIFIED FIXED
20 years ago
19 years ago

People

(Reporter: Bruce Mitchener, Assigned: Stuart Parmenter)

Tracking

Trunk
x86
Linux
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

(Reporter)

Description

20 years ago
the GTK nsWidget constructor gets a Look and feel object everytime, just to get
a single value from it and destroy it.

http://lxr.mozilla.org/seamonkey/source/widget/src/gtk/nsWidget.cpp#39

Updated

20 years ago
Assignee: ramiro → pavlov

Comment 1

20 years ago
we could do this by creating a style each time, but in order to get the correct
colors, this is needed.  (saving the overhead from L&F but still creating some
overhead).  This is required in part because we are using GTK and therefore
should support its themes.  If we don't do this, then the colors get fubar, and
broken.  I will look into this in more detail.
Is there any way to be notified when GTK's style info changes?  Can we just
cache the nsILookAndFeel * for now, and avoid the CreateInterface overhead every
time?

Updated

19 years ago
Status: NEW → RESOLVED
Last Resolved: 19 years ago
Resolution: --- → FIXED
I've committed the attached patch.
Created attachment 42 [details] [diff] [review]
Patch to cache LnF object.
Pavlov believes that it's safe for the LnF object to cache the GtkStyle * as
well, so I've committed again.
Created attachment 43 [details] [diff] [review]
Patch to cache the GtkStyle * in the LnF object
(Reporter)

Updated

19 years ago
Status: RESOLVED → VERIFIED
(Assignee)

Comment 7

19 years ago
sorry for bugzilla spam.  trying to get these off my radar

Updated

19 years ago
Status: RESOLVED → VERIFIED

Comment 8

19 years ago
re-verifying this bug.
You need to log in before you can comment on or make changes to this bug.