WebKit2: Show the substitutions panel on Mac and make sure the menu items titles are
authorjberlin@webkit.org <jberlin@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 9 Apr 2011 01:31:30 +0000 (01:31 +0000)
committerjberlin@webkit.org <jberlin@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 9 Apr 2011 01:31:30 +0000 (01:31 +0000)
commiteb20602bf07dd265540453e30def4ec774c5216d
treeac2a722d8f9e522ebdec41774511553775456958
parent6fdc587c99da3fec8a953af3f40c0d591cf1fa48
WebKit2: Show the substitutions panel on Mac and make sure the menu items titles are
updated correctly.
https://bugs.webkit.org/show_bug.cgi?id=58179

Reviewed by Anders Carlsson.

* UIProcess/API/mac/WKView.mm:
(-[WKView validateUserInterfaceItem:]):
The title of the context menu item should be opposite of whether or not the spelling panel
is visible.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::contextMenuItemSelected):
If the "Show/Hide" Substitutions item is selected, call toggleSubstitutionsPanelIsShowing.
(WebKit::WebPageProxy::substitutionsPanelIsShowing):
Ask the TextChecker.
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:

* UIProcess/TextChecker.h:
* UIProcess/mac/TextCheckerMac.mm:
(WebKit::TextChecker::substitutionsPanelIsShowing):
As the shared NSSpellChecker if the substitutionsPanel is visible.
(WebKit::TextChecker::toggleSubstitutionsPanelIsShowing):
Order the substitutionsPanel out or front (copied from WKView.mm).

* WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
(WebKit::WebEditorClient::substitutionsPanelIsShowing):
Send a sync message to the UI process to find out.
It needs to be sync because the editor code relies on the value returned.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@83369 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/API/mac/WKView.mm
Source/WebKit2/UIProcess/TextChecker.h
Source/WebKit2/UIProcess/WebPageProxy.cpp
Source/WebKit2/UIProcess/WebPageProxy.h
Source/WebKit2/UIProcess/WebPageProxy.messages.in
Source/WebKit2/UIProcess/mac/TextCheckerMac.mm
Source/WebKit2/WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm