Title: [148686] trunk/Source/WebKit2
Revision
148686
Author
[email protected]
Date
2013-04-18 11:00:40 -0700 (Thu, 18 Apr 2013)

Log Message

WebKit should not write WKPreferences to app user defaults when using the ObjC API
<rdar://problem/13593578>
https://bugs.webkit.org/show_bug.cgi?id=114821

Reviewed by Anders Carlsson.

* UIProcess/API/mac/WKBrowsingContextGroup.mm:
(-[WKBrowsingContextGroup initWithIdentifier:]):
Use a identifier-less preferences for the ObjC-API. I think we will probably want this
to be the default for the C-API at some point as well, but Safari currently uses this
behavior.

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (148685 => 148686)


--- trunk/Source/WebKit2/ChangeLog	2013-04-18 17:55:21 UTC (rev 148685)
+++ trunk/Source/WebKit2/ChangeLog	2013-04-18 18:00:40 UTC (rev 148686)
@@ -1,3 +1,17 @@
+2013-04-18  Sam Weinig  <[email protected]>
+
+        WebKit should not write WKPreferences to app user defaults when using the ObjC API
+        <rdar://problem/13593578>
+        https://bugs.webkit.org/show_bug.cgi?id=114821
+
+        Reviewed by Anders Carlsson.
+
+        * UIProcess/API/mac/WKBrowsingContextGroup.mm:
+        (-[WKBrowsingContextGroup initWithIdentifier:]):
+        Use a identifier-less preferences for the ObjC-API. I think we will probably want this
+        to be the default for the C-API at some point as well, but Safari currently uses this
+        behavior.
+
 2013-04-17  Anders Carlsson  <[email protected]>
 
         Change storage factory functions to take a PageGroup and Page respectively

Modified: trunk/Source/WebKit2/UIProcess/API/mac/WKBrowsingContextGroup.mm (148685 => 148686)


--- trunk/Source/WebKit2/UIProcess/API/mac/WKBrowsingContextGroup.mm	2013-04-18 17:55:21 UTC (rev 148685)
+++ trunk/Source/WebKit2/UIProcess/API/mac/WKBrowsingContextGroup.mm	2013-04-18 18:00:40 UTC (rev 148686)
@@ -56,6 +56,12 @@
     _data = [[WKBrowsingContextGroupData alloc] init];
     _data->_pageGroupRef = adoptWK(WKPageGroupCreateWithIdentifier(adoptWK(WKStringCreateWithCFString((CFStringRef)identifier)).get()));
 
+    // Give the WKBrowsingContextGroup a identifier-less preferences, so that they
+    // don't get automatically written to the disk. The automattic writting has proven
+    // confusing to users of the API.
+    WKRetainPtr<WKPreferencesRef> preferences = adoptWK(WKPreferencesCreate());
+    WKPageGroupSetPreferences(_data->_pageGroupRef.get(), preferences.get());
+
     return self;
 }
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to