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

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

Issue 2617443002: Implement ThreadedInputConnection.deleteSurroundingTextInCodePoints() (Closed)
Patch Set: Don't convert utf8 Created 3 years, 10 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 1269 matching lines...) Expand 10 before | Expand all | Expand 10 after
1280 return; 1280 return;
1281 } 1281 }
1282 1282
1283 // TODO(editing-dev): The use of updateStyleAndLayoutIgnorePendingStylesheets 1283 // TODO(editing-dev): The use of updateStyleAndLayoutIgnorePendingStylesheets
1284 // needs to be audited. See http://crbug.com/590369 for more details. 1284 // needs to be audited. See http://crbug.com/590369 for more details.
1285 frame()->document()->updateStyleAndLayoutIgnorePendingStylesheets(); 1285 frame()->document()->updateStyleAndLayoutIgnorePendingStylesheets();
1286 1286
1287 frame()->inputMethodController().deleteSurroundingText(before, after); 1287 frame()->inputMethodController().deleteSurroundingText(before, after);
1288 } 1288 }
1289 1289
1290 void WebLocalFrameImpl::deleteSurroundingTextInCodePoints(int before,
1291 int after) {
1292 TRACE_EVENT0("blink", "WebLocalFrameImpl::deleteSurroundingTextInCodePoints");
1293 if (WebPlugin* plugin = focusedPluginIfInputMethodSupported()) {
1294 plugin->deleteSurroundingTextInCodePoints(before, after);
1295 return;
1296 }
1297
1298 // TODO(editing-dev): The use of updateStyleAndLayoutIgnorePendingStylesheets
1299 // needs to be audited. See http://crbug.com/590369 for more details.
1300 frame()->document()->updateStyleAndLayoutIgnorePendingStylesheets();
1301
1302 frame()->inputMethodController().deleteSurroundingTextInCodePoints(before,
1303 after);
1304 }
1305
1290 void WebLocalFrameImpl::setCaretVisible(bool visible) { 1306 void WebLocalFrameImpl::setCaretVisible(bool visible) {
1291 frame()->selection().setCaretVisible(visible); 1307 frame()->selection().setCaretVisible(visible);
1292 } 1308 }
1293 1309
1294 VisiblePosition WebLocalFrameImpl::visiblePositionForViewportPoint( 1310 VisiblePosition WebLocalFrameImpl::visiblePositionForViewportPoint(
1295 const WebPoint& pointInViewport) { 1311 const WebPoint& pointInViewport) {
1296 return visiblePositionForContentsPoint( 1312 return visiblePositionForContentsPoint(
1297 frame()->view()->viewportToContents(pointInViewport), frame()); 1313 frame()->view()->viewportToContents(pointInViewport), frame());
1298 } 1314 }
1299 1315
(...skipping 1110 matching lines...) Expand 10 before | Expand all | Expand 10 after
2410 createMarkup(startPosition, endPosition, AnnotateForInterchange, 2426 createMarkup(startPosition, endPosition, AnnotateForInterchange,
2411 ConvertBlocksToInlines::NotConvert, ResolveNonLocalURLs); 2427 ConvertBlocksToInlines::NotConvert, ResolveNonLocalURLs);
2412 } else { 2428 } else {
2413 clipHtml = 2429 clipHtml =
2414 createMarkup(endPosition, startPosition, AnnotateForInterchange, 2430 createMarkup(endPosition, startPosition, AnnotateForInterchange,
2415 ConvertBlocksToInlines::NotConvert, ResolveNonLocalURLs); 2431 ConvertBlocksToInlines::NotConvert, ResolveNonLocalURLs);
2416 } 2432 }
2417 } 2433 }
2418 2434
2419 } // namespace blink 2435 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698