Layout tests and unit tests generate different line box trees. We should make them generate the same tree so that layout tests can be converted to unit tests.
Example HTML (repro case grabbed from crbug.com/752941 ):
<style>
font {
-webkit-appearance: progress-bar;
}
:first-letter {
color:black
}
* {
-webkit-rtl-ordering: visual;
-webkit-margin-end: -1px
}
</style>
<font dir="rtl">iC <q></q></font>
Layout test generates:
LayoutBlockFlow 0x358371a24250 FONT
RootInlineBox 0x358371a300d8 LayoutBlockFlow 0x358371a24250 {pos=17,0 size=15,19} baseline=15/10
InlineTextBox 0x358371a64010 LayoutTextFragment 0x358371a443d0 (0,1) "C"
InlineTextBox 0x358371a64090 LayoutTextFragment 0x358371a444c0 (0,1) "i"
RootInlineBox 0x358371a301a0 LayoutBlockFlow 0x358371a24250 {pos=19,20 size=13,19} baseline=15/10
InlineFlowBox 0x358371a681d8 LayoutInline 0x358371a40010 {pos=18,20 size=14,19} baseline=15/10
InlineFlowBox 0x358371a68270 LayoutInline 0x358371a40180 {pos=18,20 size=7,19} baseline=15/10
InlineFlowBox 0x358371a68140 LayoutQuote (anonymous) 0x358371a441f0 {pos=18,20 size=7,19} baseline=15/10
InlineTextBox 0x358371a64190 LayoutTextFragment 0x358371a442e0 (0,1) """
InlineFlowBox 0x358371a68010 LayoutInline 0x358371a400c8 {pos=25,20 size=7,19} baseline=15/10
InlineFlowBox 0x358371a680a8 LayoutQuote (anonymous) 0x358371a44010 {pos=25,20 size=7,19} baseline=15/10
InlineTextBox 0x358371a64110 LayoutTextFragment 0x358371a44100 (0,1) """
Unit test with EditingTestBase generates:
LayoutBlockFlow 0x1d3249e24250 FONT
RootInlineBox 0x1d3249e30010 LayoutBlockFlow 0x1d3249e24250 {pos=1,0 size=0,1} baseline=1/1
InlineFlowBox 0x1d3249e68140 LayoutInline 0x1d3249e40010 {pos=0,0 size=0,1} baseline=1/1
InlineFlowBox 0x1d3249e680a8 LayoutInline 0x1d3249e40180 {pos=0,0 size=0,1} baseline=1/1
InlineFlowBox 0x1d3249e68010 LayoutQuote (anonymous) 0x1d3249e441f0 {pos=0,0 size=0,1} baseline=1/1
InlineTextBox 0x1d3249e64010 LayoutTextFragment 0x1d3249e442e0 (0,1) """
InlineFlowBox 0x1d3249e68270 LayoutInline 0x1d3249e400c8 {pos=0,0 size=0,1} baseline=1/1
InlineFlowBox 0x1d3249e681d8 LayoutQuote (anonymous) 0x1d3249e44010 {pos=0,0 size=0,1} baseline=1/1
InlineTextBox 0x1d3249e64090 LayoutTextFragment 0x1d3249e44100 (0,1) """
InlineTextBox 0x1d3249e64110 LayoutTextFragment 0x1d3249e443d0 (0,2) "C "
InlineTextBox 0x1d3249e64190 LayoutTextFragment 0x1d3249e444c0 (0,1) "i"
Comment 1 by yosin@chromium.org
, Aug 10 2017