Warning, /frameworks/khtml/docs/inline_model.txt is written in an unsupported language. File is not indexed.
0001 This document gives an example of how a given rendering of inline elements, 0002 with its associated HTML code, will map to 2 different trees: 0003 0004 -a tree of render objects, mirroring the corresponding DOM tree. 0005 -a tree of lineboxes reflecting how inline-level render objects are laid out in distinct lines inside 0006 block-level elements. (cf. https://www.w3.org/TR/CSS2/visuren.html#inline-formatting and https://www.w3.org/TR/CSS2/visudet.html#line-height) 0007 0008 Rendering: 0009 ========= 0010 _________________ 0011 |Lorem ipsum dolor| 0012 |sit amet. | 0013 |_________________| 0014 0015 => 1 block level element 0016 => 2 lines (because of wrapping). 0017 0018 HTML: 0019 ==== 0020 0021 <div>Lorem <span>ipsum <i>dolor sit</i> amet.</span></div> 0022 0023 Render tree: 0024 =========== 0025 [RenderBlock1 0026 [RenderText1 "Lorem "] 0027 [RenderInline1 0028 [RenderText2 "ipsum "] 0029 [RenderInline2 0030 [RenderText3 "dolor sit"] 0031 ] 0032 [RenderText4 " amet."] 0033 ] 0034 ] 0035 0036 Linebox tree: 0037 ============ 0038 0039 [RootInlineBox1 0040 [InlineTextBox1 "Lorem"] 0041 [InlineFlowBox1 0042 [InlineTextBox2 "ipsum"] 0043 [InlineFlowBox3 0044 [InlineTextBox3 "dolor"] 0045 ] 0046 ] 0047 ] 0048 [RootInlineBox2 0049 [InlineFlowBox2 0050 [InlineFlowBox4 0051 [InlineTextBox4 "sit"] 0052 ] 0053 [InlineTextBox5 " amet."] 0054 ] 0055 ] 0056 0057 Linkage of LineBox tree: 0058 ======================== 0059 (just for first line:) 0060 0061 RootBox1->nextOnLine() == InlineTextBox1 ->nextOnLine() == InlineFlowBox1 -> nextOnLine() == InlineTextBox2 -> 0062 nextOnLine() == InlineFlowBox2-> nextOnLine() == InlineTextBox2 ->nextOnLine() == InlineFlowBox2 -> 0063 nextOnLine() == InlineTextBox3 0064 0065 Correspondence Render tree / Linebox tree: 0066 ========================================== 0067 (just for some objects:) 0068 0069 ( RenderBlock1 -> firstLineBox() == RootBox1 ) ->nextLineBox() == (RootBox2 == RenderBlock1 -> lastLineBox() ) 0070 ( RenderInline1 ->firstLineBox() == InlineFlowBox1 ) -> nextLineBox() == (InlineFlowBox2 == RenderInline1 -> lastLineBox() ) 0071 ( RenderText3 -> firstTextBox() == InlineTextBox3 ) -> nextTextBox() == (InlineTextBox4 == RenderText3 -> lastLineBox() )