Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 98cae7a19408e1ef5672e25b85a2a50a0e9eae5e
      
https://github.com/WebKit/WebKit/commit/98cae7a19408e1ef5672e25b85a2a50a0e9eae5e
  Author: Alan Baradlay <[email protected]>
  Date:   2024-12-26 (Thu, 26 Dec 2024)

  Changed paths:
    A LayoutTests/fast/flexbox/legacy-line-clamp-with-max-height-expected.html
    A LayoutTests/fast/flexbox/legacy-line-clamp-with-max-height.html
    M Source/WebCore/rendering/RenderDeprecatedFlexibleBox.cpp

  Log Message:
  -----------
  Overlapping content at
https://www.cnet.com/home/kitchen-and-household/best-dishwasher/
https://bugs.webkit.org/show_bug.cgi?id=285161

Reviewed by Antti Koivisto.

- legacy clamping only affects the size of the clamped block. Any next sibling 
block box keeps its regular height (they don't collapse to 0px).
- when the (deprecated) flex box's height is solely driven by its content 
(height: auto), we correctly size it to the clamped content.
However when max/min height are set, we may incorrectly identify them as valid 
constraints:
  e.g. content height: 200px
       clamped height: 100px
       max-height: 150px
-> height is set to 150px

This is caused by 'heightSpecified' always taking priority over the clamped 
height (heightSpecified is set to true when we realize the flex box's height is 
not solely constrained by its content).

This patch checks if the final, clamped height is ok to use or we should fall 
back to the original height (similar to what we do with heightSpecified).

* LayoutTests/fast/flexbox/legacy-line-clamp-with-max-height-expected.html: 
Added.
* LayoutTests/fast/flexbox/legacy-line-clamp-with-max-height.html: Added.
* Source/WebCore/rendering/RenderDeprecatedFlexibleBox.cpp:
(WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):

Canonical link: https://commits.webkit.org/288300@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to