@@ -506,49 +506,7 @@ Types of Containment</h2>
506506<h3 id='containment-size'>
507507Size Containment</h3>
508508
509- If the element does not generate a <a>principal box</a> (as is the case with ''display: contents'' or ''display: none'' ),
510- or its [=inner display type=] is ''display/table'' ,
511- or its principal box is an <a spec="css-display-3">internal table box</a> ,
512- or an <a spec="css-display-3">internal ruby box</a> ,
513- or a <a spec="css-display-3" lt="atomic inline">non-atomic</a> <a spec="css-display-3">inline-level</a> box,
514- size containment has no effect.
515-
516- <wpt>
517- contain-size-001.html
518- contain-size-002.html
519- contain-size-003.html
520- contain-size-004.html
521- contain-size-005.html
522- contain-size-006.html
523- contain-size-007.html
524- contain-size-008.html
525- contain-size-009.html
526- contain-size-010.html
527- contain-size-012.html
528- contain-size-012b.html
529- contain-size-051.html
530- contain-size-052.html
531- </wpt>
532-
533- Note: Internal table boxes,
534- which do not include table captions,
535- are excluded,
536- because the table layout algorithm
537- does not allow boxes to become smaller than their inflow content.
538- Sizing a table cell as if it was empty and then layout out its content inside without changing the size
539- is effectively an undefined operation.
540- Manually setting the 'width' or 'height' properties to ''0''
541- cannot make it smaller than its content.
542- This concern does not apply to table captions,
543- which are perfectly capable of having a fixed size
544- that is independent of their content.
545-
546- <wpt>
547- contain-size-011.html
548- contain-size-056.html
549- </wpt>
550-
551- Otherwise, giving an element <dfn export>size containment</dfn>
509+ Giving an element <dfn export>size containment</dfn>
552510 makes its [=principal box=] a <dfn>size containment box</dfn>
553511 and has the following effects:
554512
@@ -700,6 +658,52 @@ Size Containment</h3>
700658 and its [=natural height=] is treated as 0.
701659 </div>
702660
661+ However, giving an element [=size containment=]
662+ has no effect if any of the following are true:
663+
664+ * if the element does not generate a <a>principal box</a>
665+ (as is the case with ''display: contents'' or ''display: none'' )
666+ * if its [=inner display type=] is ''display/table''
667+ * if its [=principal box=] is
668+ an <a spec="css-display-3">internal table box</a>
669+ * if its [=principal box=] is
670+ an <a spec="css-display-3">internal ruby box</a>
671+ or a <a spec="css-display-3" lt="atomic inline">non-atomic</a> <a spec="css-display-3">inline-level</a> box
672+
673+ <wpt>
674+ contain-size-001.html
675+ contain-size-002.html
676+ contain-size-003.html
677+ contain-size-004.html
678+ contain-size-005.html
679+ contain-size-006.html
680+ contain-size-007.html
681+ contain-size-008.html
682+ contain-size-009.html
683+ contain-size-010.html
684+ contain-size-012.html
685+ contain-size-012b.html
686+ contain-size-051.html
687+ contain-size-052.html
688+ </wpt>
689+
690+ Note: Internal table boxes,
691+ which do not include table captions,
692+ are excluded,
693+ because the table layout algorithm
694+ does not allow boxes to become smaller than their inflow content.
695+ Sizing a table cell as if it was empty and then laying out its content inside without changing the size
696+ is effectively an undefined operation.
697+ Manually setting the 'width' or 'height' properties to ''0''
698+ cannot make it smaller than its content.
699+ This concern does not apply to table captions,
700+ which are perfectly capable of having a fixed size
701+ that is independent of their content.
702+
703+ <wpt>
704+ contain-size-011.html
705+ contain-size-056.html
706+ </wpt>
703707
704708<h4 id='containment-size-opt' class="no-toc">
705709Possible Size-Containment Optimizations</h4>
@@ -731,12 +735,7 @@ Possible Size-Containment Optimizations</h4>
731735<h3 id='containment-layout'>
732736Layout Containment</h3>
733737
734- If the element does not generate a <a>principal box</a> (as is the case with 'display' values of ''display/contents'' or ''display/none'' ),
735- or its [=principal box=] is an <a spec="css-display-3">internal table box</a> other than ''display/table-cell'' ,
736- or an <a spec="css-display-3">internal ruby box</a> ,
737- or a <a spec="css-display-3" lt="atomic inline">non-atomic</a> <a spec="css-display-3">inline-level</a> box,
738- layout containment has no effect.
739- Otherwise, giving an element <dfn export>layout containment</dfn>
738+ Giving an element <dfn export>layout containment</dfn>
740739 makes its [=principal box=] a <dfn>layout containment box</dfn>
741740 and has the following effects:
742741
@@ -886,6 +885,18 @@ Layout Containment</h3>
886885 contain-layout-baseline-005.html
887886 </wpt>
888887
888+ However, giving an element [=layout containment=]
889+ has no effect if any of the following are true:
890+
891+ * if the element does not generate a <a>principal box</a>
892+ (as is the case with ''display: contents'' or ''display: none'' )
893+ * if its [=principal box=] is
894+ an <a spec="css-display-3">internal table box</a>
895+ other than ''display/table-cell''
896+ * if its [=principal box=] is
897+ an <a spec="css-display-3">internal ruby box</a>
898+ or a <a spec="css-display-3" lt="atomic inline">non-atomic</a> <a spec="css-display-3">inline-level</a> box
899+
889900<h4 id='containment-layout-opt' class="no-toc">
890901Possible Layout-Containment Optimizations</h4>
891902
@@ -1017,12 +1028,7 @@ Possible Style-Containment Optimizations</h4>
10171028<h3 id='containment-paint'>
10181029Paint Containment</h3>
10191030
1020- If the element does not generate a <a>principal box</a> (as is the case with 'display' values of ''display/contents'' or ''display/none'' ),
1021- or its [=principal box=] is an <a spec="css-display-3">internal table box</a> other than ''display/table-cell'' ,
1022- or an <a spec="css-display-3">internal ruby box</a> ,
1023- or a <a spec="css-display-3" lt="atomic inline">non-atomic</a> <a spec="css-display-3">inline-level</a> box,
1024- paint containment has no effect.
1025- Otherwise, giving an element <dfn export>paint containment</dfn>
1031+ Giving an element <dfn export>paint containment</dfn>
10261032 makes its [=principal box=] a <dfn>paint containment box</dfn>
10271033 and has the following effects:
10281034
@@ -1111,6 +1117,18 @@ Paint Containment</h3>
11111117 contain-paint-baseline-001.html
11121118 </wpt>
11131119
1120+ However, giving an element [=paint containment=]
1121+ has no effect if any of the following are true:
1122+
1123+ * if the element does not generate a <a>principal box</a>
1124+ (as is the case with ''display: contents'' or ''display: none'' )
1125+ * if its [=principal box=] is
1126+ an <a spec="css-display-3">internal table box</a>
1127+ other than ''display/table-cell''
1128+ * if its [=principal box=] is
1129+ an <a spec="css-display-3">internal ruby box</a>
1130+ or a <a spec="css-display-3" lt="atomic inline">non-atomic</a> <a spec="css-display-3">inline-level</a> box
1131+
11141132<h4 id='containment-paint-opt' class="no-toc">
11151133Possible Paint-Containment Optimizations</h4>
11161134
0 commit comments