Title: [210103] trunk
- Revision
- 210103
- Author
- [email protected]
- Date
- 2016-12-22 11:49:37 -0800 (Thu, 22 Dec 2016)
Log Message
Source/WebKit2:
[Cocoa] SPI for setloadsImagesAutomatically
https://bugs.webkit.org/show_bug.cgi?id=166401
Patch by Zhuo Li <[email protected]> on 2016-12-22
Reviewed by Darin Adler.
* UIProcess/API/Cocoa/WKPreferences.mm: Call the C API under the hood.
(-[WKPreferences _loadsImagesAutomatically]):
(-[WKPreferences _setLoadsImagesAutomatically:]):
* UIProcess/API/Cocoa/WKPreferencesPrivate.h:
Add `_loadsImagesAutomatically` property.
Tools:
[Cocoa] SPI for setloadsImagesAutomatically.
https://bugs.webkit.org/show_bug.cgi?id=166401.
Patch by Zhuo Li <[email protected]> on 2016-12-22
Reviewed by Darin Adler.
* TestWebKitAPI/Tests/WebKit2Cocoa/Preferences.mm:
(TEST): Test the _setLoadsImagesAutomatically SPI. By default,
_loadsImagesAutomatically returns YES.
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (210102 => 210103)
--- trunk/Source/WebKit2/ChangeLog 2016-12-22 18:31:04 UTC (rev 210102)
+++ trunk/Source/WebKit2/ChangeLog 2016-12-22 19:49:37 UTC (rev 210103)
@@ -1,3 +1,17 @@
+2016-12-22 Zhuo Li <[email protected]>
+
+ [Cocoa] SPI for setloadsImagesAutomatically
+ https://bugs.webkit.org/show_bug.cgi?id=166401
+
+ Reviewed by Darin Adler.
+
+ * UIProcess/API/Cocoa/WKPreferences.mm: Call the C API under the hood.
+ (-[WKPreferences _loadsImagesAutomatically]):
+ (-[WKPreferences _setLoadsImagesAutomatically:]):
+
+ * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
+ Add `_loadsImagesAutomatically` property.
+
2016-12-22 Eric Carlson <[email protected]>
AVPlayerLayer isn't available on every system
Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKPreferences.mm (210102 => 210103)
--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKPreferences.mm 2016-12-22 18:31:04 UTC (rev 210102)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKPreferences.mm 2016-12-22 19:49:37 UTC (rev 210103)
@@ -517,6 +517,16 @@
_preferences->setShouldSuppressKeyboardInputDuringProvisionalNavigation(shouldSuppress);
}
+- (BOOL)_loadsImagesAutomatically
+{
+ return _preferences->loadsImagesAutomatically();
+}
+
+- (void)_setLoadsImagesAutomatically:(BOOL)loadsImagesAutomatically
+{
+ _preferences->setLoadsImagesAutomatically(loadsImagesAutomatically);
+}
+
@end
#endif // WK_API_ENABLED
Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKPreferencesPrivate.h (210102 => 210103)
--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKPreferencesPrivate.h 2016-12-22 18:31:04 UTC (rev 210102)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKPreferencesPrivate.h 2016-12-22 19:49:37 UTC (rev 210103)
@@ -94,6 +94,8 @@
@property (nonatomic, setter=_setApplePayCapabilityDisclosureAllowed:) BOOL _applePayCapabilityDisclosureAllowed WK_API_AVAILABLE(macosx(10.12), ios(10.0));
+@property (nonatomic, setter=_setLoadsImagesAutomatically:) BOOL _loadsImagesAutomatically WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA));
+
+ (NSArray<_WKExperimentalFeature *> *)_experimentalFeatures WK_API_AVAILABLE(macosx(10.12), ios(10.0));
- (BOOL)_isEnabledForFeature:(_WKExperimentalFeature *)feature WK_API_AVAILABLE(macosx(10.12), ios(10.0));
- (void)_setEnabled:(BOOL)value forFeature:(_WKExperimentalFeature *)feature WK_API_AVAILABLE(macosx(10.12), ios(10.0));
Modified: trunk/Tools/ChangeLog (210102 => 210103)
--- trunk/Tools/ChangeLog 2016-12-22 18:31:04 UTC (rev 210102)
+++ trunk/Tools/ChangeLog 2016-12-22 19:49:37 UTC (rev 210103)
@@ -1,3 +1,14 @@
+2016-12-22 Zhuo Li <[email protected]>
+
+ [Cocoa] SPI for setloadsImagesAutomatically.
+ https://bugs.webkit.org/show_bug.cgi?id=166401.
+
+ Reviewed by Darin Adler.
+
+ * TestWebKitAPI/Tests/WebKit2Cocoa/Preferences.mm:
+ (TEST): Test the _setLoadsImagesAutomatically SPI. By default,
+ _loadsImagesAutomatically returns YES.
+
2016-12-22 Wenson Hsieh <[email protected]>
fast/events/ios/viewport-shrink-to-fit-allows-double-tap.html is flaky/order dependent
Modified: trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/Preferences.mm (210102 => 210103)
--- trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/Preferences.mm 2016-12-22 18:31:04 UTC (rev 210102)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/Preferences.mm 2016-12-22 19:49:37 UTC (rev 210103)
@@ -42,6 +42,17 @@
EXPECT_TRUE([preferences _isStandalone]);
}
+TEST(WebKit2, LoadsImagesAutomatically)
+{
+ RetainPtr<WKPreferences> preferences = adoptNS([[WKPreferences alloc] init]);
+
+ EXPECT_TRUE([preferences _loadsImagesAutomatically]);
+ [preferences _setLoadsImagesAutomatically:NO];
+ EXPECT_FALSE([preferences _loadsImagesAutomatically]);
+ [preferences _setLoadsImagesAutomatically:YES];
+ EXPECT_TRUE([preferences _loadsImagesAutomatically]);
+}
+
TEST(WebKit2, ExperimentalFeatures)
{
NSArray *features = [WKPreferences _experimentalFeatures];
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes