Bug 218202

Summary: [LFC] Do not use RenderStyle padding values unless padding is set
Product: WebKit Reporter: zalan <zalan>
Component: Layout and RenderingAssignee: zalan <zalan>
Status: RESOLVED INVALID    
Severity: Normal CC: bfulgham, koivisto, simon.fraser, zalan
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch koivisto: review+

Description zalan 2020-10-26 13:40:42 PDT
ssia
Comment 1 zalan 2020-10-26 13:45:31 PDT
Created attachment 412351 [details]
Patch
Comment 2 Antti Koivisto 2020-10-26 14:26:20 PDT
Comment on attachment 412351 [details]
Patch

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

> Source/WebCore/ChangeLog:9
> +        An unset padding value computes to the passed in maximum value.
> +        (e.g. valueForLength(style.paddingLeft(), 10) -> computed padding left is 10px)

Unset padding should be 0. Which test is this failing?
Comment 3 zalan 2020-10-26 15:52:39 PDT
(In reply to Antti Koivisto from comment #2)
> Comment on attachment 412351 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=412351&action=review
> 
> > Source/WebCore/ChangeLog:9
> > +        An unset padding value computes to the passed in maximum value.
> > +        (e.g. valueForLength(style.paddingLeft(), 10) -> computed padding left is 10px)
> 
> Unset padding should be 0. Which test is this failing?
So apparently RenderStyle::resetPadding sets Length(auto) :(
Comment 4 zalan 2020-10-26 15:53:40 PDT
will fix this by resetting the padding properly (to a valid value).