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 1278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1289 return; | 1289 return; |
1290 } | 1290 } |
1291 | 1291 |
1292 // TODO(editing-dev): The use of updateStyleAndLayoutIgnorePendingStylesheets | 1292 // TODO(editing-dev): The use of updateStyleAndLayoutIgnorePendingStylesheets |
1293 // needs to be audited. See http://crbug.com/590369 for more details. | 1293 // needs to be audited. See http://crbug.com/590369 for more details. |
1294 frame()->document()->updateStyleAndLayoutIgnorePendingStylesheets(); | 1294 frame()->document()->updateStyleAndLayoutIgnorePendingStylesheets(); |
1295 | 1295 |
1296 frame()->inputMethodController().deleteSurroundingText(before, after); | 1296 frame()->inputMethodController().deleteSurroundingText(before, after); |
1297 } | 1297 } |
1298 | 1298 |
| 1299 void WebLocalFrameImpl::deleteSurroundingTextInCodePoints(int before, |
| 1300 int after) { |
| 1301 TRACE_EVENT0("blink", "WebLocalFrameImpl::deleteSurroundingTextInCodePoints"); |
| 1302 if (WebPlugin* plugin = focusedPluginIfInputMethodSupported()) { |
| 1303 plugin->deleteSurroundingTextInCodePoints(before, after); |
| 1304 return; |
| 1305 } |
| 1306 |
| 1307 // TODO(editing-dev): The use of updateStyleAndLayoutIgnorePendingStylesheets |
| 1308 // needs to be audited. See http://crbug.com/590369 for more details. |
| 1309 frame()->document()->updateStyleAndLayoutIgnorePendingStylesheets(); |
| 1310 |
| 1311 frame()->inputMethodController().deleteSurroundingTextInCodePoints(before, |
| 1312 after); |
| 1313 } |
| 1314 |
1299 void WebLocalFrameImpl::setCaretVisible(bool visible) { | 1315 void WebLocalFrameImpl::setCaretVisible(bool visible) { |
1300 frame()->selection().setCaretVisible(visible); | 1316 frame()->selection().setCaretVisible(visible); |
1301 } | 1317 } |
1302 | 1318 |
1303 VisiblePosition WebLocalFrameImpl::visiblePositionForViewportPoint( | 1319 VisiblePosition WebLocalFrameImpl::visiblePositionForViewportPoint( |
1304 const WebPoint& pointInViewport) { | 1320 const WebPoint& pointInViewport) { |
1305 return visiblePositionForContentsPoint( | 1321 return visiblePositionForContentsPoint( |
1306 frame()->view()->viewportToContents(pointInViewport), frame()); | 1322 frame()->view()->viewportToContents(pointInViewport), frame()); |
1307 } | 1323 } |
1308 | 1324 |
(...skipping 1129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2438 createMarkup(startPosition, endPosition, AnnotateForInterchange, | 2454 createMarkup(startPosition, endPosition, AnnotateForInterchange, |
2439 ConvertBlocksToInlines::NotConvert, ResolveNonLocalURLs); | 2455 ConvertBlocksToInlines::NotConvert, ResolveNonLocalURLs); |
2440 } else { | 2456 } else { |
2441 clipHtml = | 2457 clipHtml = |
2442 createMarkup(endPosition, startPosition, AnnotateForInterchange, | 2458 createMarkup(endPosition, startPosition, AnnotateForInterchange, |
2443 ConvertBlocksToInlines::NotConvert, ResolveNonLocalURLs); | 2459 ConvertBlocksToInlines::NotConvert, ResolveNonLocalURLs); |
2444 } | 2460 } |
2445 } | 2461 } |
2446 | 2462 |
2447 } // namespace blink | 2463 } // namespace blink |
OLD | NEW |