diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog index 71ea024141721b011c0c03d731265d7c99440b8e..680215b2aedb3ac1be2d55065a8a694f83bb4da1 100644 --- a/LayoutTests/ChangeLog +++ b/LayoutTests/ChangeLog @@ -1,3 +1,17 @@ +2009-09-14 Andrew Richards + + Reviewed by Sam Weinig. + + Document.elementFromPoint() and Document.caretRangeFromPoint() returning null at points visible only after scrolling. + https://bugs.webkit.org/show_bug.cgi?id=29245 + + Extend tests to include hits in areas that are not in the initial containing block of the page. + + * fast/dom/Document/CaretRangeFromPoint/hittest-relative-to-viewport-expected.txt: + * fast/dom/Document/CaretRangeFromPoint/hittest-relative-to-viewport.html: + * fast/dom/elementFromPoint-relative-to-viewport-expected.txt: + * fast/dom/elementFromPoint-relative-to-viewport.html: + 2009-09-15 Jungshik Shin Reviewed by Eric Seidel diff --git a/LayoutTests/fast/dom/Document/CaretRangeFromPoint/hittest-relative-to-viewport-expected.txt b/LayoutTests/fast/dom/Document/CaretRangeFromPoint/hittest-relative-to-viewport-expected.txt index d2eda151bb94b5fa1abcec7bfeb9de8c15d12f14..b41c6251d5f50230626497d6f8ba26ff6fe0e8fa 100644 --- a/LayoutTests/fast/dom/Document/CaretRangeFromPoint/hittest-relative-to-viewport-expected.txt +++ b/LayoutTests/fast/dom/Document/CaretRangeFromPoint/hittest-relative-to-viewport-expected.txt @@ -1,14 +1,27 @@ -This box is here to create scrollbars. -Testing with no scroll -PASS: range.startContainer == element.firstChild. -PASS: range.startOffset == 0. -Test scrolling down -PASS: range.startContainer == element.firstChild. -PASS: range.startOffset == 12. -Test scrolling right -PASS: range.startContainer == element.firstChild. -PASS: range.startOffset == 2. -Test scrolling down and right -PASS: range.startContainer == element.firstChild. -PASS: range.startOffset == 14. +This checks for proper behavior of caretRangeFromPoint before and after scrolling. + +On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". + + +PASS Range.startContainer check (got [object Text], expected [object Text]) +PASS Range.startOffset check (got 0, expected 0) +PASS Range.startContainer check (got [object Text], expected [object Text]) +PASS Range.startOffset check (got 12, expected 12) +PASS Range.startContainer check (got [object Text], expected [object Text]) +PASS Range.startOffset check (got 2, expected 2) +PASS Range.startContainer check (got [object Text], expected [object Text]) +PASS Range.startOffset check (got 14, expected 14) + +PASS Range.startContainer check (got [object Text], expected [object Text]) +PASS Range.startOffset check (got 0, expected 0) +PASS Range.startContainer check (got [object Text], expected [object Text]) +PASS Range.startOffset check (got 12, expected 12) +PASS Range.startContainer check (got [object Text], expected [object Text]) +PASS Range.startOffset check (got 2, expected 2) +PASS Range.startContainer check (got [object Text], expected [object Text]) +PASS Range.startOffset check (got 14, expected 14) + +PASS successfullyParsed is true + +TEST COMPLETE diff --git a/LayoutTests/fast/dom/Document/CaretRangeFromPoint/hittest-relative-to-viewport.html b/LayoutTests/fast/dom/Document/CaretRangeFromPoint/hittest-relative-to-viewport.html index 57a359d8aa59d3dc5771f33ecb962a8e92c588c9..0d0cd1fe211ff57cabf616f51a9d365a397d657d 100644 --- a/LayoutTests/fast/dom/Document/CaretRangeFromPoint/hittest-relative-to-viewport.html +++ b/LayoutTests/fast/dom/Document/CaretRangeFromPoint/hittest-relative-to-viewport.html @@ -1,87 +1,93 @@ - - - - + - function swapInLog() - { - var element = document.getElementById('test'); - var parent = element.parentNode; - if (window.layoutTestController) - parent.removeChild(element); - var console = document.createElement("pre"); - console.textContent = _log; - parent.appendChild(console); - } +
+
xxxxx xxxxx xxxxx xxxxx
+
This box is here to create scrollbars.
+
xxxxx xxxxx xxxxx xxxxx
+
This box is here to create additional space for the hit tests which must initially be in the scroll area.
+
+ +

+
- var element; + - - -
xxxxx xxxxx xxxxx xxxxx
-
This box is here to create scrollbars.
- - + successfullyParsed = true; + + diff --git a/LayoutTests/fast/dom/elementFromPoint-relative-to-viewport-expected.txt b/LayoutTests/fast/dom/elementFromPoint-relative-to-viewport-expected.txt index 91c3961bfd2e9c9060a02c401ab625d1cef40a75..c88a511940022c9d985790dca13f43d810fa2b6d 100644 --- a/LayoutTests/fast/dom/elementFromPoint-relative-to-viewport-expected.txt +++ b/LayoutTests/fast/dom/elementFromPoint-relative-to-viewport-expected.txt @@ -3,10 +3,14 @@ This test document.elementFromPoint is evaluated in with respect to the viewport On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". -PASS unscrolledBox is '0' -PASS scrolledDownBox is '15' -PASS scrolledRightBox is '3' -PASS scrolledDownAndRightBox is '18' +PASS unscrolledBoxInitial is '0' +PASS scrolledDownBoxInitial is '15' +PASS scrolledRightBoxInitial is '3' +PASS scrolledDownAndRightBoxInitial is '18' +PASS unscrolledBoxOffscreen is '0' +PASS scrolledDownBoxOffscreen is '15' +PASS scrolledRightBoxOffscreen is '3' +PASS scrolledDownAndRightBoxOffscreen is '18' PASS successfullyParsed is true TEST COMPLETE diff --git a/LayoutTests/fast/dom/elementFromPoint-relative-to-viewport.html b/LayoutTests/fast/dom/elementFromPoint-relative-to-viewport.html index 2936943d202d8ee9a7bf505f9d2be5322a15aa67..4ae3841f4f0c8387e6224c6baf9d2bcea955bafc 100644 --- a/LayoutTests/fast/dom/elementFromPoint-relative-to-viewport.html +++ b/LayoutTests/fast/dom/elementFromPoint-relative-to-viewport.html @@ -1,8 +1,9 @@ -

-

-
-
This box is here to create scrollbars.
+
+
This box is here to create scrollbars.
+
+
This box is here to create even more scrollbars!
+

+