[Mac] Expose Enable/Disable Accelerated Drawing in MiniBrowser
authordbates@webkit.org <dbates@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 8 Sep 2015 23:04:34 +0000 (23:04 +0000)
committerdbates@webkit.org <dbates@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 8 Sep 2015 23:04:34 +0000 (23:04 +0000)
commit86d81fc650293ee5807322b02f2b6f5b2bc1007a
tree47670f657c20efbcce7f8f8f257094eeb0623794
parentc27edfd34323549d64a092d485a35ba68ce4aadd
[Mac] Expose Enable/Disable Accelerated Drawing in MiniBrowser
https://bugs.webkit.org/show_bug.cgi?id=148980

Reviewed by Alexey Proskuryakov.

Source/WebKit2:

Expose SPI web preference to enable/disable- and query the state of- accelerated drawing
so that we can toggle this setting in MiniBrowser on Mac.

* UIProcess/API/Cocoa/WKPreferences.mm:
(-[WKPreferences _acceleratedDrawingEnabled]): Added.
(-[WKPreferences _setAcceleratedDrawingEnabled:]): Added.
* UIProcess/API/Cocoa/WKPreferencesPrivate.h:

Tools:

Add setting to enable/disable accelerated drawing so as to support testing
this feature in MiniBrowser on Mac.

* MiniBrowser/mac/SettingsController.h:
* MiniBrowser/mac/SettingsController.m:
(-[SettingsController _populateMenu]): Add menu item.
(-[SettingsController validateMenuItem:]): Update setting when menu item is toggled.
(-[SettingsController toggleAcceleratedDrawingEnabled:]): Added.
(-[SettingsController acceleratedDrawingEnabled]): Added.
* MiniBrowser/mac/WK1BrowserWindowController.m:
(-[WK1BrowserWindowController didChangeSettings]): Apply setting in WebKit1.
* MiniBrowser/mac/WK2BrowserWindowController.m:
(-[WK2BrowserWindowController didChangeSettings]): Apply setting in WebKit2.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@189513 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/API/Cocoa/WKPreferences.mm
Source/WebKit2/UIProcess/API/Cocoa/WKPreferencesPrivate.h
Tools/ChangeLog
Tools/MiniBrowser/mac/SettingsController.h
Tools/MiniBrowser/mac/SettingsController.m
Tools/MiniBrowser/mac/WK1BrowserWindowController.m
Tools/MiniBrowser/mac/WK2BrowserWindowController.m