Changeset 156606 in webkit


Ignore:
Timestamp:
Sep 28, 2013 9:14:00 AM (11 years ago)
Author:
commit-queue@webkit.org
Message:

filter: drop-shadow doesnot support viewport units
https://bugs.webkit.org/show_bug.cgi?id=122053

Patch by Gurpreet Kaur <k.gurpreet@samsung.com> on 2013-09-28
Reviewed by Darin Adler.

Source/WebCore:

drop-shadow properties were not applied incase its values
were given in vh, vw, vmax, vmin units.

Tests: fast/css/drop-shadow-viewport-height.html

fast/css/drop-shadow-viewport-vmax.html
fast/css/drop-shadow-viewport-vmin.html
fast/css/drop-shadow-viewport-width.html

  • css/StyleResolver.cpp:

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

LayoutTests:

  • fast/css/drop-shadow-viewport-height-expected-mismatch.html: Added.
  • fast/css/drop-shadow-viewport-height.html: Added.
  • fast/css/drop-shadow-viewport-vmax-expected-mismatch.html: Added.
  • fast/css/drop-shadow-viewport-vmax.html: Added.
  • fast/css/drop-shadow-viewport-vmin-expected-mismatch.html: Added.
  • fast/css/drop-shadow-viewport-vmin.html: Added.
  • fast/css/drop-shadow-viewport-width-expected-mismatch.html: Added.
  • fast/css/drop-shadow-viewport-width.html: Added.

Added new tests for verifying that drop-shadow properties are applied
when its values are viewport units.

Location:
trunk
Files:
8 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r156605 r156606  
     12013-09-28  Gurpreet Kaur  <k.gurpreet@samsung.com>
     2
     3        filter: drop-shadow doesnot support viewport units
     4        https://bugs.webkit.org/show_bug.cgi?id=122053
     5
     6        Reviewed by Darin Adler.
     7
     8        * fast/css/drop-shadow-viewport-height-expected-mismatch.html: Added.
     9        * fast/css/drop-shadow-viewport-height.html: Added.
     10        * fast/css/drop-shadow-viewport-vmax-expected-mismatch.html: Added.
     11        * fast/css/drop-shadow-viewport-vmax.html: Added.
     12        * fast/css/drop-shadow-viewport-vmin-expected-mismatch.html: Added.
     13        * fast/css/drop-shadow-viewport-vmin.html: Added.
     14        * fast/css/drop-shadow-viewport-width-expected-mismatch.html: Added.
     15        * fast/css/drop-shadow-viewport-width.html: Added.
     16        Added new tests for verifying that drop-shadow properties are applied
     17        when its values are viewport units.
     18
    1192013-09-28  Gurpreet Kaur  <k.gurpreet@samsung.com>
    220
  • trunk/Source/WebCore/ChangeLog

    r156605 r156606  
     12013-09-28  Gurpreet Kaur  <k.gurpreet@samsung.com>
     2
     3        filter: drop-shadow doesnot support viewport units
     4        https://bugs.webkit.org/show_bug.cgi?id=122053
     5
     6        Reviewed by Darin Adler.
     7
     8        drop-shadow properties were not applied incase its values
     9        were given in vh, vw, vmax, vmin units.
     10
     11        Tests: fast/css/drop-shadow-viewport-height.html
     12               fast/css/drop-shadow-viewport-vmax.html
     13               fast/css/drop-shadow-viewport-vmin.html
     14               fast/css/drop-shadow-viewport-width.html
     15
     16        * css/StyleResolver.cpp:
     17        (WebCore::StyleResolver::createFilterOperations):
     18        Calculating the drop-shadow values which has been specified in viewport
     19        units.The vh/vw units are calcultated as percent of viewport height and
     20        viewport width respectively. 1vmax: 1vw or 1vh, whatever is largest.
     21        1vmin: 1vw or 1vh, whatever is smallest.
     22
    1232013-09-28  Gurpreet Kaur  <k.gurpreet@samsung.com>
    224
  • trunk/Source/WebCore/css/StyleResolver.cpp

    r156601 r156606  
    38733873
    38743874            ShadowValue* item = static_cast<ShadowValue*>(cssValue);
    3875             IntPoint location(item->x->computeLength<int>(style, rootStyle, zoomFactor),
    3876                               item->y->computeLength<int>(style, rootStyle, zoomFactor));
     3875            int x = item->x->computeLength<int>(style, rootStyle, zoomFactor);
     3876            if (item->x->isViewportPercentageLength())
     3877                x = viewportPercentageValue(*item->x, x);
     3878            int y = item->y->computeLength<int>(style, rootStyle, zoomFactor);
     3879            if (item->y->isViewportPercentageLength())
     3880                y = viewportPercentageValue(*item->y, y);
     3881            IntPoint location(x, y);
    38773882            int blur = item->blur ? item->blur->computeLength<int>(style, rootStyle, zoomFactor) : 0;
     3883            if (item->blur && item->blur->isViewportPercentageLength())
     3884                blur = viewportPercentageValue(*item->blur, blur);
    38783885            Color color;
    38793886            if (item->color)
Note: See TracChangeset for help on using the changeset viewer.