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

Side by Side Diff: third_party/WebKit/Source/web/WebLocalFrameImpl.cpp

Issue 1889053003: Fix InputConnection.deleteSurroundingText() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use a different method to handle "\n" node Created 4 years, 5 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 1208 matching lines...) Expand 10 before | Expand all | Expand 10 after
1219 void WebLocalFrameImpl::extendSelectionAndDelete(int before, int after) 1219 void WebLocalFrameImpl::extendSelectionAndDelete(int before, int after)
1220 { 1220 {
1221 TRACE_EVENT0("blink", "WebLocalFrameImpl::extendSelectionAndDelete"); 1221 TRACE_EVENT0("blink", "WebLocalFrameImpl::extendSelectionAndDelete");
1222 if (WebPlugin* plugin = focusedPluginIfInputMethodSupported()) { 1222 if (WebPlugin* plugin = focusedPluginIfInputMethodSupported()) {
1223 plugin->extendSelectionAndDelete(before, after); 1223 plugin->extendSelectionAndDelete(before, after);
1224 return; 1224 return;
1225 } 1225 }
1226 frame()->inputMethodController().extendSelectionAndDelete(before, after); 1226 frame()->inputMethodController().extendSelectionAndDelete(before, after);
1227 } 1227 }
1228 1228
1229 void WebLocalFrameImpl::deleteSurroundingText(int before, int after)
1230 {
1231 TRACE_EVENT0("blink", "WebLocalFrameImpl::deleteSurroundingText");
1232 if (WebPlugin* plugin = focusedPluginIfInputMethodSupported()) {
1233 plugin->deleteSurroundingText(before, after);
1234 return;
1235 }
1236 frame()->inputMethodController().deleteSurroundingText(before, after);
1237 }
1238
1229 void WebLocalFrameImpl::setCaretVisible(bool visible) 1239 void WebLocalFrameImpl::setCaretVisible(bool visible)
1230 { 1240 {
1231 frame()->selection().setCaretVisible(visible); 1241 frame()->selection().setCaretVisible(visible);
1232 } 1242 }
1233 1243
1234 VisiblePosition WebLocalFrameImpl::visiblePositionForViewportPoint(const WebPoin t& pointInViewport) 1244 VisiblePosition WebLocalFrameImpl::visiblePositionForViewportPoint(const WebPoin t& pointInViewport)
1235 { 1245 {
1236 return visiblePositionForContentsPoint(frame()->view()->viewportToContents(p ointInViewport), frame()); 1246 return visiblePositionForContentsPoint(frame()->view()->viewportToContents(p ointInViewport), frame());
1237 } 1247 }
1238 1248
(...skipping 908 matching lines...) Expand 10 before | Expand all | Expand 10 after
2147 { 2157 {
2148 frame()->loader().forceSandboxFlags(static_cast<SandboxFlags>(flags)); 2158 frame()->loader().forceSandboxFlags(static_cast<SandboxFlags>(flags));
2149 } 2159 }
2150 2160
2151 void WebLocalFrameImpl::clearActiveFindMatch() 2161 void WebLocalFrameImpl::clearActiveFindMatch()
2152 { 2162 {
2153 ensureTextFinder().clearActiveFindMatch(); 2163 ensureTextFinder().clearActiveFindMatch();
2154 } 2164 }
2155 2165
2156 } // namespace blink 2166 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698