mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-02 10:00:54 +00:00
Bug 1442176 - 1. Remove current pin-on-caret-drag code; r=snorp
Remove the current code that pins the toolbar on caret drag, which only works for Fennec. Differential Revision: https://phabricator.services.mozilla.com/D5189
This commit is contained in:
parent
0aa327aaa4
commit
e87c3096e6
@ -27,9 +27,6 @@
|
||||
#include "nsFrameSelection.h"
|
||||
#include "nsGenericHTMLElement.h"
|
||||
#include "nsIHapticFeedback.h"
|
||||
#ifdef MOZ_WIDGET_ANDROID
|
||||
#include "nsWindow.h"
|
||||
#endif
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
@ -894,17 +891,6 @@ AccessibleCaretManager::SetSelectionDragState(bool aState) const
|
||||
if (fs) {
|
||||
fs->SetDragState(aState);
|
||||
}
|
||||
|
||||
// Pin Fennecs DynamicToolbarAnimator in place before/after dragging,
|
||||
// to avoid co-incident screen scrolling.
|
||||
#ifdef MOZ_WIDGET_ANDROID
|
||||
if (XRE_IsParentProcess()) {
|
||||
nsIDocument* doc = mPresShell->GetDocument();
|
||||
MOZ_ASSERT(doc);
|
||||
nsIWidget* widget = nsContentUtils::WidgetForDocument(doc);
|
||||
static_cast<nsWindow*>(widget)->SetSelectionDragState(aState);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
bool
|
||||
|
@ -140,13 +140,6 @@ public class LayerSession {
|
||||
private void updateOverscrollOffset(final float x, final float y) {
|
||||
LayerSession.this.updateOverscrollOffset(x, y);
|
||||
}
|
||||
|
||||
@WrapForJNI(calledFrom = "ui")
|
||||
private void onSelectionCaretDrag(final boolean dragging) {
|
||||
// Active SelectionCaretDrag requires DynamicToolbarAnimator to be pinned to
|
||||
// avoid unwanted scroll interactions.
|
||||
LayerSession.this.onSelectionCaretDrag(dragging);
|
||||
}
|
||||
}
|
||||
|
||||
protected final Compositor mCompositor = new Compositor();
|
||||
@ -482,16 +475,6 @@ public class LayerSession {
|
||||
mOverscroll.setDistance(y, OverscrollEdgeEffect.AXIS_Y);
|
||||
}
|
||||
|
||||
/* package */ void onSelectionCaretDrag(final boolean dragging) {
|
||||
if (DEBUG) {
|
||||
ThreadUtils.assertOnUiThread();
|
||||
}
|
||||
|
||||
if (mToolbar != null) {
|
||||
mToolbar.setPinned(dragging, DynamicToolbarAnimator.PinReason.CARET_DRAG);
|
||||
}
|
||||
}
|
||||
|
||||
/* package */ void onMetricsChanged(final float scrollX, final float scrollY,
|
||||
final float zoom) {
|
||||
if (DEBUG) {
|
||||
|
@ -1945,24 +1945,6 @@ nsWindow::UpdateOverscrollOffset(const float aX, const float aY)
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
nsWindow::SetSelectionDragState(bool aState)
|
||||
{
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
|
||||
if (!mLayerViewSupport) {
|
||||
return;
|
||||
}
|
||||
|
||||
const auto& compositor = mLayerViewSupport->GetJavaCompositor();
|
||||
DispatchToUiThread(
|
||||
"nsWindow::SetSelectionDragState",
|
||||
[compositor = LayerSession::Compositor::GlobalRef(compositor),
|
||||
aState] {
|
||||
compositor->OnSelectionCaretDrag(aState);
|
||||
});
|
||||
}
|
||||
|
||||
void *
|
||||
nsWindow::GetNativeData(uint32_t aDataType)
|
||||
{
|
||||
|
@ -268,7 +268,6 @@ public:
|
||||
const InputContextAction& aAction) override;
|
||||
virtual InputContext GetInputContext() override;
|
||||
|
||||
void SetSelectionDragState(bool aState);
|
||||
LayerManager* GetLayerManager(PLayerTransactionChild* aShadowManager = nullptr,
|
||||
LayersBackend aBackendHint = mozilla::layers::LayersBackend::LAYERS_NONE,
|
||||
LayerManagerPersistence aPersistence = LAYER_MANAGER_CURRENT) override;
|
||||
|
Loading…
Reference in New Issue
Block a user