[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
andreas.kling at nokia.com
andreas.kling at nokia.com
Wed Dec 22 15:26:25 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 77e5709785a246952a9f4dc0119327f17cbc24bb
Author: andreas.kling at nokia.com <andreas.kling at nokia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Nov 3 15:00:45 2010 +0000
2010-11-03 Kenneth Rohde Christiansen <kenneth at webkit.org>
Reviewed by Andreas Kling.
Make it possible to delegate scrolling to the UI
https://bugs.webkit.org/show_bug.cgi?id=48907
Enable scrolling delegation when setResizesToContents is active.
* Api/qgraphicswebview.cpp:
(QGraphicsWebView::setResizesToContents):
2010-11-03 Kenneth Rohde Christiansen <kenneth at webkit.org>
Reviewed by Andreas Kling.
Make it possible to delegate scrolling to the UI
https://bugs.webkit.org/show_bug.cgi?id=48907
Add a WebCore setting for delegating scrolling to the actual
WebKit view, which means that setScrollPosition will call
scrollContents directly without going though the scrollbar
code.
* page/FrameView.cpp:
(WebCore::FrameView::delegatesScrolling):
* page/FrameView.h:
* page/Settings.cpp:
(WebCore::Settings::Settings):
(WebCore::Settings::setShouldDelegateScrolling):
* page/Settings.h:
(WebCore::Settings::shouldDelegateScrolling):
* platform/ScrollView.cpp:
(WebCore::ScrollView::setScrollPosition):
* platform/ScrollView.h:
(WebCore::ScrollView::delegatesScrolling):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@71239 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index e9de53d..a9c81b6 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,28 @@
+2010-11-03 Kenneth Rohde Christiansen <kenneth at webkit.org>
+
+ Reviewed by Andreas Kling.
+
+ Make it possible to delegate scrolling to the UI
+ https://bugs.webkit.org/show_bug.cgi?id=48907
+
+ Add a WebCore setting for delegating scrolling to the actual
+ WebKit view, which means that setScrollPosition will call
+ scrollContents directly without going though the scrollbar
+ code.
+
+ * page/FrameView.cpp:
+ (WebCore::FrameView::delegatesScrolling):
+ * page/FrameView.h:
+ * page/Settings.cpp:
+ (WebCore::Settings::Settings):
+ (WebCore::Settings::setShouldDelegateScrolling):
+ * page/Settings.h:
+ (WebCore::Settings::shouldDelegateScrolling):
+ * platform/ScrollView.cpp:
+ (WebCore::ScrollView::setScrollPosition):
+ * platform/ScrollView.h:
+ (WebCore::ScrollView::delegatesScrolling):
+
2010-11-03 Patrick Gansterer <paroga at webkit.org>
Reviewed by Adam Roben.
diff --git a/WebCore/page/FrameView.cpp b/WebCore/page/FrameView.cpp
index 638620a..b54cfa0 100644
--- a/WebCore/page/FrameView.cpp
+++ b/WebCore/page/FrameView.cpp
@@ -349,6 +349,16 @@ void FrameView::setMarginHeight(int h)
m_margins.setHeight(h);
}
+bool FrameView::delegatesScrolling()
+{
+ ASSERT(m_frame);
+
+ if (parent())
+ return false;
+
+ return m_frame->settings() && m_frame->settings()->shouldDelegateScrolling();
+}
+
bool FrameView::avoidScrollbarCreation()
{
ASSERT(m_frame);
diff --git a/WebCore/page/FrameView.h b/WebCore/page/FrameView.h
index 7d6591b..79020d0 100644
--- a/WebCore/page/FrameView.h
+++ b/WebCore/page/FrameView.h
@@ -76,6 +76,7 @@ public:
virtual PassRefPtr<Scrollbar> createScrollbar(ScrollbarOrientation);
+ virtual bool delegatesScrolling();
virtual bool avoidScrollbarCreation();
virtual void setContentsSize(const IntSize&);
diff --git a/WebCore/page/Settings.cpp b/WebCore/page/Settings.cpp
index 63633bf..7e9232f 100644
--- a/WebCore/page/Settings.cpp
+++ b/WebCore/page/Settings.cpp
@@ -114,6 +114,7 @@ Settings::Settings(Page* page)
, m_javaScriptCanOpenWindowsAutomatically(false)
, m_javaScriptCanAccessClipboard(false)
, m_shouldPrintBackgrounds(false)
+ , m_shouldDelegateScrolling(false)
, m_textAreasAreResizable(false)
#if ENABLE(DASHBOARD_SUPPORT)
, m_usesDashboardBackwardCompatibilityMode(false)
@@ -365,6 +366,11 @@ void Settings::setShouldPrintBackgrounds(bool shouldPrintBackgrounds)
m_shouldPrintBackgrounds = shouldPrintBackgrounds;
}
+void Settings::setShouldDelegateScrolling(bool shouldDelegateScrolling)
+{
+ m_shouldDelegateScrolling = shouldDelegateScrolling;
+}
+
void Settings::setTextAreasAreResizable(bool textAreasAreResizable)
{
if (m_textAreasAreResizable == textAreasAreResizable)
diff --git a/WebCore/page/Settings.h b/WebCore/page/Settings.h
index b8d7a31..03998cc 100644
--- a/WebCore/page/Settings.h
+++ b/WebCore/page/Settings.h
@@ -170,6 +170,9 @@ namespace WebCore {
void setShouldPrintBackgrounds(bool);
bool shouldPrintBackgrounds() const { return m_shouldPrintBackgrounds; }
+ void setShouldDelegateScrolling(bool);
+ bool shouldDelegateScrolling() const { return m_shouldDelegateScrolling; }
+
void setTextAreasAreResizable(bool);
bool textAreasAreResizable() const { return m_textAreasAreResizable; }
@@ -375,6 +378,7 @@ namespace WebCore {
bool m_javaScriptCanOpenWindowsAutomatically : 1;
bool m_javaScriptCanAccessClipboard : 1;
bool m_shouldPrintBackgrounds : 1;
+ bool m_shouldDelegateScrolling : 1;
bool m_textAreasAreResizable : 1;
#if ENABLE(DASHBOARD_SUPPORT)
bool m_usesDashboardBackwardCompatibilityMode : 1;
diff --git a/WebCore/platform/ScrollView.cpp b/WebCore/platform/ScrollView.cpp
index 63e9427..32dafd2 100644
--- a/WebCore/platform/ScrollView.cpp
+++ b/WebCore/platform/ScrollView.cpp
@@ -329,6 +329,11 @@ void ScrollView::setScrollPosition(const IntPoint& scrollPoint)
return;
}
+ if (delegatesScrolling()) {
+ scrollContents(IntSize(scrollPoint.x(), scrollPoint.y()));
+ return;
+ }
+
IntPoint newScrollPosition = scrollPoint.shrunkTo(maximumScrollPosition());
newScrollPosition.clampNegativeToZero();
diff --git a/WebCore/platform/ScrollView.h b/WebCore/platform/ScrollView.h
index 89f037f..22e487d 100644
--- a/WebCore/platform/ScrollView.h
+++ b/WebCore/platform/ScrollView.h
@@ -104,6 +104,7 @@ public:
virtual void setCanHaveScrollbars(bool);
bool canHaveScrollbars() const { return horizontalScrollbarMode() != ScrollbarAlwaysOff || verticalScrollbarMode() != ScrollbarAlwaysOff; }
+ virtual bool delegatesScrolling() { return false; }
virtual bool avoidScrollbarCreation() { return false; }
// By default you only receive paint events for the area that is visible. In the case of using a
diff --git a/WebKit/qt/Api/qgraphicswebview.cpp b/WebKit/qt/Api/qgraphicswebview.cpp
index df28626..1ae52de 100644
--- a/WebKit/qt/Api/qgraphicswebview.cpp
+++ b/WebKit/qt/Api/qgraphicswebview.cpp
@@ -821,6 +821,7 @@ void QGraphicsWebView::setResizesToContents(bool enabled)
if (d->resizesToContents == enabled)
return;
d->resizesToContents = enabled;
+ d->page->d->page->settings()->setShouldDelegateScrolling(enabled);
if (d->page)
d->updateResizesToContentsForPage();
}
diff --git a/WebKit/qt/ChangeLog b/WebKit/qt/ChangeLog
index 150512f..f0a2e15 100644
--- a/WebKit/qt/ChangeLog
+++ b/WebKit/qt/ChangeLog
@@ -1,3 +1,15 @@
+2010-11-03 Kenneth Rohde Christiansen <kenneth at webkit.org>
+
+ Reviewed by Andreas Kling.
+
+ Make it possible to delegate scrolling to the UI
+ https://bugs.webkit.org/show_bug.cgi?id=48907
+
+ Enable scrolling delegation when setResizesToContents is active.
+
+ * Api/qgraphicswebview.cpp:
+ (QGraphicsWebView::setResizesToContents):
+
2010-11-03 Daniel Bates <dbates at rim.com>
For unnamed frames, window.name returns a generated name
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list