Changeset 292394 in webkit
- Timestamp:
- Apr 5, 2022 8:44:42 AM (2 years ago)
- Location:
- trunk
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r292386 r292394 1 2022-04-05 Alan Bujtas <zalan@apple.com> 2 3 [CSS-Contain] Add support for contain: inline-size 4 https://bugs.webkit.org/show_bug.cgi?id=238787 5 6 Reviewed by Antti Koivisto. 7 8 * TestExpectations: 9 1 10 2022-04-05 Cameron McCormack <heycam@apple.com> 2 11 -
trunk/LayoutTests/TestExpectations
r292386 r292394 4637 4637 # CSS containment tests that fail 4638 4638 imported/w3c/web-platform-tests/css/css-contain/contain-inline-size-bfc-floats-001.html [ ImageOnlyFailure ] 4639 imported/w3c/web-platform-tests/css/css-contain/contain-inline-size-bfc-floats-002.html [ ImageOnlyFailure ]4640 imported/w3c/web-platform-tests/css/css-contain/contain-inline-size-fieldset.html [ ImageOnlyFailure ]4641 4639 imported/w3c/web-platform-tests/css/css-contain/contain-inline-size-flex.html [ ImageOnlyFailure ] 4642 imported/w3c/web-platform-tests/css/css-contain/contain-inline-size-flexitem.html [ ImageOnlyFailure ]4643 4640 imported/w3c/web-platform-tests/css/css-contain/contain-inline-size-grid.html [ ImageOnlyFailure ] 4644 imported/w3c/web-platform-tests/css/css-contain/contain-inline-size-legend.html [ ImageOnlyFailure ]4645 imported/w3c/web-platform-tests/css/css-contain/contain-inline-size-multicol.html [ ImageOnlyFailure ]4646 imported/w3c/web-platform-tests/css/css-contain/contain-inline-size-regular-container.html [ ImageOnlyFailure ]4647 imported/w3c/web-platform-tests/css/css-contain/contain-inline-size-vertical-rl-.html [ ImageOnlyFailure ]4648 4641 # webkit-ruby-text 4649 4642 imported/w3c/web-platform-tests/css/css-contain/contain-layout-017.html [ ImageOnlyFailure ] -
trunk/LayoutTests/imported/w3c/ChangeLog
r292382 r292394 1 2022-04-05 Alan Bujtas <zalan@apple.com> 2 3 [CSS-Contain] Add support for contain: inline-size 4 https://bugs.webkit.org/show_bug.cgi?id=238787 5 6 Reviewed by Antti Koivisto. 7 8 * web-platform-tests/css/css-contain/parsing/contain-computed-expected.txt: 9 * web-platform-tests/css/css-contain/parsing/contain-valid-expected.txt: 10 1 11 2022-04-05 Nikolaos Mouchtaris <nmouchtaris@apple.com> 2 12 -
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-contain/parsing/contain-computed-expected.txt
r287882 r292394 13 13 PASS Property contain value 'size layout paint' 14 14 PASS Property contain value 'layout paint' 15 FAIL Property contain value 'inline-size' assert_true: 'inline-size' is a supported value for contain. expected true got false 16 FAIL Property contain value 'inline-size layout style paint' assert_ true: 'inline-size layout style paint' is a supported value for contain. expected true got false15 PASS Property contain value 'inline-size' 16 FAIL Property contain value 'inline-size layout style paint' assert_equals: expected "inline-size layout style paint" but got "layout style paint inline-size" 17 17 -
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-contain/parsing/contain-valid-expected.txt
r287882 r292394 11 11 PASS e.style['contain'] = "layout style paint" should set the property value 12 12 PASS e.style['contain'] = "layout paint style size" should set the property value 13 FAIL e.style['contain'] = "inline-size" should set the property value assert_not_equals: property should be set got disallowed value "" 14 FAIL e.style['contain'] = "layout inline-size" should set the property value assert_not_equals: property should be set got disallowed value "" 13 PASS e.style['contain'] = "inline-size" should set the property value 14 PASS e.style['contain'] = "layout inline-size" should set the property value 15 15 -
trunk/Source/WebCore/ChangeLog
r292393 r292394 1 2022-04-05 Alan Bujtas <zalan@apple.com> 2 3 [CSS-Contain] Add support for contain: inline-size 4 https://bugs.webkit.org/show_bug.cgi?id=238787 5 6 Reviewed by Antti Koivisto. 7 8 * css/CSSComputedStyleDeclaration.cpp: 9 (WebCore::ComputedStyleExtractor::valueForPropertyInStyle): 10 * css/parser/CSSPropertyParser.cpp: 11 (WebCore::consumeContain): 12 * rendering/RenderBlock.cpp: 13 (WebCore::RenderBlock::computeIntrinsicLogicalWidths const): 14 (WebCore::RenderBlock::computeBlockPreferredLogicalWidths const): 15 * rendering/RenderBlockFlow.cpp: 16 (WebCore::RenderBlockFlow::computeIntrinsicLogicalWidths const): 17 (WebCore::RenderBlockFlow::computeInlinePreferredLogicalWidths const): 18 * rendering/RenderBox.cpp: 19 (WebCore::RenderBox::createsNewFormattingContext const): 20 (WebCore::RenderBox::establishesIndependentFormattingContext const): 21 * rendering/RenderBox.h: 22 * style/StyleBuilderCustom.h: 23 (WebCore::Style::BuilderCustom::applyValueContain): 24 1 25 2022-04-05 Carlos Garcia Campos <cgarcia@igalia.com> 2 26 -
trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp
r292210 r292394 3733 3733 if (containment & Containment::Paint) 3734 3734 list->append(cssValuePool.createIdentifierValue(CSSValuePaint)); 3735 if (containment & Containment::InlineSize) 3736 list->append(cssValuePool.createIdentifierValue(CSSValueInlineSize)); 3735 3737 return list; 3736 3738 } -
trunk/Source/WebCore/css/parser/CSSPropertyParser.cpp
r291244 r292394 4033 4033 return singleValue; 4034 4034 auto list = CSSValueList::createSpaceSeparated(); 4035 RefPtr<CSSPrimitiveValue> size, layout, paint, style;4035 RefPtr<CSSPrimitiveValue> size, inlineSize, layout, paint, style; 4036 4036 while (!range.atEnd()) { 4037 4037 switch (range.peek().id()) { … … 4040 4040 return nullptr; 4041 4041 size = consumeIdent(range); 4042 break; 4043 case CSSValueInlineSize: 4044 if (inlineSize || size) 4045 return nullptr; 4046 inlineSize = consumeIdent(range); 4042 4047 break; 4043 4048 case CSSValueLayout: … … 4062 4067 if (size) 4063 4068 list->append(size.releaseNonNull()); 4069 if (inlineSize) 4070 list->append(inlineSize.releaseNonNull()); 4064 4071 if (layout) 4065 4072 list->append(layout.releaseNonNull()); -
trunk/Source/WebCore/rendering/RenderBlock.cpp
r291992 r292394 2243 2243 { 2244 2244 ASSERT(!childrenInline()); 2245 if (!shouldApplySizeContainment(*this)) 2245 auto shouldIgnoreDescendantContentForLogicalWidth = shouldApplySizeContainment(*this) || shouldApplyInlineSizeContainment(*this); 2246 if (!shouldIgnoreDescendantContentForLogicalWidth) 2246 2247 computeBlockPreferredLogicalWidths(minLogicalWidth, maxLogicalWidth); 2247 2248 … … 2277 2278 void RenderBlock::computeBlockPreferredLogicalWidths(LayoutUnit& minLogicalWidth, LayoutUnit& maxLogicalWidth) const 2278 2279 { 2280 ASSERT(!shouldApplyInlineSizeContainment(*this)); 2281 2279 2282 const RenderStyle& styleToUse = style(); 2280 2283 bool nowrap = styleToUse.whiteSpace() == WhiteSpace::NoWrap; -
trunk/Source/WebCore/rendering/RenderBlockFlow.cpp
r291946 r292394 346 346 void RenderBlockFlow::computeIntrinsicLogicalWidths(LayoutUnit& minLogicalWidth, LayoutUnit& maxLogicalWidth) const 347 347 { 348 if (!shouldApplySizeContainment(*this)) { 348 auto shouldIgnoreDescendantContentForLogicalWidth = shouldApplySizeContainment(*this) || shouldApplyInlineSizeContainment(*this); 349 if (!shouldIgnoreDescendantContentForLogicalWidth) { 349 350 if (childrenInline()) 350 351 computeInlinePreferredLogicalWidths(minLogicalWidth, maxLogicalWidth); … … 4119 4120 void RenderBlockFlow::computeInlinePreferredLogicalWidths(LayoutUnit& minLogicalWidth, LayoutUnit& maxLogicalWidth) const 4120 4121 { 4121 // "The inline-axis intrinsic sizes of the principal box are determined as if the element had no content." 4122 // https://drafts.csswg.org/css-contain-3/#containment-inline-size 4123 if (shouldApplyInlineSizeContainment(*this)) 4124 return; 4122 ASSERT(!shouldApplyInlineSizeContainment(*this)); 4125 4123 4126 4124 #if ENABLE(LAYOUT_FORMATTING_CONTEXT) -
trunk/Source/WebCore/style/StyleBuilderCustom.h
r291956 r292394 1299 1299 case CSSValueSize: 1300 1300 containment.add(Containment::Size); 1301 break; 1302 case CSSValueInlineSize: 1303 containment.add(Containment::InlineSize); 1301 1304 break; 1302 1305 case CSSValueLayout:
Note: See TracChangeset
for help on using the changeset viewer.