Changeset 287779 in webkit


Ignore:
Timestamp:
Jan 7, 2022 1:16:52 PM (6 months ago)
Author:
Alan Bujtas
Message:

Inline blocks that contain text with min-width, box-sizing: border-box incorrectly include the border in width calculation
https://bugs.webkit.org/show_bug.cgi?id=234935
<rdar://problem/87217423>

Reviewed by Antti Koivisto.

Source/WebCore:

The block formatting context root takes care of applying the the min/max-width constraints.

Test: fast/inline/min-max-width-and-preferred-width.html

  • layout/formattingContexts/inline/InlineFormattingContext.cpp:

(WebCore::Layout::InlineFormattingContext::computedIntrinsicWidthConstraintsForIntegration): remove redundant min/max-width checking.

LayoutTests:

  • fast/inline/min-max-width-and-preferred-width-expected.html: Added.
  • fast/inline/min-max-width-and-preferred-width.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r287759 r287779  
     12022-01-07  Alan Bujtas  <zalan@apple.com>
     2
     3        Inline blocks that contain text with min-width, box-sizing: border-box incorrectly include the border in width calculation
     4        https://bugs.webkit.org/show_bug.cgi?id=234935
     5        <rdar://problem/87217423>
     6
     7        Reviewed by Antti Koivisto.
     8
     9        * fast/inline/min-max-width-and-preferred-width-expected.html: Added.
     10        * fast/inline/min-max-width-and-preferred-width.html: Added.
     11
    1122022-01-07  Youenn Fablet  <youenn@apple.com>
    213
  • trunk/Source/WebCore/ChangeLog

    r287778 r287779  
     12022-01-07  Alan Bujtas  <zalan@apple.com>
     2
     3        Inline blocks that contain text with min-width, box-sizing: border-box incorrectly include the border in width calculation
     4        https://bugs.webkit.org/show_bug.cgi?id=234935
     5        <rdar://problem/87217423>
     6
     7        Reviewed by Antti Koivisto.
     8
     9        The block formatting context root takes care of applying the the min/max-width constraints. 
     10
     11        Test: fast/inline/min-max-width-and-preferred-width.html
     12
     13        * layout/formattingContexts/inline/InlineFormattingContext.cpp:
     14        (WebCore::Layout::InlineFormattingContext::computedIntrinsicWidthConstraintsForIntegration): remove redundant min/max-width checking.
     15
    1162022-01-07  Andres Gonzalez  <andresg_22@apple.com>
    217
  • trunk/Source/WebCore/layout/formattingContexts/inline/InlineFormattingContext.cpp

    r287476 r287779  
    168168    collectContentIfNeeded();
    169169
    170     auto constraints = formattingGeometry().constrainByMinMaxWidth(root(),
    171         { ceiledLayoutUnit(computedIntrinsicWidthForConstraint(IntrinsicWidthMode::Minimum))
    172         , ceiledLayoutUnit(computedIntrinsicWidthForConstraint(IntrinsicWidthMode::Maximum)) });
     170    auto constraints = IntrinsicWidthConstraints {
     171        ceiledLayoutUnit(computedIntrinsicWidthForConstraint(IntrinsicWidthMode::Minimum)),
     172        ceiledLayoutUnit(computedIntrinsicWidthForConstraint(IntrinsicWidthMode::Maximum))
     173    };
    173174    formattingState().setIntrinsicWidthConstraints(constraints);
    174175    return constraints;
Note: See TracChangeset for help on using the changeset viewer.