[Win] Make tests more consistent with Mac platform
authorbfulgham@apple.com <bfulgham@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 15 Feb 2014 00:04:55 +0000 (00:04 +0000)
committerbfulgham@apple.com <bfulgham@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 15 Feb 2014 00:04:55 +0000 (00:04 +0000)
https://bugs.webkit.org/show_bug.cgi?id=128848

Reviewed by Simon Fraser.

Source/WebKit/win:

* Interfaces/IWebPreferencesPrivate.idl: Add access to the
mock scrollbar and screen font substitution features.
* WebPreferenceKeysPrivate.h: Ditto
* WebPreferences.cpp: Ditto
(WebPreferences::mockScrollbarsEnabled):
(WebPreferences::setMockScrollbarsEnabled):
(WebPreferences::screenFontSubstitutionEnabled):
(WebPreferences::setScreenFontSubstitutionEnabled):
* WebPreferences.h: Ditto
* WebView.cpp:
(WebView::notifyPreferencesChanged): Ditto

Tools:

* DumpRenderTree/win/DumpRenderTree.cpp:
(resetDefaultsToConsistentValues): Turn CSS regions on,
turn mock scrollbars on, and allow screen font
substitution.

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

LayoutTests/platform/win/TestExpectations
Source/WebKit/win/ChangeLog
Source/WebKit/win/Interfaces/IWebPreferencesPrivate.idl
Source/WebKit/win/WebPreferenceKeysPrivate.h
Source/WebKit/win/WebPreferences.cpp
Source/WebKit/win/WebPreferences.h
Source/WebKit/win/WebView.cpp
Tools/ChangeLog
Tools/DumpRenderTree/win/DumpRenderTree.cpp

index 566378f..42fbb67 100644 (file)
@@ -1489,7 +1489,7 @@ imported/w3c/html-templates
 http/tests/security/isolatedWorld/cross-origin-xhr.html
 
 # CSS Regions support not yet enabled. http://webkit.org/b/57312
-fast/regions
+#fast/regions
 
 # CSS Exclusions support not yet enabled. http://webkit.org/b/57311
 fast/exclusions
@@ -1883,11 +1883,11 @@ fast/loader/javascript-url-iframe-remove-on-navigate.html
 fast/dom/MutationObserver/inline-event-listener.html
 fast/profiler/dead-time.html
 fast/profiler/stop-profiling-after-setTimeout.html
-fast/regions/repaint/japanese-rl-selection-repaint-in-regions.html
-fast/regions/repaint/line-flow-with-floats-in-regions.html
-fast/regions/repaint/overflow-flipped-writing-mode-block-in-regions.html
-fast/regions/repaint/region-painting-invalidation.html
-fast/regions/repaint/region-painting-via-layout.html
+#fast/regions/repaint/japanese-rl-selection-repaint-in-regions.html
+#fast/regions/repaint/line-flow-with-floats-in-regions.html
+#fast/regions/repaint/overflow-flipped-writing-mode-block-in-regions.html
+#fast/regions/repaint/region-painting-invalidation.html
+#fast/regions/repaint/region-painting-via-layout.html
 fast/repaint/canvas-putImageData.html
 fast/repaint/fixed-in-page-scale.html
 fast/repaint/fixed-right-bottom-in-page-scale.html
index 43a36d8..6dbd74b 100644 (file)
@@ -1,3 +1,22 @@
+2014-02-14  Brent Fulgham  <bfulgham@apple.com>
+
+        [Win] Make tests more consistent with Mac platform
+        https://bugs.webkit.org/show_bug.cgi?id=128848
+
+        Reviewed by Simon Fraser.
+
+        * Interfaces/IWebPreferencesPrivate.idl: Add access to the
+        mock scrollbar and screen font substitution features.
+        * WebPreferenceKeysPrivate.h: Ditto
+        * WebPreferences.cpp: Ditto
+        (WebPreferences::mockScrollbarsEnabled):
+        (WebPreferences::setMockScrollbarsEnabled):
+        (WebPreferences::screenFontSubstitutionEnabled):
+        (WebPreferences::setScreenFontSubstitutionEnabled):
+        * WebPreferences.h: Ditto
+        * WebView.cpp:
+        (WebView::notifyPreferencesChanged): Ditto
+
 2014-02-11  Zalan Bujtas  <zalan@apple.com>
 
         Subpixel rendering: Make GraphicsLayerClient::paintContents's clip rect subpixel based.
index 2fc44ef..9186530 100644 (file)
@@ -142,4 +142,10 @@ interface IWebPreferencesPrivate : IUnknown
 
     HRESULT setRequestAnimationFrameEnabled([in] BOOL);
     HRESULT requestAnimationFrameEnabled([out, retval] BOOL*);
+
+    HRESULT mockScrollbarsEnabled([out, retval] BOOL* enabled);
+    HRESULT setMockScrollbarsEnabled([in] BOOL enabled);
+
+    HRESULT screenFontSubstitutionEnabled([out, retval] BOOL* enabled);
+    HRESULT setScreenFontSubstitutionEnabled([in] BOOL enabled);
 }
index c93d634..cdd67c0 100644 (file)
 
 #define WebKitRequestAnimationFrameEnabledPreferenceKey "WebKitRequestAnimationFrameEnabled"
 
+#define WebKitMockScrollbarsEnabledPreferenceKey "WebKitMockScrollbarsEnabled"
+
+#define WebKitScreenFontSubstitutionEnabledPreferenceKey "WebKitScreenFontSubstitutionEnabledPreferenceKey"
index edec077..f551dd4 100644 (file)
@@ -1254,6 +1254,30 @@ HRESULT WebPreferences::unused6()
     return E_FAIL;
 }
 
+HRESULT WebPreferences::mockScrollbarsEnabled(BOOL* enabled)
+{
+    *enabled = boolValueForKey(WebKitMockScrollbarsEnabledPreferenceKey);
+    return S_OK;
+}
+
+HRESULT WebPreferences::setMockScrollbarsEnabled(BOOL enabled)
+{
+    setBoolValue(WebKitMockScrollbarsEnabledPreferenceKey, enabled);
+    return S_OK;
+}
+
+HRESULT WebPreferences::screenFontSubstitutionEnabled(BOOL* enabled)
+{
+    *enabled = boolValueForKey(WebKitScreenFontSubstitutionEnabledPreferenceKey);
+    return S_OK;
+}
+
+HRESULT WebPreferences::setScreenFontSubstitutionEnabled(BOOL enabled)
+{
+    setBoolValue(WebKitScreenFontSubstitutionEnabledPreferenceKey, enabled);
+    return S_OK;
+}
+
 HRESULT STDMETHODCALLTYPE WebPreferences::hyperlinkAuditingEnabled(
     /* [in] */ BOOL* enabled)
 {
index ba2bec1..ac6bc49 100644 (file)
@@ -477,6 +477,12 @@ public:
     virtual HRESULT STDMETHODCALLTYPE requestAnimationFrameEnabled(BOOL*);
     virtual HRESULT STDMETHODCALLTYPE setRequestAnimationFrameEnabled(BOOL);
 
+    virtual HRESULT STDMETHODCALLTYPE mockScrollbarsEnabled(BOOL*);
+    virtual HRESULT STDMETHODCALLTYPE setMockScrollbarsEnabled(BOOL);
+
+    virtual HRESULT STDMETHODCALLTYPE screenFontSubstitutionEnabled(BOOL*);
+    virtual HRESULT STDMETHODCALLTYPE setScreenFontSubstitutionEnabled(BOOL);
+
     // WebPreferences
 
     // This method accesses a different preference key than developerExtrasEnabled.
index 03dd351..6aa7e6d 100644 (file)
@@ -5047,6 +5047,16 @@ HRESULT WebView::notifyPreferencesChanged(IWebNotification* notification)
         return hr;
     settings.setRequestAnimationFrameEnabled(enabled);
 
+    hr = prefsPrivate->mockScrollbarsEnabled(&enabled);
+    if (FAILED(hr))
+        return hr;
+    settings.setMockScrollbarsEnabled(enabled);
+
+    hr = prefsPrivate->screenFontSubstitutionEnabled(&enabled);
+    if (FAILED(hr))
+        return hr;
+    settings.setScreenFontSubstitutionEnabled(enabled);
+
     return S_OK;
 }
 
index 8f3b390..aa2d41a 100644 (file)
@@ -1,3 +1,15 @@
+2014-02-14  Brent Fulgham  <bfulgham@apple.com>
+
+        [Win] Make tests more consistent with Mac platform
+        https://bugs.webkit.org/show_bug.cgi?id=128848
+
+        Reviewed by Simon Fraser.
+
+        * DumpRenderTree/win/DumpRenderTree.cpp:
+        (resetDefaultsToConsistentValues): Turn CSS regions on,
+        turn mock scrollbars on, and allow screen font
+        substitution.
+
 2014-02-14  Mark Hahnenberg  <mhahnenberg@apple.com>
 
         Save ARGV in a local to avoid repeated lookups
index 2f2d808..6befaae 100644 (file)
@@ -873,6 +873,7 @@ static void resetDefaultsToConsistentValues(IWebPreferences* preferences)
     preferences->setCacheModel(WebCacheModelDocumentBrowser);
     preferences->setLoadsImagesAutomatically(TRUE);
     preferences->setTextAreasAreResizable(TRUE);
+    preferences->setCSSRegionsEnabled(TRUE);
 
     if (persistentUserStyleSheetLocation) {
         Vector<wchar_t> urlCharacters(CFStringGetLength(persistentUserStyleSheetLocation.get()));
@@ -901,6 +902,8 @@ static void resetDefaultsToConsistentValues(IWebPreferences* preferences)
 #if USE(CG)
         prefsPrivate->setAcceleratedCompositingEnabled(TRUE);
 #endif
+        prefsPrivate->setMockScrollbarsEnabled(TRUE);
+        prefsPrivate->setScreenFontSubstitutionEnabled(TRUE);
     }
     setAlwaysAcceptCookies(false);