Ignore:
Timestamp:
Jun 15, 2016, 1:48:45 PM (9 years ago)
Author:
jfernandez@igalia.com
Message:

[css-sizing] Item borders are missing with 'min-width:-webkit-fill-available' and zero available width
https://bugs.webkit.org/show_bug.cgi?id=158258

Source/WebCore:

Reviewed by Darin Adler.

The "fill-available" size is defined as the containing block's size less
the box's border and padding size. However, when used for min-width we
should ensure we don't get negative values as result of logical width
computation.

http://www.w3.org/TR/css-sizing-3/#fill-available-sizing

This patch ensure fill-available value computed value will be always
greater than box's boder and padding width.

Test: fast/css-intrinsic-dimensions/fill-available-with-zero-width.html

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::computeIntrinsicLogicalWidthUsing):

LayoutTests:

Tests to verify that fill-available size works as expected when contaner's width is zero.

Reviewed by Darin Adler.

  • fast/css-intrinsic-dimensions/fill-available-with-zero-width-expected.html: Added.
  • fast/css-intrinsic-dimensions/fill-available-with-zero-width.html: Added.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/rendering/RenderBox.cpp

    r201677 r202103  
    24732473{
    24742474    if (logicalWidthLength.type() == FillAvailable)
    2475         return fillAvailableMeasure(availableLogicalWidth);
     2475        return std::max(borderAndPadding, fillAvailableMeasure(availableLogicalWidth));
    24762476
    24772477    LayoutUnit minLogicalWidth = 0;
Note: See TracChangeset for help on using the changeset viewer.