@@ -39,18 +39,23 @@ <H1><a name="q0">Appendix E. Elaborate description of Stacking Contexts</a></H1>
3939< h2 > < a name ="q1 "> E.1 Definitions</ a > </ h2 >
4040
4141< dl >
42+
4243< dt > Tree Order</ dt >
43- < dd > Preorder depth-first traversal of the < em > rendering</ em > tree, in logical
44- (not visual) order for bidirectional content, after taking into
45- account properties that move boxes around such as the 'run-in' value
46- of 'display'.</ dd >
44+
45+ < dd > Preorder depth-first traversal of the < em > rendering</ em > tree, in
46+ logical (not visual) order for bidirectional content, after taking
47+ into account properties that move boxes around such as the 'run-in'
48+ value of 'display'.</ dd >
4749
4850< dt > Element</ dt >
49- < dd > In this description, "element" refers to both actual elements and
50- pseudo-elements. Pseudo-elements and anonymous boxes are treated as
51- descendants in the appropriate places. For example, an outside list
52- marker comes before an adjoining ':before' box in the line box, which
53- comes before the content of the box, and so forth.</ dd >
51+
52+ < dd > In this description, "element" refers to both actual elements,
53+ pseudo-elements, and anonymous boxes. Pseudo-elements and anonymous
54+ boxes are treated as descendants in the appropriate places. For
55+ example, an outside list marker comes before an adjoining ':before'
56+ box in the line box, which comes before the content of the box, and so
57+ forth.</ dd >
58+
5459</ dl >
5560
5661< h2 > < a name ="q2 "> E.2 Painting order</ a > </ h2 >
@@ -126,29 +131,44 @@ <h2><a name="q2">E.2 Painting order</a></h2>
126131 descendants which actually create a new stacking context should be
127132 considered part of the parent stacking context, not this new one.
128133
129- < li > First for the element, then for all its in-flow, non-positioned,
130- block-level descendants in tree order:
134+ < li > If the element is an inline element that generates a stacking
135+ context, then:
136+ < ol >
137+ < li > For each line box that the element is in:
138+ < ol >
139+ < li > Jump to 7.2.1 for the box(es) of the element in that line
140+ box (in tree order).
141+ </ ol >
142+ </ ol >
143+ < li > Otherwise: first for the element, then for all its in-flow,
144+ non-positioned, block-level descendants in tree order:
145+ < ol >
146+ < li > If the element is a block-level replaced element,
147+ then: the replaced content, atomically.
148+ < li > Otherwise, for each line box of that element:
131149< ol >
132- < li > For each element in each line box of the element, in tree order, if any, or
133- if the element is inline-level (note that all elements in line
134- boxes are forcably inline-level), on a per-line-box basis:
150+ < li > For each box that is a child of that element, in that line
151+ box, in tree order:
135152< ol >
136- < li > Background color of element.
137- < li > Background image of element.
138- < li > Border of element.
153+ < li > background color of element.
154+ < li > background image of element.
155+ < li > border of element.
139156< li > For inline elements:
140157< ol >
141- < li > Underline of element.
142- < li > Overline of element.
143- < li > Text of element.
144- < li > Then all the element's in-flow, non-positioned,
145- inline-level descendants, including anonymous
146- inline elements generated for text nodes inside
147- the element, in tree order:
158+ < li > underline of element.
159+ < li > overline of element.
160+ < li > For all the element's in-flow, non-positioned, inline-level
161+ children that are in this line box, and all
162+ runs of text inside the element that is on this line box,
163+ in tree order:
148164< ol >
149- < li > Jump to step 6.1 for this element.
165+ < li > If this is a run of text, then:
166+ < ol >
167+ < li > the text.
168+ </ ol >
169+ < li > Otherwise, jump to 7.2.1 for that element.
150170</ ol >
151- < li > Line -through of element.
171+ < li > line -through of element.
152172</ ol >
153173 For inline-block and inline-table elements:
154174< ol >
@@ -160,14 +180,15 @@ <h2><a name="q2">E.2 Painting order</a></h2>
160180</ ol >
161181 For inline-level replaced elements:
162182< ol >
163- < li > The replaced content, atomically.
183+ < li > the replaced content, atomically.
184+ </ ol >
164185</ ol >
165- < li > Optionally, the outline of the element (see 9 below).
186+ < p class ="note "> Some of the boxes may have been generated by line
187+ splitting or the Unicode bidirectional algorithm.
188+ < li > Optionally, the outline of the element (see 10 below).
166189</ ol >
167- < li > Otherwise, if the element is a block-level replaced element,
168- then the replaced content, atomically.
169190< li > Optionally, if the element is block-level, the outline of the
170- element (see 9 below).
191+ element (see 10 below).
171192</ ol >
172193< li > All positioned descendants with 'z-index: auto' or 'z-index: 0',
173194 in tree order. For those with 'z-index: auto', treat the element
0 commit comments