Bug 218948 - [LFC] Do not use RenderStyle's logical margin API
Summary: [LFC] Do not use RenderStyle's logical margin API
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: zalan
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-11-14 15:35 PST by zalan
Modified: 2020-11-15 06:27 PST (History)
6 users (show)

See Also:


Attachments
Patch (4.15 KB, patch)
2020-11-14 15:44 PST, zalan
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description zalan 2020-11-14 15:35:06 PST
it flips the values based on the box's own writing mode and not the writing mode the box lives in.
see https://www.w3.org/TR/css-writing-modes-4/#logical-direction-layout
Comment 1 zalan 2020-11-14 15:44:04 PST
Created attachment 414146 [details]
Patch
Comment 2 Sam Weinig 2020-11-14 16:19:17 PST
Comment on attachment 414146 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=414146&action=review

> Source/WebCore/ChangeLog:16
> +        RenderStyle::marginStart/End/Before/After flips these values based on the box's own writing mode.

Should these RenderStyle functions be renamed to make it more clear?
Comment 3 zalan 2020-11-14 20:22:35 PST
(In reply to Sam Weinig from comment #2)
> Comment on attachment 414146 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=414146&action=review
> 
> > Source/WebCore/ChangeLog:16
> > +        RenderStyle::marginStart/End/Before/After flips these values based on the box's own writing mode.
> 
> Should these RenderStyle functions be renamed to make it more clear?
Most certainly. I am not sure though what their name would be like. Guess I should figure out the cases where we would call them first.
Comment 4 EWS 2020-11-15 06:26:04 PST
Committed r269826: <https://trac.webkit.org/changeset/269826>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 414146 [details].
Comment 5 Radar WebKit Bug Importer 2020-11-15 06:27:17 PST
<rdar://problem/71414284>