mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Backed out 5 changesets (bug 1230674) for webgl bustage and crashes. r=backout on a CLOSED TREE
Backed out changeset 07cdcb9b4565 (bug 1230674) Backed out changeset d21d089c447f (bug 1230674) Backed out changeset a26de45cdb6a (bug 1230674) Backed out changeset 59ec0033bd22 (bug 1230674) Backed out changeset 74a06f6d85e1 (bug 1230674)
This commit is contained in:
parent
d6009f3288
commit
a10345e651
@ -144,9 +144,6 @@ public:
|
||||
*/
|
||||
virtual void NotifyFlushComplete() = 0;
|
||||
|
||||
virtual void UpdateOverscrollVelocity(const float aX, const float aY) {}
|
||||
virtual void UpdateOverscrollOffset(const float aX,const float aY) {}
|
||||
|
||||
GeckoContentController() {}
|
||||
virtual void Destroy() {}
|
||||
|
||||
|
@ -2385,22 +2385,15 @@ void AsyncPanZoomController::OverscrollBy(ParentLayerPoint& aOverscroll) {
|
||||
// scroll to begin with.
|
||||
bool xCanScroll = mX.CanScroll();
|
||||
bool yCanScroll = mY.CanScroll();
|
||||
bool xConsumed = FuzzyEqualsAdditive(aOverscroll.x, 0.0f, COORDINATE_EPSILON);
|
||||
bool yConsumed = FuzzyEqualsAdditive(aOverscroll.y, 0.0f, COORDINATE_EPSILON);
|
||||
|
||||
#if defined(MOZ_ANDROID_APZ)
|
||||
RefPtr<GeckoContentController> controller = GetGeckoContentController();
|
||||
if (controller && ((xCanScroll && !xConsumed) || (yCanScroll && !yConsumed))) {
|
||||
controller->UpdateOverscrollOffset(aOverscroll.x, aOverscroll.y);
|
||||
aOverscroll.x = aOverscroll.y = 0.0f;
|
||||
}
|
||||
#else
|
||||
bool xConsumed = FuzzyEqualsAdditive(aOverscroll.x, 0.0f, COORDINATE_EPSILON);
|
||||
if (xCanScroll && !xConsumed) {
|
||||
mX.OverscrollBy(aOverscroll.x);
|
||||
aOverscroll.x = 0;
|
||||
xConsumed = true;
|
||||
}
|
||||
|
||||
bool yConsumed = FuzzyEqualsAdditive(aOverscroll.y, 0.0f, COORDINATE_EPSILON);
|
||||
if (yCanScroll && !yConsumed) {
|
||||
mY.OverscrollBy(aOverscroll.y);
|
||||
aOverscroll.y = 0;
|
||||
@ -2410,7 +2403,6 @@ void AsyncPanZoomController::OverscrollBy(ParentLayerPoint& aOverscroll) {
|
||||
if ((xCanScroll && xConsumed) || (yCanScroll && yConsumed)) {
|
||||
ScheduleComposite();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
RefPtr<const OverscrollHandoffChain> AsyncPanZoomController::BuildOverscrollHandoffChain() {
|
||||
@ -2509,14 +2501,7 @@ void AsyncPanZoomController::HandleFlingOverscroll(const ParentLayerPoint& aVelo
|
||||
aScrolledApzc};
|
||||
treeManagerLocal->DispatchFling(this, handoffState);
|
||||
if (!IsZero(handoffState.mVelocity) && IsPannable() && gfxPrefs::APZOverscrollEnabled()) {
|
||||
#if defined(MOZ_ANDROID_APZ)
|
||||
RefPtr<GeckoContentController> controller = GetGeckoContentController();
|
||||
if (controller) {
|
||||
controller->UpdateOverscrollVelocity(handoffState.mVelocity.x, handoffState.mVelocity.y);
|
||||
}
|
||||
#else
|
||||
StartOverscrollAnimation(handoffState.mVelocity);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -585,7 +585,6 @@ pref("apz.fling_friction", "0.004");
|
||||
pref("apz.fling_stopped_threshold", "0.1");
|
||||
pref("apz.max_velocity_inches_per_ms", "0.07");
|
||||
pref("apz.fling_accel_interval_ms", 750);
|
||||
pref("apz.overscroll.enabled", true);
|
||||
#endif
|
||||
|
||||
pref("layers.progressive-paint", true);
|
||||
|
@ -9,7 +9,6 @@ import org.mozilla.gecko.GeckoEvent;
|
||||
import org.mozilla.gecko.GeckoThread;
|
||||
import org.mozilla.gecko.annotation.WrapForJNI;
|
||||
import org.mozilla.gecko.mozglue.JNIObject;
|
||||
import org.mozilla.gecko.util.ThreadUtils;
|
||||
|
||||
import org.json.JSONObject;
|
||||
|
||||
@ -22,7 +21,6 @@ class NativePanZoomController extends JNIObject implements PanZoomController {
|
||||
private final PanZoomTarget mTarget;
|
||||
private final LayerView mView;
|
||||
private boolean mDestroyed;
|
||||
private Overscroll mOverscroll;
|
||||
|
||||
@WrapForJNI
|
||||
private native boolean handleMotionEvent(
|
||||
@ -170,8 +168,7 @@ class NativePanZoomController extends JNIObject implements PanZoomController {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setOverscrollHandler(final Overscroll handler) {
|
||||
mOverscroll = handler;
|
||||
public void setOverscrollHandler(final Overscroll listener) {
|
||||
}
|
||||
|
||||
@WrapForJNI(stubName = "SetIsLongpressEnabled")
|
||||
@ -183,41 +180,4 @@ class NativePanZoomController extends JNIObject implements PanZoomController {
|
||||
nativeSetIsLongpressEnabled(isLongpressEnabled);
|
||||
}
|
||||
}
|
||||
|
||||
@WrapForJNI(allowMultithread = true)
|
||||
private void updateOverscrollVelocity(final float x, final float y) {
|
||||
if (mOverscroll != null) {
|
||||
if (ThreadUtils.isOnUiThread() == true) {
|
||||
mOverscroll.setVelocity(x * 1000.0f, Overscroll.Axis.X);
|
||||
mOverscroll.setVelocity(y * 1000.0f, Overscroll.Axis.Y);
|
||||
} else {
|
||||
ThreadUtils.postToUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
// Multiply the velocity by 1000 to match what was done in JPZ.
|
||||
mOverscroll.setVelocity(x * 1000.0f, Overscroll.Axis.X);
|
||||
mOverscroll.setVelocity(y * 1000.0f, Overscroll.Axis.Y);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@WrapForJNI(allowMultithread = true)
|
||||
private void updateOverscrollOffset(final float x, final float y) {
|
||||
if (mOverscroll != null) {
|
||||
if (ThreadUtils.isOnUiThread() == true) {
|
||||
mOverscroll.setDistance(x, Overscroll.Axis.X);
|
||||
mOverscroll.setDistance(y, Overscroll.Axis.Y);
|
||||
} else {
|
||||
ThreadUtils.postToUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
mOverscroll.setDistance(x, Overscroll.Axis.X);
|
||||
mOverscroll.setDistance(y, Overscroll.Axis.Y);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -17,13 +17,6 @@ using mozilla::layers::APZCTreeManager;
|
||||
namespace mozilla {
|
||||
namespace widget {
|
||||
|
||||
void
|
||||
AndroidContentController::Destroy()
|
||||
{
|
||||
mAndroidWindow = nullptr;
|
||||
ChromeProcessController::Destroy();
|
||||
}
|
||||
|
||||
void
|
||||
AndroidContentController::NotifyDefaultPrevented(APZCTreeManager* aManager,
|
||||
uint64_t aInputBlockId,
|
||||
@ -82,21 +75,6 @@ AndroidContentController::PostDelayedTask(Task* aTask, int aDelayMs)
|
||||
{
|
||||
AndroidBridge::Bridge()->PostTaskToUiThread(aTask, aDelayMs);
|
||||
}
|
||||
void
|
||||
AndroidContentController::UpdateOverscrollVelocity(const float aX, const float aY)
|
||||
{
|
||||
if (mAndroidWindow) {
|
||||
mAndroidWindow->UpdateOverscrollVelocity(aX, aY);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
AndroidContentController::UpdateOverscrollOffset(const float aX,const float aY)
|
||||
{
|
||||
if (mAndroidWindow) {
|
||||
mAndroidWindow->UpdateOverscrollOffset(aX, aY);
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace widget
|
||||
} // namespace mozilla
|
||||
|
@ -12,7 +12,6 @@
|
||||
#include "mozilla/TimeStamp.h"
|
||||
#include "nsIDOMWindowUtils.h"
|
||||
#include "nsTArray.h"
|
||||
#include "nsWindow.h"
|
||||
|
||||
namespace mozilla {
|
||||
namespace layers {
|
||||
@ -25,26 +24,20 @@ class AndroidContentController final
|
||||
: public mozilla::layers::ChromeProcessController
|
||||
{
|
||||
public:
|
||||
AndroidContentController(nsWindow* aWindow,
|
||||
AndroidContentController(nsIWidget* aWidget,
|
||||
mozilla::layers::APZEventState* aAPZEventState,
|
||||
mozilla::layers::APZCTreeManager* aAPZCTreeManager)
|
||||
: mozilla::layers::ChromeProcessController(aWindow, aAPZEventState, aAPZCTreeManager)
|
||||
, mAndroidWindow(aWindow)
|
||||
: mozilla::layers::ChromeProcessController(aWidget, aAPZEventState, aAPZCTreeManager)
|
||||
{}
|
||||
|
||||
// ChromeProcessController methods
|
||||
virtual void Destroy() override;
|
||||
void HandleSingleTap(const CSSPoint& aPoint,
|
||||
Modifiers aModifiers,
|
||||
const ScrollableLayerGuid& aGuid) override;
|
||||
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;
|
||||
|
||||
static void NotifyDefaultPrevented(mozilla::layers::APZCTreeManager* aManager,
|
||||
uint64_t aInputBlockId, bool aDefaultPrevented);
|
||||
private:
|
||||
RefPtr<nsWindow> mAndroidWindow;
|
||||
};
|
||||
|
||||
} // namespace widget
|
||||
|
@ -1470,22 +1470,6 @@ auto NativePanZoomController::RequestContentRepaintWrapper(float a0, float a1, f
|
||||
return mozilla::jni::Method<RequestContentRepaintWrapper_t>::Call(this, nullptr, a0, a1, a2, a3, a4);
|
||||
}
|
||||
|
||||
constexpr char NativePanZoomController::UpdateOverscrollOffset_t::name[];
|
||||
constexpr char NativePanZoomController::UpdateOverscrollOffset_t::signature[];
|
||||
|
||||
auto NativePanZoomController::UpdateOverscrollOffset(float a0, float a1) const -> void
|
||||
{
|
||||
return mozilla::jni::Method<UpdateOverscrollOffset_t>::Call(this, nullptr, a0, a1);
|
||||
}
|
||||
|
||||
constexpr char NativePanZoomController::UpdateOverscrollVelocity_t::name[];
|
||||
constexpr char NativePanZoomController::UpdateOverscrollVelocity_t::signature[];
|
||||
|
||||
auto NativePanZoomController::UpdateOverscrollVelocity(float a0, float a1) const -> void
|
||||
{
|
||||
return mozilla::jni::Method<UpdateOverscrollVelocity_t>::Call(this, nullptr, a0, a1);
|
||||
}
|
||||
|
||||
constexpr char ProgressiveUpdateData::name[];
|
||||
|
||||
constexpr char ProgressiveUpdateData::New_t::name[];
|
||||
|
@ -4092,44 +4092,6 @@ public:
|
||||
|
||||
auto RequestContentRepaintWrapper(float, float, float, float, float) const -> void;
|
||||
|
||||
public:
|
||||
struct UpdateOverscrollOffset_t {
|
||||
typedef NativePanZoomController Owner;
|
||||
typedef void ReturnType;
|
||||
typedef void SetterType;
|
||||
typedef mozilla::jni::Args<
|
||||
float,
|
||||
float> Args;
|
||||
static constexpr char name[] = "updateOverscrollOffset";
|
||||
static constexpr char signature[] =
|
||||
"(FF)V";
|
||||
static const bool isStatic = false;
|
||||
static const bool isMultithreaded = true;
|
||||
static const mozilla::jni::ExceptionMode exceptionMode =
|
||||
mozilla::jni::ExceptionMode::ABORT;
|
||||
};
|
||||
|
||||
auto UpdateOverscrollOffset(float, float) const -> void;
|
||||
|
||||
public:
|
||||
struct UpdateOverscrollVelocity_t {
|
||||
typedef NativePanZoomController Owner;
|
||||
typedef void ReturnType;
|
||||
typedef void SetterType;
|
||||
typedef mozilla::jni::Args<
|
||||
float,
|
||||
float> Args;
|
||||
static constexpr char name[] = "updateOverscrollVelocity";
|
||||
static constexpr char signature[] =
|
||||
"(FF)V";
|
||||
static const bool isStatic = false;
|
||||
static const bool isMultithreaded = true;
|
||||
static const mozilla::jni::ExceptionMode exceptionMode =
|
||||
mozilla::jni::ExceptionMode::ABORT;
|
||||
};
|
||||
|
||||
auto UpdateOverscrollVelocity(float, float) const -> void;
|
||||
|
||||
public:
|
||||
template<class Impl> class Natives;
|
||||
};
|
||||
|
@ -638,16 +638,6 @@ public:
|
||||
});
|
||||
return true;
|
||||
}
|
||||
|
||||
void UpdateOverscrollVelocity(const float x, const float y)
|
||||
{
|
||||
mNPZC->UpdateOverscrollVelocity(x, y);
|
||||
}
|
||||
|
||||
void UpdateOverscrollOffset(const float x, const float y)
|
||||
{
|
||||
mNPZC->UpdateOverscrollOffset(x, y);
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
@ -1748,22 +1738,6 @@ nsWindow::InitEvent(WidgetGUIEvent& event, LayoutDeviceIntPoint* aPoint)
|
||||
event.time = PR_Now() / 1000;
|
||||
}
|
||||
|
||||
void
|
||||
nsWindow::UpdateOverscrollVelocity(const float aX, const float aY)
|
||||
{
|
||||
if (mNPZCSupport) {
|
||||
mNPZCSupport->UpdateOverscrollVelocity(aX, aY);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
nsWindow::UpdateOverscrollOffset(const float aX, const float aY)
|
||||
{
|
||||
if (mNPZCSupport) {
|
||||
mNPZCSupport->UpdateOverscrollOffset(aX, aY);
|
||||
}
|
||||
}
|
||||
|
||||
gfx::IntSize
|
||||
nsWindow::GetAndroidScreenBounds()
|
||||
{
|
||||
|
@ -78,9 +78,6 @@ public:
|
||||
void InitEvent(mozilla::WidgetGUIEvent& event,
|
||||
LayoutDeviceIntPoint* aPoint = 0);
|
||||
|
||||
void UpdateOverscrollVelocity(const float aX, const float aY);
|
||||
void UpdateOverscrollOffset(const float aX, const float aY);
|
||||
|
||||
//
|
||||
// nsIWidget
|
||||
//
|
||||
|
Loading…
Reference in New Issue
Block a user