[WebEditingTester] Hook up key equivalents for new window action
authortimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 20 Feb 2015 19:17:51 +0000 (19:17 +0000)
committertimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 20 Feb 2015 19:17:51 +0000 (19:17 +0000)
commit327841825ebf7a537c3b39fc71468ed373934195
tree57069f09c370d8c840998a8e7af9f74c1dc0c86a
parent91c9cb9b1b0e2c052479a00fef002d51501370d0
[WebEditingTester] Hook up key equivalents for new window action
https://bugs.webkit.org/show_bug.cgi?id=141828

Reviewed by Enrica Casucci.

* WebEditingTester/AppDelegate.h:
* WebEditingTester/AppDelegate.m:
(-[WebEditingAppDelegate applicationDidFinishLaunching:]):
(-[WebEditingAppDelegate newEditor:]):
(-[WebEditingAppDelegate _defaultWebDocumentControllerClass]):
(-[WebEditingAppDelegate toggleUseWK2ByDefault:]):
(-[WebEditingAppDelegate _updateNewWindowKeyEquivalents]):
(defaultConfiguration): Deleted.
(-[WebEditingAppDelegate applicationWillTerminate:]): Deleted.
Move WKWebViewConfiguration setup into WK2WebDocumentController.
Remove unused application termination code.
Update new-window menu item key equivalents when launching and when
changing the use-WebKit2-by-default setting.
Make WebDocumentController subclasses all initialized the same way,
and use that to factor out alloc/init.
Rename loadContent to loadHTMLString for future use.

* WebEditingTester/MainMenu.xib:
Add default key equivalents.
Cmd-N will always make the default kind of window (controlled by the pref).
Cmd-Opt-N will always make the other kind.
The menu items are configured as alternates so they only show up if you
press alt (just like in MiniBrowser).

* WebEditingTester/WK1WebDocumentController.m:
(-[WK1WebDocumentController loadHTMLString:]):
(-[WK1WebDocumentController loadContent]): Deleted.
* WebEditingTester/WK2WebDocumentController.h:
* WebEditingTester/WK2WebDocumentController.m:
(defaultConfiguration):
(-[WK2WebDocumentController awakeFromNib]):
(-[WK2WebDocumentController loadHTMLString:]):
(-[WK2WebDocumentController initWithConfiguration:]): Deleted.
(-[WK2WebDocumentController dealloc]): Deleted.
* WebEditingTester/WebDocumentController.h:
* WebEditingTester/WebDocumentController.m:
(-[WebDocumentController init]):
(-[WebDocumentController initWithWindow:]):
(+[WebDocumentController defaultEditingSource]):
(-[WebDocumentController loadHTMLString:]):
(-[WebDocumentController windowDidLoad]): Deleted.
(-[WebDocumentController defaultEditingSource]): Deleted.
(-[WebDocumentController applicationTerminating]): Deleted.
(-[WebDocumentController loadContent]): Deleted.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@180429 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Tools/ChangeLog
Tools/WebEditingTester/AppDelegate.h
Tools/WebEditingTester/AppDelegate.m
Tools/WebEditingTester/MainMenu.xib
Tools/WebEditingTester/WK1WebDocumentController.m
Tools/WebEditingTester/WK2WebDocumentController.h
Tools/WebEditingTester/WK2WebDocumentController.m
Tools/WebEditingTester/WebDocumentController.h
Tools/WebEditingTester/WebDocumentController.m