[Win] Implement WebView::removeAllUserContentFromGroup
authorpeavo@outlook.com <peavo@outlook.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 3 Jun 2016 18:22:10 +0000 (18:22 +0000)
committerpeavo@outlook.com <peavo@outlook.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 3 Jun 2016 18:22:10 +0000 (18:22 +0000)
https://bugs.webkit.org/show_bug.cgi?id=158343

Reviewed by Brent Fulgham.

* WebView.cpp:
(WebView::removeAllUserContentFromGroup):

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

Source/WebKit/win/ChangeLog
Source/WebKit/win/WebView.cpp

index bdfc004..727f60f 100644 (file)
@@ -1,3 +1,13 @@
+2016-06-03  Per Arne Vollan  <pvollan@apple.com>
+
+        [Win] Implement WebView::removeAllUserContentFromGroup
+        https://bugs.webkit.org/show_bug.cgi?id=158343
+
+        Reviewed by Brent Fulgham.
+
+        * WebView.cpp:
+        (WebView::removeAllUserContentFromGroup):
+
 2016-06-02  Per Arne Vollan  <pvollan@apple.com>
 
         [Win] Fetch API tests are failing.
index bd746ea..6242641 100644 (file)
@@ -6779,7 +6779,16 @@ HRESULT WebView::removeUserStyleSheetsFromGroup(_In_ BSTR groupName, _In_opt_ IW
 
 HRESULT WebView::removeAllUserContentFromGroup(_In_ BSTR groupName)
 {
-    return E_NOTIMPL;
+    String group = toString(groupName);
+    if (group.isEmpty())
+        return E_FAIL;
+
+    auto viewGroup = WebViewGroup::get(group);
+    if (!viewGroup)
+        return S_OK;
+
+    viewGroup->userContentController().removeAllUserContent();
+    return S_OK;
 }
 
 HRESULT WebView::invalidateBackingStore(_In_ const RECT* rect)