Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(37)

Issue 541823003: Move caret to correct position when dir=auto (Closed)

Created:
6 years, 3 months ago by Habib Virji
Modified:
6 years, 3 months ago
CC:
blink-reviews, blink-reviews-rendering, zoltan1, sof, eae+blinkwatch, leviw+renderwatch, blink-reviews-dom_chromium.org, dglazkov+blink, jchaffraix+rendering, pdr., rune+blink, rwlbuis
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Project:
blink
Visibility:
Public.

Description

Move caret to correct position when dir=auto for space and LTR text following RTL text. In getPositionAndOffset, previous block was used when space is entered for dir=auto. While for dir=auto text using previous block gives wrong caret position, which was leading to caret offset not calculated. In case of RTL, previous inline box position is used. Since auto scenario, combines RTL and LTR text. In renderText, only render block direction is used. New condition has been added in RenderText to test if dir=auto, then use inlineBlock bidiLevel to decide about caret position rendering. R=leviw, eae BUG=296847 TEST=Direction auto tests covering move caret position to the right when LTR text is entered and adding RTL text to move caret to the left. Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=181701

Patch Set 1 #

Total comments: 2

Patch Set 2 : Remove duplicate code for detecting caret position #

Patch Set 3 : Compile fix for Windows #

Unified diffs Side-by-side diffs Delta from patch set Stats (+91 lines, -30 lines) Patch
A LayoutTests/editing/caret/caret-direction-auto.html View 1 chunk +50 lines, -0 lines 0 comments Download
A LayoutTests/editing/caret/caret-direction-auto-expected.txt View 1 chunk +29 lines, -0 lines 0 comments Download
D LayoutTests/editing/selection/caret-in-textarea-auto.html View 1 chunk +0 lines, -16 lines 0 comments Download
D LayoutTests/editing/selection/caret-in-textarea-auto-expected.txt View 1 chunk +0 lines, -10 lines 0 comments Download
M Source/core/dom/Position.cpp View 2 chunks +6 lines, -4 lines 0 comments Download
M Source/core/rendering/RenderText.cpp View 1 2 1 chunk +6 lines, -0 lines 0 comments Download

Messages

Total messages: 16 (4 generated)
Habib Virji
Covered the issue raised for aharon for bug296847. Please have a look.
6 years, 3 months ago (2014-09-04 17:21:26 UTC) #2
Habib Virji
On 2014/09/04 17:21:26, Habib Virji wrote: > Covered the issue raised by aharon for bug296847. ...
6 years, 3 months ago (2014-09-08 18:40:31 UTC) #3
eae
The change itself makes sense but I don't like the code duplication. https://codereview.chromium.org/541823003/diff/1/Source/core/rendering/RenderText.cpp File Source/core/rendering/RenderText.cpp ...
6 years, 3 months ago (2014-09-08 18:58:51 UTC) #4
Habib Virji
On 2014/09/08 18:58:51, eae wrote: > The change itself makes sense but I don't like ...
6 years, 3 months ago (2014-09-08 19:08:59 UTC) #5
Habib Virji
Thanks Emil, updated to correctly calculate right aligned position. Added comment to make it explicit ...
6 years, 3 months ago (2014-09-09 10:44:03 UTC) #6
Habib Virji
On 2014/09/09 10:44:03, Habib Virji wrote: > Thanks Emil, updated to correctly calculate right aligned ...
6 years, 3 months ago (2014-09-09 20:48:45 UTC) #7
eae
LGTM Much better, thank you.
6 years, 3 months ago (2014-09-09 20:51:01 UTC) #8
Habib Virji
On 2014/09/09 20:51:01, eae wrote: > LGTM > Much better, thank you. Thanks.
6 years, 3 months ago (2014-09-09 20:53:32 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/habib.virji@samsung.com/541823003/40001
6 years, 3 months ago (2014-09-09 20:53:54 UTC) #11
commit-bot: I haz the power
Try jobs failed on following builders: win_blink_rel on tryserver.blink (http://build.chromium.org/p/tryserver.blink/builders/win_blink_rel/builds/26301)
6 years, 3 months ago (2014-09-09 23:00:05 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/habib.virji@samsung.com/541823003/40001
6 years, 3 months ago (2014-09-10 05:12:39 UTC) #15
commit-bot: I haz the power
6 years, 3 months ago (2014-09-10 05:13:14 UTC) #16
Message was sent while issue was closed.
Committed patchset #3 (id:40001) as 181701

Powered by Google App Engine
This is Rietveld 408576698