Commit 1b9f72b9 authored by Xiaocheng Hu's avatar Xiaocheng Hu Committed by Commit Bot

Add bidi affinity expectation for editing/style/text-indent.html

The layout test asserts mapping between logical and visual caret
positions, which is changed by the bidi caret affinity flag. This patch
adds new behavior under the flag to make the test pass there.

Bug: 917165
Change-Id: I0494f08b7af5ddce7eeff0aff43348d84efa1931
Reviewed-on: https://chromium-review.googlesource.com/c/1388815
Commit-Queue: Xiaocheng Hu <xiaochengh@chromium.org>
Commit-Queue: Emil A Eklund <eae@chromium.org>
Reviewed-by: default avatarEmil A Eklund <eae@chromium.org>
Cr-Commit-Position: refs/heads/master@{#618655}
parent e7d6b922
...@@ -2006,9 +2006,6 @@ crbug.com/894651 virtual/bidi-caret-affinity/editing/selection/modify_move/move_ ...@@ -2006,9 +2006,6 @@ crbug.com/894651 virtual/bidi-caret-affinity/editing/selection/modify_move/move_
crbug.com/894651 virtual/bidi-caret-affinity/editing/selection/modify_move/move_right_word_08_rtl_multi_line.html [ Failure ] crbug.com/894651 virtual/bidi-caret-affinity/editing/selection/modify_move/move_right_word_08_rtl_multi_line.html [ Failure ]
crbug.com/894651 virtual/bidi-caret-affinity/editing/selection/modify_move/move_right_word_09_rtl_multi_line.html [ Failure ] crbug.com/894651 virtual/bidi-caret-affinity/editing/selection/modify_move/move_right_word_09_rtl_multi_line.html [ Failure ]
### virtual/bidi-caret-affinity/editing/style/
crbug.com/894651 virtual/bidi-caret-affinity/editing/style/text-indent.html [ Failure ]
# ====== Bidi caret affinity failures until here ====== # ====== Bidi caret affinity failures until here ======
### sheriff 2018-05-28 ### sheriff 2018-05-28
......
...@@ -57,8 +57,13 @@ output += testTextIndent("<input id='textIndentTest' type='text' style='text-ind ...@@ -57,8 +57,13 @@ output += testTextIndent("<input id='textIndentTest' type='text' style='text-ind
output += testTextIndent("<input id='textIndentTest' type='text' style='text-indent:-30px;'>", 0); output += testTextIndent("<input id='textIndentTest' type='text' style='text-indent:-30px;'>", 0);
output += testTextIndent("<input id='textIndentTest' type='text' style='text-indent:30px;text-align:left'>", 0); output += testTextIndent("<input id='textIndentTest' type='text' style='text-indent:30px;text-align:left'>", 0);
output += testTextIndent("<input id='textIndentTest' type='text' style='text-indent:30px;text-align:right'>", 1); output += testTextIndent("<input id='textIndentTest' type='text' style='text-indent:30px;text-align:right'>", 1);
output += testTextIndent("<input id='textIndentTest' type='text' style='text-indent:30px;direction:rtl;'>", 0);
output += testTextIndent("<input id='textIndentTest' type='text' style='text-indent:30px;direction:rtl;text-align:right;'>", 0); // When bidi caret affinity is enabled, carets are shown at different visual
// locations. Use the changed test expectations in this case.
var usesBidiAffinity = window.internals && internals.runtimeFlags.bidiCaretAffinityEnabled;
output += testTextIndent("<input id='textIndentTest' type='text' style='text-indent:30px;direction:rtl;'>", usesBidiAffinity ? 1 : 0);
output += testTextIndent("<input id='textIndentTest' type='text' style='text-indent:30px;direction:rtl;text-align:right;'>", usesBidiAffinity ? 1 : 0);
output += testTextIndentWhenTextAlignsToCenter(30); output += testTextIndentWhenTextAlignsToCenter(30);
output += testTextIndentWhenTextAlignsToCenter(-30); output += testTextIndentWhenTextAlignsToCenter(-30);
document.body.innerText = output; document.body.innerText = output;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment