Commit ca53c434 authored by Xiaocheng Hu's avatar Xiaocheng Hu Committed by Commit Bot

Stablize editing/selection/5232159.html for LayoutNG

The layout test was introduced to verify the ability to select
text on certain elements (*). Incidentally, it hit tests the 1px
gap between two lines on Linux, which results in different behaviors
between legacy and NG due to different line box sizing.

This patch explicitly sets font metrics and line-height to stablize
its behavior.

(*) crrev.com/20a8d9a8

Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_layout_ng
Change-Id: I44918bf049607110572fc479548f3c958770c8ba
Reviewed-on: https://chromium-review.googlesource.com/1152216
Commit-Queue: Xiaocheng Hu <xiaochengh@chromium.org>
Commit-Queue: Koji Ishii <kojii@chromium.org>
Reviewed-by: default avatarKoji Ishii <kojii@chromium.org>
Cr-Commit-Position: refs/heads/master@{#578546}
parent 6bbd3cbb
......@@ -82,7 +82,6 @@ crbug.com/591099 css3/flexbox/intrinsic-width-orthogonal-writing-mode.html [ Fai
crbug.com/591099 css3/flexbox/line-wrapping.html [ Failure ]
crbug.com/591099 css3/flexbox/scrollbars-auto.html [ Failure ]
crbug.com/714962 css3/masking/clip-path-reference-box-inline.html [ Failure ]
crbug.com/591099 editing/selection/5232159.html [ Failure ]
crbug.com/591099 editing/selection/continuations-with-move-caret-to-boundary.html [ Failure ]
crbug.com/591099 editing/selection/paint-hyphen.html [ Pass ]
crbug.com/591099 external/wpt/2dcontext/drawing-images-to-the-canvas/drawimage_html_image_11.html [ Pass ]
......
......@@ -55,6 +55,8 @@ function stepTwo()
position: absolute;
padding-right: 11px;
padding-left: 11px;
font: 10px Ahem;
line-height: 10px;
}
</style>
<title>Test for REGRESSION: Cannot select text in RSS view</title>
......
......@@ -9,19 +9,22 @@ layer at (0,0) size 800x600
text run at (0,20) width 564: "clicking somewhere in the first sentence of the paragraph below and dragging downward."
layer at (0,60) size 800x540
LayoutBlockFlow (positioned) {DIV} at (0,60) size 800x540
layer at (0,60) size 800x100
LayoutBlockFlow (positioned) {DIV} at (0,0) size 800x100
LayoutBlockFlow {DIV} at (11,0) size 778x100
LayoutText {#text} at (0,0) size 46x19
text run at (0,0) width 46: "Lorem "
LayoutInline {SPAN} at (0,0) size 38x19
LayoutText {#text} at (46,0) size 38x19
text run at (46,0) width 38: "ipsum"
LayoutText {#text} at (84,0) size 754x99
text run at (84,0) width 670: " dolor sit amet, consectetuer adipiscing elit. Integer vehicula accumsan massa. Quisque elementum. Cras id"
text run at (0,20) width 724: "neque a mi rutrum scelerisque. Nulla sed dui a massa sodales posuere. Nulla libero. Nulla posuere, felis id tincidunt"
text run at (0,40) width 740: "tincidunt, ipsum metus tristique risus, et convallis turpis elit eget massa. Nunc consectetuer dolor vel nunc. Cum sociis"
text run at (0,60) width 753: "natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Quisque dapibus ante et nulla. Cras nec velit."
text run at (0,80) width 642: "Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Integer ut tortor."
selection start: position 3 of child 0 {#text} of child 1 {SPAN} of child 1 {DIV} of child 1 {DIV} of child 3 {DIV} of body
selection end: position 236 of child 2 {#text} of child 1 {DIV} of child 1 {DIV} of child 3 {DIV} of body
layer at (0,60) size 800x80
LayoutBlockFlow (positioned) {DIV} at (0,0) size 800x80
LayoutBlockFlow {DIV} at (11,0) size 778x80
LayoutText {#text} at (0,0) size 60x10
text run at (0,0) width 60: "Lorem "
LayoutInline {SPAN} at (0,0) size 50x10
LayoutText {#text} at (60,0) size 50x10
text run at (60,0) width 50: "ipsum"
LayoutText {#text} at (110,0) size 770x80
text run at (110,0) width 630: " dolor sit amet, consectetuer adipiscing elit. Integer vehicula"
text run at (0,10) width 730: "accumsan massa. Quisque elementum. Cras id neque a mi rutrum scelerisque."
text run at (0,20) width 760: "Nulla sed dui a massa sodales posuere. Nulla libero. Nulla posuere, felis id"
text run at (0,30) width 740: "tincidunt tincidunt, ipsum metus tristique risus, et convallis turpis elit"
text run at (0,40) width 770: "eget massa. Nunc consectetuer dolor vel nunc. Cum sociis natoque penatibus et"
text run at (0,50) width 770: "magnis dis parturient montes, nascetur ridiculus mus. Quisque dapibus ante et"
text run at (0,60) width 750: "nulla. Cras nec velit. Vestibulum ante ipsum primis in faucibus orci luctus"
text run at (0,70) width 530: "et ultrices posuere cubilia Curae; Integer ut tortor."
selection start: position 2 of child 0 {#text} of child 1 {SPAN} of child 1 {DIV} of child 1 {DIV} of child 3 {DIV} of body
selection end: position 223 of child 2 {#text} of child 1 {DIV} of child 1 {DIV} of child 3 {DIV} of body
......@@ -9,19 +9,22 @@ layer at (0,0) size 800x600
text run at (0,18) width 572: "clicking somewhere in the first sentence of the paragraph below and dragging downward."
layer at (0,60) size 800x540
LayoutBlockFlow (positioned) {DIV} at (0,60) size 800x540
layer at (0,60) size 800x90
LayoutBlockFlow (positioned) {DIV} at (0,0) size 800x90
LayoutBlockFlow {DIV} at (11,0) size 778x90
LayoutText {#text} at (0,0) size 47x18
text run at (0,0) width 47: "Lorem "
LayoutInline {SPAN} at (0,0) size 40x18
LayoutText {#text} at (46,0) size 40x18
text run at (46,0) width 40: "ipsum"
LayoutText {#text} at (85,0) size 772x90
text run at (85,0) width 687: " dolor sit amet, consectetuer adipiscing elit. Integer vehicula accumsan massa. Quisque elementum. Cras id"
text run at (0,18) width 741: "neque a mi rutrum scelerisque. Nulla sed dui a massa sodales posuere. Nulla libero. Nulla posuere, felis id tincidunt"
text run at (0,36) width 760: "tincidunt, ipsum metus tristique risus, et convallis turpis elit eget massa. Nunc consectetuer dolor vel nunc. Cum sociis"
text run at (0,54) width 771: "natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Quisque dapibus ante et nulla. Cras nec velit."
text run at (0,72) width 661: "Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Integer ut tortor."
selection start: position 3 of child 0 {#text} of child 1 {SPAN} of child 1 {DIV} of child 1 {DIV} of child 3 {DIV} of body
selection end: position 236 of child 2 {#text} of child 1 {DIV} of child 1 {DIV} of child 3 {DIV} of body
layer at (0,60) size 800x80
LayoutBlockFlow (positioned) {DIV} at (0,0) size 800x80
LayoutBlockFlow {DIV} at (11,0) size 778x80
LayoutText {#text} at (0,0) size 60x10
text run at (0,0) width 60: "Lorem "
LayoutInline {SPAN} at (0,0) size 50x10
LayoutText {#text} at (60,0) size 50x10
text run at (60,0) width 50: "ipsum"
LayoutText {#text} at (110,0) size 770x80
text run at (110,0) width 630: " dolor sit amet, consectetuer adipiscing elit. Integer vehicula"
text run at (0,10) width 730: "accumsan massa. Quisque elementum. Cras id neque a mi rutrum scelerisque."
text run at (0,20) width 760: "Nulla sed dui a massa sodales posuere. Nulla libero. Nulla posuere, felis id"
text run at (0,30) width 740: "tincidunt tincidunt, ipsum metus tristique risus, et convallis turpis elit"
text run at (0,40) width 770: "eget massa. Nunc consectetuer dolor vel nunc. Cum sociis natoque penatibus et"
text run at (0,50) width 770: "magnis dis parturient montes, nascetur ridiculus mus. Quisque dapibus ante et"
text run at (0,60) width 750: "nulla. Cras nec velit. Vestibulum ante ipsum primis in faucibus orci luctus"
text run at (0,70) width 530: "et ultrices posuere cubilia Curae; Integer ut tortor."
selection start: position 2 of child 0 {#text} of child 1 {SPAN} of child 1 {DIV} of child 1 {DIV} of child 3 {DIV} of body
selection end: position 223 of child 2 {#text} of child 1 {DIV} of child 1 {DIV} of child 3 {DIV} of body
......@@ -9,19 +9,22 @@ layer at (0,0) size 800x600
text run at (0,20) width 485: "somewhere in the first sentence of the paragraph below and dragging downward."
layer at (0,60) size 800x540
LayoutBlockFlow (positioned) {DIV} at (0,60) size 800x540
layer at (0,60) size 800x100
LayoutBlockFlow (positioned) {DIV} at (0,0) size 800x100
LayoutBlockFlow {DIV} at (11,0) size 778x100
LayoutText {#text} at (0,0) size 44x19
text run at (0,0) width 44: "Lorem "
LayoutInline {SPAN} at (0,0) size 35x19
LayoutText {#text} at (44,0) size 35x19
text run at (44,0) width 35: "ipsum"
LayoutText {#text} at (79,0) size 773x99
text run at (79,0) width 689: " dolor sit amet, consectetuer adipiscing elit. Integer vehicula accumsan massa. Quisque elementum. Cras id neque a"
text run at (0,20) width 773: "mi rutrum scelerisque. Nulla sed dui a massa sodales posuere. Nulla libero. Nulla posuere, felis id tincidunt tincidunt, ipsum metus"
text run at (0,40) width 758: "tristique risus, et convallis turpis elit eget massa. Nunc consectetuer dolor vel nunc. Cum sociis natoque penatibus et magnis dis"
text run at (0,60) width 765: "parturient montes, nascetur ridiculus mus. Quisque dapibus ante et nulla. Cras nec velit. Vestibulum ante ipsum primis in faucibus"
text run at (0,80) width 363: "orci luctus et ultrices posuere cubilia Curae; Integer ut tortor."
selection start: position 3 of child 0 {#text} of child 1 {SPAN} of child 1 {DIV} of child 1 {DIV} of child 3 {DIV} of body
selection end: position 260 of child 2 {#text} of child 1 {DIV} of child 1 {DIV} of child 3 {DIV} of body
layer at (0,60) size 800x80
LayoutBlockFlow (positioned) {DIV} at (0,0) size 800x80
LayoutBlockFlow {DIV} at (11,0) size 778x80
LayoutText {#text} at (0,0) size 60x10
text run at (0,0) width 60: "Lorem "
LayoutInline {SPAN} at (0,0) size 50x10
LayoutText {#text} at (60,0) size 50x10
text run at (60,0) width 50: "ipsum"
LayoutText {#text} at (110,0) size 770x80
text run at (110,0) width 630: " dolor sit amet, consectetuer adipiscing elit. Integer vehicula"
text run at (0,10) width 730: "accumsan massa. Quisque elementum. Cras id neque a mi rutrum scelerisque."
text run at (0,20) width 760: "Nulla sed dui a massa sodales posuere. Nulla libero. Nulla posuere, felis id"
text run at (0,30) width 740: "tincidunt tincidunt, ipsum metus tristique risus, et convallis turpis elit"
text run at (0,40) width 770: "eget massa. Nunc consectetuer dolor vel nunc. Cum sociis natoque penatibus et"
text run at (0,50) width 770: "magnis dis parturient montes, nascetur ridiculus mus. Quisque dapibus ante et"
text run at (0,60) width 750: "nulla. Cras nec velit. Vestibulum ante ipsum primis in faucibus orci luctus"
text run at (0,70) width 530: "et ultrices posuere cubilia Curae; Integer ut tortor."
selection start: position 2 of child 0 {#text} of child 1 {SPAN} of child 1 {DIV} of child 1 {DIV} of child 3 {DIV} of body
selection end: position 223 of child 2 {#text} of child 1 {DIV} of child 1 {DIV} of child 3 {DIV} of body
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