|
1 | 1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"> |
2 | 2 | <html lang="en"> |
3 | | -<!-- $Id: tables.src,v 2.120 2010-08-04 16:00:58 bbos Exp $ --> |
| 3 | +<!-- $Id: tables.src,v 2.121 2010-08-25 23:13:03 bbos Exp $ --> |
4 | 4 | <head> |
5 | 5 | <title>Tables</title> |
6 | 6 | </head> |
@@ -272,74 +272,112 @@ element, and a 'table-cell' element. Missing elements generate <a |
272 | 272 | href="visuren.html#anonymous">anonymous</a> objects (e.g., anonymous |
273 | 273 | boxes in visual table layout) according to the following rules: |
274 | 274 |
|
| 275 | +<p>For the purposes of these rules, the following terms are defined: |
| 276 | +<dl> |
| 277 | + <dt>row group box |
| 278 | + <dd>A 'table-row-group', 'table-header-group', or |
| 279 | + 'table-footer-group' |
| 280 | + |
| 281 | + <dt>proper table child |
| 282 | + <dd>A 'table-row' box, row group box, 'table-column' box, |
| 283 | + 'table-column-group' box, or 'table-caption-box'. |
| 284 | + |
| 285 | + <dt>proper table row parent |
| 286 | + <dd>A 'table' or 'inline-table' box or row group box |
| 287 | + |
| 288 | + <dt>internal table box |
| 289 | + <dd>A 'table-cell' box, 'table-row' box, row group box, |
| 290 | + 'table-column' box, or 'table-column-group' box. |
| 291 | + |
| 292 | + <dt>tabular container |
| 293 | + <dd>A 'table-row' box or proper table row parent |
| 294 | + |
| 295 | + <dt>consecutive |
| 296 | + <dd>Two sibling boxes are consecutive if they have no intervening |
| 297 | + siblings other than, optionally, an anonymous inline containing |
| 298 | + only white spaces. A sequence of sibling boxes is consecutive if |
| 299 | + each box in the sequence is consecutive to the one before it in |
| 300 | + the sequence. |
| 301 | +</dl> |
| 302 | +<p>For the purposes of these rules, out-of-flow elements are |
| 303 | +represented as inline elements of zero width and height. Their |
| 304 | +containing blocks are chosen accordingly. |
| 305 | + |
| 306 | +<p>The following steps are performed in three stages. |
275 | 307 | <ol> |
276 | | - <li>If the parent P of a 'table-cell' box T is not a |
277 | | - 'table-row', a box corresponding to a 'table-row' will be |
278 | | - generated between P and T. This box will span all consecutive |
279 | | - 'table-cell' sibling boxes of T. |
280 | | - |
281 | | - <li>If the parent P of a 'table-row' box T is not a 'table', |
282 | | - 'inline-table', 'table-header-group', 'table-footer-group' or |
283 | | - 'table-row-group' box, a box corresponding to a 'table' |
284 | | - element will be generated between P and T. |
285 | | - If P is an 'inline' box, then the generated box must be an |
286 | | - 'inline-table' box instead of a 'table' box. |
287 | | - This box will span all |
288 | | - consecutive sibling boxes of T that require a |
289 | | - 'table' parent: 'table-row', 'table-row-group', |
290 | | - 'table-header-group', 'table-footer-group', 'table-column', |
291 | | - 'table-column-group', and 'table-caption'. T and T's siblings may |
292 | | - also be anonymous 'table-row' boxes generated by rule 1. |
293 | | - |
294 | | - <li>If the parent P of a 'table-column' box T is not a 'table', |
295 | | - 'inline-table', or 'table-column-group' box, a box |
296 | | - corresponding to a 'table' element will be generated between P and |
297 | | - T. |
298 | | - If P is an 'inline' box, then the generated box must be an |
299 | | - 'inline-table' box instead of a 'table' box. |
300 | | - This box will span all consecutive sibling boxes |
301 | | - of T that require a 'table' parent: 'table-row', |
302 | | - 'table-row-group', 'table-header-group', 'table-footer-group', |
303 | | - 'table-column', 'table-column-group', and 'table-caption', including |
304 | | - any anonymous 'table-row' boxes generated by rule 1. |
305 | | - |
306 | | - <li>If the parent P of a 'table-row-group' (or 'table-header-group', |
307 | | - 'table-footer-group', or 'table-column-group' or 'table-caption') |
308 | | - box T is not a 'table' or 'inline-table', a box |
309 | | - corresponding to a 'table' element will be generated between P and |
310 | | - T. |
311 | | - If P is an 'inline' box, then the generated box must be an |
312 | | - 'inline-table' box instead of a 'table' box. |
313 | | - This box will span all consecutive sibling boxes |
314 | | - of T that require a 'table' parent: 'table-row', |
315 | | - 'table-row-group', 'table-header-group', 'table-footer-group', |
316 | | - 'table-column', 'table-column-group', and 'table-caption', including |
317 | | - any anonymous 'table-row' boxes generated by rule 1. |
318 | | - |
319 | | - <li>If a child T of a 'table', 'inline-table', 'table-row-group', |
320 | | - 'table-header-group', 'table-footer-group', or 'table-row' box is an |
321 | | - anonymous inline box that contains only white space, then it is |
322 | | - treated as if it had 'display: none'. |
323 | | - |
324 | | - <li>If a child T of a 'table' box (or 'inline-table') P is not a |
325 | | - 'table-row-group', 'table-header-group', 'table-footer-group', |
326 | | - 'table-caption', 'table-column', 'table-column-group' or 'table-row' |
327 | | - box, a box corresponding to a 'table-row' element will be |
328 | | - generated between P and T. This box spans all consecutive |
329 | | - siblings of T that are not 'table-row-group', 'table-header-group', |
330 | | - 'table-footer-group', 'table-caption', 'table-column', |
331 | | - 'table-column-group' or 'table-row' boxes. |
332 | | - |
333 | | - <li>If a child T of a 'table-row-group' box (or |
334 | | - 'table-header-group' or 'table-footer-group') P is not a 'table-row' |
335 | | - box, a box corresponding to a 'table-row' element will be |
336 | | - generated between P and T. This box spans all consecutive |
337 | | - siblings of T that are not 'table-row' boxes. |
338 | | - |
339 | | - <li>If a child T of a 'table-row' box P is not a 'table-cell' |
340 | | - box, a box corresponding to a 'table-cell' element will be |
341 | | - generated between P and T. This box spans all consecutive |
342 | | - siblings of T that are not 'table-cell' boxes. |
| 308 | + <li>Remove irrelevant boxes: |
| 309 | + <ol> |
| 310 | + <li>All child boxes of a 'table-column' parent are treated as if |
| 311 | + they had 'display: none'. |
| 312 | + |
| 313 | + <li>If a child <var>C</var> of a 'table-column-group' parent is |
| 314 | + not a 'table-column' box, then it is treated as if it had |
| 315 | + 'display: none'. |
| 316 | + |
| 317 | + <li>If a child <var>C</var> of a tabular container <var>P</var> |
| 318 | + is an anonymous inline box that contains only white space, |
| 319 | + and its immediately preceding and following siblings, if |
| 320 | + any, are proper table descendants of <var>P</var> and are |
| 321 | + either 'table-caption' or internal table boxes, then it is |
| 322 | + treated as if it had 'display: none'. A box <var>D</var> is |
| 323 | + a proper table descendant of <var>A</var> if <var>D</var> |
| 324 | + can be a descendant of <var>A</var> without causing the |
| 325 | + generation of any intervening 'table' or 'inline-table' |
| 326 | + boxes. |
| 327 | + |
| 328 | + <li>If a box <var>B</var> is an anonymous inline containing only |
| 329 | + white space, and is between two immediate siblings each of |
| 330 | + which is either an internal table box or a 'table-caption' |
| 331 | + box then <var>B</var> is treated as if it had 'display: |
| 332 | + none'. |
| 333 | + </ol> |
| 334 | + |
| 335 | + <li>Generate missing child wrappers: |
| 336 | + <ol> |
| 337 | + <li>If a child <var>C</var> of a 'table' or 'inline-table' box |
| 338 | + is not a proper table child, then generate an anonymous |
| 339 | + 'table-row' box around <var>C</var> and all consecutive |
| 340 | + siblings of <var>C</var> that are not proper table children. |
| 341 | + |
| 342 | + <li>If a child <var>C</var> of a row group box is not a |
| 343 | + 'table-row' box, then generate an anonymous 'table-row' box |
| 344 | + around <var>C</var> and all consecutive siblings |
| 345 | + of <var>C</var> that are not 'table-row' boxes. |
| 346 | + |
| 347 | + <li>If a child <var>C</var> of a 'table-row' box is not a |
| 348 | + 'table-cell', then generate an anonymous 'table-cell' box |
| 349 | + around <var>C</var> and all consecutive siblings |
| 350 | + of <var>C</var> that are not 'table-cell' boxes. |
| 351 | + </ol> |
| 352 | + |
| 353 | + <li>Generate missing parents: |
| 354 | + <ol> |
| 355 | + <li>For each 'table-cell' box <var>C</var> in a sequence of |
| 356 | + consecutive internal table and 'table-caption' siblings, |
| 357 | + if <var>C</var>'s parent is not a 'table-row' then generate |
| 358 | + an anonymous 'table-row' box around <var>C</var> and all |
| 359 | + consecutive siblings of <var>C</var> that are 'table-cell' |
| 360 | + boxes. |
| 361 | + |
| 362 | + <li>For each proper table child <var>C</var> in a sequence of |
| 363 | + consecutive proper table children, if <var>C</var> is |
| 364 | + misparented then generate an anonymous 'table' or |
| 365 | + 'inline-table' box <var>T</var> around <var>C</var> and all |
| 366 | + consecutive siblings of <var>C</var> that are proper table |
| 367 | + children. (If C's parent is an 'inline' box, |
| 368 | + then <var>T</var> must be an 'inline-table' box; otherwise |
| 369 | + it must be a 'table' box.) |
| 370 | + <ul> |
| 371 | + <li>A 'table-row' is misparented if its parent is neither |
| 372 | + a row group box nor a 'table' or 'inline-table' box. |
| 373 | + <li>A 'table-column' box is misparented if its parent is |
| 374 | + neither a 'table-column-group' box nor a 'table' or |
| 375 | + 'inline-table' box. |
| 376 | + <li>A row group box, 'table-column-group' box, or |
| 377 | + 'table-caption' box is misparented if its parent is |
| 378 | + neither a 'table' box nor an 'inline-table' box. |
| 379 | + </ul> |
| 380 | + </ol> |
343 | 381 | </ol> |
344 | 382 |
|
345 | 383 | <div class="example"> |
|
0 commit comments