r44758 added RenderTheme::themeForPage and a call to it from the Page constructor. In RenderThemeSafari.cpp, the themeForPage implementation using Settings to decide which instance of a RenderTheme subclass to return. But the Page constructor (and thus themeForPage) is called before Settings has been initialized by WebKit. This caused bug 26493, though we've worked around the issue for now. It would be better to fix the design problem here.
Wouldn't it make sense to initialize the settings before constructing a page? or is there any reason for not doing so? WebView (windows) already calls "WebPreferences* sharedPreferences = WebPreferences::sharedStandardPreferences();" before constructing the Page(). Couldn't we add the below before creating the Page? bool shouldPaintNativeControls; if (SUCCEEDED(m_preferences->shouldPaintNativeControls(&shouldPaintNativeControls))) Settings::setShouldPaintNativeControls(shouldPaintNativeControls) both functions are static.
Created attachment 31497 [details] Suggested fix
Looking at this again, I'm not sure the fix is correct. Investigating...
OK - tested the patch. It works.
Landed fix in r44890.