Changeset 189702 in webkit


Ignore:
Timestamp:
Sep 14, 2015 2:46:37 AM (9 years ago)
Author:
Manuel Rego Casasnovas
Message:

[css-grid] Percentage columns should remove scrollbar's width
https://bugs.webkit.org/show_bug.cgi?id=149116

Reviewed by Sergio Villar Senin.

Source/WebCore:

Currently the calculation of percentage columns was not subtracting the
scrollbar's size.
Fixed RenderGrid::computeUsedBreadthOfSpecifiedLength()
to avoid this problem.

Test: fast/css-grid-layout/grid-percent-track-scrollbar.html

  • rendering/RenderGrid.cpp:

(WebCore::RenderGrid::computeUsedBreadthOfSpecifiedLength):

LayoutTests:

Added test to check the behavior for both columns and rows.
Note that rows (height) were already working fine.

  • fast/css-grid-layout/grid-percent-track-scrollbar-expected.txt: Added.
  • fast/css-grid-layout/grid-percent-track-scrollbar.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r189696 r189702  
     12015-09-14  Manuel Rego Casasnovas  <rego@igalia.com>
     2
     3        [css-grid] Percentage columns should remove scrollbar's width
     4        https://bugs.webkit.org/show_bug.cgi?id=149116
     5
     6        Reviewed by Sergio Villar Senin.
     7
     8        Added test to check the behavior for both columns and rows.
     9        Note that rows (height) were already working fine.
     10
     11        * fast/css-grid-layout/grid-percent-track-scrollbar-expected.txt: Added.
     12        * fast/css-grid-layout/grid-percent-track-scrollbar.html: Added.
     13
    1142015-09-14  Xabier Rodriguez Calvar  <calvaris@igalia.com>
    215
  • trunk/Source/WebCore/ChangeLog

    r189682 r189702  
     12015-09-14  Manuel Rego Casasnovas  <rego@igalia.com>
     2
     3        [css-grid] Percentage columns should remove scrollbar's width
     4        https://bugs.webkit.org/show_bug.cgi?id=149116
     5
     6        Reviewed by Sergio Villar Senin.
     7
     8        Currently the calculation of percentage columns was not subtracting the
     9        scrollbar's size.
     10        Fixed RenderGrid::computeUsedBreadthOfSpecifiedLength()
     11        to avoid this problem.
     12
     13        Test: fast/css-grid-layout/grid-percent-track-scrollbar.html
     14
     15        * rendering/RenderGrid.cpp:
     16        (WebCore::RenderGrid::computeUsedBreadthOfSpecifiedLength):
     17
    1182015-09-13  Chris Dumez  <cdumez@apple.com>
    219
  • trunk/Source/WebCore/rendering/RenderGrid.cpp

    r189567 r189702  
    452452    ASSERT(trackLength.isSpecified());
    453453    if (direction == ForColumns)
    454         return valueForLength(trackLength, logicalWidth() - borderAndPaddingLogicalWidth());
     454        return valueForLength(trackLength, contentLogicalWidth());
    455455    return valueForLength(trackLength, computeContentLogicalHeight(MainOrPreferredSize, style().logicalHeight(), Nullopt).valueOr(0));
    456456}
Note: See TracChangeset for help on using the changeset viewer.