summaryrefslogtreecommitdiffstats
path: root/xulrunner-qt/firefox-qt.patch
blob: ff4c2636748727a7a0d48da46f9bbfab8a2cbde0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
diff -ur mozilla-1.9.2.orig/widget/src/qt/nsWindow.cpp mozilla-1.9.2/widget/src/qt/nsWindow.cpp
--- mozilla-1.9.2.orig/widget/src/qt/nsWindow.cpp
+++ mozilla-1.9.2/widget/src/qt/nsWindow.cpp
@@ -668,7 +668,7 @@
 
 void
 nsWindow::Scroll(const nsIntPoint& aDelta,
-                 const nsIntRect& aSource,
+                 const nsTArray<nsIntRect>& aDestRects,
                  const nsTArray<nsIWidget::Configuration>& aConfigurations)
 {
     if (!mWidget) {
@@ -695,8 +695,16 @@
         }
     }
 
-    QRect rect(aSource.x, aSource.y, aSource.width, aSource.height);
-    mWidget->scroll(aDelta.x, aDelta.y, rect);
+    // Do a similar thing to what is done in GTK widget set.
+    // Even though it's a workaround from old GTK?
+    for(PRUint32 i = 0; i < aDestRects.Length(); ++i) {
+        const nsIntRect& aSource = aDestRects[i];
+
+        QRect rect(aSource.x, aSource.y, aSource.width, aSource.height);
+        mWidget->scroll(aDelta.x, aDelta.y, rect);
+    }
+
+
     ConfigureChildren(aConfigurations);
 
     // Show windows again...
diff -ur mozilla-1.9.2.orig/widget/src/qt/nsWindow.h mozilla-1.9.2/widget/src/qt/nsWindow.h
--- mozilla-1.9.2.orig/widget/src/qt/nsWindow.h
+++ mozilla-1.9.2/widget/src/qt/nsWindow.h
@@ -165,7 +165,7 @@
                                   PRBool        aIsSynchronous);
     NS_IMETHOD         Update();
     void               Scroll(const nsIntPoint&,
-                              const nsIntRect&,
+                              const nsTArray<nsIntRect>&,
                               const nsTArray<nsIWidget::Configuration>&);
 
     virtual void*      GetNativeData(PRUint32 aDataType);