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

Side by Side Diff: webkit/glue/editor_client_impl.cc

Issue 165309: Make double-clicking to select work correctly on Mac.... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 11 years, 4 months 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // The Mac interface forwards most of these commands to the application layer, 5 // The Mac interface forwards most of these commands to the application layer,
6 // and I'm not really sure what to do about most of them. 6 // and I'm not really sure what to do about most of them.
7 7
8 #include "config.h" 8 #include "config.h"
9 #include "webkit/glue/editor_client_impl.h" 9 #include "webkit/glue/editor_client_impl.h"
10 10
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 if (use_editor_delegate_) { 103 if (use_editor_delegate_) {
104 WebViewDelegate* d = web_view_->delegate(); 104 WebViewDelegate* d = web_view_->delegate();
105 if (d) 105 if (d)
106 return d->SmartInsertDeleteEnabled(); 106 return d->SmartInsertDeleteEnabled();
107 } 107 }
108 return true; 108 return true;
109 } 109 }
110 110
111 bool EditorClientImpl::isSelectTrailingWhitespaceEnabled() { 111 bool EditorClientImpl::isSelectTrailingWhitespaceEnabled() {
112 if (use_editor_delegate_) { 112 if (use_editor_delegate_) {
113 WebViewDelegate* d = web_view_->delegate(); 113 WebViewDelegate* d = web_view_->delegate();
114 if (d) 114 if (d)
115 return d->IsSelectTrailingWhitespaceEnabled(); 115 return d->IsSelectTrailingWhitespaceEnabled();
116 } 116 }
117
118 #if defined(OS_WIN)
117 return true; 119 return true;
120 #elif defined(OS_MACOSX) || defined(OS_LINUX)
121 return false;
122 #endif
118 } 123 }
119 124
120 bool EditorClientImpl::ShouldSpellcheckByDefault() { 125 bool EditorClientImpl::ShouldSpellcheckByDefault() {
121 // Spellcheck should be enabled for all editable areas (such as textareas, 126 // Spellcheck should be enabled for all editable areas (such as textareas,
122 // contentEditable regions, and designMode docs), except text inputs. 127 // contentEditable regions, and designMode docs), except text inputs.
123 const WebCore::Frame* frame = web_view_->GetFocusedWebCoreFrame(); 128 const WebCore::Frame* frame = web_view_->GetFocusedWebCoreFrame();
124 if (!frame) 129 if (!frame)
125 return false; 130 return false;
126 const WebCore::Editor* editor = frame->editor(); 131 const WebCore::Editor* editor = frame->editor();
127 if (!editor) 132 if (!editor)
(...skipping 890 matching lines...) Expand 10 before | Expand all | Expand 10 after
1018 } 1023 }
1019 return L"(UNKNOWN AFFINITY)"; 1024 return L"(UNKNOWN AFFINITY)";
1020 } 1025 }
1021 1026
1022 std::wstring EditorClientImpl::Describe(WebCore::CSSStyleDeclaration* style) { 1027 std::wstring EditorClientImpl::Describe(WebCore::CSSStyleDeclaration* style) {
1023 // TODO(pamg): Implement me. It's not clear what WebKit produces for this 1028 // TODO(pamg): Implement me. It's not clear what WebKit produces for this
1024 // (their [style description] method), and none of the layout tests provide 1029 // (their [style description] method), and none of the layout tests provide
1025 // an example. But because none of them use it, it's not yet important. 1030 // an example. But because none of them use it, it's not yet important.
1026 return std::wstring(); 1031 return std::wstring();
1027 } 1032 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698