diff --git a/layout/base/tests/Makefile.in b/layout/base/tests/Makefile.in index ed39b27f33b..eb6d3a21161 100644 --- a/layout/base/tests/Makefile.in +++ b/layout/base/tests/Makefile.in @@ -133,6 +133,7 @@ MOCHITEST_FILES = \ test_bug696020.html \ test_event_target_radius.html \ test_mozPaintCount.html \ + test_scroll_event_ordering.html \ test_scroll_selection_into_view.html \ test_bug583889.html \ bug583889_inner1.html \ diff --git a/layout/base/tests/test_scroll_event_ordering.html b/layout/base/tests/test_scroll_event_ordering.html new file mode 100644 index 00000000000..db9074af086 --- /dev/null +++ b/layout/base/tests/test_scroll_event_ordering.html @@ -0,0 +1,56 @@ + + + + + Test for Bug 785588 --- ordering of scroll-related events + + + + + +Mozilla Bug 785588 +
+
+
Hello
+
+
+
+
+
+ + diff --git a/layout/generic/nsGfxScrollFrame.cpp b/layout/generic/nsGfxScrollFrame.cpp index 1fef06819ce..b7b1aa8cbb2 100644 --- a/layout/generic/nsGfxScrollFrame.cpp +++ b/layout/generic/nsGfxScrollFrame.cpp @@ -1377,7 +1377,7 @@ public: bool SetRefreshObserver(nsGfxScrollFrameInner *aCallee) { NS_ASSERTION(aCallee && !mCallee, "AsyncScroll::SetRefreshObserver - Invalid usage."); - if (!RefreshDriver(aCallee)->AddRefreshObserver(this, Flush_Display)) { + if (!RefreshDriver(aCallee)->AddRefreshObserver(this, Flush_Style)) { return false; } @@ -1405,7 +1405,7 @@ private: */ void RemoveObserver() { if (mCallee) { - RefreshDriver(mCallee)->RemoveRefreshObserver(this, Flush_Display); + RefreshDriver(mCallee)->RemoveRefreshObserver(this, Flush_Style); } } };