[Win] fast/canvas/2d.getPath.modification.html is failing.
authorpvollan@apple.com <pvollan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 7 Sep 2017 19:30:43 +0000 (19:30 +0000)
committerpvollan@apple.com <pvollan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 7 Sep 2017 19:30:43 +0000 (19:30 +0000)
https://bugs.webkit.org/show_bug.cgi?id=176534

Reviewed by Alex Christensen.

We need to enable Inspector additions at runtime in order to expose the getPath function.

Source/WebKitLegacy/win:

* Interfaces/IWebPreferencesPrivate.idl:
* WebPreferenceKeysPrivate.h:
* WebPreferences.cpp:
(WebPreferences::initializeDefaultSettings):
(WebPreferences::setDataTransferItemsEnabled):
(WebPreferences::inspectorAdditionsEnabled):
(WebPreferences::setInspectorAdditionsEnabled):
* WebPreferences.h:
* WebView.cpp:
(WebView::notifyPreferencesChanged):

Tools:

* DumpRenderTree/win/DumpRenderTree.cpp:
(resetWebPreferencesToConsistentValues):

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

Source/WebKitLegacy/win/ChangeLog
Source/WebKitLegacy/win/Interfaces/IWebPreferencesPrivate.idl
Source/WebKitLegacy/win/WebPreferenceKeysPrivate.h
Source/WebKitLegacy/win/WebPreferences.cpp
Source/WebKitLegacy/win/WebPreferences.h
Source/WebKitLegacy/win/WebView.cpp
Tools/ChangeLog
Tools/DumpRenderTree/win/DumpRenderTree.cpp

index 589e8bb..38522a1 100644 (file)
@@ -1,3 +1,23 @@
+2017-09-07  Per Arne Vollan  <pvollan@apple.com>
+
+        [Win] fast/canvas/2d.getPath.modification.html is failing.
+        https://bugs.webkit.org/show_bug.cgi?id=176534
+
+        Reviewed by Alex Christensen.
+
+        We need to enable Inspector additions at runtime in order to expose the getPath function.
+
+        * Interfaces/IWebPreferencesPrivate.idl:
+        * WebPreferenceKeysPrivate.h:
+        * WebPreferences.cpp:
+        (WebPreferences::initializeDefaultSettings):
+        (WebPreferences::setDataTransferItemsEnabled):
+        (WebPreferences::inspectorAdditionsEnabled):
+        (WebPreferences::setInspectorAdditionsEnabled):
+        * WebPreferences.h:
+        * WebView.cpp:
+        (WebView::notifyPreferencesChanged):
+
 2017-09-07  Alex Christensen  <achristensen@webkit.org>
 
         Modernize Geolocation code
index c80d7ce..618d838 100644 (file)
@@ -215,4 +215,6 @@ interface IWebPreferencesPrivate6 : IWebPreferencesPrivate5
 {
     HRESULT dataTransferItemsEnabled([out, retval] BOOL*);
     HRESULT setDataTransferItemsEnabled([in] BOOL enabled);
+    HRESULT inspectorAdditionsEnabled([out, retval] BOOL*);
+    HRESULT setInspectorAdditionsEnabled([in] BOOL enabled);
 }
index 32ea435..a062241 100644 (file)
 #define WebKitIsSecureContextAttributeEnabledPreferenceKey "WebKitIsSecureContextAttributeEnabled"
 
 #define WebKitDataTransferItemsEnabledPreferenceKey "WebKitDataTransferItemsEnabled"
+
+#define WebKitInspectorAdditionsEnabledPreferenceKey "WebKitInspectorAdditionsEnabled"
index b32a5d9..f4461b6 100644 (file)
@@ -320,6 +320,8 @@ void WebPreferences::initializeDefaultSettings()
 
     CFDictionaryAddValue(defaults, CFSTR(WebKitDataTransferItemsEnabledPreferenceKey), kCFBooleanFalse);
 
+    CFDictionaryAddValue(defaults, CFSTR(WebKitInspectorAdditionsEnabledPreferenceKey), kCFBooleanFalse);
+
     defaultSettings = defaults;
 }
 
@@ -2077,6 +2079,20 @@ HRESULT WebPreferences::setDataTransferItemsEnabled(BOOL enabled)
     return S_OK;
 }
 
+HRESULT WebPreferences::inspectorAdditionsEnabled(_Out_ BOOL* enabled)
+{
+    if (!enabled)
+        return E_POINTER;
+    *enabled = boolValueForKey(WebKitInspectorAdditionsEnabledPreferenceKey);
+    return S_OK;
+}
+
+HRESULT WebPreferences::setInspectorAdditionsEnabled(BOOL enabled)
+{
+    setBoolValue(WebKitInspectorAdditionsEnabledPreferenceKey, enabled);
+    return S_OK;
+}
+
 HRESULT WebPreferences::setApplicationId(BSTR applicationId)
 {
     m_applicationId = String(applicationId).createCFString();
index c258e24..a8b6f55 100644 (file)
@@ -263,6 +263,8 @@ public:
     // IWebPreferencesPrivate6
     virtual HRESULT STDMETHODCALLTYPE dataTransferItemsEnabled(_Out_ BOOL*);
     virtual HRESULT STDMETHODCALLTYPE setDataTransferItemsEnabled(BOOL);
+    virtual HRESULT STDMETHODCALLTYPE inspectorAdditionsEnabled(_Out_ BOOL*);
+    virtual HRESULT STDMETHODCALLTYPE setInspectorAdditionsEnabled(BOOL);
 
     // WebPreferences
 
index 09e4161..761eae0 100644 (file)
@@ -5241,6 +5241,11 @@ HRESULT WebView::notifyPreferencesChanged(IWebNotification* notification)
         return hr;
     RuntimeEnabledFeatures::sharedFeatures().setDataTransferItemsEnabled(!!enabled);
 
+    hr = prefsPrivate->inspectorAdditionsEnabled(&enabled);
+    if (FAILED(hr))
+        return hr;
+    RuntimeEnabledFeatures::sharedFeatures().setInspectorAdditionsEnabled(!!enabled);
+
     hr = preferences->privateBrowsingEnabled(&enabled);
     if (FAILED(hr))
         return hr;
index 20a087b..e783abd 100644 (file)
@@ -1,3 +1,15 @@
+2017-09-07  Per Arne Vollan  <pvollan@apple.com>
+
+        [Win] fast/canvas/2d.getPath.modification.html is failing.
+        https://bugs.webkit.org/show_bug.cgi?id=176534
+
+        Reviewed by Alex Christensen.
+
+        We need to enable Inspector additions at runtime in order to expose the getPath function.
+
+        * DumpRenderTree/win/DumpRenderTree.cpp:
+        (resetWebPreferencesToConsistentValues):
+
 2017-09-07  Filip Pizlo  <fpizlo@apple.com>
 
         WSL tests should run in run-javascriptcore-tests
index 48bbca9..a6bfda0 100644 (file)
@@ -879,6 +879,7 @@ static void resetWebPreferencesToConsistentValues(IWebPreferences* preferences)
     prefsPrivate->setResourceTimingEnabled(TRUE);
     prefsPrivate->setUserTimingEnabled(TRUE);
     prefsPrivate->setDataTransferItemsEnabled(TRUE);
+    prefsPrivate->setInspectorAdditionsEnabled(TRUE);
     prefsPrivate->clearNetworkLoaderSession();
 
     setAlwaysAcceptCookies(false);