Bug 218948

Summary: [LFC] Do not use RenderStyle's logical margin API
Product: WebKit Reporter: zalan <zalan>
Component: Layout and RenderingAssignee: zalan <zalan>
Status: RESOLVED FIXED    
Severity: Normal CC: bfulgham, koivisto, sam, simon.fraser, webkit-bug-importer, zalan
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

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>