2010-09-12 Robin Qiu <robin.qiu@torchmobile.com.cn>

        Reviewed by Antonio Gomes.

        https://bugs.webkit.org/show_bug.cgi?id=18768
        Fixed a bug in scroll flow. When we don't have scrollbars, we need to
        repaintFixedElementsAfterScrolling(), sendScrollEvent() ... as well as
        scrollContents();

        * scrollbars/resources/scrollable-iframe.html: Added.
        * scrollbars/scrollevent-iframe-no-scrolling-expected.txt: Added.
        * scrollbars/scrollevent-iframe-no-scrolling-wheel-expected.txt: Added.
        * scrollbars/scrollevent-iframe-no-scrolling-wheel.html: Added.
        * scrollbars/scrollevent-iframe-no-scrolling.html: Added.
2010-09-12  Robin Qiu  <robin.qiu@torchmobile.com.cn>

        Reviewed by Antonio Gomes.

        https://bugs.webkit.org/show_bug.cgi?id=18768
        Fixed a bug in scroll flow. When we don't have scrollbars, we need to
        repaintFixedElementsAfterScrolling(), sendScrollEvent() ... as well as
        scrollContents();

        Tests: scrollbars/scrollevent-iframe-no-scrolling-wheel.html
               scrollbars/scrollevent-iframe-no-scrolling.html

        * page/FrameView.cpp:
        (WebCore::FrameView::valueChanged): Added.
        * page/FrameView.h: Added a new method.
        * platform/ScrollView.cpp:
        (WebCore::ScrollView::valueChanged): Added.
        (WebCore::ScrollView::updateScrollbars):
        * platform/ScrollView.h: Added a new method.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@67365 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent f4e6a522
2010-09-12 Robin Qiu <robin.qiu@torchmobile.com.cn>
Reviewed by Antonio Gomes.
https://bugs.webkit.org/show_bug.cgi?id=18768
Fixed a bug in scroll flow. When we don't have scrollbars, we need to
repaintFixedElementsAfterScrolling(), sendScrollEvent() ... as well as
scrollContents();
* scrollbars/resources/scrollable-iframe.html: Added.
* scrollbars/scrollevent-iframe-no-scrolling-expected.txt: Added.
* scrollbars/scrollevent-iframe-no-scrolling-wheel-expected.txt: Added.
* scrollbars/scrollevent-iframe-no-scrolling-wheel.html: Added.
* scrollbars/scrollevent-iframe-no-scrolling.html: Added.
2010-09-12 Adam Barth <abarth@webkit.org>
Revert mistaken changes to test baselines.
<html>
<body>
<div id="fillDIV" style="background-color:lightblue;width:400px;height:400px;overflow:hidden;"> </div>
</body>
</html>
<html>
<head>
<script>
if (window.layoutTestController) {
layoutTestController.dumpAsText();
layoutTestController.waitUntilDone();
}
function timeoutFired()
{
document.getElementById('console').innerHTML = "Not scrolled by WheelEvent: SUCCESS";
if (window.layoutTestController)
window.layoutTestController.notifyDone();
}
function scrollEventFired()
{
document.getElementById('console').innerHTML = "Scrolled by WheelEvent: FAILED (Should not be scrolled).";
if (window.layoutTestController)
window.layoutTestController.notifyDone();
}
function runTest()
{
window.frames[0].onscroll = scrollEventFired;
if (window.frames[0].eventSender) {
window.frames[0].eventSender.mouseScrollBy(0, -1);
}
setTimeout("timeoutFired()", 1000);
}
</script>
</head>
<body>
<div id="console"></div>
<iframe onload="runTest();" scrolling="no" style="width:200px;height:200px;" src="resources/scrollable-iframe.html">
</body>
</html>
<html>
<head>
<script>
if (window.layoutTestController) {
layoutTestController.dumpAsText();
layoutTestController.waitUntilDone();
}
function timeoutFired()
{
document.getElementById('console').innerHTML = "Scrolled by JavaScript scrollTo(): FAILED";
if (window.layoutTestController)
window.layoutTestController.notifyDone();
}
function scrollEventFired()
{
document.getElementById('console').innerHTML = "Scrolled by JavaScript scrollTo(): PASS";
if (window.layoutTestController)
window.layoutTestController.notifyDone();
}
function runTest()
{
window.frames[0].onscroll = scrollEventFired;
window.frames[0].scrollTo(0, 50);
setTimeout("timeoutFired()", 1000);
}
</script>
</head>
<body>
<div id="console"></div>
<iframe onload="runTest();" scrolling="no" style="width:200px;height:200px;" src="resources/scrollable-iframe.html">
</body>
</html>
2010-09-12 Robin Qiu <robin.qiu@torchmobile.com.cn>
Reviewed by Antonio Gomes.
https://bugs.webkit.org/show_bug.cgi?id=18768
Fixed a bug in scroll flow. When we don't have scrollbars, we need to
repaintFixedElementsAfterScrolling(), sendScrollEvent() ... as well as
scrollContents();
Tests: scrollbars/scrollevent-iframe-no-scrolling-wheel.html
scrollbars/scrollevent-iframe-no-scrolling.html
* page/FrameView.cpp:
(WebCore::FrameView::valueChanged): Added.
* page/FrameView.h: Added a new method.
* platform/ScrollView.cpp:
(WebCore::ScrollView::valueChanged): Added.
(WebCore::ScrollView::updateScrollbars):
* platform/ScrollView.h: Added a new method.
2010-09-10 MORITA Hajime <morrita@google.com>
Reviewed by Tony Chang.
......@@ -1790,6 +1790,13 @@ void FrameView::valueChanged(Scrollbar* bar)
frame()->loader()->client()->didChangeScrollOffset();
}
void FrameView::valueChanged(const IntSize& scrollDelta)
{
ScrollView::valueChanged(scrollDelta);
frame()->eventHandler()->sendScrollEvent();
frame()->loader()->client()->didChangeScrollOffset();
}
void FrameView::invalidateScrollbarRect(Scrollbar* scrollbar, const IntRect& rect)
{
// Add in our offset within the FrameView.
......
......@@ -269,6 +269,7 @@ private:
// ScrollBarClient interface
virtual void valueChanged(Scrollbar*);
virtual void valueChanged(const IntSize&);
virtual void invalidateScrollbarRect(Scrollbar*, const IntRect&);
virtual bool isActive() const;
virtual void getTickmarks(Vector<IntRect>&) const;
......
......@@ -310,6 +310,15 @@ void ScrollView::valueChanged(Scrollbar* scrollbar)
scrollContents(scrollDelta);
}
void ScrollView::valueChanged(const IntSize& scrollDelta)
{
if (scrollbarsSuppressed())
return;
repaintFixedElementsAfterScrolling();
scrollContents(scrollDelta);
}
void ScrollView::setScrollPosition(const IntPoint& scrollPoint)
{
if (prohibitsScrolling())
......@@ -494,7 +503,7 @@ void ScrollView::updateScrollbars(const IntSize& desiredOffset)
IntSize scrollDelta = scroll - m_scrollOffset;
if (scrollDelta != IntSize()) {
m_scrollOffset = scroll;
scrollContents(scrollDelta);
valueChanged(scrollDelta);
}
m_inUpdateScrollbars = false;
......
......@@ -62,6 +62,7 @@ public:
virtual int scrollSize(ScrollbarOrientation orientation) const;
virtual void setScrollOffsetFromAnimation(const IntPoint&);
virtual void valueChanged(Scrollbar*);
virtual void valueChanged(const IntSize&);
// The window thats hosts the ScrollView. The ScrollView will communicate scrolls and repaints to the
// host window in the window's coordinate space.
......
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