Title: [160176] trunk
Revision
160176
Author
[email protected]
Date
2013-12-05 08:48:06 -0800 (Thu, 05 Dec 2013)

Log Message

[CSS Shapes] Fix inset when only a subset of the arguments are defined
https://bugs.webkit.org/show_bug.cgi?id=125277

Reviewed by David Hyatt.

Source/WebCore:

       I thought Length's default value is fixed-0, but actually it's auto-0. For the optional arguments
       of inset shape, we need to use fixed-0, so I updated the code and the tests to use that explicitly.

No new tests, I updated the old ones.

* css/BasicShapeFunctions.cpp:
(WebCore::basicShapeForValue):

LayoutTests:

* fast/shapes/shape-outside-floats/shape-outside-floats-inset.html:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (160175 => 160176)


--- trunk/LayoutTests/ChangeLog	2013-12-05 16:27:21 UTC (rev 160175)
+++ trunk/LayoutTests/ChangeLog	2013-12-05 16:48:06 UTC (rev 160176)
@@ -1,3 +1,12 @@
+2013-12-05  Zoltan Horvath  <[email protected]>
+
+        [CSS Shapes] Fix inset when only a subset of the arguments are defined
+        https://bugs.webkit.org/show_bug.cgi?id=125277
+
+        Reviewed by David Hyatt.
+
+        * fast/shapes/shape-outside-floats/shape-outside-floats-inset.html:
+
 2013-12-05  Michał Pakuła vel Rutka  <[email protected]>
 
         Unreviewed EFL gardening

Modified: trunk/LayoutTests/fast/shapes/shape-outside-floats/shape-outside-floats-inset.html (160175 => 160176)


--- trunk/LayoutTests/fast/shapes/shape-outside-floats/shape-outside-floats-inset.html	2013-12-05 16:27:21 UTC (rev 160175)
+++ trunk/LayoutTests/fast/shapes/shape-outside-floats/shape-outside-floats-inset.html	2013-12-05 16:48:06 UTC (rev 160176)
@@ -17,13 +17,13 @@
         height: 40px;
     }
     .top {
-        -webkit-shape-outside: inset(20px 0 0 0);
+        -webkit-shape-outside: inset(20px);
     }
     .right {
-        -webkit-shape-outside: inset(0 20px 0 0);
+        -webkit-shape-outside: inset(0 20px);
     }
     .bottom {
-        -webkit-shape-outside: inset(0 0 20px 0);
+        -webkit-shape-outside: inset(0 0 20px);
     }
     .left {
         -webkit-shape-outside: inset(0 0 0 20px);

Modified: trunk/Source/WebCore/ChangeLog (160175 => 160176)


--- trunk/Source/WebCore/ChangeLog	2013-12-05 16:27:21 UTC (rev 160175)
+++ trunk/Source/WebCore/ChangeLog	2013-12-05 16:48:06 UTC (rev 160176)
@@ -1,3 +1,18 @@
+2013-12-05  Zoltan Horvath  <[email protected]>
+
+        [CSS Shapes] Fix inset when only a subset of the arguments are defined
+        https://bugs.webkit.org/show_bug.cgi?id=125277
+
+        Reviewed by David Hyatt.
+
+       I thought Length's default value is fixed-0, but actually it's auto-0. For the optional arguments
+       of inset shape, we need to use fixed-0, so I updated the code and the tests to use that explicitly.
+
+        No new tests, I updated the old ones.
+
+        * css/BasicShapeFunctions.cpp:
+        (WebCore::basicShapeForValue):
+
 2013-12-05  Carlos Garcia Campos  <[email protected]>
 
         [GTK] Do not use deprecated gtk-doc 'Rename to' tag

Modified: trunk/Source/WebCore/css/BasicShapeFunctions.cpp (160175 => 160176)


--- trunk/Source/WebCore/css/BasicShapeFunctions.cpp	2013-12-05 16:27:21 UTC (rev 160175)
+++ trunk/Source/WebCore/css/BasicShapeFunctions.cpp	2013-12-05 16:48:06 UTC (rev 160176)
@@ -404,16 +404,26 @@
         const CSSBasicShapeInset* rectValue = static_cast<const CSSBasicShapeInset* >(basicShapeValue);
         RefPtr<BasicShapeInset> rect = BasicShapeInset::create();
 
-        if (rectValue->left())
+        if (rectValue->top())
             rect->setTop(convertToLength(style, rootStyle, rectValue->top()));
-        else
+        else {
+            rect->setTop(Length(0, Fixed));
             return rect;
+        }
         if (rectValue->right())
             rect->setRight(convertToLength(style, rootStyle, rectValue->right()));
+        else
+            rect->setRight(Length(0, Fixed));
+
         if (rectValue->bottom())
             rect->setBottom(convertToLength(style, rootStyle, rectValue->bottom()));
+        else
+            rect->setBottom(Length(0, Fixed));
+
         if (rectValue->left())
             rect->setLeft(convertToLength(style, rootStyle, rectValue->left()));
+        else
+            rect->setLeft(Length(0, Fixed));
 
         if (rectValue->topLeftRadius()) {
             Pair* topLeftRadius = rectValue->topLeftRadius()->getPairValue();
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to