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

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

Issue 2617443002: Implement ThreadedInputConnection.deleteSurroundingTextInCodePoints() (Closed)
Patch Set: Add more comments Created 3 years, 11 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 1277 matching lines...) Expand 10 before | Expand all | Expand 10 after
1288 return; 1288 return;
1289 } 1289 }
1290 1290
1291 // TODO(editing-dev): The use of updateStyleAndLayoutIgnorePendingStylesheets 1291 // TODO(editing-dev): The use of updateStyleAndLayoutIgnorePendingStylesheets
1292 // needs to be audited. See http://crbug.com/590369 for more details. 1292 // needs to be audited. See http://crbug.com/590369 for more details.
1293 frame()->document()->updateStyleAndLayoutIgnorePendingStylesheets(); 1293 frame()->document()->updateStyleAndLayoutIgnorePendingStylesheets();
1294 1294
1295 frame()->inputMethodController().deleteSurroundingText(before, after); 1295 frame()->inputMethodController().deleteSurroundingText(before, after);
1296 } 1296 }
1297 1297
1298 void WebLocalFrameImpl::deleteSurroundingTextInCodePoints(int before,
1299 int after) {
1300 TRACE_EVENT0("blink", "WebLocalFrameImpl::deleteSurroundingTextInCodePoints");
1301 if (WebPlugin* plugin = focusedPluginIfInputMethodSupported()) {
1302 plugin->deleteSurroundingTextInCodePoints(before, after);
1303 return;
1304 }
1305
1306 // TODO(editing-dev): The use of updateStyleAndLayoutIgnorePendingStylesheets
1307 // needs to be audited. See http://crbug.com/590369 for more details.
1308 frame()->document()->updateStyleAndLayoutIgnorePendingStylesheets();
1309
1310 frame()->inputMethodController().deleteSurroundingTextInCodePoints(before,
1311 after);
1312 }
1313
1298 void WebLocalFrameImpl::setCaretVisible(bool visible) { 1314 void WebLocalFrameImpl::setCaretVisible(bool visible) {
1299 frame()->selection().setCaretVisible(visible); 1315 frame()->selection().setCaretVisible(visible);
1300 } 1316 }
1301 1317
1302 VisiblePosition WebLocalFrameImpl::visiblePositionForViewportPoint( 1318 VisiblePosition WebLocalFrameImpl::visiblePositionForViewportPoint(
1303 const WebPoint& pointInViewport) { 1319 const WebPoint& pointInViewport) {
1304 return visiblePositionForContentsPoint( 1320 return visiblePositionForContentsPoint(
1305 frame()->view()->viewportToContents(pointInViewport), frame()); 1321 frame()->view()->viewportToContents(pointInViewport), frame());
1306 } 1322 }
1307 1323
(...skipping 1053 matching lines...) Expand 10 before | Expand all | Expand 10 after
2361 ->frameScheduler() 2377 ->frameScheduler()
2362 ->unthrottledTaskRunner() 2378 ->unthrottledTaskRunner()
2363 ->toSingleThreadTaskRunner(); 2379 ->toSingleThreadTaskRunner();
2364 } 2380 }
2365 2381
2366 WebInputMethodControllerImpl* WebLocalFrameImpl::inputMethodController() const { 2382 WebInputMethodControllerImpl* WebLocalFrameImpl::inputMethodController() const {
2367 return m_inputMethodController.get(); 2383 return m_inputMethodController.get();
2368 } 2384 }
2369 2385
2370 } // namespace blink 2386 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698