Chromium Code Reviews
DescriptionMake InputMethodController::TextInputType() to use canonicalized position
Make InputMethodController::TextInputType() to use canonicalized position
This patch changes |RootEditableElementOfSelection()| to use canonicalized
position as workaround for applications depend buggy behavior of Blink.
Before patch[1], |InputMethodController| to check editability of selection by
using |VisibleSelection::Start()|. After patch[1], |InputMethodController| to
use |SelectionInDOMTree::Base()|.
The buggy behavior of Blink caused by using |VisibleSelection::Start()| which
returns inside of editable even if scripts specified before editable.
For example, simpler version of Google Docs/Presentations:
<html>
<head>...</head>
<body contenteditable>...</body>
</html>
Google Docs/Presentations set selection to a position HTML@1 where before
BODY element. In this case, |VisibleSelection::Start()| == BODY@0 due by
visible position canonicalization.
[1] http://crrev.com/2782413002 Get rid of computeVisibleSelectionInDOMTreeDeprecated() in InputMethodController
BUG=711396, 712761, 714507
TEST=run_webkit_unit_tests --gtest_filter=InputMethodControllerTest.TextInputTypeAtBeforeEditable
Review-Url: https://codereview.chromium.org/2834343002
Cr-Commit-Position: refs/heads/master@{#466612}
Committed: https://chromium.googlesource.com/chromium/src/+/f0600844152acd9e12e486ecfd49ae492f67517c
Patch Set 1 : 2017-04-24T15:09:42 #
Messages
Total messages: 14 (10 generated)
|
||||||||||||||||||||||||||||