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

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: deleteContents doesn’t work well for multiple nodes. Created 4 years, 7 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 1200 matching lines...) Expand 10 before | Expand all | Expand 10 after
1211 void WebLocalFrameImpl::extendSelectionAndDelete(int before, int after) 1211 void WebLocalFrameImpl::extendSelectionAndDelete(int before, int after)
1212 { 1212 {
1213 TRACE_EVENT0("blink", "WebLocalFrameImpl::extendSelectionAndDelete"); 1213 TRACE_EVENT0("blink", "WebLocalFrameImpl::extendSelectionAndDelete");
1214 if (WebPlugin* plugin = focusedPluginIfInputMethodSupported()) { 1214 if (WebPlugin* plugin = focusedPluginIfInputMethodSupported()) {
1215 plugin->extendSelectionAndDelete(before, after); 1215 plugin->extendSelectionAndDelete(before, after);
1216 return; 1216 return;
1217 } 1217 }
1218 frame()->inputMethodController().extendSelectionAndDelete(before, after); 1218 frame()->inputMethodController().extendSelectionAndDelete(before, after);
1219 } 1219 }
1220 1220
1221 void WebLocalFrameImpl::deleteSurroundingText(int before, int after)
1222 {
1223 TRACE_EVENT0("blink", "WebLocalFrameImpl::deleteSurroundingText");
1224 if (WebPlugin* plugin = focusedPluginIfInputMethodSupported()) {
1225 plugin->deleteSurroundingText(before, after);
1226 return;
1227 }
1228 frame()->inputMethodController().deleteSurroundingText(before, after);
1229 }
1230
1221 void WebLocalFrameImpl::setCaretVisible(bool visible) 1231 void WebLocalFrameImpl::setCaretVisible(bool visible)
1222 { 1232 {
1223 frame()->selection().setCaretVisible(visible); 1233 frame()->selection().setCaretVisible(visible);
1224 } 1234 }
1225 1235
1226 VisiblePosition WebLocalFrameImpl::visiblePositionForViewportPoint(const WebPoin t& pointInViewport) 1236 VisiblePosition WebLocalFrameImpl::visiblePositionForViewportPoint(const WebPoin t& pointInViewport)
1227 { 1237 {
1228 return visiblePositionForContentsPoint(frame()->view()->viewportToContents(p ointInViewport), frame()); 1238 return visiblePositionForContentsPoint(frame()->view()->viewportToContents(p ointInViewport), frame());
1229 } 1239 }
1230 1240
(...skipping 875 matching lines...) Expand 10 before | Expand all | Expand 10 after
2106 return WebSandboxFlags::None; 2116 return WebSandboxFlags::None;
2107 return static_cast<WebSandboxFlags>(frame()->loader().effectiveSandboxFlags( )); 2117 return static_cast<WebSandboxFlags>(frame()->loader().effectiveSandboxFlags( ));
2108 } 2118 }
2109 2119
2110 void WebLocalFrameImpl::forceSandboxFlags(WebSandboxFlags flags) 2120 void WebLocalFrameImpl::forceSandboxFlags(WebSandboxFlags flags)
2111 { 2121 {
2112 frame()->loader().forceSandboxFlags(static_cast<SandboxFlags>(flags)); 2122 frame()->loader().forceSandboxFlags(static_cast<SandboxFlags>(flags));
2113 } 2123 }
2114 2124
2115 } // namespace blink 2125 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698