RESOLVED FIXED 13304
REGRESSION(14784): WebKit doesn't dynamically reflect changes to the highlight color in System Preferences
https://bugs.webkit.org/show_bug.cgi?id=13304
Summary REGRESSION(14784): WebKit doesn't dynamically reflect changes to the highligh...
mitz
Reported 2007-04-08 03:56:04 PDT
Changing the highlight color in System Preferences doesn't affect an existing instance of WebKit (that has already used highlighting). RenderTheme caches the highlight color the first time it's accessed and there's no invalidation mechanism.
Attachments
proposed fix (6.69 KB, patch)
2007-05-05 07:49 PDT, Alexey Proskuryakov
darin: review+
proposed fix (12.05 KB, patch)
2007-05-05 09:44 PDT, Alexey Proskuryakov
darin: review+
Alexey Proskuryakov
Comment 1 2007-05-01 03:42:01 PDT
Isn't this a regression? Works for me with shipping Safari/WebKit.
mitz
Comment 2 2007-05-01 05:07:23 PDT
Yes, it is a regression. Thanks, Alexey!
Darin Adler
Comment 3 2007-05-04 22:18:09 PDT
mitz
Comment 4 2007-05-05 00:00:43 PDT
The bug is not limited to selection in form controls.
Alexey Proskuryakov
Comment 5 2007-05-05 07:49:26 PDT
Created attachment 14356 [details] proposed fix
Darin Adler
Comment 6 2007-05-05 08:08:06 PDT
Comment on attachment 14356 [details] proposed fix + /* Have to just leak the cells, since statics are destroyed with no autorelease pool available */ I know you just moved this comment, but it is not true. You can create an autorelease pool of your own and then call HardRelease before draining the autorelease pool. In fact, even removeObserver: needs an autorelease pool. On the other hand, I think we should just change it so that RenderThemeMac is never destroyed. RenderTheme* theme() { static RenderThemeMac* macTheme = new RenderThemeMac; return macTheme; } r=me, because this issue is a minor one as long as you aren't seeing a crash on quit
Alexey Proskuryakov
Comment 7 2007-05-05 09:44:58 PDT
Created attachment 14358 [details] proposed fix I didn't get any crashes on quit, but it looks safer to change theme() in this way indeed.
Darin Adler
Comment 8 2007-05-05 15:15:29 PDT
Comment on attachment 14358 [details] proposed fix + static RenderThemeMac* macTheme; + if (!macTheme) + macTheme = new RenderThemeMac; This could just be written: static RenderThemeMac* macTheme = new RenderThemeMac; The initialization only runs once. r=me
Alexey Proskuryakov
Comment 9 2007-05-05 22:39:21 PDT
Committed revision 21274.
Note You need to log in before you can comment on or make changes to this bug.