Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
2008-07-18 Maxime Britto <britto@apple.com>
Reviewed by Adele. Fixed <rdar://problem/6049803> Prevent the autoscroll to trigger in WebClips when starting or hovering on an editable field. Test: fast/events/autoscroll-with-non-scrollable-parent.html * ChangeLog: * page/EventHandler.cpp: Edited (WebCore::EventHandler::handleMousePressEvent): changed the name of the funtion called to canBeProgramaticallyScrolled() (WebCore::EventHandler::handleMouseDraggedEvent): prevent the autoscroll to keep looking for a renderer when it's already triggered * rendering/RenderLayer.cpp: (WebCore::RenderLayer::scrollRectToVisible): verifies that the top layer can be programmatically scrolled before asking him to make the rect visible * rendering/RenderListBox.h: (WebCore::RenderListBox::canBeProgramaticallyScrolled): * rendering/RenderObject.cpp: (WebCore::RenderObject::canBeProgramaticallyScrolled): Edited : For the 3rd case we want document's renderer to have scrollbar as it's the top layer (WebCore::RenderObject::hasScrollableView): Verifies that the Object has a view with scrollBars * rendering/RenderObject.h: Renamed shouldAutosroll() for canBeProgramaticallyScrolled() * rendering/RenderTextControl.h: (WebCore::RenderTextControl::canBeProgramaticallyScrolled): 2008-07-18 Adele Peterson & Maxime Britto <britto@apple.com> Reviewed by Adele. Test for <rdar://problem/6049803> Autoscroll triggered on no scrolling iframes * ChangeLog: * fast/events/autoscroll-with-non-scrollable-parent-expected.txt: Added. * fast/events/autoscroll-with-non-scrollable-parent.html: Added. * fast/events/resources/big-page-with-input.html: Added. Canonical link: https://commits.webkit.org/27675@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@35244 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
Maxime Britto
committed
Jul 19, 2008
1 parent
03b5238
commit f4143a825eec8759e2f183c8cd062e8ad682da32
Showing
11 changed files
with
128 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -0,0 +1,5 @@ | ||
|
||
rdar://problem/6049803 | ||
To do the test manually you have to try triggering the autoscroll by starting the dragging from within the text field. If the autoscroll occurs the text has FAILED since the containing iframe has scrolling=no else it has PASSED. | ||
Though you should be able to write some long text in the input and to trigger the autoscroll within the input. | ||
PASSED |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -0,0 +1,62 @@ | ||
<html> | ||
<head> | ||
<script> | ||
function log(msg) | ||
{ | ||
document.getElementById('console').appendChild(document.createTextNode(msg + '\n')); | ||
} | ||
|
||
function test() | ||
{ | ||
if (window.layoutTestController) { | ||
layoutTestController.waitUntilDone(); | ||
layoutTestController.dumpAsText(); | ||
setTimeout(autoscrollTestPart1, 0); | ||
} | ||
} | ||
|
||
function autoscrollTestPart1() | ||
{ | ||
var iframe = document.getElementById('NoScrolliFrame'); | ||
var iframeDocument = iframe.contentDocument; | ||
var input = iframeDocument.getElementById('inp'); | ||
if (window.eventSender) { | ||
var x = iframe.offsetLeft + input.offsetLeft + 7; | ||
var y = iframe.offsetLeft + input.offsetTop + 7; | ||
eventSender.dragMode = false; | ||
eventSender.mouseMoveTo(x, y); | ||
eventSender.mouseDown(); | ||
eventSender.mouseMoveTo(x + 20, y); | ||
eventSender.mouseMoveTo(x + 600, y); | ||
} | ||
setTimeout(autoscrollTestPart2, 100); | ||
} | ||
|
||
function autoscrollTestPart2() | ||
{ | ||
if (window.eventSender) | ||
eventSender.mouseUp(); | ||
|
||
var iframe = document.getElementById('NoScrolliFrame'); | ||
var iframeDocument = iframe.contentDocument; | ||
if (iframeDocument.body.scrollLeft != 0) | ||
log("FAILED : " + iframeDocument.body.scrollLeft + " pixels have been scrolled"); | ||
else | ||
log("PASSED"); | ||
|
||
if (window.layoutTestController) | ||
layoutTestController.notifyDone(); | ||
} | ||
</script> | ||
</head> | ||
<body onload="test()"> | ||
<iframe id="NoScrolliFrame" scrolling="no" style="height: 100px; width: 100px" src="resources/big-page-with-input.html"></iframe> | ||
<div id="console"> | ||
rdar://problem/6049803 <br> | ||
To do the test manually you have to try triggering the autoscroll by starting the dragging from within the text field. If the autoscroll occurs the text has FAILED since the containing iframe has scrolling=no else it has PASSED.<br> | ||
Though you should be able to write some long text in the input and to trigger the autoscroll within the input.<br> | ||
</div> | ||
|
||
</body> | ||
</html> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -0,0 +1,8 @@ | ||
<html> | ||
<body> | ||
<div style="width: 400px; height: 400px; background-color: blue"> | ||
<input id="inp" size=5> | ||
</div> | ||
</body> | ||
</html> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters