summaryrefslogtreecommitdiffstats
path: root/WebCore/platform/qt/ScrollViewQt.cpp
diff options
context:
space:
mode:
authorFeng Qian <fqian@google.com>2009-06-18 18:20:56 -0700
committerFeng Qian <fqian@google.com>2009-06-18 18:20:56 -0700
commit1edef79f87f9c52c21d69c87c19f8e2b140a9119 (patch)
treecad337ef493b0d9710bf3ae478cb87cb534f598d /WebCore/platform/qt/ScrollViewQt.cpp
parentb83fc086000e27bc227580bd0e35b9d7bee1179a (diff)
parentc9c4d65c1547996ed3748026904d6e7f09aec2b4 (diff)
downloadexternal_webkit-1edef79f87f9c52c21d69c87c19f8e2b140a9119.zip
external_webkit-1edef79f87f9c52c21d69c87c19f8e2b140a9119.tar.gz
external_webkit-1edef79f87f9c52c21d69c87c19f8e2b140a9119.tar.bz2
Merge commit 'goog/master-webkit-merge' into webkit-merge-44544
Diffstat (limited to 'WebCore/platform/qt/ScrollViewQt.cpp')
-rw-r--r--WebCore/platform/qt/ScrollViewQt.cpp20
1 files changed, 13 insertions, 7 deletions
diff --git a/WebCore/platform/qt/ScrollViewQt.cpp b/WebCore/platform/qt/ScrollViewQt.cpp
index 76d9f01..48885d3 100644
--- a/WebCore/platform/qt/ScrollViewQt.cpp
+++ b/WebCore/platform/qt/ScrollViewQt.cpp
@@ -36,27 +36,33 @@ namespace WebCore {
void ScrollView::platformInit()
{
- m_widgetsThatPreventBlitting = 0;
+ m_widgetsPreventingBlitting = 0;
}
void ScrollView::platformDestroy()
{
}
-void ScrollView::platformAddChild(Widget* child)
+// Windowed plugins are using native windows and are thus preventing
+// us from doing any kind of scrolling optimization.
+
+void ScrollView::adjustWidgetsPreventingBlittingCount(int delta)
{
- root()->m_widgetsThatPreventBlitting++;
+ m_widgetsPreventingBlitting += delta;
if (parent())
- parent()->platformAddChild(child);
+ parent()->adjustWidgetsPreventingBlittingCount(delta);
+}
+
+void ScrollView::platformAddChild(Widget* child)
+{
+ adjustWidgetsPreventingBlittingCount(1);
}
void ScrollView::platformRemoveChild(Widget* child)
{
- ASSERT(root()->m_widgetsThatPreventBlitting);
- root()->m_widgetsThatPreventBlitting--;
child->hide();
+ adjustWidgetsPreventingBlittingCount(-1);
}
}
-
// vim: ts=4 sw=4 et