Commit 3a470a7f authored by zoltan@webkit.org's avatar zoltan@webkit.org

[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:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160176 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 02308551
2013-12-05 Zoltan Horvath <zoltan@webkit.org>
[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 <m.pakula@samsung.com>
Unreviewed EFL gardening
......
......@@ -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);
......
2013-12-05 Zoltan Horvath <zoltan@webkit.org>
[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 <cgarcia@igalia.com>
[GTK] Do not use deprecated gtk-doc 'Rename to' tag
......@@ -404,16 +404,26 @@ PassRefPtr<BasicShape> basicShapeForValue(const RenderStyle* style, const Render
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();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment