Changeset 190721 in webkit


Ignore:
Timestamp:
Oct 8, 2015 6:28:54 AM (8 years ago)
Author:
svillar@igalia.com
Message:

[css-grid] Percentages of indefinite sizes to be resolved as auto
https://bugs.webkit.org/show_bug.cgi?id=149810

Reviewed by Darin Adler.

Specs mention that percentages in grid track sizes must be
resolved as 'auto' if the grid container has an indefinite
size in the corresponding axis.

The 'auto' keyword used to be resolved as
minmax(min-content,max-content) but since r189911 it's
resolved as minmax(auto,auto). Updated the implementation so
we properly resolve those percentages.

No new tests as the behavior does not change at all. That's
because 'auto' as min-track sizing function is the same as
min-content (unless we have a specified value for
min-{width|height}, but those cases were already handled in the
code), and as a max sizing function is works as max-content.

  • rendering/RenderGrid.cpp:

(WebCore::RenderGrid::gridTrackSize):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r190716 r190721  
     12015-10-08  Sergio Villar Senin  <svillar@igalia.com>
     2
     3        [css-grid] Percentages of indefinite sizes to be resolved as auto
     4        https://bugs.webkit.org/show_bug.cgi?id=149810
     5
     6        Reviewed by Darin Adler.
     7
     8        Specs mention that percentages in grid track sizes must be
     9        resolved as 'auto' if the grid container has an indefinite
     10        size in the corresponding axis.
     11
     12        The 'auto' keyword used to be resolved as
     13        minmax(min-content,max-content) but since r189911 it's
     14        resolved as minmax(auto,auto). Updated the implementation so
     15        we properly resolve those percentages.
     16
     17        No new tests as the behavior does not change at all. That's
     18        because 'auto' as min-track sizing function is the same as
     19        min-content (unless we have a specified value for
     20        min-{width|height}, but those cases were already handled in the
     21        code), and as a max sizing function is works as max-content.
     22
     23        * rendering/RenderGrid.cpp:
     24        (WebCore::RenderGrid::gridTrackSize):
     25
    1262015-10-08  Xabier Rodriguez Calvar  <calvaris@igalia.com> and Youenn Fablet  <youenn.fablet@crf.canon.fr>
    227
  • trunk/Source/WebCore/rendering/RenderGrid.cpp

    r190665 r190721  
    3535#include "RenderLayer.h"
    3636#include "RenderView.h"
    37 #include <wtf/NeverDestroyed.h>
    3837
    3938namespace WebCore {
     
    578577        if (!hasDefiniteLogicalSize(direction)) {
    579578            if (minTrackBreadth.isPercentage())
    580                 minTrackBreadth = Length(MinContent);
     579                minTrackBreadth = Length(Auto);
    581580            if (maxTrackBreadth.isPercentage())
    582                 maxTrackBreadth = Length(MaxContent);
     581                maxTrackBreadth = Length(Auto);
    583582        }
    584583    }
Note: See TracChangeset for help on using the changeset viewer.