Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Unified Diff: webkit/glue/webview_impl.cc

Issue 13731: [chromium-reviews] Add "Enable spell check for this field" menu option in sub context menu for c... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« webkit/glue/editor_client_impl.cc ('K') | « webkit/glue/webview_impl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/glue/webview_impl.cc
===================================================================
--- webkit/glue/webview_impl.cc (revision 6726)
+++ webkit/glue/webview_impl.cc (working copy)
@@ -1175,30 +1175,6 @@
}
}
-bool WebViewImpl::FocusedFrameNeedsSpellchecking() {
- const WebCore::Frame* frame = GetFocusedWebCoreFrame();
- if (!frame)
- return false;
- const WebCore::Editor* editor = frame->editor();
- if (!editor)
- return false;
- const WebCore::Document* document = frame->document();
- if (!document)
- return false;
- const WebCore::Node* node = document->focusedNode();
- if (!node)
- return false;
- const WebCore::RenderObject* renderer = node->renderer();
- if (!renderer)
- return false;
- // We should also retrieve the contenteditable attribute of this element to
- // determine if this element needs spell-checking.
- const WebCore::EUserModify user_modify = renderer->style()->userModify();
- return (renderer->isTextArea() && editor->canEdit()) ||
- user_modify == WebCore::READ_WRITE ||
- user_modify == WebCore::READ_WRITE_PLAINTEXT_ONLY;
-}
-
// Releases references used to restore focus.
void WebViewImpl::ReleaseFocusReferences() {
if (last_focused_frame_.get()) {
« webkit/glue/editor_client_impl.cc ('K') | « webkit/glue/webview_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698