Bug 218975

Summary: [css-flex] Images as flex items should use the overridingLogicalHeight when defined to compute the logical width
Product: WebKit Reporter: Sergio Villar Senin <svillar>
Component: New BugsAssignee: Sergio Villar Senin <svillar>
Status: RESOLVED FIXED    
Severity: Normal CC: changseok, esprehn+autocc, ews-watchlist, glenn, jfernandez, kondapallykalyan, pdr, rbuis, rego, rniwa, simon.fraser, svillar, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Patch rego: review+

Description Sergio Villar Senin 2020-11-16 02:56:21 PST
RenderReplaced should use the overridingLogicalHeight when defined to compute the logical width
Comment 1 Sergio Villar Senin 2020-11-16 03:07:29 PST
Created attachment 414213 [details]
Patch
Comment 2 Sergio Villar Senin 2020-11-17 02:13:56 PST
Created attachment 414322 [details]
Patch
Comment 3 Manuel Rego Casasnovas 2020-11-17 13:19:45 PST
Comment on attachment 414322 [details]
Patch

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

> Source/WebCore/rendering/RenderReplaced.cpp:527
> +            ASSERT(intrinsicRatio);

intrisicRatio can be zero, so this ASSERT will crash (like it's happening on the debug EWS), Shouldn't we add it in the previous check?
Comment 4 Sergio Villar Senin 2020-11-18 02:28:53 PST
(In reply to Manuel Rego Casasnovas from comment #3)
> Comment on attachment 414322 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=414322&action=review
> 
> > Source/WebCore/rendering/RenderReplaced.cpp:527
> > +            ASSERT(intrinsicRatio);
> 
> intrisicRatio can be zero, so this ASSERT will crash (like it's happening on
> the debug EWS), Shouldn't we add it in the previous check?

I'm trying to know how intrinsicRatio is zero given that both the intrinsic width and the intrinsic height are > 0. I thought it won't be possible, that's why I added the ASSERT.
Comment 5 Sergio Villar Senin 2020-11-18 05:17:03 PST
(In reply to Sergio Villar Senin from comment #4)
> (In reply to Manuel Rego Casasnovas from comment #3)
> > Comment on attachment 414322 [details]
> > Patch
> > 
> > View in context:
> > https://bugs.webkit.org/attachment.cgi?id=414322&action=review
> > 
> > > Source/WebCore/rendering/RenderReplaced.cpp:527
> > > +            ASSERT(intrinsicRatio);
> > 
> > intrisicRatio can be zero, so this ASSERT will crash (like it's happening on
> > the debug EWS), Shouldn't we add it in the previous check?
> 
> I'm trying to know how intrinsicRatio is zero given that both the intrinsic
> width and the intrinsic height are > 0. I thought it won't be possible,
> that's why I added the ASSERT.

Right so for example an iframe has indeed a intrinsic size but not necessarily an aspect ratio. Will change the condition and remove the assert
Comment 6 Sergio Villar Senin 2020-11-18 05:32:52 PST
Created attachment 414442 [details]
Patch
Comment 7 Manuel Rego Casasnovas 2020-11-19 01:42:34 PST
Comment on attachment 414442 [details]
Patch

r=me
Comment 8 Sergio Villar Senin 2020-11-20 01:33:52 PST
Committed r270073: <https://trac.webkit.org/changeset/270073>
Comment 9 Radar WebKit Bug Importer 2020-11-20 01:34:40 PST
<rdar://problem/71620147>