Bug 26493

Summary: REGRESSION (r44758): First tab always uses Mac-style form controls
Product: WebKit Reporter: Adam Roben (:aroben) <aroben>
Component: Layout and RenderingAssignee: Adam Roben (:aroben) <aroben>
Severity: Normal Keywords: InRadar, PlatformOnly, Regression
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: Windows XP   
Description Flags
patch v1 + ChangeLog darin: review+

Description Adam Roben (:aroben) 2009-06-17 14:35:20 PDT
To reproduce:

1. Launch Safari
2. Go to data:text/html,<button>test
3. Open a new tab
4. Go to data:text/html,<button>test

In step 2, a Mac-style button is drawn. In step 4, a Windows-style button is drawn.

This regressed in r44758 <http://trac.webkit.org/changeset/44758>.
Comment 1 Adam Roben (:aroben) 2009-06-17 14:36:14 PDT
Comment 2 Adam Roben (:aroben) 2009-06-17 14:37:47 PDT
The problem is that RenderTheme::themeForPage is getting called before WebPreferences has communicated its settings to WebCore::Settings. RenderTheme::themeForPage consults Settings to decide whether it should return the RenderThemeWin or RenderThemeSafari instance, but Settings hasn't been initialized yet.
Comment 3 Adam Roben (:aroben) 2009-06-17 14:45:47 PDT
Created attachment 31441 [details]
patch v1 + ChangeLog
Comment 4 Darin Adler 2009-06-17 14:49:46 PDT
Comment on attachment 31441 [details]
patch v1 + ChangeLog


I'm sad we have to work around this instead of fixing it. Too bad we didn't realize this was wrong before landing the per-page theme change!
Comment 5 Dave Hyatt 2009-06-17 14:51:50 PDT
Comment on attachment 31441 [details]
patch v1 + ChangeLog

Comment 6 Adam Roben (:aroben) 2009-06-17 15:10:27 PDT
Fixed in r44785
Comment 7 Adam Roben (:aroben) 2009-06-17 15:13:19 PDT
I've recorded the desire to fix the real bug in bug 26494.