Back out changeset 027c6cc12078 (bug 1249943) for making test_basic_pan.html permafail (timeout) on Linux, on a CLOSED TREE.

This commit is contained in:
L. David Baron 2016-02-24 15:57:29 -08:00
parent 1eea1bc262
commit c5037c9d89
8 changed files with 10 additions and 43 deletions

View File

@ -1752,8 +1752,9 @@ TabChild::NotifyAPZStateChange(const ViewID& aViewId,
if (aChange == layers::GeckoContentController::APZStateChange::TransformEnd) {
// This is used by tests to determine when the APZ is done doing whatever
// it's doing. XXX generify this as needed when writing additional tests.
nsCOMPtr<nsIObserverService> observerService = mozilla::services::GetObserverService();
observerService->NotifyObservers(nullptr, "APZ:TransformEnd", nullptr);
DispatchMessageManagerMessage(
NS_LITERAL_STRING("APZ:TransformEnd"),
NS_LITERAL_STRING("{}"));
}
return true;
}

View File

@ -10,12 +10,10 @@
<script type="application/javascript">
function scrollPage() {
var transformEnd = function() {
SpecialPowers.Services.obs.removeObserver(transformEnd, "APZ:TransformEnd", false);
SpecialPowers._addMessageListener("APZ:TransformEnd", function() {
dump("Transform complete; flushing repaints...\n");
flushApzRepaints(checkScroll);
};
SpecialPowers.Services.obs.addObserver(transformEnd, "APZ:TransformEnd", false);
});
const TOUCH_SLOP = 1;
synthesizeNativeDrag(document.body, 10, 100, 0, -(50 + TOUCH_SLOP));

View File

@ -10,12 +10,10 @@
<script type="application/javascript">
function scrollOuter() {
var transformEnd = function() {
SpecialPowers.Services.obs.removeObserver(transformEnd, "APZ:TransformEnd", false);
SpecialPowers._addMessageListener("APZ:TransformEnd", function() {
dump("Transform complete; flushing repaints...\n");
flushApzRepaints(checkScroll);
};
SpecialPowers.Services.obs.addObserver(transformEnd, "APZ:TransformEnd", false);
});
const TOUCH_SLOP = 1;
synthesizeNativeDrag(document.getElementById('outer'), 10, 100, 0, -(50 + TOUCH_SLOP));

View File

@ -11,12 +11,10 @@
function scrollOuter() {
var outer = document.getElementById('outer');
var transformEnd = function() {
SpecialPowers.Services.obs.removeObserver(transformEnd, "APZ:TransformEnd", false);
SpecialPowers._addMessageListener("APZ:TransformEnd", function() {
dump("Transform complete; flushing repaints...\n");
flushApzRepaints(checkScroll, outer.contentWindow);
};
SpecialPowers.Services.obs.addObserver(transformEnd, "APZ:TransformEnd", false);
});
const TOUCH_SLOP = 1;
synthesizeNativeDrag(outer.contentDocument.body, 10, 100, 0, -(50 + TOUCH_SLOP));

View File

@ -25,9 +25,7 @@ skip-if = (os == 'android') || (os == 'b2g') # wheel events not supported on mob
[test_layerization.html]
skip-if = (os == 'android') || (os == 'b2g') # uses wheel events which are not supported on mobile
[test_basic_pan.html]
# Windows touch injection doesn't work in automation, but this test can be run locally on a windows touch device.
# On OS X we don't support touch events at all.
skip-if = (toolkit == 'windows') || (toolkit == 'cocoa')
skip-if = toolkit != 'gonk'
[test_scroll_inactive_flattened_frame.html]
skip-if = (os == 'android') || (os == 'b2g') || (buildapp == 'mulet') # wheel events not supported on mobile; see bug 1164274 for mulet
[test_scroll_inactive_bug1190112.html]

View File

@ -45,10 +45,6 @@ window.onload = function() {
// events get held up. Try to prevent that by making long-taps require
// a 10 second hold.
["ui.click_hold_context_menus.delay", "10000"],
// The subtests in this test do touch-drags to pan the page, but we don't
// want those pans to turn into fling animations, so we increase the
// fling-stop threshold velocity to absurdly high.
["apz.fling_stopped_threshold", "10000"],
]
}, testDone);
};

View File

@ -9,7 +9,6 @@
#include "base/message_loop.h"
#include "mozilla/layers/APZCCallbackHelper.h"
#include "mozilla/layers/APZCTreeManager.h"
#include "nsIObserverService.h"
#include "nsLayoutUtils.h"
#include "nsWindow.h"
@ -99,23 +98,5 @@ AndroidContentController::UpdateOverscrollOffset(const float aX,const float aY)
}
}
void
AndroidContentController::NotifyAPZStateChange(const ScrollableLayerGuid& aGuid,
APZStateChange aChange,
int aArg)
{
// This function may get invoked twice, if the first invocation is not on
// the main thread then the ChromeProcessController version of this function
// will redispatch to the main thread. We want to make sure that our handling
// only happens on the main thread.
ChromeProcessController::NotifyAPZStateChange(aGuid, aChange, aArg);
if (NS_IsMainThread() && aChange == layers::GeckoContentController::APZStateChange::TransformEnd) {
// This is used by tests to determine when the APZ is done doing whatever
// it's doing. XXX generify this as needed when writing additional tests.
nsCOMPtr<nsIObserverService> observerService = mozilla::services::GetObserverService();
observerService->NotifyObservers(nullptr, "APZ:TransformEnd", nullptr);
}
}
} // namespace widget
} // namespace mozilla

View File

@ -40,9 +40,6 @@ public:
void PostDelayedTask(Task* aTask, int aDelayMs) override;
void UpdateOverscrollVelocity(const float aX, const float aY) override;
void UpdateOverscrollOffset(const float aX,const float aY) override;
void NotifyAPZStateChange(const ScrollableLayerGuid& aGuid,
APZStateChange aChange,
int aArg) override;
static void NotifyDefaultPrevented(mozilla::layers::APZCTreeManager* aManager,
uint64_t aInputBlockId, bool aDefaultPrevented);