summaryrefslogtreecommitdiffstats
path: root/webkit
diff options
context:
space:
mode:
authorsail@chromium.org <sail@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-03 21:07:09 +0000
committersail@chromium.org <sail@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-03 21:07:09 +0000
commit13a1e4c3c4735ea3ed878c7f8f09ba555dd0d517 (patch)
tree365721f3d340de7da803fc2ec009d72686d24229 /webkit
parent94b4dc8631ea600034ecbb47194989646ec10aba (diff)
downloadchromium_src-13a1e4c3c4735ea3ed878c7f8f09ba555dd0d517.zip
chromium_src-13a1e4c3c4735ea3ed878c7f8f09ba555dd0d517.tar.gz
chromium_src-13a1e4c3c4735ea3ed878c7f8f09ba555dd0d517.tar.bz2
Mac: Enable "Check Spelling While Typing" in Edit menu
Currently the "Edit -> Spelling and Grammar -> Check Spelling While Typing" menu item is always disabled. The problem is that the logic to enable / disable this item lives in the render process and not in the UI. This patch implements a generic message that the render process can send to the browser to update the state of view commands. This is used to enable and disable the "Check Spelling While Typing" menu item. BUG=38440 TEST=Clicked in an edit box and verified that the "Check Spelling While Typing" menu item was enabled. Verified that changing the value from the context menu correctly updates the Edit menu as well. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@73664 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r--webkit/plugins/npapi/webplugin_delegate_impl_mac.mm9
1 files changed, 5 insertions, 4 deletions
diff --git a/webkit/plugins/npapi/webplugin_delegate_impl_mac.mm b/webkit/plugins/npapi/webplugin_delegate_impl_mac.mm
index e43453d..2b463ae 100644
--- a/webkit/plugins/npapi/webplugin_delegate_impl_mac.mm
+++ b/webkit/plugins/npapi/webplugin_delegate_impl_mac.mm
@@ -680,9 +680,10 @@ void WebPluginDelegateImpl::WindowlessPaint(gfx::NativeDrawingContext context,
const gfx::Rect& damage_rect) {
// If we get a paint event before we are completely set up (e.g., a nested
// call while the plugin is still in NPP_SetWindow), bail.
- if (!have_called_set_window_ || !buffer_context_)
+ //if (!have_called_set_window_ || !buffer_context_)
+ if (!have_called_set_window_)
return;
- DCHECK(buffer_context_ == context);
+ //DCHECK(buffer_context_ == context);
static base::StatsRate plugin_paint("Plugin.Paint");
base::StatsScope<base::StatsRate> scope(plugin_paint);
@@ -729,8 +730,8 @@ void WebPluginDelegateImpl::WindowlessPaint(gfx::NativeDrawingContext context,
// The backing buffer can change during the call to NPP_HandleEvent, in which
// case the old context is (or is about to be) invalid.
- if (context == buffer_context_)
- CGContextRestoreGState(context);
+ //if (context == buffer_context_)
+ CGContextRestoreGState(context);
}
void WebPluginDelegateImpl::WindowlessSetWindow() {