OLD | NEW |
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 1267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1278 return; | 1278 return; |
1279 } | 1279 } |
1280 | 1280 |
1281 // TODO(editing-dev): The use of updateStyleAndLayoutIgnorePendingStylesheets | 1281 // TODO(editing-dev): The use of updateStyleAndLayoutIgnorePendingStylesheets |
1282 // needs to be audited. See http://crbug.com/590369 for more details. | 1282 // needs to be audited. See http://crbug.com/590369 for more details. |
1283 frame()->document()->updateStyleAndLayoutIgnorePendingStylesheets(); | 1283 frame()->document()->updateStyleAndLayoutIgnorePendingStylesheets(); |
1284 | 1284 |
1285 frame()->inputMethodController().deleteSurroundingText(before, after); | 1285 frame()->inputMethodController().deleteSurroundingText(before, after); |
1286 } | 1286 } |
1287 | 1287 |
| 1288 void WebLocalFrameImpl::deleteSurroundingTextInCodePoints(int before, |
| 1289 int after) { |
| 1290 TRACE_EVENT0("blink", "WebLocalFrameImpl::deleteSurroundingTextInCodePoints"); |
| 1291 if (WebPlugin* plugin = focusedPluginIfInputMethodSupported()) { |
| 1292 plugin->deleteSurroundingTextInCodePoints(before, after); |
| 1293 return; |
| 1294 } |
| 1295 |
| 1296 // TODO(editing-dev): The use of updateStyleAndLayoutIgnorePendingStylesheets |
| 1297 // needs to be audited. See http://crbug.com/590369 for more details. |
| 1298 frame()->document()->updateStyleAndLayoutIgnorePendingStylesheets(); |
| 1299 |
| 1300 frame()->inputMethodController().deleteSurroundingTextInCodePoints(before, |
| 1301 after); |
| 1302 } |
| 1303 |
1288 void WebLocalFrameImpl::setCaretVisible(bool visible) { | 1304 void WebLocalFrameImpl::setCaretVisible(bool visible) { |
1289 frame()->selection().setCaretVisible(visible); | 1305 frame()->selection().setCaretVisible(visible); |
1290 } | 1306 } |
1291 | 1307 |
1292 VisiblePosition WebLocalFrameImpl::visiblePositionForViewportPoint( | 1308 VisiblePosition WebLocalFrameImpl::visiblePositionForViewportPoint( |
1293 const WebPoint& pointInViewport) { | 1309 const WebPoint& pointInViewport) { |
1294 return visiblePositionForContentsPoint( | 1310 return visiblePositionForContentsPoint( |
1295 frame()->view()->viewportToContents(pointInViewport), frame()); | 1311 frame()->view()->viewportToContents(pointInViewport), frame()); |
1296 } | 1312 } |
1297 | 1313 |
(...skipping 1053 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2351 ->frameScheduler() | 2367 ->frameScheduler() |
2352 ->unthrottledTaskRunner() | 2368 ->unthrottledTaskRunner() |
2353 ->toSingleThreadTaskRunner(); | 2369 ->toSingleThreadTaskRunner(); |
2354 } | 2370 } |
2355 | 2371 |
2356 WebInputMethodControllerImpl* WebLocalFrameImpl::inputMethodController() const { | 2372 WebInputMethodControllerImpl* WebLocalFrameImpl::inputMethodController() const { |
2357 return m_inputMethodController.get(); | 2373 return m_inputMethodController.get(); |
2358 } | 2374 } |
2359 | 2375 |
2360 } // namespace blink | 2376 } // namespace blink |
OLD | NEW |