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 2376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2387 return confirmComposition(DoNotKeepSelection); | 2387 return confirmComposition(DoNotKeepSelection); |
2388 } | 2388 } |
2389 | 2389 |
2390 bool WebViewImpl::confirmComposition(ConfirmCompositionBehavior selectionBehavio r) | 2390 bool WebViewImpl::confirmComposition(ConfirmCompositionBehavior selectionBehavio r) |
2391 { | 2391 { |
2392 return confirmComposition(WebString(), selectionBehavior); | 2392 return confirmComposition(WebString(), selectionBehavior); |
2393 } | 2393 } |
2394 | 2394 |
2395 bool WebViewImpl::confirmComposition(const WebString& text) | 2395 bool WebViewImpl::confirmComposition(const WebString& text) |
2396 { | 2396 { |
2397 UserGestureIndicator gestureIndicator(DefinitelyProcessingNewUserGesture); | |
2397 return confirmComposition(text, DoNotKeepSelection); | 2398 return confirmComposition(text, DoNotKeepSelection); |
2398 } | 2399 } |
2399 | 2400 |
2400 bool WebViewImpl::confirmComposition(const WebString& text, ConfirmCompositionBe havior selectionBehavior) | 2401 bool WebViewImpl::confirmComposition(const WebString& text, ConfirmCompositionBe havior selectionBehavior) |
aelias_OOO_until_Jul13
2016/02/05 20:15:00
Please move the UserGestureIndicator line here sin
ashlin.j
2016/02/08 11:02:36
Not adding the initialization here because confirm
| |
2401 { | 2402 { |
2402 LocalFrame* focused = toLocalFrame(focusedCoreFrame()); | 2403 LocalFrame* focused = toLocalFrame(focusedCoreFrame()); |
2403 if (!focused || !m_imeAcceptEvents) | 2404 if (!focused || !m_imeAcceptEvents) |
2404 return false; | 2405 return false; |
2405 | 2406 |
2406 if (WebPlugin* plugin = focusedPluginIfInputMethodSupported(focused)) | 2407 if (WebPlugin* plugin = focusedPluginIfInputMethodSupported(focused)) |
2407 return plugin->confirmComposition(text, selectionBehavior); | 2408 return plugin->confirmComposition(text, selectionBehavior); |
2408 | 2409 |
2409 return focused->inputMethodController().confirmCompositionOrInsertText(text, selectionBehavior == KeepSelection ? InputMethodController::KeepSelection : Inp utMethodController::DoNotKeepSelection); | 2410 return focused->inputMethodController().confirmCompositionOrInsertText(text, selectionBehavior == KeepSelection ? InputMethodController::KeepSelection : Inp utMethodController::DoNotKeepSelection); |
2410 } | 2411 } |
(...skipping 2219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4630 { | 4631 { |
4631 // TODO(oshima): Investigate if this should return the ScreenInfo's scale fa ctor rather than | 4632 // TODO(oshima): Investigate if this should return the ScreenInfo's scale fa ctor rather than |
4632 // page's scale factor, which can be 1 in use-zoom-for-dsf mode. | 4633 // page's scale factor, which can be 1 in use-zoom-for-dsf mode. |
4633 if (!page()) | 4634 if (!page()) |
4634 return 1; | 4635 return 1; |
4635 | 4636 |
4636 return page()->deviceScaleFactor(); | 4637 return page()->deviceScaleFactor(); |
4637 } | 4638 } |
4638 | 4639 |
4639 } // namespace blink | 4640 } // namespace blink |
OLD | NEW |