OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2011, 2012 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 2412 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2423 return true; | 2423 return true; |
2424 | 2424 |
2425 size_t location; | 2425 size_t location; |
2426 size_t length; | 2426 size_t length; |
2427 caretOrSelectionRange(&location, &length); | 2427 caretOrSelectionRange(&location, &length); |
2428 editor->setIgnoreCompositionSelectionChange(true); | 2428 editor->setIgnoreCompositionSelectionChange(true); |
2429 editor->setSelectionOffsets(compositionStart, compositionEnd); | 2429 editor->setSelectionOffsets(compositionStart, compositionEnd); |
2430 String text = editor->selectedText(); | 2430 String text = editor->selectedText(); |
2431 focused->document()->execCommand("delete", true); | 2431 focused->document()->execCommand("delete", true); |
2432 editor->setComposition(text, CompositionUnderlineVectorBuilder(underlines),
0, 0); | 2432 editor->setComposition(text, CompositionUnderlineVectorBuilder(underlines),
0, 0); |
| 2433 // Need to set setIgnoreCompositionSelectionChange(true) again because setCo
mposition resets it to false. |
| 2434 editor->setIgnoreCompositionSelectionChange(true); |
2433 editor->setSelectionOffsets(location, location + length); | 2435 editor->setSelectionOffsets(location, location + length); |
2434 editor->setIgnoreCompositionSelectionChange(false); | 2436 editor->setIgnoreCompositionSelectionChange(false); |
2435 | 2437 |
2436 return true; | 2438 return true; |
2437 } | 2439 } |
2438 | 2440 |
2439 void WebViewImpl::extendSelectionAndDelete(int before, int after) | 2441 void WebViewImpl::extendSelectionAndDelete(int before, int after) |
2440 { | 2442 { |
2441 const Frame* focused = focusedWebCoreFrame(); | 2443 const Frame* focused = focusedWebCoreFrame(); |
2442 if (!focused) | 2444 if (!focused) |
(...skipping 1860 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4303 #endif | 4305 #endif |
4304 | 4306 |
4305 bool WebViewImpl::shouldDisableDesktopWorkarounds() | 4307 bool WebViewImpl::shouldDisableDesktopWorkarounds() |
4306 { | 4308 { |
4307 ViewportArguments arguments = mainFrameImpl()->frame()->document()->viewport
Arguments(); | 4309 ViewportArguments arguments = mainFrameImpl()->frame()->document()->viewport
Arguments(); |
4308 return arguments.width == ViewportArguments::ValueDeviceWidth || !arguments.
userZoom | 4310 return arguments.width == ViewportArguments::ValueDeviceWidth || !arguments.
userZoom |
4309 || (arguments.minZoom == arguments.maxZoom && arguments.minZoom != Viewp
ortArguments::ValueAuto); | 4311 || (arguments.minZoom == arguments.maxZoom && arguments.minZoom != Viewp
ortArguments::ValueAuto); |
4310 } | 4312 } |
4311 | 4313 |
4312 } // namespace WebKit | 4314 } // namespace WebKit |
OLD | NEW |