Changeset 115953 in webkit


Ignore:
Timestamp:
May 3, 2012 3:02:54 AM (12 years ago)
Author:
commit-queue@webkit.org
Message:

CSS clip: auto clips to box borders instead of removing clipping
https://bugs.webkit.org/show_bug.cgi?id=36772

Patch by Uday Kiran <udaykiran@motorola.com> on 2012-05-03
Reviewed by Andreas Kling.

Source/WebCore:

According to CSS 2.1 spec, http://www.w3.org/TR/CSS2/visufx.html#propdef-clip,
clip property with value 'auto' the element does not clip.
Also getPropertyValue for clip when auto is specified should return "auto"
and not "rect(0px 0px 0px 0px)".

Tests: css2.1/20110323/clip-001-expected.html

css2.1/20110323/clip-001.html

  • css/StyleBuilder.cpp:

(WebCore::ApplyPropertyClip::applyValue):

LayoutTests:

CSS 2.1 test case added for clip:auto

  • css2.1/20110323/clip-001-expected.html: Added.
  • css2.1/20110323/clip-001.html: Added.
  • fast/css/getPropertyValue-clip.html: getPropertyValue for clip when auto is specified should return auto and not rect(0px 0px 0px 0px).
Location:
trunk
Files:
2 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r115947 r115953  
     12012-05-03  Uday Kiran  <udaykiran@motorola.com>
     2
     3        CSS clip: auto clips to box borders instead of removing clipping
     4        https://bugs.webkit.org/show_bug.cgi?id=36772
     5
     6        Reviewed by Andreas Kling.
     7
     8        CSS 2.1 test case added for clip:auto
     9
     10        * css2.1/20110323/clip-001-expected.html: Added.
     11        * css2.1/20110323/clip-001.html: Added.
     12        * fast/css/getPropertyValue-clip.html: getPropertyValue for clip when auto is specified should return auto and not rect(0px 0px 0px 0px).
     13
    1142012-05-03  Nikolas Zimmermann  <nzimmermann@rim.com>
    215
  • trunk/LayoutTests/fast/css/getPropertyValue-clip.html

    r33513 r115953  
    2020      }
    2121      div = document.getElementById("clip2");
    22       if (getComputedStyle(div,'').getPropertyValue("clip") != "rect(0px 0px 0px 0px)") {
     22      if (getComputedStyle(div,'').getPropertyValue("clip") != "auto") {
    2323          log("FAILED");
    2424          return;
  • trunk/Source/WebCore/ChangeLog

    r115951 r115953  
     12012-05-03  Uday Kiran  <udaykiran@motorola.com>
     2
     3        CSS clip: auto clips to box borders instead of removing clipping
     4        https://bugs.webkit.org/show_bug.cgi?id=36772
     5
     6        Reviewed by Andreas Kling.
     7
     8        According to CSS 2.1 spec, http://www.w3.org/TR/CSS2/visufx.html#propdef-clip,
     9        clip property with value 'auto' the element does not clip.
     10        Also getPropertyValue for clip when auto is specified should return "auto"
     11        and not "rect(0px 0px 0px 0px)".
     12
     13        Tests: css2.1/20110323/clip-001-expected.html
     14               css2.1/20110323/clip-001.html
     15
     16        * css/StyleBuilder.cpp:
     17        (WebCore::ApplyPropertyClip::applyValue):
     18
    1192012-05-02  Antti Koivisto  <antti@apple.com>
    220
  • trunk/Source/WebCore/css/StyleBuilder.cpp

    r115215 r115953  
    256256        } else if (primitiveValue->getIdent() == CSSValueAuto) {
    257257            styleResolver->style()->setClip(Length(), Length(), Length(), Length());
    258             styleResolver->style()->setHasClip(true);
     258            styleResolver->style()->setHasClip(false);
    259259        }
    260260    }
Note: See TracChangeset for help on using the changeset viewer.