зеркало из https://github.com/mozilla/gecko-dev.git
Back out 2 csets for bug 1163832 for emulator crashtest failures. r=me
CLOSED TREE
This commit is contained in:
Родитель
0a876b9419
Коммит
b54dc47f24
|
@ -24,7 +24,6 @@
|
||||||
#include "nsIObjectLoadingContent.h"
|
#include "nsIObjectLoadingContent.h"
|
||||||
#include "nsFrame.h"
|
#include "nsFrame.h"
|
||||||
#include "mozilla/layers/ShadowLayers.h"
|
#include "mozilla/layers/ShadowLayers.h"
|
||||||
#include "mozilla/layers/APZCCallbackHelper.h"
|
|
||||||
#include "ClientLayerManager.h"
|
#include "ClientLayerManager.h"
|
||||||
#include "nsQueryObject.h"
|
#include "nsQueryObject.h"
|
||||||
#ifdef MOZ_FMP4
|
#ifdef MOZ_FMP4
|
||||||
|
@ -2456,35 +2455,6 @@ nsDOMWindowUtils::SetAsyncScrollOffset(nsIDOMNode* aNode,
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
|
||||||
nsDOMWindowUtils::FlushApzRepaints(bool* aOutResult)
|
|
||||||
{
|
|
||||||
nsIWidget* widget = GetWidget();
|
|
||||||
if (!widget) {
|
|
||||||
*aOutResult = false;
|
|
||||||
return NS_OK;
|
|
||||||
}
|
|
||||||
// If APZ is not enabled, this function is a no-op. After bug 1162064 this
|
|
||||||
// should be a widget->IsAsyncPanZoomEnabled() check.
|
|
||||||
if (!gfxPrefs::AsyncPanZoomEnabled()) {
|
|
||||||
*aOutResult = false;
|
|
||||||
return NS_OK;
|
|
||||||
}
|
|
||||||
LayerManager* manager = widget->GetLayerManager();
|
|
||||||
if (!manager) {
|
|
||||||
*aOutResult = false;
|
|
||||||
return NS_OK;
|
|
||||||
}
|
|
||||||
ShadowLayerForwarder* forwarder = manager->AsShadowForwarder();
|
|
||||||
if (!forwarder || !forwarder->HasShadowManager()) {
|
|
||||||
*aOutResult = false;
|
|
||||||
return NS_OK;
|
|
||||||
}
|
|
||||||
forwarder->GetShadowManager()->SendFlushApzRepaints();
|
|
||||||
*aOutResult = true;
|
|
||||||
return NS_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
nsDOMWindowUtils::ComputeAnimationDistance(nsIDOMElement* aElement,
|
nsDOMWindowUtils::ComputeAnimationDistance(nsIDOMElement* aElement,
|
||||||
const nsAString& aProperty,
|
const nsAString& aProperty,
|
||||||
|
|
|
@ -49,7 +49,7 @@ interface nsIJSRAIIHelper;
|
||||||
interface nsIContentPermissionRequest;
|
interface nsIContentPermissionRequest;
|
||||||
interface nsIObserver;
|
interface nsIObserver;
|
||||||
|
|
||||||
[scriptable, uuid(663e4d9a-c963-4949-b68e-3a6f71c0414f)]
|
[scriptable, uuid(0ce789cc-3fb6-48b8-a58e-32deefc337b4)]
|
||||||
interface nsIDOMWindowUtils : nsISupports {
|
interface nsIDOMWindowUtils : nsISupports {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1428,16 +1428,6 @@ interface nsIDOMWindowUtils : nsISupports {
|
||||||
*/
|
*/
|
||||||
void setAsyncScrollOffset(in nsIDOMNode aNode, in int32_t aX, in int32_t aY);
|
void setAsyncScrollOffset(in nsIDOMNode aNode, in int32_t aX, in int32_t aY);
|
||||||
|
|
||||||
/**
|
|
||||||
* Do a round-trip to the compositor to ensure any pending APZ repaint requests
|
|
||||||
* get flushed to the main thread. If the function returns true, the flush was
|
|
||||||
* triggered and an "apz-repaints-flushed" notification will be dispatched via
|
|
||||||
* the observer service once the flush is complete. If the function returns
|
|
||||||
* false, an error occurred or a flush is not needed, and the notification
|
|
||||||
* will not fire. This is intended to be used by test code only!
|
|
||||||
*/
|
|
||||||
bool flushApzRepaints();
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Method for testing StyleAnimationValue::ComputeDistance.
|
* Method for testing StyleAnimationValue::ComputeDistance.
|
||||||
*
|
*
|
||||||
|
|
|
@ -589,7 +589,6 @@ child:
|
||||||
HandleSingleTap(CSSPoint aPoint, Modifiers aModifiers, ScrollableLayerGuid aGuid);
|
HandleSingleTap(CSSPoint aPoint, Modifiers aModifiers, ScrollableLayerGuid aGuid);
|
||||||
HandleLongTap(CSSPoint point, Modifiers aModifiers, ScrollableLayerGuid aGuid, uint64_t aInputBlockId);
|
HandleLongTap(CSSPoint point, Modifiers aModifiers, ScrollableLayerGuid aGuid, uint64_t aInputBlockId);
|
||||||
NotifyAPZStateChange(ViewID aViewId, APZStateChange aChange, int aArg);
|
NotifyAPZStateChange(ViewID aViewId, APZStateChange aChange, int aArg);
|
||||||
NotifyFlushComplete();
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -2138,13 +2138,6 @@ TabChild::RecvNotifyAPZStateChange(const ViewID& aViewId,
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
|
||||||
TabChild::RecvNotifyFlushComplete()
|
|
||||||
{
|
|
||||||
APZCCallbackHelper::NotifyFlushComplete();
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool
|
bool
|
||||||
TabChild::RecvActivate()
|
TabChild::RecvActivate()
|
||||||
{
|
{
|
||||||
|
|
|
@ -342,7 +342,6 @@ public:
|
||||||
virtual bool RecvNotifyAPZStateChange(const ViewID& aViewId,
|
virtual bool RecvNotifyAPZStateChange(const ViewID& aViewId,
|
||||||
const APZStateChange& aChange,
|
const APZStateChange& aChange,
|
||||||
const int& aArg) override;
|
const int& aArg) override;
|
||||||
virtual bool RecvNotifyFlushComplete() override;
|
|
||||||
virtual bool RecvActivate() override;
|
virtual bool RecvActivate() override;
|
||||||
virtual bool RecvDeactivate() override;
|
virtual bool RecvDeactivate() override;
|
||||||
virtual bool RecvMouseEvent(const nsString& aType,
|
virtual bool RecvMouseEvent(const nsString& aType,
|
||||||
|
|
|
@ -1069,14 +1069,6 @@ TabParent::NotifyMouseScrollTestEvent(const ViewID& aScrollId, const nsString& a
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
TabParent::NotifyFlushComplete()
|
|
||||||
{
|
|
||||||
if (!mIsDestroyed) {
|
|
||||||
unused << SendNotifyFlushComplete();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
TabParent::Activate()
|
TabParent::Activate()
|
||||||
{
|
{
|
||||||
|
|
|
@ -274,7 +274,6 @@ public:
|
||||||
APZStateChange aChange,
|
APZStateChange aChange,
|
||||||
int aArg);
|
int aArg);
|
||||||
void NotifyMouseScrollTestEvent(const ViewID& aScrollId, const nsString& aEvent);
|
void NotifyMouseScrollTestEvent(const ViewID& aScrollId, const nsString& aEvent);
|
||||||
void NotifyFlushComplete();
|
|
||||||
void Activate();
|
void Activate();
|
||||||
void Deactivate();
|
void Deactivate();
|
||||||
|
|
||||||
|
|
|
@ -158,11 +158,6 @@ public:
|
||||||
virtual void NotifyMozMouseScrollEvent(const FrameMetrics::ViewID& aScrollId, const nsString& aEvent)
|
virtual void NotifyMozMouseScrollEvent(const FrameMetrics::ViewID& aScrollId, const nsString& aEvent)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
/**
|
|
||||||
* Notify content that the repaint requests have been flushed.
|
|
||||||
*/
|
|
||||||
virtual void NotifyFlushComplete() = 0;
|
|
||||||
|
|
||||||
GeckoContentController() {}
|
GeckoContentController() {}
|
||||||
virtual void Destroy() {}
|
virtual void Destroy() {}
|
||||||
|
|
||||||
|
|
|
@ -554,19 +554,6 @@ APZCTreeManager::UpdateHitTestingTree(TreeBuildingState& aState,
|
||||||
return node;
|
return node;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
APZCTreeManager::FlushApzRepaints(uint64_t aLayersId)
|
|
||||||
{
|
|
||||||
{ // scope lock
|
|
||||||
MonitorAutoLock lock(mTreeLock);
|
|
||||||
FlushPendingRepaintRecursively(mRootNode, aLayersId);
|
|
||||||
}
|
|
||||||
const CompositorParent::LayerTreeState* state = CompositorParent::GetIndirectShadowTree(aLayersId);
|
|
||||||
MOZ_ASSERT(state && state->mController);
|
|
||||||
NS_DispatchToMainThread(NS_NewRunnableMethod(
|
|
||||||
state->mController.get(), &GeckoContentController::NotifyFlushComplete));
|
|
||||||
}
|
|
||||||
|
|
||||||
nsEventStatus
|
nsEventStatus
|
||||||
APZCTreeManager::ReceiveInputEvent(InputData& aEvent,
|
APZCTreeManager::ReceiveInputEvent(InputData& aEvent,
|
||||||
ScrollableLayerGuid* aOutTargetGuid,
|
ScrollableLayerGuid* aOutTargetGuid,
|
||||||
|
@ -1084,23 +1071,6 @@ APZCTreeManager::FlushRepaintsRecursively(HitTestingTreeNode* aNode)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
APZCTreeManager::FlushPendingRepaintRecursively(HitTestingTreeNode* aNode, uint64_t aLayersId)
|
|
||||||
{
|
|
||||||
mTreeLock.AssertCurrentThreadOwns();
|
|
||||||
|
|
||||||
for (HitTestingTreeNode* node = aNode; node; node = node->GetPrevSibling()) {
|
|
||||||
if (node->IsPrimaryHolder()) {
|
|
||||||
AsyncPanZoomController* apzc = node->GetApzc();
|
|
||||||
MOZ_ASSERT(apzc);
|
|
||||||
if (apzc->GetGuid().mLayersId == aLayersId) {
|
|
||||||
apzc->FlushRepaintIfPending();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
FlushPendingRepaintRecursively(node->GetLastChild(), aLayersId);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
APZCTreeManager::CancelAnimation(const ScrollableLayerGuid &aGuid)
|
APZCTreeManager::CancelAnimation(const ScrollableLayerGuid &aGuid)
|
||||||
{
|
{
|
||||||
|
|
|
@ -130,13 +130,6 @@ public:
|
||||||
uint64_t aOriginatingLayersId,
|
uint64_t aOriginatingLayersId,
|
||||||
uint32_t aPaintSequenceNumber);
|
uint32_t aPaintSequenceNumber);
|
||||||
|
|
||||||
/**
|
|
||||||
* Walk the tree of APZCs and flushes the repaint requests for all the APZCS
|
|
||||||
* corresponding to the given layers id. Finally, sends a flush complete
|
|
||||||
* notification to the GeckoContentController for the layers id.
|
|
||||||
*/
|
|
||||||
void FlushApzRepaints(uint64_t aLayersId);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* General handler for incoming input events. Manipulates the frame metrics
|
* General handler for incoming input events. Manipulates the frame metrics
|
||||||
* based on what type of input it is. For example, a PinchGestureEvent will
|
* based on what type of input it is. For example, a PinchGestureEvent will
|
||||||
|
@ -437,7 +430,6 @@ private:
|
||||||
void UpdateZoomConstraintsRecursively(HitTestingTreeNode* aNode,
|
void UpdateZoomConstraintsRecursively(HitTestingTreeNode* aNode,
|
||||||
const ZoomConstraints& aConstraints);
|
const ZoomConstraints& aConstraints);
|
||||||
void FlushRepaintsRecursively(HitTestingTreeNode* aNode);
|
void FlushRepaintsRecursively(HitTestingTreeNode* aNode);
|
||||||
void FlushPendingRepaintRecursively(HitTestingTreeNode* aNode, uint64_t aLayersId);
|
|
||||||
|
|
||||||
already_AddRefed<HitTestingTreeNode> RecycleOrCreateNode(TreeBuildingState& aState,
|
already_AddRefed<HitTestingTreeNode> RecycleOrCreateNode(TreeBuildingState& aState,
|
||||||
AsyncPanZoomController* aApzc);
|
AsyncPanZoomController* aApzc);
|
||||||
|
|
|
@ -2446,13 +2446,6 @@ void AsyncPanZoomController::FlushRepaintForNewInputBlock() {
|
||||||
UpdateSharedCompositorFrameMetrics();
|
UpdateSharedCompositorFrameMetrics();
|
||||||
}
|
}
|
||||||
|
|
||||||
void AsyncPanZoomController::FlushRepaintIfPending() {
|
|
||||||
// Just tell the paint throttler to send the pending repaint request if
|
|
||||||
// there is one.
|
|
||||||
ReentrantMonitorAutoEnter lock(mMonitor);
|
|
||||||
mPaintThrottler.TaskComplete(GetFrameTime());
|
|
||||||
}
|
|
||||||
|
|
||||||
bool AsyncPanZoomController::SnapBackIfOverscrolled() {
|
bool AsyncPanZoomController::SnapBackIfOverscrolled() {
|
||||||
ReentrantMonitorAutoEnter lock(mMonitor);
|
ReentrantMonitorAutoEnter lock(mMonitor);
|
||||||
// It's possible that we're already in the middle of an overscroll
|
// It's possible that we're already in the middle of an overscroll
|
||||||
|
|
|
@ -183,11 +183,6 @@ public:
|
||||||
*/
|
*/
|
||||||
void NotifyLayersUpdated(const FrameMetrics& aLayerMetrics, bool aIsFirstPaint);
|
void NotifyLayersUpdated(const FrameMetrics& aLayerMetrics, bool aIsFirstPaint);
|
||||||
|
|
||||||
/**
|
|
||||||
* Flush any pending repaint request.
|
|
||||||
*/
|
|
||||||
void FlushRepaintIfPending();
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The platform implementation must set the compositor parent so that we can
|
* The platform implementation must set the compositor parent so that we can
|
||||||
* request composites.
|
* request composites.
|
||||||
|
|
|
@ -710,15 +710,6 @@ APZCCallbackHelper::NotifyMozMouseScrollEvent(const FrameMetrics::ViewID& aScrol
|
||||||
true, true);
|
true, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
APZCCallbackHelper::NotifyFlushComplete()
|
|
||||||
{
|
|
||||||
MOZ_ASSERT(NS_IsMainThread());
|
|
||||||
nsCOMPtr<nsIObserverService> observerService = mozilla::services::GetObserverService();
|
|
||||||
MOZ_ASSERT(observerService);
|
|
||||||
observerService->NotifyObservers(nullptr, "apz-repaints-flushed", nullptr);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -161,9 +161,6 @@ public:
|
||||||
|
|
||||||
/* Notify content of a mouse scroll testing event. */
|
/* Notify content of a mouse scroll testing event. */
|
||||||
static void NotifyMozMouseScrollEvent(const FrameMetrics::ViewID& aScrollId, const nsString& aEvent);
|
static void NotifyMozMouseScrollEvent(const FrameMetrics::ViewID& aScrollId, const nsString& aEvent);
|
||||||
|
|
||||||
/* Notify content that the repaint flush is complete. */
|
|
||||||
static void NotifyFlushComplete();
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -213,10 +213,3 @@ ChromeProcessController::NotifyMozMouseScrollEvent(const FrameMetrics::ViewID& a
|
||||||
|
|
||||||
APZCCallbackHelper::NotifyMozMouseScrollEvent(aScrollId, aEvent);
|
APZCCallbackHelper::NotifyMozMouseScrollEvent(aScrollId, aEvent);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
ChromeProcessController::NotifyFlushComplete()
|
|
||||||
{
|
|
||||||
MOZ_ASSERT(NS_IsMainThread());
|
|
||||||
APZCCallbackHelper::NotifyFlushComplete();
|
|
||||||
}
|
|
||||||
|
|
|
@ -56,7 +56,6 @@ public:
|
||||||
int aArg) override;
|
int aArg) override;
|
||||||
virtual void NotifyMozMouseScrollEvent(const FrameMetrics::ViewID& aScrollId,
|
virtual void NotifyMozMouseScrollEvent(const FrameMetrics::ViewID& aScrollId,
|
||||||
const nsString& aEvent) override;
|
const nsString& aEvent) override;
|
||||||
virtual void NotifyFlushComplete() override;
|
|
||||||
private:
|
private:
|
||||||
nsCOMPtr<nsIWidget> mWidget;
|
nsCOMPtr<nsIWidget> mWidget;
|
||||||
nsRefPtr<APZEventState> mAPZEventState;
|
nsRefPtr<APZEventState> mAPZEventState;
|
||||||
|
|
|
@ -1326,13 +1326,6 @@ CompositorParent::RecvRequestOverfill()
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
CompositorParent::FlushApzRepaints(const LayerTransactionParent* aLayerTree)
|
|
||||||
{
|
|
||||||
MOZ_ASSERT(mApzcTreeManager);
|
|
||||||
mApzcTreeManager->FlushApzRepaints(aLayerTree->GetId());
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
CompositorParent::GetAPZTestData(const LayerTransactionParent* aLayerTree,
|
CompositorParent::GetAPZTestData(const LayerTransactionParent* aLayerTree,
|
||||||
APZTestData* aOutData)
|
APZTestData* aOutData)
|
||||||
|
@ -1741,7 +1734,6 @@ public:
|
||||||
virtual void LeaveTestMode(LayerTransactionParent* aLayerTree) override;
|
virtual void LeaveTestMode(LayerTransactionParent* aLayerTree) override;
|
||||||
virtual void ApplyAsyncProperties(LayerTransactionParent* aLayerTree)
|
virtual void ApplyAsyncProperties(LayerTransactionParent* aLayerTree)
|
||||||
override;
|
override;
|
||||||
virtual void FlushApzRepaints(const LayerTransactionParent* aLayerTree) override;
|
|
||||||
virtual void GetAPZTestData(const LayerTransactionParent* aLayerTree,
|
virtual void GetAPZTestData(const LayerTransactionParent* aLayerTree,
|
||||||
APZTestData* aOutData) override;
|
APZTestData* aOutData) override;
|
||||||
virtual void SetConfirmedTargetAPZC(const LayerTransactionParent* aLayerTree,
|
virtual void SetConfirmedTargetAPZC(const LayerTransactionParent* aLayerTree,
|
||||||
|
@ -2154,21 +2146,6 @@ CrossProcessCompositorParent::ApplyAsyncProperties(
|
||||||
state->mParent->ApplyAsyncProperties(aLayerTree);
|
state->mParent->ApplyAsyncProperties(aLayerTree);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
CrossProcessCompositorParent::FlushApzRepaints(const LayerTransactionParent* aLayerTree)
|
|
||||||
{
|
|
||||||
uint64_t id = aLayerTree->GetId();
|
|
||||||
MOZ_ASSERT(id != 0);
|
|
||||||
const CompositorParent::LayerTreeState* state =
|
|
||||||
CompositorParent::GetIndirectShadowTree(id);
|
|
||||||
if (!state) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
MOZ_ASSERT(state->mParent);
|
|
||||||
state->mParent->FlushApzRepaints(aLayerTree);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
CrossProcessCompositorParent::GetAPZTestData(const LayerTransactionParent* aLayerTree,
|
CrossProcessCompositorParent::GetAPZTestData(const LayerTransactionParent* aLayerTree,
|
||||||
APZTestData* aOutData)
|
APZTestData* aOutData)
|
||||||
|
|
|
@ -268,7 +268,6 @@ public:
|
||||||
virtual void LeaveTestMode(LayerTransactionParent* aLayerTree) override;
|
virtual void LeaveTestMode(LayerTransactionParent* aLayerTree) override;
|
||||||
virtual void ApplyAsyncProperties(LayerTransactionParent* aLayerTree)
|
virtual void ApplyAsyncProperties(LayerTransactionParent* aLayerTree)
|
||||||
override;
|
override;
|
||||||
virtual void FlushApzRepaints(const LayerTransactionParent* aLayerTree) override;
|
|
||||||
virtual void GetAPZTestData(const LayerTransactionParent* aLayerTree,
|
virtual void GetAPZTestData(const LayerTransactionParent* aLayerTree,
|
||||||
APZTestData* aOutData) override;
|
APZTestData* aOutData) override;
|
||||||
virtual void SetConfirmedTargetAPZC(const LayerTransactionParent* aLayerTree,
|
virtual void SetConfirmedTargetAPZC(const LayerTransactionParent* aLayerTree,
|
||||||
|
|
|
@ -783,13 +783,6 @@ LayerTransactionParent::RecvSetAsyncScrollOffset(const FrameMetrics::ViewID& aSc
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
|
||||||
LayerTransactionParent::RecvFlushApzRepaints()
|
|
||||||
{
|
|
||||||
mShadowLayersManager->FlushApzRepaints(this);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool
|
bool
|
||||||
LayerTransactionParent::RecvGetAPZTestData(APZTestData* aOutData)
|
LayerTransactionParent::RecvGetAPZTestData(APZTestData* aOutData)
|
||||||
{
|
{
|
||||||
|
|
|
@ -133,7 +133,6 @@ protected:
|
||||||
override;
|
override;
|
||||||
virtual bool RecvSetAsyncScrollOffset(const FrameMetrics::ViewID& aId,
|
virtual bool RecvSetAsyncScrollOffset(const FrameMetrics::ViewID& aId,
|
||||||
const int32_t& aX, const int32_t& aY) override;
|
const int32_t& aX, const int32_t& aY) override;
|
||||||
virtual bool RecvFlushApzRepaints() override;
|
|
||||||
virtual bool RecvGetAPZTestData(APZTestData* aOutData) override;
|
virtual bool RecvGetAPZTestData(APZTestData* aOutData) override;
|
||||||
virtual bool RecvRequestProperty(const nsString& aProperty, float* aValue) override;
|
virtual bool RecvRequestProperty(const nsString& aProperty, float* aValue) override;
|
||||||
virtual bool RecvSetConfirmedTargetAPZC(const uint64_t& aBlockId,
|
virtual bool RecvSetConfirmedTargetAPZC(const uint64_t& aBlockId,
|
||||||
|
|
|
@ -89,9 +89,6 @@ parent:
|
||||||
// Useful for testing rendering of async scrolling.
|
// Useful for testing rendering of async scrolling.
|
||||||
sync SetAsyncScrollOffset(ViewID id, int32_t x, int32_t y);
|
sync SetAsyncScrollOffset(ViewID id, int32_t x, int32_t y);
|
||||||
|
|
||||||
// Flush any pending APZ repaints to the main thread.
|
|
||||||
async FlushApzRepaints();
|
|
||||||
|
|
||||||
// Drop any front buffers that might be retained on the compositor
|
// Drop any front buffers that might be retained on the compositor
|
||||||
// side.
|
// side.
|
||||||
async ClearCachedResources();
|
async ClearCachedResources();
|
||||||
|
|
|
@ -36,7 +36,6 @@ public:
|
||||||
const TimeStamp& aTime) { return true; }
|
const TimeStamp& aTime) { return true; }
|
||||||
virtual void LeaveTestMode(LayerTransactionParent* aLayerTree) { }
|
virtual void LeaveTestMode(LayerTransactionParent* aLayerTree) { }
|
||||||
virtual void ApplyAsyncProperties(LayerTransactionParent* aLayerTree) = 0;
|
virtual void ApplyAsyncProperties(LayerTransactionParent* aLayerTree) = 0;
|
||||||
virtual void FlushApzRepaints(const LayerTransactionParent* aLayerTree) = 0;
|
|
||||||
virtual void GetAPZTestData(const LayerTransactionParent* aLayerTree,
|
virtual void GetAPZTestData(const LayerTransactionParent* aLayerTree,
|
||||||
APZTestData* aOutData) { }
|
APZTestData* aOutData) { }
|
||||||
virtual void SetConfirmedTargetAPZC(const LayerTransactionParent* aLayerTree,
|
virtual void SetConfirmedTargetAPZC(const LayerTransactionParent* aLayerTree,
|
||||||
|
|
|
@ -70,7 +70,6 @@ public:
|
||||||
MOCK_METHOD3(SendAsyncScrollDOMEvent, void(bool aIsRoot, const CSSRect &aContentRect, const CSSSize &aScrollableSize));
|
MOCK_METHOD3(SendAsyncScrollDOMEvent, void(bool aIsRoot, const CSSRect &aContentRect, const CSSSize &aScrollableSize));
|
||||||
MOCK_METHOD2(PostDelayedTask, void(Task* aTask, int aDelayMs));
|
MOCK_METHOD2(PostDelayedTask, void(Task* aTask, int aDelayMs));
|
||||||
MOCK_METHOD3(NotifyAPZStateChange, void(const ScrollableLayerGuid& aGuid, APZStateChange aChange, int aArg));
|
MOCK_METHOD3(NotifyAPZStateChange, void(const ScrollableLayerGuid& aGuid, APZStateChange aChange, int aArg));
|
||||||
MOCK_METHOD0(NotifyFlushComplete, void());
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class MockContentControllerDelayed : public MockContentController {
|
class MockContentControllerDelayed : public MockContentController {
|
||||||
|
|
|
@ -270,14 +270,6 @@ public:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void NotifyFlushComplete() override {
|
|
||||||
MOZ_ASSERT(NS_IsMainThread());
|
|
||||||
if (mRenderFrame) {
|
|
||||||
TabParent* browser = TabParent::GetFrom(mRenderFrame->Manager());
|
|
||||||
browser->NotifyFlushComplete();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Methods used by RenderFrameParent to set fields stored here.
|
// Methods used by RenderFrameParent to set fields stored here.
|
||||||
|
|
||||||
void SaveZoomConstraints(const ZoomConstraints& aConstraints)
|
void SaveZoomConstraints(const ZoomConstraints& aConstraints)
|
||||||
|
|
|
@ -14,7 +14,6 @@ const XHTML_NS = "http://www.w3.org/1999/xhtml";
|
||||||
const DEBUG_CONTRACTID = "@mozilla.org/xpcom/debug;1";
|
const DEBUG_CONTRACTID = "@mozilla.org/xpcom/debug;1";
|
||||||
const PRINTSETTINGS_CONTRACTID = "@mozilla.org/gfx/printsettings-service;1";
|
const PRINTSETTINGS_CONTRACTID = "@mozilla.org/gfx/printsettings-service;1";
|
||||||
const ENVIRONMENT_CONTRACTID = "@mozilla.org/process/environment;1";
|
const ENVIRONMENT_CONTRACTID = "@mozilla.org/process/environment;1";
|
||||||
const NS_OBSERVER_SERVICE_CONTRACTID = "@mozilla.org/observer-service;1";
|
|
||||||
|
|
||||||
// "<!--CLEAR-->"
|
// "<!--CLEAR-->"
|
||||||
const BLANK_URL_FOR_CLEARING = "data:text/html;charset=UTF-8,%3C%21%2D%2DCLEAR%2D%2D%3E";
|
const BLANK_URL_FOR_CLEARING = "data:text/html;charset=UTF-8,%3C%21%2D%2DCLEAR%2D%2D%3E";
|
||||||
|
@ -364,13 +363,10 @@ const STATE_WAITING_FOR_REFTEST_WAIT_REMOVAL = 1;
|
||||||
// When spell checking is done on all spell-checked elements, we can move to the
|
// When spell checking is done on all spell-checked elements, we can move to the
|
||||||
// next state.
|
// next state.
|
||||||
const STATE_WAITING_FOR_SPELL_CHECKS = 2;
|
const STATE_WAITING_FOR_SPELL_CHECKS = 2;
|
||||||
// When any pending compositor-side repaint requests have been flushed, we can
|
|
||||||
// move to the next state.
|
|
||||||
const STATE_WAITING_FOR_APZ_FLUSH = 3;
|
|
||||||
// When all MozAfterPaint events and all explicit paint waits are flushed, we're
|
// When all MozAfterPaint events and all explicit paint waits are flushed, we're
|
||||||
// done and can move to the COMPLETED state.
|
// done and can move to the COMPLETED state.
|
||||||
const STATE_WAITING_TO_FINISH = 4;
|
const STATE_WAITING_TO_FINISH = 3;
|
||||||
const STATE_COMPLETED = 5;
|
const STATE_COMPLETED = 4;
|
||||||
|
|
||||||
function FlushRendering() {
|
function FlushRendering() {
|
||||||
var anyPendingPaintsGeneratedInDescendants = false;
|
var anyPendingPaintsGeneratedInDescendants = false;
|
||||||
|
@ -536,31 +532,9 @@ function WaitForTestEnd(contentRootElement, inPrintMode, spellCheckedElements) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
state = STATE_WAITING_FOR_APZ_FLUSH;
|
state = STATE_WAITING_TO_FINISH;
|
||||||
LogInfo("MakeProgress: STATE_WAITING_FOR_APZ_FLUSH");
|
// Try next state
|
||||||
gFailureReason = "timed out waiting for APZ flush to complete";
|
MakeProgress();
|
||||||
|
|
||||||
var os = CC[NS_OBSERVER_SERVICE_CONTRACTID].getService(CI.nsIObserverService);
|
|
||||||
var flushWaiter = function(aSubject, aTopic, aData) {
|
|
||||||
if (aTopic) LogInfo("MakeProgress: apz-repaints-flushed fired");
|
|
||||||
os.removeObserver(flushWaiter, "apz-repaints-flushed");
|
|
||||||
state = STATE_WAITING_TO_FINISH;
|
|
||||||
MakeProgress();
|
|
||||||
};
|
|
||||||
os.addObserver(flushWaiter, "apz-repaints-flushed", false);
|
|
||||||
|
|
||||||
if (windowUtils().flushApzRepaints()) {
|
|
||||||
LogInfo("MakeProgress: done requesting APZ flush");
|
|
||||||
} else {
|
|
||||||
LogInfo("MakeProgress: APZ flush not required");
|
|
||||||
flushWaiter(null, null, null);
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
|
|
||||||
case STATE_WAITING_FOR_APZ_FLUSH:
|
|
||||||
LogInfo("MakeProgress: STATE_WAITING_FOR_APZ_FLUSH");
|
|
||||||
// Nothing to do here; once we get the apz-repaints-flushed event
|
|
||||||
// we will go to STATE_WAITING_TO_FINISH
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
case STATE_WAITING_TO_FINISH:
|
case STATE_WAITING_TO_FINISH:
|
||||||
|
|
Загрузка…
Ссылка в новой задаче