Ignore:
Timestamp:
Sep 19, 2013, 4:03:32 AM (12 years ago)
Author:
[email protected]
Message:

CSS Unit vmax and vmin in border-width not handled.
https://bugs.webkit.org/show_bug.cgi?id=121421

Patch by Gurpreet Kaur <[email protected]> on 2013-09-19
Reviewed by Darin Adler.

Source/WebCore:

Border properties were not applied incase its values
were given in vmax/vmin units.

Tests: fast/css/viewport-vmax-border.html

fast/css/viewport-vmin-border.html

  • css/CSSPrimitiveValue.cpp:

(WebCore::CSSPrimitiveValue::computeLengthDouble):

  • css/CSSPrimitiveValue.h:

(WebCore::CSSPrimitiveValue::isViewportPercentageMax):
(WebCore::CSSPrimitiveValue::isViewportPercentageMin):

  • css/DeprecatedStyleBuilder.cpp:

(WebCore::ApplyPropertyComputeLength::applyValue):
Calculating the border values which has been specified in
vmax/vmin units. 1vmax: 1vw or 1vh, whatever is largest.
1vmin: 1vw or 1vh, whatever is smallest. The vh/vw units are
calcultated as percent of viewport height and viewport width respectively.

LayoutTests:

  • fast/css/viewport-vmax-border-expected.txt: Added.
  • fast/css/viewport-vmax-border.html: Added.
  • fast/css/viewport-vmin-border-expected.txt: Added.
  • fast/css/viewport-vmin-border.html: Added.

Added new tests for verifying that border properties are
applied when its values are given in vmax/vmin units.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/css/CSSPrimitiveValue.h

    r155624 r156091  
    205205    bool isViewportPercentageWidth() const { return m_primitiveUnitType == CSS_VW; }
    206206    bool isViewportPercentageHeight() const { return m_primitiveUnitType == CSS_VH; }
     207    bool isViewportPercentageMax() const { return m_primitiveUnitType == CSS_VMAX; }
     208    bool isViewportPercentageMin() const { return m_primitiveUnitType == CSS_VMIN; }
    207209    bool isValueID() const { return m_primitiveUnitType == CSS_VALUE_ID; }
    208210   
Note: See TracChangeset for help on using the changeset viewer.