Changeset 292222 in webkit
- Timestamp:
- Apr 1, 2022 8:35:55 AM (4 months ago)
- Location:
- trunk
- Files:
-
- 13 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/fast/css/resize-single-axis-expected.txt (modified) (1 diff)
-
LayoutTests/fast/css/resize-single-axis.html (modified) (3 diffs)
-
LayoutTests/imported/w3c/ChangeLog (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/css/css-logical/logical-values-resize-expected.txt (modified) (1 diff)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/css/CSSPrimitiveValueMappings.h (modified) (2 diffs)
-
Source/WebCore/css/CSSProperties.json (modified) (2 diffs)
-
Source/WebCore/css/parser/CSSParserFastPaths.cpp (modified) (1 diff)
-
Source/WebCore/rendering/RenderLayer.cpp (modified) (2 diffs)
-
Source/WebCore/rendering/style/RenderStyleConstants.cpp (modified) (1 diff)
-
Source/WebCore/rendering/style/RenderStyleConstants.h (modified) (1 diff)
-
Source/WebCore/rendering/style/StyleRareNonInheritedData.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r292218 r292222 1 2022-04-01 Tim Nguyen <ntim@apple.com> 2 3 [css-logical] Add support for block/inline CSS values for resize property 4 https://bugs.webkit.org/show_bug.cgi?id=218088 5 6 Reviewed by Antti Koivisto. 7 8 Add tests for functionality. 9 10 * fast/css/resize-single-axis-expected.txt: 11 * fast/css/resize-single-axis.html: 12 1 13 2022-04-01 Youenn Fablet <youenn@apple.com> 2 14 -
trunk/LayoutTests/fast/css/resize-single-axis-expected.txt
r44914 r292222 2 2 'horizontal' resized as expected to (100px, 50px). 3 3 'vertical' resized as expected to (50px, 100px). 4 'block-horizontal' resized as expected to (50px, 100px). 5 'inline-horizontal' resized as expected to (100px, 50px). 6 'block-vertical' resized as expected to (100px, 50px). 7 'inline-vertical' resized as expected to (50px, 100px). 4 8 -
trunk/LayoutTests/fast/css/resize-single-axis.html
r120683 r292222 20 20 resize: vertical; 21 21 } 22 23 #block-horizontal, 24 #block-vertical { 25 resize: block; 26 } 27 28 #inline-horizontal, 29 #inline-vertical { 30 resize: inline; 31 } 22 32 </style> 23 33 … … 26 36 <div id="horizontal"></div> 27 37 <div id="vertical"></div> 38 <div id="block-horizontal"></div> 39 <div id="inline-horizontal"></div> 40 <section style="writing-mode: vertical-lr;"> 41 <div id="block-vertical"></div> 42 <div id="inline-vertical"></div> 43 </section> 28 44 29 45 <script type="text/javascript"> … … 61 77 var horizontal = document.getElementById("horizontal"); 62 78 var vertical = document.getElementById("vertical"); 79 var blockHorizontal = document.getElementById("block-horizontal"); 80 var inlineHorizontal = document.getElementById("inline-horizontal"); 81 var blockVertical = document.getElementById("block-vertical"); 82 var inlineVertical = document.getElementById("inline-vertical"); 63 83 64 84 resize(both); 65 85 resize(horizontal); 66 86 resize(vertical); 87 resize(blockHorizontal); 88 resize(inlineHorizontal); 89 resize(blockVertical); 90 resize(inlineVertical); 67 91 68 92 assertSize(both, "100px", "100px"); 69 93 assertSize(horizontal, "100px", "50px"); 70 94 assertSize(vertical, "50px", "100px"); 95 assertSize(blockHorizontal, "50px", "100px"); 96 assertSize(inlineHorizontal, "100px", "50px"); 97 assertSize(blockVertical, "100px", "50px"); 98 assertSize(inlineVertical, "50px", "100px"); 71 99 } 72 100 </script> -
trunk/LayoutTests/imported/w3c/ChangeLog
r292216 r292222 1 2022-04-01 Tim Nguyen <ntim@apple.com> 2 3 [css-logical] Add support for block/inline CSS values for resize property 4 https://bugs.webkit.org/show_bug.cgi?id=218088 5 6 Reviewed by Antti Koivisto. 7 8 Marked relevant WPT as passing. 9 10 * web-platform-tests/css/css-logical/logical-values-resize-expected.txt: 11 1 12 2022-04-01 Youenn Fablet <youenn@apple.com> 2 13 -
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-logical/logical-values-resize-expected.txt
r264522 r292222 1 1 2 FAIL Test that 'resize: block' is supported. assert_equals: logical values in inline style, resize expected "block" but got "" 3 FAIL Test that 'resize: inline' is supported. assert_equals: logical values in inline style, resize expected "inline" but got "" 2 PASS Test that 'resize: block' is supported. 3 PASS Test that 'resize: inline' is supported. 4 4 -
trunk/Source/WebCore/ChangeLog
r292221 r292222 1 2022-04-01 Tim Nguyen <ntim@apple.com> 2 3 [css-logical] Add support for block/inline CSS values for resize property 4 https://bugs.webkit.org/show_bug.cgi?id=218088 5 6 Reviewed by Antti Koivisto. 7 8 Tests: 9 - Parsing: imported/w3c/web-platform-tests/css/css-logical/logical-values-resize.html 10 - Functionality: fast/css/resize-single-axis.html 11 12 * css/CSSPrimitiveValueMappings.h: 13 (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): 14 (WebCore::CSSPrimitiveValue::operator Resize const): 15 * css/CSSProperties.json: 16 * css/parser/CSSParserFastPaths.cpp: 17 (WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue): 18 * rendering/RenderLayer.cpp: 19 (WebCore::RenderLayer::resize): 20 * rendering/style/RenderStyleConstants.cpp: 21 (WebCore::operator<<): 22 * rendering/style/RenderStyleConstants.h: 23 * rendering/style/StyleRareNonInheritedData.h: 24 1 25 2022-04-01 Rob Buis <rbuis@igalia.com> 2 26 -
trunk/Source/WebCore/css/CSSPrimitiveValueMappings.h
r290813 r292222 2203 2203 m_value.valueID = CSSValueVertical; 2204 2204 break; 2205 case Resize::Block: 2206 m_value.valueID = CSSValueBlock; 2207 break; 2208 case Resize::Inline: 2209 m_value.valueID = CSSValueInline; 2210 break; 2205 2211 case Resize::None: 2206 2212 m_value.valueID = CSSValueNone; … … 2220 2226 case CSSValueVertical: 2221 2227 return Resize::Vertical; 2228 case CSSValueBlock: 2229 return Resize::Block; 2230 case CSSValueInline: 2231 return Resize::Inline; 2222 2232 case CSSValueAuto: 2223 2233 ASSERT_NOT_REACHED(); // Depends on settings, thus should be handled by the caller. -
trunk/Source/WebCore/css/CSSProperties.json
r291690 r292222 4265 4265 }, 4266 4266 "resize": { 4267 "inherited": true,4268 4267 "values": [ 4269 4268 "none", … … 4271 4270 "horizontal", 4272 4271 "vertical", 4273 "auto" 4272 "block", 4273 "inline", 4274 { 4275 "value": "auto", 4276 "status": "non-standard" 4277 } 4274 4278 ], 4275 4279 "codegen-properties": { -
trunk/Source/WebCore/css/parser/CSSParserFastPaths.cpp
r292214 r292222 706 706 || valueID == CSSValueFixed 707 707 || valueID == CSSValueSticky || valueID == CSSValueWebkitSticky; 708 case CSSPropertyResize: // none | both | horizontal | vertical | auto709 return valueID == CSSValueNone || valueID == CSSValueBoth || valueID == CSSValueHorizontal || valueID == CSSValueVertical || valueID == CSSValue Auto;708 case CSSPropertyResize: // none | both | horizontal | vertical | block | inline | auto 709 return valueID == CSSValueNone || valueID == CSSValueBoth || valueID == CSSValueHorizontal || valueID == CSSValueVertical || valueID == CSSValueBlock || valueID == CSSValueInline || valueID == CSSValueAuto; 710 710 case CSSPropertyShapeRendering: 711 711 return valueID == CSSValueAuto || valueID == CSSValueOptimizeSpeed || valueID == CSSValueCrispedges || valueID == CSSValueGeometricPrecision; -
trunk/Source/WebCore/rendering/RenderLayer.cpp
r292155 r292222 2788 2788 2789 2789 Resize resize = renderer->style().resize(); 2790 if (resize != Resize::Vertical && difference.width()) { 2790 bool canResizeWidth = resize == Resize::Horizontal || resize == Resize::Both 2791 || (renderer->isHorizontalWritingMode() ? resize == Resize::Inline : resize == Resize::Block); 2792 if (canResizeWidth && difference.width()) { 2791 2793 if (is<HTMLFormControlElement>(*element)) { 2792 2794 // Make implicit margins from the theme explicit (see <http://bugs.webkit.org/show_bug.cgi?id=9547>). … … 2799 2801 } 2800 2802 2801 if (resize != Resize::Horizontal && difference.height()) { 2803 bool canResizeHeight = resize == Resize::Vertical || resize == Resize::Both 2804 || (renderer->isHorizontalWritingMode() ? resize == Resize::Block : resize == Resize::Inline); 2805 if (canResizeHeight && difference.height()) { 2802 2806 if (is<HTMLFormControlElement>(*element)) { 2803 2807 // Make implicit margins from the theme explicit (see <http://bugs.webkit.org/show_bug.cgi?id=9547>). -
trunk/Source/WebCore/rendering/style/RenderStyleConstants.cpp
r291863 r292222 883 883 case Resize::Horizontal: ts << "horizontal"; break; 884 884 case Resize::Vertical: ts << "vertical"; break; 885 case Resize::Block: ts << "block"; break; 886 case Resize::Inline: ts << "inline"; break; 885 887 } 886 888 return ts; -
trunk/Source/WebCore/rendering/style/RenderStyleConstants.h
r291257 r292222 576 576 Both, 577 577 Horizontal, 578 Vertical 578 Vertical, 579 Block, 580 Inline, 579 581 }; 580 582 -
trunk/Source/WebCore/rendering/style/StyleRareNonInheritedData.h
r288556 r292222 226 226 unsigned breakAfter : 4; 227 227 unsigned breakInside : 3; // BreakInside 228 unsigned resize : 2; // Resize228 unsigned resize : 3; // Resize 229 229 230 230 unsigned inputSecurity : 1; // InputSecurity
Note: See TracChangeset
for help on using the changeset viewer.