Skip to content
Permalink
Browse files
2010-07-18 Dean Jackson <dino@apple.com>
        Unreviewed (although this was discussed with SimonF in
        original review).

        https://bugs.webkit.org/show_bug.cgi?id=41259

        Unfortunately the test in the previous commit is platform
        specific (I was hoping it would not be) and is failing
        the bots. This update exercises the same thing, but doesn't
        check for exact values.

        * fast/transforms/scrollIntoView-transformed-expected.txt:
        * fast/transforms/scrollIntoView-transformed.html:

Canonical link: https://commits.webkit.org/54475@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@63635 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
grorg committed Jul 18, 2010
1 parent 3a028a2 commit 458e13ba53ddf6a226c045908f94ca83ccf8ab44
Showing with 71 additions and 35 deletions.
  1. +15 −0 LayoutTests/ChangeLog
  2. +5 −9 LayoutTests/fast/transforms/scrollIntoView-transformed-expected.txt
  3. +51 −26 LayoutTests/fast/transforms/scrollIntoView-transformed.html
@@ -1,3 +1,18 @@
2010-07-18 Dean Jackson <dino@apple.com>

Unreviewed (although this was discussed with SimonF in
original review).

https://bugs.webkit.org/show_bug.cgi?id=41259

Unfortunately the test in the previous commit is platform
specific (I was hoping it would not be) and is failing
the bots. This update exercises the same thing, but doesn't
check for exact values.

* fast/transforms/scrollIntoView-transformed-expected.txt:
* fast/transforms/scrollIntoView-transformed.html:

2010-07-18 Dean Jackson <dino@apple.com>

Reviewed by Simon Fraser.
@@ -65,14 +65,10 @@ Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor


this is a div scroll trigger with a transform
PASS - Element a had scrollTop: 224
PASS - Element a and Element b had different scrollTop
PASS - Element b had scrollTop: 0
PASS - Element c had scrollTop: 233
PASS - Element d had scrollTop: 233
PASS - Element e had scrollTop: 221
PASS - Element f had scrollTop: 221
PASS - Element g had scrollTop: 238
PASS - Element h had scrollTop: 238
PASS - Element i had scrollTop: 255
PASS - Element j had scrollTop: 255
PASS - Element c and Element c-transformed both had the same scrollTop
PASS - Element d and Element d-transformed both had the same scrollTop
PASS - Element e and Element e-transformed both had the same scrollTop
PASS - Element f and Element f-transformed both had the same scrollTop

@@ -1,19 +1,14 @@
<title>Select element scrolling when in transformed container</title>
<script>

const expectedValues = [
["a", 224],
["b", 0],
["c", 233],
["d", 233],
["e", 221],
["f", 221],
["g", 238],
["h", 238],
["i", 255],
["j", 255]
const sameValues = [
["c", "c-transformed"],
["d", "d-transformed"],
["e", "e-transformed"],
["f", "f-transformed"]
];


function test()
{
if (window.layoutTestController) {
@@ -32,15 +27,45 @@
}

var resultString = "";
for (i=0; i < expectedValues.length; i++) {
var id = expectedValues[i][0];
var expectedScrollTop = expectedValues[i][1];
var element = document.getElementById(id);
var currentScrollTop = element.scrollTop;
if (expectedScrollTop != currentScrollTop) {
resultString += "FAIL - Element " + id + " had scrollTop: " + currentScrollTop + " should be " + expectedScrollTop + "<br>";
var id1, id2, element1, element2, scrollTop1, scrollTop2;

// The test results should be (for scrollTop)
// a != b
// b == 0
// c == c-transformed
// d == c-transformed
// e == c-transformed
// f == c-transformed

id1 = "a";
id2 = "b";
element1 = document.getElementById(id1);
element2 = document.getElementById(id2);
scrollTop1 = element1.scrollTop;
scrollTop2 = element2.scrollTop;
if (scrollTop1 != scrollTop2) {
resultString += "PASS - Element " + id1 + " and Element " + id2 + " had different scrollTop<br>";
} else {
resultString += "FAIL - Element " + id1 + " and Element " + id2 + " had identical scrollTop<br>";
}

if (scrollTop2 == 0) {
resultString += "PASS - Element " + id2 + " had scrollTop: 0<br>";
} else {
resultString += "FAIL - Element " + id2 + " had a non-zero scrollTop: " + scrollTop2 + "<br>";
}

for (i=0; i < sameValues.length; i++) {
id1 = sameValues[i][0];
id2 = sameValues[i][1];
element1 = document.getElementById(id1);
element2 = document.getElementById(id2);
scrollTop1 = element1.scrollTop;
scrollTop2 = element2.scrollTop;
if (scrollTop1 == scrollTop2) {
resultString += "PASS - Element " + id1 + " and Element " + id2 + " both had the same scrollTop<br>";
} else {
resultString += "PASS - Element " + id + " had scrollTop: " + currentScrollTop + "<br>";
resultString += "FAIL - Element " + id1 + " had scrollTop: " + scrollTop1 + " and Element " + id2 + " had scrollTop: " + scrollTop2 + "<br>";
}
}

@@ -139,7 +164,7 @@
</div>
</div>

<div class="container" id="d">
<div class="container" id="c-transformed">
<div class="scrolled offset">
<p>
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
@@ -153,7 +178,7 @@

<br>

<div class="container" id="e">
<div class="container" id="d">
<div class="scrolled">
<p>
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
@@ -165,7 +190,7 @@
</div>
</div>

<div class="container" id="f">
<div class="container" id="d-transformed">
<div class="scrolled offset">
<p>
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
@@ -179,7 +204,7 @@

<br>

<div class="container" id="g">
<div class="container" id="e">
<div class="scrolled">
<p>
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
@@ -191,7 +216,7 @@
</div>
</div>

<div class="container" id="h">
<div class="container" id="e-transformed">
<div class="scrolled offset">
<p>
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
@@ -205,7 +230,7 @@

<br>

<div class="container" id="i">
<div class="container" id="f">
<div class="scrolled">
<p>
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
@@ -217,7 +242,7 @@
</div>
</div>

<div class="container" id="j">
<div class="container" id="f-transformed">
<div class="scrolled offset">
<p>
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

0 comments on commit 458e13b

Please sign in to comment.