RESOLVED FIXED Bug 232012
Add over-constrained direction check to computePositionedLogicalHeightUsing
https://bugs.webkit.org/show_bug.cgi?id=232012
Summary Add over-constrained direction check to computePositionedLogicalHeightUsing
Rob Buis
Reported 2021-10-20 06:33:58 PDT
Fix abspos-020.html
Attachments
Patch (3.14 KB, patch)
2021-10-20 06:37 PDT, Rob Buis
no flags
Patch (6.46 KB, patch)
2021-10-24 12:06 PDT, Rob Buis
no flags
Patch (1.59 KB, patch)
2021-10-24 23:34 PDT, Rob Buis
no flags
Patch (5.94 KB, patch)
2021-10-25 05:53 PDT, Rob Buis
ews-feeder: commit-queue-
Patch (8.29 KB, patch)
2021-10-25 10:58 PDT, Rob Buis
no flags
Patch (8.96 KB, patch)
2021-10-25 12:20 PDT, Rob Buis
no flags
Patch (8.68 KB, patch)
2021-10-25 12:50 PDT, Rob Buis
no flags
Patch (1.76 KB, patch)
2021-10-25 13:41 PDT, Rob Buis
no flags
Patch (8.18 KB, patch)
2021-10-27 05:14 PDT, Rob Buis
ews-feeder: commit-queue-
Patch (10.74 KB, patch)
2021-10-27 06:19 PDT, Rob Buis
no flags
Patch (9.78 KB, patch)
2021-10-27 08:20 PDT, Rob Buis
no flags
Patch (8.48 KB, patch)
2021-10-27 10:35 PDT, Rob Buis
no flags
Patch (6.82 KB, patch)
2021-10-31 07:48 PDT, Rob Buis
no flags
Patch (5.25 KB, patch)
2021-11-03 13:26 PDT, Rob Buis
no flags
Patch (8.37 KB, patch)
2021-11-03 14:47 PDT, Rob Buis
no flags
Patch (8.52 KB, patch)
2021-11-04 00:58 PDT, Rob Buis
no flags
Patch (13.62 KB, patch)
2021-11-04 04:05 PDT, Rob Buis
no flags
Patch (13.71 KB, patch)
2021-11-04 04:49 PDT, Rob Buis
no flags
Patch (16.48 KB, patch)
2021-11-04 14:23 PDT, Rob Buis
no flags
Patch (11.09 KB, patch)
2021-11-16 08:43 PST, Rob Buis
no flags
Patch (12.83 KB, patch)
2021-11-17 01:19 PST, Rob Buis
no flags
Patch (11.38 KB, patch)
2021-12-03 02:15 PST, Rob Buis
no flags
Patch (11.50 KB, patch)
2021-12-07 02:12 PST, Rob Buis
no flags
Patch (11.53 KB, patch)
2022-01-14 01:38 PST, Rob Buis
no flags
Patch (11.52 KB, patch)
2022-04-21 01:46 PDT, Rob Buis
no flags
Patch (10.71 KB, patch)
2022-08-22 03:20 PDT, Rob Buis
no flags
Patch (10.71 KB, patch)
2022-09-07 06:43 PDT, Rob Buis
no flags
Rob Buis
Comment 1 2021-10-20 06:37:07 PDT
Rob Buis
Comment 2 2021-10-24 12:06:01 PDT
Rob Buis
Comment 3 2021-10-24 23:34:07 PDT
Rob Buis
Comment 4 2021-10-25 05:53:16 PDT
Rob Buis
Comment 5 2021-10-25 10:58:59 PDT
Rob Buis
Comment 6 2021-10-25 12:20:54 PDT
Rob Buis
Comment 7 2021-10-25 12:50:25 PDT
Rob Buis
Comment 8 2021-10-25 13:41:59 PDT
Rob Buis
Comment 9 2021-10-27 05:14:47 PDT
Rob Buis
Comment 10 2021-10-27 06:19:10 PDT
Radar WebKit Bug Importer
Comment 11 2021-10-27 06:34:19 PDT
Rob Buis
Comment 12 2021-10-27 08:20:21 PDT
Rob Buis
Comment 13 2021-10-27 10:35:37 PDT
Rob Buis
Comment 14 2021-10-31 07:48:57 PDT
Rob Buis
Comment 15 2021-11-03 13:26:28 PDT
Rob Buis
Comment 16 2021-11-03 14:47:51 PDT
Rob Buis
Comment 17 2021-11-04 00:58:04 PDT
Rob Buis
Comment 18 2021-11-04 04:05:02 PDT
Rob Buis
Comment 19 2021-11-04 04:49:20 PDT
Rob Buis
Comment 20 2021-11-04 14:23:16 PDT
Sergio Villar Senin
Comment 21 2021-11-16 00:34:41 PST
Comment on attachment 443339 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=443339&action=review The patch looks sane and correct overall. I wonder whether we're fixing too many cases in a single patch. Would it be possible to split the patch in 2-3 ones or does it only make sense when all the changes are in place? I was wondering whether we could use an iterative approach fixing case by case. > Source/WebCore/rendering/RenderBox.cpp:4036 > + if (isLeftRightOverconstrained && containerDirection == TextDirection::RTL) Nit: perhaps it's enough to directly use the !isOrthogonal in the if condition and avoid having that extra variable > Source/WebCore/rendering/RenderBox.cpp:4396 > + if (isLeftRightOverconstrained) { Ditto. > LayoutTests/ChangeLog:9 > + * platform/ios/TestExpectations: Add something here about the tests the patch is fixing. Also the new iOS failures require an explanation.
Rob Buis
Comment 22 2021-11-16 08:43:07 PST
Rob Buis
Comment 23 2021-11-17 01:15:44 PST
Comment on attachment 443339 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=443339&action=review >> Source/WebCore/rendering/RenderBox.cpp:4036 >> + if (isLeftRightOverconstrained && containerDirection == TextDirection::RTL) > > Nit: perhaps it's enough to directly use the !isOrthogonal in the if condition and avoid having that extra variable Sure, fixed. >> Source/WebCore/rendering/RenderBox.cpp:4396 >> + if (isLeftRightOverconstrained) { > > Ditto. Done. >> LayoutTests/ChangeLog:9 >> + * platform/ios/TestExpectations: > > Add something here about the tests the patch is fixing. Also the new iOS failures require an explanation. Done.
Rob Buis
Comment 24 2021-11-17 01:16:38 PST
(In reply to Sergio Villar Senin from comment #21) > Comment on attachment 443339 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=443339&action=review > > The patch looks sane and correct overall. I wonder whether we're fixing too > many cases in a single patch. Would it be possible to split the patch in 2-3 > ones or does it only make sense when all the changes are in place? > > I was wondering whether we could use an iterative approach fixing case by > case. Good idea, I created https://bugs.webkit.org/show_bug.cgi?id=233189 which probably should go in first.
Rob Buis
Comment 25 2021-11-17 01:19:42 PST
Sergio Villar Senin
Comment 26 2021-12-02 01:57:49 PST
Comment on attachment 444494 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=444494&action=review Thanks for your patience. > Source/WebCore/rendering/RenderBox.cpp:4453 > + logicalTopValue = (availableSpace + logicalTopValue) - computedValues.m_margins.m_before - computedValues.m_margins.m_after; I don't understand why we're using the availableSpace here. The available space makes sense in the block direction of the container. But the container block direction is orthogonal to the child's top-bottom direction. If any we should use the available space in the child's block direction (since we're looking for the logical top). > Source/WebCore/rendering/RenderBox.cpp:4455 > + logicalTopValue = valueForLength(style().left(), containerLogicalHeight); I don't understand this too.
Rob Buis
Comment 27 2021-12-03 02:15:40 PST
Rob Buis
Comment 28 2021-12-03 03:16:08 PST
Comment on attachment 444494 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=444494&action=review >> Source/WebCore/rendering/RenderBox.cpp:4453 >> + logicalTopValue = (availableSpace + logicalTopValue) - computedValues.m_margins.m_before - computedValues.m_margins.m_after; > > I don't understand why we're using the availableSpace here. The available space makes sense in the block direction of the container. But the container block direction is orthogonal to the child's top-bottom direction. If any we should use the available space in the child's block direction (since we're looking for the logical top). I applied the same principle as in the similar over-constrained case in computePositionedLogicalWidthUsing. >> Source/WebCore/rendering/RenderBox.cpp:4455 >> + logicalTopValue = valueForLength(style().left(), containerLogicalHeight); > > I don't understand this too. This is to chose explicit left instead of logical left, to implement the substitution rules explained in for example abs-pos-non-replaced-vrl-220.xht. I noticed this was not done in case the direction is rtf, so I fixed that in the latest patch.
Rob Buis
Comment 29 2021-12-07 02:12:48 PST
Rob Buis
Comment 30 2022-01-14 01:38:51 PST
Rob Buis
Comment 31 2022-04-21 01:46:13 PDT
Rob Buis
Comment 32 2022-08-22 03:20:50 PDT
Rob Buis
Comment 33 2022-09-07 06:43:16 PDT
EWS
Comment 34 2022-09-09 13:53:53 PDT
Committed 254324@main (1787f669ccb1): <https://commits.webkit.org/254324@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 462183 [details].
Note You need to log in before you can comment on or make changes to this bug.