Text not drawn or white-on-white for "Close Page"/"Go Back" button on safe browsing...
authordino@apple.com <dino@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 8 Jan 2015 20:24:52 +0000 (20:24 +0000)
committerdino@apple.com <dino@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 8 Jan 2015 20:24:52 +0000 (20:24 +0000)
https://bugs.webkit.org/show_bug.cgi?id=140232
<rdar://problem/19371010>

Reviewed by Anders Carlsson.

Source/WebCore:

We need to support default button styling even when application chrome
mode is not enabled (it was a bit weird that this was exposed as a Setting
anyway). We should render as a default button whenever content sets
the proprietary -webkit-appearance. This means we don't need the
applicationChromeMode setting.

For normal Web content there should be no change in behavior.

* page/Settings.in: Remove applicationChromeMode
* rendering/RenderTheme.cpp:
(WebCore::RenderTheme::isDefault): Don't test for the setting.

Source/WebKit/mac:

Remove the applicationChromeMode setting, but leave stubs in to make
sure existing binaries don't break.

* WebCoreSupport/WebInspectorClient.mm:
(-[WebInspectorWindowController init]):
* WebView/WebPreferenceKeysPrivate.h:
* WebView/WebPreferences.mm:
(+[WebPreferences initialize]):
(-[WebPreferences applicationChromeModeEnabled]):
(-[WebPreferences setApplicationChromeModeEnabled:]):
* WebView/WebView.mm:
(-[WebView _preferencesChanged:]):

Source/WebKit/win:

Remove the applicationChromeMode setting, but leave stubs in to make
sure existing binaries don't break.

* WebPreferences.cpp:
(WebPreferences::initializeDefaultSettings):
(WebPreferences::inApplicationChromeMode):
(WebPreferences::setApplicationChromeMode):
* WebView.cpp:
(WebView::notifyPreferencesChanged):

Source/WebKit2:

Remove the applicationChromeMode setting, but leave stubs in to make
sure existing binaries don't break.

* Shared/API/c/WKDeprecatedFunctions.cpp:
(WKPreferencesSetApplicationChromeModeEnabled):
(WKPreferencesGetApplicationChromeModeEnabled):
* Shared/WebPreferencesDefinitions.h:
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetApplicationChromeModeEnabled): Deleted.
(WKPreferencesGetApplicationChromeModeEnabled): Deleted.
* UIProcess/API/C/WKPreferencesRefPrivate.h:
* UIProcess/WebInspectorProxy.cpp:
(WebKit::WebInspectorPageGroups::createInspectorPageGroup):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@178124 268f45cc-cd09-0410-ab3c-d52691b4dbfc

18 files changed:
Source/WebCore/ChangeLog
Source/WebCore/page/Settings.in
Source/WebCore/rendering/RenderTheme.cpp
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/WebCoreSupport/WebInspectorClient.mm
Source/WebKit/mac/WebView/WebPreferenceKeysPrivate.h
Source/WebKit/mac/WebView/WebPreferences.mm
Source/WebKit/mac/WebView/WebView.mm
Source/WebKit/win/ChangeLog
Source/WebKit/win/WebPreferences.cpp
Source/WebKit/win/WebView.cpp
Source/WebKit2/ChangeLog
Source/WebKit2/Shared/API/c/WKDeprecatedFunctions.cpp
Source/WebKit2/Shared/WebPreferencesDefinitions.h
Source/WebKit2/UIProcess/API/C/WKPreferences.cpp
Source/WebKit2/UIProcess/API/C/WKPreferencesRefPrivate.h
Source/WebKit2/UIProcess/WebInspectorProxy.cpp
Source/WebKit2/WebProcess/WebPage/WebPage.cpp

index b86577d..b3a6924 100644 (file)
@@ -1,3 +1,23 @@
+2015-01-08  Dean Jackson  <dino@apple.com>
+
+        Text not drawn or white-on-white for "Close Page"/"Go Back" button on safe browsing warning page
+        https://bugs.webkit.org/show_bug.cgi?id=140232
+        <rdar://problem/19371010>
+
+        Reviewed by Anders Carlsson.
+
+        We need to support default button styling even when application chrome
+        mode is not enabled (it was a bit weird that this was exposed as a Setting
+        anyway). We should render as a default button whenever content sets
+        the proprietary -webkit-appearance. This means we don't need the
+        applicationChromeMode setting.
+
+        For normal Web content there should be no change in behavior.
+
+        * page/Settings.in: Remove applicationChromeMode
+        * rendering/RenderTheme.cpp:
+        (WebCore::RenderTheme::isDefault): Don't test for the setting.
+
 2015-01-08  Chris Dumez  <cdumez@apple.com>
 
         Unfriend StyleResolver and StyleBuilderCustom
index 1ef8c84..e730a20 100644 (file)
@@ -155,7 +155,6 @@ fixedPositionCreatesStackingContext initial=defaultFixedPositionCreatesStackingC
 syncXHRInDocumentsEnabled initial=true
 cookieEnabled initial=true
 mediaEnabled initial=true
-applicationChromeMode initial=false
 DOMPasteAllowed initial=false
 
 # When enabled, window.blur() does not change focus, and
index 56c30c8..3c344f3 100644 (file)
@@ -874,9 +874,6 @@ bool RenderTheme::isDefault(const RenderObject& o) const
     if (!isActive(o))
         return false;
 
-    if (!o.frame().settings().applicationChromeMode())
-        return false;
-    
     return o.style().appearance() == DefaultButtonPart;
 }
 
index 7dec555..4356df3 100644 (file)
@@ -1,3 +1,24 @@
+2015-01-08  Dean Jackson  <dino@apple.com>
+
+        Text not drawn or white-on-white for "Close Page"/"Go Back" button on safe browsing warning page
+        https://bugs.webkit.org/show_bug.cgi?id=140232
+        <rdar://problem/19371010>
+
+        Reviewed by Anders Carlsson.
+
+        Remove the applicationChromeMode setting, but leave stubs in to make
+        sure existing binaries don't break.
+
+        * WebCoreSupport/WebInspectorClient.mm:
+        (-[WebInspectorWindowController init]):
+        * WebView/WebPreferenceKeysPrivate.h:
+        * WebView/WebPreferences.mm:
+        (+[WebPreferences initialize]):
+        (-[WebPreferences applicationChromeModeEnabled]):
+        (-[WebPreferences setApplicationChromeModeEnabled:]):
+        * WebView/WebView.mm:
+        (-[WebView _preferencesChanged:]):
+
 2015-01-07  Daniel Bates  <dabates@apple.com>
 
         [iOS] Make WebKit2 build with public iOS SDK and more build fixes for DRT
index 9e19ff2..f07d2c2 100644 (file)
@@ -395,7 +395,6 @@ void WebInspectorFrontendClient::append(const String& suggestedURL, const String
 
     WebPreferences *preferences = [[WebPreferences alloc] init];
     [preferences setAllowsAnimatedImages:YES];
-    [preferences setApplicationChromeModeEnabled:YES];
     [preferences setAuthorAndUserStylesEnabled:YES];
     [preferences setAutosaves:NO];
     [preferences setDefaultFixedFontSize:11];
index b83b54b..5707b93 100644 (file)
@@ -86,7 +86,6 @@
 #define WebKitDeveloperExtrasEnabledPreferenceKey @"WebKitDeveloperExtrasEnabledPreferenceKey"
 #define WebKitJavaScriptExperimentsEnabledPreferenceKey @"WebKitJavaScriptExperimentsEnabledPreferenceKey"
 #define WebKitAuthorAndUserStylesEnabledPreferenceKey @"WebKitAuthorAndUserStylesEnabledPreferenceKey"
-#define WebKitApplicationChromeModeEnabledPreferenceKey @"WebKitApplicationChromeModeEnabledPreferenceKey"
 #define WebKitDOMTimersThrottlingEnabledPreferenceKey @"WebKitDOMTimersThrottlingEnabledPreferenceKey"
 #define WebKitWebArchiveDebugModeEnabledPreferenceKey @"WebKitWebArchiveDebugModeEnabledPreferenceKey"
 #define WebKitLocalFileContentSniffingEnabledPreferenceKey @"WebKitLocalFileContentSniffingEnabledPreferenceKey"
index 894d841..5448329 100644 (file)
@@ -475,7 +475,6 @@ public:
         [NSNumber numberWithBool:NO],   WebKitDeveloperExtrasEnabledPreferenceKey,
         [NSNumber numberWithBool:NO],   WebKitJavaScriptExperimentsEnabledPreferenceKey,
         [NSNumber numberWithBool:YES],  WebKitAuthorAndUserStylesEnabledPreferenceKey,
-        [NSNumber numberWithBool:NO],   WebKitApplicationChromeModeEnabledPreferenceKey,
         [NSNumber numberWithBool:YES],  WebKitDOMTimersThrottlingEnabledPreferenceKey,
         [NSNumber numberWithBool:NO],   WebKitWebArchiveDebugModeEnabledPreferenceKey,
         [NSNumber numberWithBool:NO],   WebKitLocalFileContentSniffingEnabledPreferenceKey,
@@ -1216,14 +1215,14 @@ public:
     [self _setBoolValue:flag forKey:WebKitAuthorAndUserStylesEnabledPreferenceKey];
 }
 
+// FIXME: applicationChromeMode is no longer needed by ToT, but is still used in Safari 8.
 - (BOOL)applicationChromeModeEnabled
 {
-    return [self _boolValueForKey:WebKitApplicationChromeModeEnabledPreferenceKey];
+    return NO;
 }
 
 - (void)setApplicationChromeModeEnabled:(BOOL)flag
 {
-    [self _setBoolValue:flag forKey:WebKitApplicationChromeModeEnabledPreferenceKey];
 }
 
 - (BOOL)domTimersThrottlingEnabled
index 7cff4c9..f6dc18d 100644 (file)
@@ -2265,7 +2265,6 @@ static bool needsSelfRetainWhileLoadingQuirk()
     settings.setDeveloperExtrasEnabled([preferences developerExtrasEnabled]);
     settings.setJavaScriptExperimentsEnabled([preferences javaScriptExperimentsEnabled]);
     settings.setAuthorAndUserStylesEnabled([preferences authorAndUserStylesEnabled]);
-    settings.setApplicationChromeMode([preferences applicationChromeModeEnabled]);
 
     settings.setNeedsSiteSpecificQuirks(_private->useSiteSpecificSpoofing);
     settings.setDOMTimersThrottlingEnabled([preferences domTimersThrottlingEnabled]);
index 31d6a57..e2d4193 100644 (file)
@@ -1,3 +1,21 @@
+2015-01-08  Dean Jackson  <dino@apple.com>
+
+        Text not drawn or white-on-white for "Close Page"/"Go Back" button on safe browsing warning page
+        https://bugs.webkit.org/show_bug.cgi?id=140232
+        <rdar://problem/19371010>
+
+        Reviewed by Anders Carlsson.
+
+        Remove the applicationChromeMode setting, but leave stubs in to make
+        sure existing binaries don't break.
+
+        * WebPreferences.cpp:
+        (WebPreferences::initializeDefaultSettings):
+        (WebPreferences::inApplicationChromeMode):
+        (WebPreferences::setApplicationChromeMode):
+        * WebView.cpp:
+        (WebView::notifyPreferencesChanged):
+
 2015-01-07  Brent Fulgham  <bfulgham@apple.com>
 
         [Win] WindowCloseTimer is an ActiveDOMObject and must call suspendIfNeeded
index 626a00d..fcd6d0e 100644 (file)
@@ -264,7 +264,6 @@ void WebPreferences::initializeDefaultSettings()
     CFDictionaryAddValue(defaults, CFSTR(WebKitCacheModelPreferenceKey), cacheModelRef.get());
 
     CFDictionaryAddValue(defaults, CFSTR(WebKitAuthorAndUserStylesEnabledPreferenceKey), kCFBooleanTrue);
-    CFDictionaryAddValue(defaults, CFSTR(WebKitApplicationChromeModePreferenceKey), kCFBooleanFalse);
 
     CFDictionaryAddValue(defaults, CFSTR(WebKitOfflineWebApplicationCacheEnabledPreferenceKey), kCFBooleanFalse);
 
@@ -1472,15 +1471,13 @@ HRESULT STDMETHODCALLTYPE WebPreferences::authorAndUserStylesEnabled(BOOL* enabl
     return S_OK;
 }
 
-HRESULT WebPreferences::inApplicationChromeMode(BOOL* enabled)
+HRESULT WebPreferences::inApplicationChromeMode(BOOL*)
 {
-    *enabled = boolValueForKey(WebKitApplicationChromeModePreferenceKey);
     return S_OK;
 }
-    
-HRESULT WebPreferences::setApplicationChromeMode(BOOL enabled)
+
+HRESULT WebPreferences::setApplicationChromeMode(BOOL)
 {
-    setBoolValue(WebKitApplicationChromeModePreferenceKey, enabled);
     return S_OK;
 }
 
index 9e7dc49..a3ab8e2 100644 (file)
@@ -4951,11 +4951,6 @@ HRESULT WebView::notifyPreferencesChanged(IWebNotification* notification)
         settings.setAuthorAndUserStylesEnabled(enabled);
     }
 
-    hr = prefsPrivate->inApplicationChromeMode(&enabled);
-    if (FAILED(hr))
-        return hr;
-    settings.setApplicationChromeMode(enabled);
-
     hr = prefsPrivate->offlineWebApplicationCacheEnabled(&enabled);
     if (FAILED(hr))
         return hr;
index a2a0264..f729536 100644 (file)
@@ -1,3 +1,27 @@
+2015-01-08  Dean Jackson  <dino@apple.com>
+
+        Text not drawn or white-on-white for "Close Page"/"Go Back" button on safe browsing warning page
+        https://bugs.webkit.org/show_bug.cgi?id=140232
+        <rdar://problem/19371010>
+
+        Reviewed by Anders Carlsson.
+
+        Remove the applicationChromeMode setting, but leave stubs in to make
+        sure existing binaries don't break.
+
+        * Shared/API/c/WKDeprecatedFunctions.cpp:
+        (WKPreferencesSetApplicationChromeModeEnabled):
+        (WKPreferencesGetApplicationChromeModeEnabled):
+        * Shared/WebPreferencesDefinitions.h:
+        * UIProcess/API/C/WKPreferences.cpp:
+        (WKPreferencesSetApplicationChromeModeEnabled): Deleted.
+        (WKPreferencesGetApplicationChromeModeEnabled): Deleted.
+        * UIProcess/API/C/WKPreferencesRefPrivate.h:
+        * UIProcess/WebInspectorProxy.cpp:
+        (WebKit::WebInspectorPageGroups::createInspectorPageGroup):
+        * WebProcess/WebPage/WebPage.cpp:
+        (WebKit::WebPage::updatePreferences):
+
 2015-01-08  Gwang Yoon Hwang  <yoon@igalia.com>
 
         [ThreadedCompositor] Update active animations without interrupting the main-thread
index fb13880..10ecfcd 100644 (file)
@@ -50,6 +50,9 @@ WK_EXPORT void WKDictionaryRemoveItem(WKMutableDictionaryRef dictionary, WKStrin
 WK_EXPORT void WKPreferencesSetRegionBasedColumnsEnabled(WKPreferencesRef, bool flag);
 WK_EXPORT bool WKPreferencesGetRegionBasedColumnsEnabled(WKPreferencesRef);
 
+WK_EXPORT void WKPreferencesSetApplicationChromeModeEnabled(WKPreferencesRef, bool);
+WK_EXPORT bool WKPreferencesGetApplicationChromeModeEnabled(WKPreferencesRef);
+
 WK_EXPORT void WKPreferencesSetMultithreadedWebGLEnabled(WKPreferencesRef, bool);
 WK_EXPORT bool WKPreferencesGetMultithreadedWebGLEnabled(WKPreferencesRef);
 
@@ -106,6 +109,15 @@ bool WKPreferencesGetMultithreadedWebGLEnabled(WKPreferencesRef)
     return false;
 }
 
+void WKPreferencesSetApplicationChromeModeEnabled(WKPreferencesRef, bool)
+{
+}
+
+bool WKPreferencesGetApplicationChromeModeEnabled(WKPreferencesRef)
+{
+    return false;
+}
+
 bool WKInspectorIsDebuggingJavaScript(WKInspectorRef)
 {
     return false;
index 2e997ef..9bf195e 100644 (file)
     macro(ShowsToolTipOverTruncatedText, showsToolTipOverTruncatedText, Bool, bool, false) \
     macro(MockScrollbarsEnabled, mockScrollbarsEnabled, Bool, bool, false) \
     macro(WebAudioEnabled, webAudioEnabled, Bool, bool, true) \
-    macro(ApplicationChromeModeEnabled, applicationChromeMode, Bool, bool, false) \
     macro(SuppressesIncrementalRendering, suppressesIncrementalRendering, Bool, bool, false) \
     macro(BackspaceKeyNavigationEnabled, backspaceKeyNavigationEnabled, Bool, bool, true) \
     macro(CaretBrowsingEnabled, caretBrowsingEnabled, Bool, bool, false) \
index bc58778..06931af 100644 (file)
@@ -787,16 +787,6 @@ bool WKPreferencesGetWebAudioEnabled(WKPreferencesRef preferencesRef)
     return toImpl(preferencesRef)->webAudioEnabled();
 }
 
-void WKPreferencesSetApplicationChromeModeEnabled(WKPreferencesRef preferencesRef, bool enabled)
-{
-    toImpl(preferencesRef)->setApplicationChromeModeEnabled(enabled);
-}
-
-bool WKPreferencesGetApplicationChromeModeEnabled(WKPreferencesRef preferencesRef)
-{
-    return toImpl(preferencesRef)->applicationChromeMode();
-}
-
 void WKPreferencesSetInspectorUsesWebKitUserInterface(WKPreferencesRef, bool)
 {
     // FIXME: Remove once WebKit nightlies don't need to support Safari 6 thru 7.
index 147c202..7f9c6e8 100644 (file)
@@ -180,10 +180,6 @@ WK_EXPORT bool WKPreferencesGetShowsToolTipOverTruncatedText(WKPreferencesRef pr
 WK_EXPORT void WKPreferencesSetMockScrollbarsEnabled(WKPreferencesRef preferencesRef, bool flag);
 WK_EXPORT bool WKPreferencesGetMockScrollbarsEnabled(WKPreferencesRef preferencesRef);
     
-// Defaults to false.
-WK_EXPORT void WKPreferencesSetApplicationChromeModeEnabled(WKPreferencesRef preferencesRef, bool enabled);
-WK_EXPORT bool WKPreferencesGetApplicationChromeModeEnabled(WKPreferencesRef preferencesRef);
-
 // Deprecated. Always returns false.
 WK_EXPORT void WKPreferencesSetInspectorUsesWebKitUserInterface(WKPreferencesRef preferencesRef, bool enabled);
 WK_EXPORT bool WKPreferencesGetInspectorUsesWebKitUserInterface(WKPreferencesRef preferencesRef);
index 1ca04a3..7ac0c81 100644 (file)
@@ -109,7 +109,6 @@ private:
 #endif
 
         pageGroup->preferences().setAllowFileAccessFromFileURLs(true);
-        pageGroup->preferences().setApplicationChromeModeEnabled(true);
 
         return pageGroup.release();
     }
index 0a5a326..9e36f78 100644 (file)
@@ -2807,7 +2807,6 @@ void WebPage::updatePreferences(const WebPreferencesStore& store)
     settings.setMediaPlaybackAllowsAirPlay(store.getBoolValueForKey(WebPreferencesKey::mediaPlaybackAllowsAirPlayKey()));
 #endif
 
-    settings.setApplicationChromeMode(store.getBoolValueForKey(WebPreferencesKey::applicationChromeModeKey()));
     settings.setSuppressesIncrementalRendering(store.getBoolValueForKey(WebPreferencesKey::suppressesIncrementalRenderingKey()));
     settings.setIncrementalRenderingSuppressionTimeoutInSeconds(store.getDoubleValueForKey(WebPreferencesKey::incrementalRenderingSuppressionTimeoutKey()));
     settings.setBackspaceKeyNavigationEnabled(store.getBoolValueForKey(WebPreferencesKey::backspaceKeyNavigationEnabledKey()));