зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset 079ee7b41c3a (bug 1156160) for selection reftest failures
CLOSED TREE
This commit is contained in:
Родитель
b49cd98e3b
Коммит
702d0d5527
|
@ -32,8 +32,7 @@ namespace mozilla {
|
||||||
#define AC_LOGV(message, ...) \
|
#define AC_LOGV(message, ...) \
|
||||||
AC_LOGV_BASE("AccessibleCaretEventHub (%p): " message, this, ##__VA_ARGS__);
|
AC_LOGV_BASE("AccessibleCaretEventHub (%p): " message, this, ##__VA_ARGS__);
|
||||||
|
|
||||||
NS_IMPL_ISUPPORTS(AccessibleCaretEventHub,
|
NS_IMPL_ISUPPORTS(AccessibleCaretEventHub, nsIReflowObserver, nsIScrollObserver,
|
||||||
nsIDocumentActivity, nsIReflowObserver, nsIScrollObserver,
|
|
||||||
nsISelectionListener, nsISupportsWeakReference);
|
nsISelectionListener, nsISupportsWeakReference);
|
||||||
|
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
|
@ -434,12 +433,6 @@ AccessibleCaretEventHub::Init()
|
||||||
|
|
||||||
mDocShell = static_cast<nsDocShell*>(docShell);
|
mDocShell = static_cast<nsDocShell*>(docShell);
|
||||||
|
|
||||||
nsIDocument* doc = mPresShell->GetDocument();
|
|
||||||
if (doc) {
|
|
||||||
doc->RegisterActivityObserver(
|
|
||||||
NS_ISUPPORTS_CAST(nsIDocumentActivity*, this));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (sUseLongTapInjector) {
|
if (sUseLongTapInjector) {
|
||||||
mLongTapInjectorTimer = do_CreateInstance("@mozilla.org/timer;1");
|
mLongTapInjectorTimer = do_CreateInstance("@mozilla.org/timer;1");
|
||||||
}
|
}
|
||||||
|
@ -464,12 +457,6 @@ AccessibleCaretEventHub::Terminate()
|
||||||
docShell->RemoveWeakScrollObserver(this);
|
docShell->RemoveWeakScrollObserver(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
nsIDocument* doc = mPresShell->GetDocument();
|
|
||||||
if (doc) {
|
|
||||||
doc->UnregisterActivityObserver(
|
|
||||||
NS_ISUPPORTS_CAST(nsIDocumentActivity*, this));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (mLongTapInjectorTimer) {
|
if (mLongTapInjectorTimer) {
|
||||||
mLongTapInjectorTimer->Cancel();
|
mLongTapInjectorTimer->Cancel();
|
||||||
}
|
}
|
||||||
|
@ -714,25 +701,6 @@ AccessibleCaretEventHub::ReflowInterruptible(DOMHighResTimeStamp aStart,
|
||||||
return Reflow(aStart, aEnd);
|
return Reflow(aStart, aEnd);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
AccessibleCaretEventHub::NotifyOwnerDocumentActivityChanged()
|
|
||||||
{
|
|
||||||
if (!mInitialized) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
MOZ_ASSERT(mRefCnt.get() > 1, "Expect caller holds us as well!");
|
|
||||||
|
|
||||||
nsIDocument* doc = mPresShell->GetDocument();
|
|
||||||
if (!doc) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!doc->Hidden()) {
|
|
||||||
mManager->OnDocumentVisible();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
AccessibleCaretEventHub::AsyncPanZoomStarted()
|
AccessibleCaretEventHub::AsyncPanZoomStarted()
|
||||||
{
|
{
|
||||||
|
|
|
@ -11,7 +11,6 @@
|
||||||
#include "mozilla/UniquePtr.h"
|
#include "mozilla/UniquePtr.h"
|
||||||
#include "mozilla/WeakPtr.h"
|
#include "mozilla/WeakPtr.h"
|
||||||
#include "nsCOMPtr.h"
|
#include "nsCOMPtr.h"
|
||||||
#include "nsIDocumentActivity.h"
|
|
||||||
#include "nsIFrame.h"
|
#include "nsIFrame.h"
|
||||||
#include "nsIReflowObserver.h"
|
#include "nsIReflowObserver.h"
|
||||||
#include "nsIScrollObserver.h"
|
#include "nsIScrollObserver.h"
|
||||||
|
@ -61,12 +60,10 @@ class WidgetTouchEvent;
|
||||||
// Please see the wiki page for more information.
|
// Please see the wiki page for more information.
|
||||||
// https://wiki.mozilla.org/AccessibleCaret
|
// https://wiki.mozilla.org/AccessibleCaret
|
||||||
//
|
//
|
||||||
class AccessibleCaretEventHub
|
class AccessibleCaretEventHub : public nsIReflowObserver,
|
||||||
: public nsIDocumentActivity
|
public nsIScrollObserver,
|
||||||
, public nsIReflowObserver
|
public nsISelectionListener,
|
||||||
, public nsIScrollObserver
|
public nsSupportsWeakReference
|
||||||
, public nsISelectionListener
|
|
||||||
, public nsSupportsWeakReference
|
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
explicit AccessibleCaretEventHub(nsIPresShell* aPresShell);
|
explicit AccessibleCaretEventHub(nsIPresShell* aPresShell);
|
||||||
|
@ -79,7 +76,6 @@ public:
|
||||||
void NotifyBlur(bool aIsLeavingDocument);
|
void NotifyBlur(bool aIsLeavingDocument);
|
||||||
|
|
||||||
NS_DECL_ISUPPORTS
|
NS_DECL_ISUPPORTS
|
||||||
NS_DECL_NSIDOCUMENTACTIVITY
|
|
||||||
NS_DECL_NSIREFLOWOBSERVER
|
NS_DECL_NSIREFLOWOBSERVER
|
||||||
NS_DECL_NSISELECTIONLISTENER
|
NS_DECL_NSISELECTIONLISTENER
|
||||||
|
|
||||||
|
|
|
@ -751,13 +751,6 @@ AccessibleCaretManager::OnFrameReconstruction()
|
||||||
mSecondCaret->EnsureApzAware();
|
mSecondCaret->EnsureApzAware();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
AccessibleCaretManager::OnDocumentVisible()
|
|
||||||
{
|
|
||||||
AC_LOG("%s: UpdateCarets()", __FUNCTION__);
|
|
||||||
UpdateCarets();
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
AccessibleCaretManager::SetLastInputSource(uint16_t aInputSource)
|
AccessibleCaretManager::SetLastInputSource(uint16_t aInputSource)
|
||||||
{
|
{
|
||||||
|
|
|
@ -103,10 +103,6 @@ public:
|
||||||
// was reconstructed, resulting in the content elements getting cloned.
|
// was reconstructed, resulting in the content elements getting cloned.
|
||||||
virtual void OnFrameReconstruction();
|
virtual void OnFrameReconstruction();
|
||||||
|
|
||||||
// Called by AccessibleCaretEventHub to inform us that the document
|
|
||||||
// becomes visible.
|
|
||||||
virtual void OnDocumentVisible();
|
|
||||||
|
|
||||||
// Update the manager with the last input source that was observed. This
|
// Update the manager with the last input source that was observed. This
|
||||||
// is used in part to determine if the carets should be shown or hidden.
|
// is used in part to determine if the carets should be shown or hidden.
|
||||||
void SetLastInputSource(uint16_t aInputSource);
|
void SetLastInputSource(uint16_t aInputSource);
|
||||||
|
|
Загрузка…
Ссылка в новой задаче