@@ -534,49 +534,7 @@ Types of Containment</h2>
534
534
<h3 id='containment-size'>
535
535
Size Containment</h3>
536
536
537
- If the element does not generate a <a>principal box</a> (as is the case with ''display: contents'' or ''display: none'' ),
538
- or its [=inner display type=] is ''display/table'' ,
539
- or its principal box is an <a spec="css-display-3">internal table box</a> ,
540
- or an <a spec="css-display-3">internal ruby box</a> ,
541
- or a <a spec="css-display-3" lt="atomic inline">non-atomic</a> <a spec="css-display-3">inline-level</a> box,
542
- size containment has no effect.
543
-
544
- <wpt>
545
- contain-size-001.html
546
- contain-size-002.html
547
- contain-size-003.html
548
- contain-size-004.html
549
- contain-size-005.html
550
- contain-size-006.html
551
- contain-size-007.html
552
- contain-size-008.html
553
- contain-size-009.html
554
- contain-size-010.html
555
- contain-size-012.html
556
- contain-size-012b.html
557
- contain-size-051.html
558
- contain-size-052.html
559
- </wpt>
560
-
561
- Note: Internal table boxes,
562
- which do not include table captions,
563
- are excluded,
564
- because the table layout algorithm
565
- does not allow boxes to become smaller than their inflow content.
566
- Sizing a table cell as if it was empty and then laying out its content inside without changing the size
567
- is effectively an undefined operation.
568
- Manually setting the 'width' or 'height' properties to ''0''
569
- cannot make it smaller than its content.
570
- This concern does not apply to table captions,
571
- which are perfectly capable of having a fixed size
572
- that is independent of their content.
573
-
574
- <wpt>
575
- contain-size-011.html
576
- contain-size-056.html
577
- </wpt>
578
-
579
- Otherwise, giving an element <dfn export>size containment</dfn>
537
+ Giving an element <dfn export>size containment</dfn>
580
538
makes its [=principal box=] a <dfn>size containment box</dfn>
581
539
and has the following effects:
582
540
@@ -864,6 +822,52 @@ Size Containment</h3>
864
822
and its [=natural height=] is treated as 0.
865
823
</div>
866
824
825
+ However, giving an element [=size containment=]
826
+ has no effect if any of the following are true:
827
+
828
+ * if the element does not generate a <a>principal box</a>
829
+ (as is the case with ''display: contents'' or ''display: none'' )
830
+ * if its [=inner display type=] is ''display/table''
831
+ * if its [=principal box=] is
832
+ an <a spec="css-display-3">internal table box</a>
833
+ * if its [=principal box=] is
834
+ an <a spec="css-display-3">internal ruby box</a>
835
+ or a <a spec="css-display-3" lt="atomic inline">non-atomic</a> <a spec="css-display-3">inline-level</a> box
836
+
837
+ <wpt>
838
+ contain-size-001.html
839
+ contain-size-002.html
840
+ contain-size-003.html
841
+ contain-size-004.html
842
+ contain-size-005.html
843
+ contain-size-006.html
844
+ contain-size-007.html
845
+ contain-size-008.html
846
+ contain-size-009.html
847
+ contain-size-010.html
848
+ contain-size-012.html
849
+ contain-size-012b.html
850
+ contain-size-051.html
851
+ contain-size-052.html
852
+ </wpt>
853
+
854
+ Note: Internal table boxes,
855
+ which do not include table captions,
856
+ are excluded,
857
+ because the table layout algorithm
858
+ does not allow boxes to become smaller than their inflow content.
859
+ Sizing a table cell as if it was empty and then laying out its content inside without changing the size
860
+ is effectively an undefined operation.
861
+ Manually setting the 'width' or 'height' properties to ''0''
862
+ cannot make it smaller than its content.
863
+ This concern does not apply to table captions,
864
+ which are perfectly capable of having a fixed size
865
+ that is independent of their content.
866
+
867
+ <wpt>
868
+ contain-size-011.html
869
+ contain-size-056.html
870
+ </wpt>
867
871
868
872
<h4 id='containment-size-opt' class="no-toc">
869
873
Possible Size-Containment Optimizations</h4>
@@ -895,12 +899,7 @@ Possible Size-Containment Optimizations</h4>
895
899
<h3 id='containment-layout'>
896
900
Layout Containment</h3>
897
901
898
- If the element does not generate a <a>principal box</a> (as is the case with 'display' values of ''display/contents'' or ''display/none'' ),
899
- or its [=principal box=] is an <a spec="css-display-3">internal table box</a> other than ''display/table-cell'' ,
900
- or an <a spec="css-display-3">internal ruby box</a> ,
901
- or a <a spec="css-display-3" lt="atomic inline">non-atomic</a> <a spec="css-display-3">inline-level</a> box,
902
- layout containment has no effect.
903
- Otherwise, giving an element <dfn export>layout containment</dfn>
902
+ Giving an element <dfn export>layout containment</dfn>
904
903
makes its [=principal box=] a <dfn>layout containment box</dfn>
905
904
and has the following effects:
906
905
@@ -1050,6 +1049,18 @@ Layout Containment</h3>
1050
1049
contain-layout-baseline-005.html
1051
1050
</wpt>
1052
1051
1052
+ However, giving an element [=layout containment=]
1053
+ has no effect if any of the following are true:
1054
+
1055
+ * if the element does not generate a <a>principal box</a>
1056
+ (as is the case with ''display: contents'' or ''display: none'' )
1057
+ * if its [=principal box=] is
1058
+ an <a spec="css-display-3">internal table box</a>
1059
+ other than ''display/table-cell''
1060
+ * if its [=principal box=] is
1061
+ an <a spec="css-display-3">internal ruby box</a>
1062
+ or a <a spec="css-display-3" lt="atomic inline">non-atomic</a> <a spec="css-display-3">inline-level</a> box
1063
+
1053
1064
<h4 id='containment-layout-opt' class="no-toc">
1054
1065
Possible Layout-Containment Optimizations</h4>
1055
1066
@@ -1075,12 +1086,7 @@ Possible Layout-Containment Optimizations</h4>
1075
1086
<h3 id='containment-paint'>
1076
1087
Paint Containment</h3>
1077
1088
1078
- If the element does not generate a <a>principal box</a> (as is the case with 'display' values of ''display/contents'' or ''display/none'' ),
1079
- or its [=principal box=] is an <a spec="css-display-3">internal table box</a> other than ''display/table-cell'' ,
1080
- or an <a spec="css-display-3">internal ruby box</a> ,
1081
- or a <a spec="css-display-3" lt="atomic inline">non-atomic</a> <a spec="css-display-3">inline-level</a> box,
1082
- paint containment has no effect.
1083
- Otherwise, giving an element <dfn export>paint containment</dfn>
1089
+ Giving an element <dfn export>paint containment</dfn>
1084
1090
makes its [=principal box=] a <dfn>paint containment box</dfn>
1085
1091
and has the following effects:
1086
1092
@@ -1171,6 +1177,18 @@ Paint Containment</h3>
1171
1177
contain-paint-baseline-001.html
1172
1178
</wpt>
1173
1179
1180
+ However, giving an element [=paint containment=]
1181
+ has no effect if any of the following are true:
1182
+
1183
+ * if the element does not generate a <a>principal box</a>
1184
+ (as is the case with ''display: contents'' or ''display: none'' )
1185
+ * if its [=principal box=] is
1186
+ an <a spec="css-display-3">internal table box</a>
1187
+ other than ''display/table-cell''
1188
+ * if its [=principal box=] is
1189
+ an <a spec="css-display-3">internal ruby box</a>
1190
+ or a <a spec="css-display-3" lt="atomic inline">non-atomic</a> <a spec="css-display-3">inline-level</a> box
1191
+
1174
1192
<h4 id='containment-paint-opt' class="no-toc">
1175
1193
Possible Paint-Containment Optimizations</h4>
1176
1194
0 commit comments