Bug 215369 - [css-flexbox] Only update the intrinsic height if we don't have override height
Summary: [css-flexbox] Only update the intrinsic height if we don't have override height
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Sergio Villar Senin
URL:
Keywords: InRadar
: 210088 (view as bug list)
Depends on:
Blocks:
 
Reported: 2020-08-11 04:43 PDT by Sergio Villar Senin
Modified: 2020-08-11 08:23 PDT (History)
13 users (show)

See Also:


Attachments
Patch (4.41 KB, patch)
2020-08-11 04:58 PDT, Sergio Villar Senin
jfernandez: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sergio Villar Senin 2020-08-11 04:43:17 PDT
[css-flexbox] Don't update the intrinsic height if we don't have override height
Comment 1 Sergio Villar Senin 2020-08-11 04:58:10 PDT
Created attachment 406375 [details]
Patch
Comment 2 Javier Fernandez 2020-08-11 05:12:55 PDT
Comment on attachment 406375 [details]
Patch

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

> Source/WebCore/rendering/RenderBox.cpp:2781
> +    if (isFloatingOrOutOfFlowPositioned() || !parent() || !parent()->isFlexibleBox() || hasOverrideContentLogicalHeight())

I think Grid items with stretch alignment will have the same problem with this cache. Wouldn't make more sense to just check for the HasOverrideContentLogicalHeight and remove the clauses about flexible box ?
Comment 3 Sergio Villar Senin 2020-08-11 07:40:37 PDT
*** Bug 210088 has been marked as a duplicate of this bug. ***
Comment 4 Sergio Villar Senin 2020-08-11 07:56:31 PDT
(In reply to Javier Fernandez from comment #2)
> Comment on attachment 406375 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=406375&action=review
> 
> > Source/WebCore/rendering/RenderBox.cpp:2781
> > +    if (isFloatingOrOutOfFlowPositioned() || !parent() || !parent()->isFlexibleBox() || hasOverrideContentLogicalHeight())
> 
> I think Grid items with stretch alignment will have the same problem with
> this cache. Wouldn't make more sense to just check for the
> HasOverrideContentLogicalHeight and remove the clauses about flexible box ?

Right, we might eventually need it for grid too. However we cannot remove the checks now beause that triggers an infinite recursion between

layoutBlock() <-> relayoutToAvoidWidows()

that should be fixed as part of another patch. I could include a FIXME if you want.
Comment 5 Javier Fernandez 2020-08-11 08:03:17 PDT
Comment on attachment 406375 [details]
Patch

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

>>> Source/WebCore/rendering/RenderBox.cpp:2781
>>> +    if (isFloatingOrOutOfFlowPositioned() || !parent() || !parent()->isFlexibleBox() || hasOverrideContentLogicalHeight())
>> 
>> I think Grid items with stretch alignment will have the same problem with this cache. Wouldn't make more sense to just check for the HasOverrideContentLogicalHeight and remove the clauses about flexible box ?
> 
> Right, we might eventually need it for grid too. However we cannot remove the checks now beause that triggers an infinite recursion between
> 
> layoutBlock() <-> relayoutToAvoidWidows()
> 
> that should be fixed as part of another patch. I could include a FIXME if you want.

Yes, please, add that FIXME.
Comment 6 Javier Fernandez 2020-08-11 08:03:50 PDT
Comment on attachment 406375 [details]
Patch

r=me
Comment 7 Sergio Villar Senin 2020-08-11 08:22:35 PDT
Committed r265497: <https://trac.webkit.org/changeset/265497>
Comment 8 Radar WebKit Bug Importer 2020-08-11 08:23:19 PDT
<rdar://problem/66840803>