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 1270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1281 return; | 1281 return; |
1282 } | 1282 } |
1283 | 1283 |
1284 // TODO(editing-dev): The use of updateStyleAndLayoutIgnorePendingStylesheets | 1284 // TODO(editing-dev): The use of updateStyleAndLayoutIgnorePendingStylesheets |
1285 // needs to be audited. See http://crbug.com/590369 for more details. | 1285 // needs to be audited. See http://crbug.com/590369 for more details. |
1286 frame()->document()->updateStyleAndLayoutIgnorePendingStylesheets(); | 1286 frame()->document()->updateStyleAndLayoutIgnorePendingStylesheets(); |
1287 | 1287 |
1288 frame()->inputMethodController().deleteSurroundingText(before, after); | 1288 frame()->inputMethodController().deleteSurroundingText(before, after); |
1289 } | 1289 } |
1290 | 1290 |
| 1291 void WebLocalFrameImpl::deleteSurroundingTextInCodePoints(int before, |
| 1292 int after) { |
| 1293 TRACE_EVENT0("blink", "WebLocalFrameImpl::deleteSurroundingTextInCodePoints"); |
| 1294 if (WebPlugin* plugin = focusedPluginIfInputMethodSupported()) { |
| 1295 plugin->deleteSurroundingTextInCodePoints(before, after); |
| 1296 return; |
| 1297 } |
| 1298 |
| 1299 // TODO(editing-dev): The use of updateStyleAndLayoutIgnorePendingStylesheets |
| 1300 // needs to be audited. See http://crbug.com/590369 for more details. |
| 1301 frame()->document()->updateStyleAndLayoutIgnorePendingStylesheets(); |
| 1302 |
| 1303 frame()->inputMethodController().deleteSurroundingTextInCodePoints(before, |
| 1304 after); |
| 1305 } |
| 1306 |
1291 void WebLocalFrameImpl::setCaretVisible(bool visible) { | 1307 void WebLocalFrameImpl::setCaretVisible(bool visible) { |
1292 frame()->selection().setCaretVisible(visible); | 1308 frame()->selection().setCaretVisible(visible); |
1293 } | 1309 } |
1294 | 1310 |
1295 VisiblePosition WebLocalFrameImpl::visiblePositionForViewportPoint( | 1311 VisiblePosition WebLocalFrameImpl::visiblePositionForViewportPoint( |
1296 const WebPoint& pointInViewport) { | 1312 const WebPoint& pointInViewport) { |
1297 return visiblePositionForContentsPoint( | 1313 return visiblePositionForContentsPoint( |
1298 frame()->view()->viewportToContents(pointInViewport), frame()); | 1314 frame()->view()->viewportToContents(pointInViewport), frame()); |
1299 } | 1315 } |
1300 | 1316 |
(...skipping 1130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2431 createMarkup(startPosition, endPosition, AnnotateForInterchange, | 2447 createMarkup(startPosition, endPosition, AnnotateForInterchange, |
2432 ConvertBlocksToInlines::NotConvert, ResolveNonLocalURLs); | 2448 ConvertBlocksToInlines::NotConvert, ResolveNonLocalURLs); |
2433 } else { | 2449 } else { |
2434 clipHtml = | 2450 clipHtml = |
2435 createMarkup(endPosition, startPosition, AnnotateForInterchange, | 2451 createMarkup(endPosition, startPosition, AnnotateForInterchange, |
2436 ConvertBlocksToInlines::NotConvert, ResolveNonLocalURLs); | 2452 ConvertBlocksToInlines::NotConvert, ResolveNonLocalURLs); |
2437 } | 2453 } |
2438 } | 2454 } |
2439 | 2455 |
2440 } // namespace blink | 2456 } // namespace blink |
OLD | NEW |