[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.18-1-697-g2f78b87
eric at webkit.org
eric at webkit.org
Wed Jan 20 22:24:10 UTC 2010
The following commit has been merged in the debian/unstable branch:
commit 5698575cf18a5ffd9b000f065cfb248e06a65b0e
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Thu Jan 14 12:15:03 2010 +0000
2010-01-14 Andreas Kling <andreas.kling at nokia.com>
Reviewed by Kenneth Rohde Christiansen.
[Qt] Enable scrolling optimization for pages with embedded widgets
https://bugs.webkit.org/show_bug.cgi?id=33373
Added a basic manual test for scrolling of embedded QWidgets.
* manual-tests/qt/qtplugin-scrolling.html: Added.
* platform/ScrollView.cpp:
(WebCore::ScrollView::scrollContents):
(WebCore::ScrollView::setParent):
* platform/ScrollView.h:
* platform/qt/ScrollViewQt.cpp:
(WebCore::ScrollView::platformInit):
(WebCore::ScrollView::platformAddChild):
(WebCore::ScrollView::platformRemoveChild):
* plugins/qt/PluginViewQt.cpp:
(WebCore::PluginView::updatePluginWidget):
(WebCore::PluginView::invalidateRect):
2010-01-14 Andreas Kling <andreas.kling at nokia.com>
Reviewed by Kenneth Rohde Christiansen.
[Qt] Add an "alien_QLabel" classId for manual testing of alien widgets.
https://bugs.webkit.org/show_bug.cgi?id=33373
* QtLauncher/main.cpp:
(WebPage::createPlugin):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@53259 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index be74adf..fe256c4 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,26 @@
+2010-01-14 Andreas Kling <andreas.kling at nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Enable scrolling optimization for pages with embedded widgets
+
+ https://bugs.webkit.org/show_bug.cgi?id=33373
+
+ Added a basic manual test for scrolling of embedded QWidgets.
+
+ * manual-tests/qt/qtplugin-scrolling.html: Added.
+ * platform/ScrollView.cpp:
+ (WebCore::ScrollView::scrollContents):
+ (WebCore::ScrollView::setParent):
+ * platform/ScrollView.h:
+ * platform/qt/ScrollViewQt.cpp:
+ (WebCore::ScrollView::platformInit):
+ (WebCore::ScrollView::platformAddChild):
+ (WebCore::ScrollView::platformRemoveChild):
+ * plugins/qt/PluginViewQt.cpp:
+ (WebCore::PluginView::updatePluginWidget):
+ (WebCore::PluginView::invalidateRect):
+
2009-12-09 Philippe Normand <pnormand at igalia.com>
Reviewed by Xan Lopez.
diff --git a/WebCore/manual-tests/qt/qtplugin-scrolling.html b/WebCore/manual-tests/qt/qtplugin-scrolling.html
new file mode 100644
index 0000000..8503832
--- /dev/null
+++ b/WebCore/manual-tests/qt/qtplugin-scrolling.html
@@ -0,0 +1,32 @@
+<html>
+<head>
+<style>
+ #spacer {
+ width: 100%;
+ height: 1000px;
+ background-color: yellow;
+ }
+</style>
+</head>
+<body>
+
+<p>
+ Scroll the page, ensure that the two labels move nicely along with the rest of the document.
+</p>
+
+<div>
+<object type="application/x-qt-plugin" classid="alien_QLabel" name="label1" height="30"></object>
+</div>
+
+<div>
+<object type="application/x-qt-plugin" classid="QLabel" name="label2" height="30"></object>
+</div>
+
+<div id="spacer"><p> </p></div>
+
+<script>
+document.label1.setText("Label one");
+document.label2.setText("Label two");
+</script>
+</body>
+</html>
diff --git a/WebCore/platform/ScrollView.cpp b/WebCore/platform/ScrollView.cpp
index 137925b..0f6920c 100644
--- a/WebCore/platform/ScrollView.cpp
+++ b/WebCore/platform/ScrollView.cpp
@@ -513,7 +513,7 @@ void ScrollView::scrollContents(const IntSize& scrollDelta)
hostWindow()->repaint(panScrollIconDirtyRect, true);
}
- if (canBlitOnScroll() && !rootPreventsBlitting()) { // The main frame can just blit the WebView window
+ if (canBlitOnScroll()) { // The main frame can just blit the WebView window
// FIXME: Find a way to blit subframes without blitting overlapping content
hostWindow()->scroll(-scrollDelta, scrollViewRect, clipRect);
} else {
@@ -603,14 +603,6 @@ void ScrollView::setParent(ScrollView* parentView)
if (m_scrollbarsAvoidingResizer && parent())
parent()->adjustScrollbarsAvoidingResizerCount(-m_scrollbarsAvoidingResizer);
-#if PLATFORM(QT)
- if (m_widgetsPreventingBlitting && parent())
- parent()->adjustWidgetsPreventingBlittingCount(-m_widgetsPreventingBlitting);
-
- if (m_widgetsPreventingBlitting && parentView)
- parentView->adjustWidgetsPreventingBlittingCount(m_widgetsPreventingBlitting);
-#endif
-
Widget::setParent(parentView);
if (m_scrollbarsAvoidingResizer && parent())
diff --git a/WebCore/platform/ScrollView.h b/WebCore/platform/ScrollView.h
index ca72900..a7173a7 100644
--- a/WebCore/platform/ScrollView.h
+++ b/WebCore/platform/ScrollView.h
@@ -312,16 +312,6 @@ private:
NSScrollView<WebCoreFrameScrollView>* scrollView() const;
#endif
-#if PLATFORM(QT)
-public:
- void adjustWidgetsPreventingBlittingCount(int delta);
-private:
- bool rootPreventsBlitting() const { return root()->m_widgetsPreventingBlitting > 0; }
- unsigned m_widgetsPreventingBlitting;
-#else
- bool rootPreventsBlitting() const { return false; }
-#endif
-
#if PLATFORM(GTK)
public:
void setGtkAdjustments(GtkAdjustment* hadj, GtkAdjustment* vadj);
diff --git a/WebCore/platform/qt/ScrollViewQt.cpp b/WebCore/platform/qt/ScrollViewQt.cpp
index ccbd751..17ad253 100644
--- a/WebCore/platform/qt/ScrollViewQt.cpp
+++ b/WebCore/platform/qt/ScrollViewQt.cpp
@@ -36,32 +36,19 @@ namespace WebCore {
void ScrollView::platformInit()
{
- m_widgetsPreventingBlitting = 0;
}
void ScrollView::platformDestroy()
{
}
-// Windowed plugins are using native windows and are thus preventing
-// us from doing any kind of scrolling optimization.
-
-void ScrollView::adjustWidgetsPreventingBlittingCount(int delta)
-{
- m_widgetsPreventingBlitting += delta;
- if (parent())
- parent()->adjustWidgetsPreventingBlittingCount(delta);
-}
-
void ScrollView::platformAddChild(Widget*)
{
- adjustWidgetsPreventingBlittingCount(1);
}
void ScrollView::platformRemoveChild(Widget* child)
{
child->hide();
- adjustWidgetsPreventingBlittingCount(-1);
}
}
diff --git a/WebCore/plugins/qt/PluginViewQt.cpp b/WebCore/plugins/qt/PluginViewQt.cpp
index fb8ba08..a0315bd 100644
--- a/WebCore/plugins/qt/PluginViewQt.cpp
+++ b/WebCore/plugins/qt/PluginViewQt.cpp
@@ -127,6 +127,10 @@ void PluginView::updatePluginWidget()
// scroll, we need to move/resize immediately.
if (!m_windowRect.intersects(frameView->frameRect()))
setNPWindowIfNeeded();
+
+ // Make sure we get repainted afterwards. This is necessary for downward
+ // scrolling to move the plugin widget properly.
+ invalidate();
}
void PluginView::setFocus()
@@ -644,7 +648,8 @@ NPError PluginView::getValue(NPNVariable variable, void* value)
void PluginView::invalidateRect(const IntRect& rect)
{
if (m_isWindowed) {
- platformWidget()->update(rect);
+ if (platformWidget())
+ platformWidget()->update(rect);
return;
}
diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index 5fcdd67..7b29b52 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,14 @@
+2010-01-14 Andreas Kling <andreas.kling at nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Add an "alien_QLabel" classId for manual testing of alien widgets.
+
+ https://bugs.webkit.org/show_bug.cgi?id=33373
+
+ * QtLauncher/main.cpp:
+ (WebPage::createPlugin):
+
2010-01-14 Eric Seidel <eric at webkit.org>
No review, rolling out r53249.
diff --git a/WebKitTools/QtLauncher/main.cpp b/WebKitTools/QtLauncher/main.cpp
index ddf8729..6c71f86 100644
--- a/WebKitTools/QtLauncher/main.cpp
+++ b/WebKitTools/QtLauncher/main.cpp
@@ -651,6 +651,13 @@ QObject* WebPage::createPlugin(const QString &classId, const QUrl &url, const QS
Q_UNUSED(url);
Q_UNUSED(paramNames);
Q_UNUSED(paramValues);
+
+ if (classId == "alien_QLabel") {
+ QLabel* l = new QLabel;
+ l->winId();
+ return l;
+ }
+
#ifndef QT_NO_UITOOLS
QUiLoader loader;
return loader.createWidget(classId, view());
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list