Give user scripts custom URLs
https://bugs.webkit.org/show_bug.cgi?id=133035

Reviewed by Beth Dakin.

* UIProcess/API/Cocoa/WKUserContentController.mm:
(-[WKUserContentController addUserScript:]):
Create a user-script:<number> URL for user scripts.

* UIProcess/API/Cocoa/WKUserScript.h:
Move the init method after the properties.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@169000 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Need a way to get a WKPageRef from a WKWebView
<http://webkit.org/b/133015>

Reviewed by Benjamin Poulain.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _pageRef]): Added.
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
(-[WKWebView _pageRef]): Added declaration.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@169001 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Subpixel rendering: Add subpixelCSSOMElementMetricsEnabled to WK1 WebPreferences.
https://bugs.webkit.org/show_bug.cgi?id=133029

Reviewed by Simon Fraser.

Source/WebKit/mac:
To match the WK2 preferences API.

* WebView/WebPreferenceKeysPrivate.h:
* WebView/WebPreferences.mm:
(+[WebPreferences initialize]):
(-[WebPreferences subpixelCSSOMElementMetricsEnabled]):
(-[WebPreferences setSubpixelCSSOMElementMetricsEnabled:]):
* WebView/WebPreferencesPrivate.h:
* WebView/WebView.mm:
(-[WebView _preferencesChanged:]):

Tools:
Added a menu item to toggle subpixelCSSOMElementMetricsEnabled's value. However
toggling it on a WK2 window needs restart.
Adding dynamic toggle to WK2 requires a WebPreferences SPI. It's not worth cluttering
the WebPreferences just to support this temporary toggle.

* MiniBrowser/mac/BrowserWindowController.h:
* MiniBrowser/mac/MainMenu.xib:
* MiniBrowser/mac/WK1BrowserWindowController.m:
(-[WK1BrowserWindowController validateMenuItem:]):
(-[WK1BrowserWindowController isSubpixelCSSOMElementMetricsEnabled]):
(-[WK1BrowserWindowController toggleSubpixelCSSOMElementMetricsEnabled:]):
* MiniBrowser/mac/WK2BrowserWindowController.m:
(-[WK2BrowserWindowController validateMenuItem:]):
(-[WK2BrowserWindowController isSubpixelCSSOMElementMetricsEnabled]):
(-[WK2BrowserWindowController toggleSubpixelCSSOMElementMetricsEnabled:]):


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