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

Issue 625739 link

Starred by 12 users

Issue metadata

Status: Verified
Owner:
Closed: Jul 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Mac
Pri: 2
Type: Bug-Regression



Sign in to add a comment

textarea with dir="auto" and one character in Hebrew crashes the tab when navigating with left/right arrows

Reported by pinto....@gmail.com, Jul 5 2016

Issue description

Chrome Version       : Version 51.0.2704.103 m
URLs (if applicable) : http://codepen.io/avipinto/pen/kXwBWq
Other browsers tested: also happens in canary and an electron based app
  Add OK or FAIL, along with the version, after other browsers where you
have tested this issue:
     Safari:
    Firefox:OK
         IE:OK

What steps will reproduce the problem?
(1) have a textarea with dir="auto" 
(2a) add a placeholder to the textarea and one character in Hebrew (like "ע")
(2b) enter a string to the textarea containing one Hebrew letter and one or more english letters (like: "גf","aaaעbbb")
(3) focus on the textarea and hit the right/left arrows to navigate the text

What is the expected result?
i would expect that the cursor will move along the text

What happens instead?
chrome hangs forever (25% CPU) seems like there is an infinite loop for determining the cursor position
another problem is that when you enter several letters in Hebrew, the cursor can't be at the last position - hit End and the cursor will jump to the beginning of the text

Please provide any additional information below. Attach a screenshot if
possible.
you can play with a reduced example here http://codepen.io/avipinto/pen/kXwBWq
 
NOTE there are two scenarios there follow either 2a/2b in both cases the cursor position causes the crash
attached a stand alone html that contains the codepen scenario
index.html
1.7 KB View Download
to be more specific, only the left arrow key(keyCode=37) causes the crash
Cc: rnimmagadda@chromium.org
Components: Blink>TextSelection
Labels: -Type-Bug -Pri-3 M-52 OS-Linux OS-Mac OS-Windows Pri-2 Type-Bug-Regression
Owner: tkent@chromium.org
Status: Assigned (was: Unconfirmed)
====================================

Good Build:

49.0.2567.0    Base Position: 360248


Bad Build:

49.0.2590.0    Base Position: 364940

=====================================

Able to repro this issue on Windows 7, MAC (10.11.5) & Ubuntu Trusty (14.04) for the Google Chrome Stable Version - 51.0.2704.106

This is a regression issue broken in M49, below mentioned is the bisect info:

CHANGELOG URL: https://chromium.googlesource.com/chromium/src/+log/2ff76a86882308a81d17ac8bbeb57a95c3578a3e..98a0970e6672c6a0638f3d7c72ac4b5edf3aefe2

Suspecting Commit: 283fc78866474faf6b53203f2ba685ed0c33bef4

Review URL: https://codereview.chromium.org/1478573002

@tkent: Could you please look into the issue, and if it has nothing to do with your changes and if possible please do assign it to the concerned owner.

Thank you.

Comment 5 by tkent@chromium.org, Jul 13 2016

Components: Blink>Forms>Textarea
Status: Started (was: Assigned)
Infinite loop in VisibleUnits.cpp leftVisuallyDistinctCandidate().

Project Member

Comment 6 by bugdroid1@chromium.org, Jul 13 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/55f27bb5c4f4f99a2885dc67bd6e448a464505ed

commit 55f27bb5c4f4f99a2885dc67bd6e448a464505ed
Author: tkent <tkent@chromium.org>
Date: Wed Jul 13 07:29:15 2016

Placeholder content direction should not affect INPUT/TEXTAREA direction.

Skip -webkit-input-placeholder elements when we compute direction for dir=auto in
HTMLElement::directionality.

- Using <bdi> for placeholders doesn't work. We want to inherit placeholder direction
  from the parent element.
- Using unicode-bidi CSS property doesn't work. It doesn't affect dir=auto
  computation.

BUG= 623270 , 625739 

Review-Url: https://codereview.chromium.org/2145823003
Cr-Commit-Position: refs/heads/master@{#405069}

[add] https://crrev.com/55f27bb5c4f4f99a2885dc67bd6e448a464505ed/third_party/WebKit/LayoutTests/fast/forms/text/text-dir-auto-with-placeholder.html
[add] https://crrev.com/55f27bb5c4f4f99a2885dc67bd6e448a464505ed/third_party/WebKit/LayoutTests/fast/forms/textarea/textarea-dir-auto-with-placeholder.html
[modify] https://crrev.com/55f27bb5c4f4f99a2885dc67bd6e448a464505ed/third_party/WebKit/Source/core/html/HTMLElement.cpp

Project Member

Comment 7 by bugdroid1@chromium.org, Jul 13 2016

Labels: merge-merged-2795
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/55f27bb5c4f4f99a2885dc67bd6e448a464505ed

commit 55f27bb5c4f4f99a2885dc67bd6e448a464505ed
Author: tkent <tkent@chromium.org>
Date: Wed Jul 13 07:29:15 2016

Placeholder content direction should not affect INPUT/TEXTAREA direction.

Skip -webkit-input-placeholder elements when we compute direction for dir=auto in
HTMLElement::directionality.

- Using <bdi> for placeholders doesn't work. We want to inherit placeholder direction
  from the parent element.
- Using unicode-bidi CSS property doesn't work. It doesn't affect dir=auto
  computation.

BUG= 623270 , 625739 

Review-Url: https://codereview.chromium.org/2145823003
Cr-Commit-Position: refs/heads/master@{#405069}

[add] https://crrev.com/55f27bb5c4f4f99a2885dc67bd6e448a464505ed/third_party/WebKit/LayoutTests/fast/forms/text/text-dir-auto-with-placeholder.html
[add] https://crrev.com/55f27bb5c4f4f99a2885dc67bd6e448a464505ed/third_party/WebKit/LayoutTests/fast/forms/textarea/textarea-dir-auto-with-placeholder.html
[modify] https://crrev.com/55f27bb5c4f4f99a2885dc67bd6e448a464505ed/third_party/WebKit/Source/core/html/HTMLElement.cpp

Comment 8 by tkent@chromium.org, Jul 13 2016

Labels: Merge-Request-52 Merge-Request-53
Status: Fixed (was: Started)
I confirmed this was fixed with the current canary, 54.0.2795.0.

Comment 9 by dimu@google.com, Jul 14 2016

Labels: -Merge-Request-52 Merge-Review-52 Hotlist-Merge-Review
[Automated comment] Less than 2 weeks to go before stable on M52, manual review required.

Comment 10 by dimu@google.com, Jul 14 2016

Labels: -Merge-Request-53 Merge-Approved-53 Hotlist-Merge-Approved
Your change meets the bar and is auto-approved for M53 (branch: 2785)

Comment 11 by dimu@google.com, Jul 14 2016

Labels: -Merge-Request-52 Merge-Review-52 Hotlist-Merge-Review
[Automated comment] Less than 2 weeks to go before stable on M52, manual review required.
Before we approve merge to M52, Could you please confirm whether this change is baked/verified in Canary and safe to merge?

Comment 13 by tkent@chromium.org, Jul 14 2016

#12, Yes, I verified with canary, and I think it's safe.

Labels: -Merge-Review-52 Merge-Approved-52
Approving merge to M52 branch 2743 based on comment #13. Please merge ASAP. Thank you.
Project Member

Comment 15 by bugdroid1@chromium.org, Jul 15 2016

Labels: -merge-approved-52 merge-merged-2743
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/681eea95566832930b06d21f8b20200f3f04d361

commit 681eea95566832930b06d21f8b20200f3f04d361
Author: Kent Tamura <tkent@chromium.org>
Date: Fri Jul 15 00:07:17 2016

Merge "Placeholder content direction should not affect INPUT/TEXTAREA direction." to M52

Skip -webkit-input-placeholder elements when we compute direction for dir=auto in
HTMLElement::directionality.

- Using <bdi> for placeholders doesn't work. We want to inherit placeholder direction
  from the parent element.
- Using unicode-bidi CSS property doesn't work. It doesn't affect dir=auto
  computation.

BUG= 625739 

Review-Url: https://codereview.chromium.org/2145823003
Cr-Commit-Position: refs/heads/master@{#405069}
(cherry picked from commit 55f27bb5c4f4f99a2885dc67bd6e448a464505ed)

Review URL: https://codereview.chromium.org/2147353002 .

Cr-Commit-Position: refs/branch-heads/2743@{#637}
Cr-Branched-From: 2b3ae3b8090361f8af5a611712fc1a5ab2de53cb-refs/heads/master@{#394939}

[add] https://crrev.com/681eea95566832930b06d21f8b20200f3f04d361/third_party/WebKit/LayoutTests/fast/forms/text/text-dir-auto-with-placeholder.html
[add] https://crrev.com/681eea95566832930b06d21f8b20200f3f04d361/third_party/WebKit/LayoutTests/fast/forms/textarea/textarea-dir-auto-with-placeholder.html
[modify] https://crrev.com/681eea95566832930b06d21f8b20200f3f04d361/third_party/WebKit/Source/core/html/HTMLElement.cpp

Project Member

Comment 16 by bugdroid1@chromium.org, Jul 15 2016

Labels: -merge-approved-53 merge-merged-2785
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/71e7fb4f9959f570961e6e57830658bafb2d0d4d

commit 71e7fb4f9959f570961e6e57830658bafb2d0d4d
Author: Kent Tamura <tkent@chromium.org>
Date: Fri Jul 15 00:19:09 2016

Merge "Placeholder content direction should not affect INPUT/TEXTAREA direction." to M53.

Skip -webkit-input-placeholder elements when we compute direction for dir=auto in
HTMLElement::directionality.

- Using <bdi> for placeholders doesn't work. We want to inherit placeholder direction
  from the parent element.
- Using unicode-bidi CSS property doesn't work. It doesn't affect dir=auto
  computation.

BUG= 625739 

Review-Url: https://codereview.chromium.org/2145823003
Cr-Commit-Position: refs/heads/master@{#405069}
(cherry picked from commit 55f27bb5c4f4f99a2885dc67bd6e448a464505ed)

Review URL: https://codereview.chromium.org/2147373002 .

Cr-Commit-Position: refs/branch-heads/2785@{#130}
Cr-Branched-From: 68623971be0cfc492a2cb0427d7f478e7b214c24-refs/heads/master@{#403382}

[add] https://crrev.com/71e7fb4f9959f570961e6e57830658bafb2d0d4d/third_party/WebKit/LayoutTests/fast/forms/text/text-dir-auto-with-placeholder.html
[add] https://crrev.com/71e7fb4f9959f570961e6e57830658bafb2d0d4d/third_party/WebKit/LayoutTests/fast/forms/textarea/textarea-dir-auto-with-placeholder.html
[modify] https://crrev.com/71e7fb4f9959f570961e6e57830658bafb2d0d4d/third_party/WebKit/Source/core/html/HTMLElement.cpp

Labels: TE-Verified-52.0.2743.82 TE-Verified-M52
Verified the fix on Windows 7, MAC (10.11.5) & Ubuntu Trusty (14.04) for Google Chrome Beta Version - 52.0.2743.82

Screen-shots are attached.

TE-Verified labels are added.
625739.mov
3.7 MB Download
Status: Verified (was: Fixed)

Comment 19 by tkent@chromium.org, Oct 12 2016

Components: -Blink>TextSelection Blink>Editing>Selection

Sign in to add a comment