Changeset 282267 in webkit
- Timestamp:
- Sep 10, 2021 7:26:56 AM (10 months ago)
- Location:
- trunk
- Files:
-
- 4 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/TestExpectations (modified) (1 diff)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/rendering/RenderFlexibleBox.cpp (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r282266 r282267 1 2021-09-07 Sergio Villar Senin <svillar@igalia.com> 2 3 [css-flexbox] Add support for self-start & self-end css-align-3 positional alignment properties 4 https://bugs.webkit.org/show_bug.cgi?id=229996 5 6 Reviewed by Manuel Rego Casasnovas. 7 8 * TestExpectations: Removed a couple of tests that are now passing. 9 1 10 2021-09-10 Alan Bujtas <zalan@apple.com> 2 11 -
trunk/LayoutTests/TestExpectations
r282264 r282267 4168 4168 webkit.org/b/221474 imported/w3c/web-platform-tests/css/css-flexbox/svg-root-as-flex-item-003.html [ ImageOnlyFailure ] 4169 4169 4170 # The test works fine but the expected result fails due to a missing layout. 4170 4171 webkit.org/b/221468 imported/w3c/web-platform-tests/css/css-flexbox/flexbox-align-self-horiz-002.xhtml [ ImageOnlyFailure ] 4171 webkit.org/b/221468 imported/w3c/web-platform-tests/css/css-flexbox/flexbox-align-self-vert-002.xhtml [ ImageOnlyFailure ]4172 webkit.org/b/221468 imported/w3c/web-platform-tests/css/css-flexbox/flexbox-align-self-vert-rtl-005.xhtml [ ImageOnlyFailure ]4173 4172 4174 4173 # align baseline in flexbox. -
trunk/Source/WebCore/ChangeLog
r282266 r282267 1 2021-09-07 Sergio Villar Senin <svillar@igalia.com> 2 3 [css-flexbox] Add support for self-start & self-end css-align-3 positional alignment properties 4 https://bugs.webkit.org/show_bug.cgi?id=229996 5 6 Reviewed by Manuel Rego Casasnovas. 7 8 Added support for SelfStart and SelfEnd positional alignment properties from 9 https://drafts.csswg.org/css-align-3/#positional-values. These two properties 10 align the alignment subject (flex item) to be flush with the edge of the alignment container (flex line) 11 corresponding to the alignment subject's start side in the appropriate axis. This allows authors to align 12 the flex items based on their writing modes instead of the writing mode of the container. 13 14 * rendering/RenderFlexibleBox.cpp: 15 (WebCore::alignmentOffset): 16 (WebCore::RenderFlexibleBox::alignmentForChild const): 17 1 18 2021-09-10 Alan Bujtas <zalan@apple.com> 2 19 -
trunk/Source/WebCore/rendering/RenderFlexibleBox.cpp
r282078 r282267 40 40 #include "RenderStyleConstants.h" 41 41 #include "RenderView.h" 42 #include "WritingMode.h" 42 43 #include <limits> 43 44 #include <wtf/IsoMallocInlines.h> … … 1571 1572 case ItemPosition::Start: 1572 1573 case ItemPosition::End: 1574 case ItemPosition::SelfStart: 1575 case ItemPosition::SelfEnd: 1573 1576 case ItemPosition::Left: 1574 1577 case ItemPosition::Right: … … 1597 1600 return maxAscent - ascent; 1598 1601 case ItemPosition::LastBaseline: 1599 case ItemPosition::SelfStart:1600 case ItemPosition::SelfEnd:1601 1602 // FIXME: Implement last baseline. 1602 1603 break; … … 1722 1723 if (align == ItemPosition::End) 1723 1724 return ItemPosition::FlexEnd; 1725 1726 if (align == ItemPosition::SelfStart || align == ItemPosition::SelfEnd) { 1727 // self-start corresponds to flex-start (and self-end to flex-end) in the majority of the cases 1728 // for orthogonal layouts except when the container is flipped blocks writing mode (vrl/hbt) and 1729 // the child is ltr or the other way around. For example: 1730 // 1) htb ltr child inside a vrl container: self-start corresponds to flex-end 1731 // 2) htb rtl child inside a vlr container: self-end corresponds to flex-start 1732 bool isOrthogonal = style().isHorizontalWritingMode() != child.style().isHorizontalWritingMode(); 1733 if (isOrthogonal && (style().isFlippedBlocksWritingMode() == child.style().isLeftToRightDirection())) 1734 return align == ItemPosition::SelfStart ? ItemPosition::FlexEnd : ItemPosition::FlexStart; 1735 1736 if (!isOrthogonal) { 1737 if (style().isFlippedLinesWritingMode() != child.style().isFlippedLinesWritingMode()) 1738 return align == ItemPosition::SelfStart ? ItemPosition::FlexEnd : ItemPosition::FlexStart; 1739 if (style().isLeftToRightDirection() != child.style().isLeftToRightDirection()) 1740 return align == ItemPosition::SelfStart ? ItemPosition::FlexEnd : ItemPosition::FlexStart; 1741 } 1742 1743 return align == ItemPosition::SelfStart ? ItemPosition::FlexStart : ItemPosition::FlexEnd; 1744 } 1724 1745 1725 1746 if (style().flexWrap() == FlexWrap::Reverse) {
Note: See TracChangeset
for help on using the changeset viewer.