New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 749321 link

Starred by 1 user

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 3
Type: Bug

Blocked on:
issue 735774

Blocking:
issue 741321



Sign in to add a comment

DCHECK fails when long-pressing Amazon password input

Project Member Reported by amaralp@chromium.org, Jul 26 2017

Issue description

Chrome Version: M62 (although probably present for earlier builds)
OS: Android

What steps will reproduce the problem?
(1) Go to amazon.com on an Android device
(2) Go to the login page
(3) Type "password" into the password input field and then long-press the password field.

What is the expected result?
DCHECKs shouldn't fail.

What happens instead?
The DCHECK (DCHECK_LE(start_position_, end_position_);) in the EphemeralRange constructor fails (https://cs.chromium.org/chromium/src/third_party/WebKit/Source/core/editing/EphemeralRange.cpp?rcl=ab61848245075e2ca3f5d9dce134ea2fc0a73488&l=44)

The DCHECK gave error:

[FATAL:EphemeralRange.cpp(44)] Check failed: start_position_ <= end_position_ (INPUT id="ap_password" class="auth-clear-icon-visible" (editable) (focused)@afterAnchor vs. #text "password"@offsetInAnchor[8])

This is the summarized callstack:
EphemeralRangeTemplate() (line 44)
VisibleSelectionTemplate.Validate() (line 488)
SelectionController.SelectClosestWordFromHitTestResult() 

 
Blocking: 741321
Cc: yosin@chromium.org
Components: Blink>Editing>Selection
Status: Assigned (was: Untriaged)
yosin@, any ideas why the DCHECK fails on amazon.com?
Labels: -Pri-1 Pri-3
Cc: rlanday@chromium.org
Owner: rlanday@chromium.org
Blockedon: 735774
The Amazon password field has markup that looks like:

<input type="password" id="ap_password">
  #shadow-root (user-agent)
  <div id="placeholder">Amazon password</div>
  <div id="inner-editor"></div>
</input>

When you long-press, we set both the start and end position inside the inner-editor element:
DIV id="inner-editor" (editable)@offsetInAnchor[0]

VisibleSelection attempts to move the start and end positions to the word boundary:
https://chromium.googlesource.com/chromium/src/+/30e1a4396cbd07167a20721d5a8aa08e1973bcd1/third_party/WebKit/Source/core/editing/VisibleSelection.cpp#508

The end position doesn't move, but the start position moves *forward* to
INPUT id="ap_password" (editable) (focused)@afterAnchor

which is now *after* the end position. So I think StartOfWord() (and maybe EndOfWord() as well) needs to be revised as mentioned in  crbug.com/735774 :
https://bugs.chromium.org/p/chromium/issues/detail?id=735774#c19
Owner: ----
Status: Available (was: Assigned)

Sign in to add a comment