[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
commit-queue at webkit.org
commit-queue at webkit.org
Wed Dec 22 13:22:08 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 4a8bb26c277332ed10bda02892ddc229d56bd304
Author: commit-queue at webkit.org <commit-queue at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Mon Sep 13 06:24:41 2010 +0000
2010-09-12 Robin Qiu <robin.qiu at 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 at 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
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 1ac9c36..4339b0d 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,18 @@
+2010-09-12 Robin Qiu <robin.qiu at 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 at webkit.org>
Revert mistaken changes to test baselines.
diff --git a/LayoutTests/scrollbars/resources/scrollable-iframe.html b/LayoutTests/scrollbars/resources/scrollable-iframe.html
new file mode 100644
index 0000000..b2b3fae
--- /dev/null
+++ b/LayoutTests/scrollbars/resources/scrollable-iframe.html
@@ -0,0 +1,5 @@
+<html>
+ <body>
+ <div id="fillDIV" style="background-color:lightblue;width:400px;height:400px;overflow:hidden;"> </div>
+ </body>
+</html>
diff --git a/LayoutTests/scrollbars/scrollevent-iframe-no-scrolling-expected.txt b/LayoutTests/scrollbars/scrollevent-iframe-no-scrolling-expected.txt
new file mode 100644
index 0000000..869f4cd
--- /dev/null
+++ b/LayoutTests/scrollbars/scrollevent-iframe-no-scrolling-expected.txt
@@ -0,0 +1,2 @@
+Scrolled by JavaScript scrollTo(): PASS
+
diff --git a/LayoutTests/scrollbars/scrollevent-iframe-no-scrolling-wheel-expected.txt b/LayoutTests/scrollbars/scrollevent-iframe-no-scrolling-wheel-expected.txt
new file mode 100644
index 0000000..32d23cb
--- /dev/null
+++ b/LayoutTests/scrollbars/scrollevent-iframe-no-scrolling-wheel-expected.txt
@@ -0,0 +1,2 @@
+Not scrolled by WheelEvent: SUCCESS
+
diff --git a/LayoutTests/scrollbars/scrollevent-iframe-no-scrolling-wheel.html b/LayoutTests/scrollbars/scrollevent-iframe-no-scrolling-wheel.html
new file mode 100644
index 0000000..9ddb5d8
--- /dev/null
+++ b/LayoutTests/scrollbars/scrollevent-iframe-no-scrolling-wheel.html
@@ -0,0 +1,35 @@
+<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>
+
diff --git a/LayoutTests/scrollbars/scrollevent-iframe-no-scrolling.html b/LayoutTests/scrollbars/scrollevent-iframe-no-scrolling.html
new file mode 100644
index 0000000..b7b6435
--- /dev/null
+++ b/LayoutTests/scrollbars/scrollevent-iframe-no-scrolling.html
@@ -0,0 +1,33 @@
+<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>
+
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 9feafe4..39d65b3 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,23 @@
+2010-09-12 Robin Qiu <robin.qiu at 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 at google.com>
Reviewed by Tony Chang.
diff --git a/WebCore/page/FrameView.cpp b/WebCore/page/FrameView.cpp
index df4930f..27a7737 100644
--- a/WebCore/page/FrameView.cpp
+++ b/WebCore/page/FrameView.cpp
@@ -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.
diff --git a/WebCore/page/FrameView.h b/WebCore/page/FrameView.h
index 8ab38a3..b0b2d18 100644
--- a/WebCore/page/FrameView.h
+++ b/WebCore/page/FrameView.h
@@ -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;
diff --git a/WebCore/platform/ScrollView.cpp b/WebCore/platform/ScrollView.cpp
index 679de83..61271ac 100644
--- a/WebCore/platform/ScrollView.cpp
+++ b/WebCore/platform/ScrollView.cpp
@@ -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;
diff --git a/WebCore/platform/ScrollView.h b/WebCore/platform/ScrollView.h
index 94fa671..925e581 100644
--- a/WebCore/platform/ScrollView.h
+++ b/WebCore/platform/ScrollView.h
@@ -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.
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list