WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
Same patch, style complaints addressed
bug-33373.diff (text/plain), 6.76 KB, created by
Andreas Kling
on 2010-01-11 09:48:09 PST
(
hide
)
Description:
Same patch, style complaints addressed
Filename:
MIME Type:
Creator:
Andreas Kling
Created:
2010-01-11 09:48:09 PST
Size:
6.76 KB
patch
obsolete
>diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog >index d5560d0..93653c4 100644 >--- a/WebCore/ChangeLog >+++ b/WebCore/ChangeLog >@@ -1,3 +1,26 @@ >+2010-01-11 Andreas Kling <andreas.kling@nokia.com> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ [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-11 Joanmarie Diggs <joanmarie.diggs@gmail.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 8eaf455..750483e 100644 >--- a/WebKitTools/ChangeLog >+++ b/WebKitTools/ChangeLog >@@ -1,3 +1,14 @@ >+2010-01-11 Andreas Kling <andreas.kling@nokia.com> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ [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-10 Adam Barth <abarth@webkit.org> > > Rubber stamped by David Kilzer. >diff --git a/WebKitTools/QtLauncher/main.cpp b/WebKitTools/QtLauncher/main.cpp >index ddf8729..30fa79f 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());
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 33373
:
46127
|
46284
| 46285