Commit 22ad69c3 authored by adele@apple.com's avatar adele@apple.com
Browse files

WebCore:

2008-04-17  Dean Jackson  <dino@apple.com>

        Reviewed by Hyatt.

        Fix for <rdar://problem/5849968> translate method should have Y=0 when only X is present

        Test: fast/css/transform-default-parameter.html

        * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty):
        translate function with only X parameter now leaves the Y parameter as zero.

LayoutTests:

2008-04-17  Dean Jackson  <dino@apple.com>

        Reviewed by Hyatt.

        Test for <rdar://problem/5849968> translate method should have Y=0 when only X is present

        * fast/css/transform-default-parameter.html: Added.
        * platform/mac/fast/css/transform-default-parameter-expected.checksum: Added.
        * platform/mac/fast/css/transform-default-parameter-expected.png: Added.
        * platform/mac/fast/css/transform-default-parameter-expected.txt: Added.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@32002 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 3752fb81
2008-04-17 Dean Jackson <dino@apple.com>
Reviewed by Hyatt.
Test for <rdar://problem/5849968> translate method should have Y=0 when only X is present
* fast/css/transform-default-parameter.html: Added.
* platform/mac/fast/css/transform-default-parameter-expected.checksum: Added.
* platform/mac/fast/css/transform-default-parameter-expected.png: Added.
* platform/mac/fast/css/transform-default-parameter-expected.txt: Added.
2008-04-16 Darin Adler <darin@apple.com>
 
Earlier version reviewed by Mitz.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<title>Testing translate(x)</title>
<style type="text/css" media="screen">
div {
position: absolute;
width: 300px;
height: 100px;
}
#box1 {
top: 100px;
left: 100px;
background-color: blue;
-webkit-transform: translate(400px); // this should evaluate as 400px, 0px
}
#box2 {
top: 500px;
left: 500px;
background-color: green;
-webkit-transform: translate3d(0px, 0px, -1px);
}
#box3 {
top: 100px;
left: 500px;
background-color: red;
-webkit-transform: translate3d(0px, 0px, -1px);
}
</style>
</head>
<body>
<h1>Testing default translate parameter</h1>
<p>There should be blue and green boxes shown. If there is a red box visible, the test has failed</p>
<div id="box3">
If you can see this box, then the test has failed.
</div>
<div id="box1">
This box should be visible (it is translated).
</div>
<div id="box2">
This box should be visible.
</div>
</body>
</html>
\ No newline at end of file
397ec8129fc0f617b71a8f0547a9f5a0
\ No newline at end of file
layer at (0,0) size 800x600
RenderView at (0,0) size 800x600
layer at (0,0) size 800x113
RenderBlock {HTML} at (0,0) size 800x113
RenderBody {BODY} at (8,21) size 784x76
RenderBlock {H1} at (0,0) size 784x37
RenderText {#text} at (0,0) size 487x37
text run at (0,0) width 487: "Testing default translate parameter"
RenderBlock {P} at (0,58) size 784x18
RenderText {#text} at (0,0) size 577x18
text run at (0,0) width 577: "There should be blue and green boxes shown. If there is a red box visible, the test has failed"
layer at (500,100) size 300x100
RenderBlock (positioned) {DIV} at (500,100) size 300x100 [bgcolor=#FF0000]
RenderText {#text} at (0,0) size 293x18
text run at (0,0) width 293: "If you can see this box, then the test has failed."
layer at (100,100) size 300x100
RenderBlock (positioned) {DIV} at (100,100) size 300x100 [bgcolor=#0000FF]
RenderText {#text} at (0,0) size 270x18
text run at (0,0) width 270: "This box should be visible (it is translated)."
layer at (500,500) size 300x100
RenderBlock (positioned) {DIV} at (500,500) size 300x100 [bgcolor=#008000]
RenderText {#text} at (0,0) size 170x18
text run at (0,0) width 170: "This box should be visible."
2008-04-17 Dean Jackson <dino@apple.com>
Reviewed by Hyatt.
Fix for <rdar://problem/5849968> translate method should have Y=0 when only X is present
Test: fast/css/transform-default-parameter.html
* css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty):
translate function with only X parameter now leaves the Y parameter as zero.
2008-04-17 Anders Carlsson <andersca@apple.com>
 
Reviewed by Sam.
......@@ -4423,8 +4423,7 @@ void CSSStyleSelector::applyProperty(int id, CSSValue *value)
if (values->length() > 1) {
CSSPrimitiveValue* secondValue = static_cast<CSSPrimitiveValue*>(values->itemWithoutBoundsCheck(1));
ty = convertToLength(secondValue, m_style, &ok);
} else
ty = tx;
}
}
}
......
Supports Markdown
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