[Webkit-unassigned] [Bug 218093] [css-logical] Implement logical border-radius
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Jan 8 06:20:24 PST 2021
https://bugs.webkit.org/show_bug.cgi?id=218093
--- Comment #44 from zsun at igalia.com ---
(In reply to Oriol Brufau from comment #42)
> Comment on attachment 417005 [details]
> Patch
>
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=417005&action=review
>
> > Source/WebCore/platform/text/WritingMode.h:90
> > + return isFlippedTextFlow(textflow) != isVerticalTextFlow(textflow);
>
> You could make isFlippedLinesWritingMode call this function to avoid
> duplicating the logic:
>
> constexpr inline bool isFlippedLinesWritingMode(WritingMode writingMode)
> {
> return isFlippedLinesTextFlow(makeTextFlow(writingMode,
> TextDirection::LTR));
> }
>
> > Source/WebCore/platform/text/WritingMode.h:190
> > + BoxCorner physicalCorner = static_cast<BoxCorner>(logicalBoxCorner);
>
> physicalCorner doesn't seem needed.
>
> > Source/WebCore/platform/text/WritingMode.h:229
> > + return physicalCorner;
>
> So I guess you are returning physicalCorner because some compiler was
> failing to notice that all cases are covered?
> Then I would add an ASSERT_NOT_REACHED() and just return some random corner
> like BoxCorner::TopLeft.
> I don't think static_cast<BoxCorner>(logicalBoxCorner) makes much sense.
>
> Or just replace the entire switch with
>
> bool isBlockStart = logicalBoxCorner == LogicalBoxCorner::StartStart ||
> logicalBoxCorner == LogicalBoxCorner::StartEnd;
> bool isInlineStart = logicalBoxCorner == LogicalBoxCorner::StartStart ||
> logicalBoxCorner == LogicalBoxCorner::EndStart;
> if (isBlockStart == isFlippedTextFlow(textflow)) {
> if (isInlineStart == isReversedTextFlow(textflow))
> return BoxCorner::BottomRight;
> } else if (isInlineStart != isReversedTextFlow(textflow)) {
> return BoxCorner::TopLeft;
> }
> if (isBlockStart == isFlippedLinesTextFlow(textflow))
> return BoxCorner::BottomLeft;
> return BoxCorner::TopRight;
Updated. Thank you!
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20210108/f8b9e5b1/attachment-0001.htm>
More information about the webkit-unassigned
mailing list