mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 05:11:16 +00:00
Bug 1614208 - Stop including AccessibleCaretEventHub and PresShell.h from Selection.h. r=TYLin
And fix a bunch of fallout as we now don't include nsDocShell.h everywhere. Differential Revision: https://phabricator.services.mozilla.com/D62169 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
14a5089845
commit
6615ff9fad
@ -10,6 +10,7 @@
|
||||
|
||||
#include "mozilla/dom/Selection.h"
|
||||
|
||||
#include "mozilla/AccessibleCaretEventHub.h"
|
||||
#include "mozilla/AsyncEventDispatcher.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
#include "mozilla/AutoCopyListener.h"
|
||||
@ -2719,6 +2720,16 @@ bool Selection::ContainsPoint(const nsPoint& aPoint) {
|
||||
return false;
|
||||
}
|
||||
|
||||
void Selection::MaybeNotifyAccessibleCaretEventHub(PresShell* aPresShell) {
|
||||
if (!mAccessibleCaretEventHub && aPresShell) {
|
||||
mAccessibleCaretEventHub = aPresShell->GetAccessibleCaretEventHub();
|
||||
}
|
||||
}
|
||||
|
||||
void Selection::StopNotifyingAccessibleCaretEventHub() {
|
||||
mAccessibleCaretEventHub = nullptr;
|
||||
}
|
||||
|
||||
nsPresContext* Selection::GetPresContext() const {
|
||||
PresShell* presShell = GetPresShell();
|
||||
return presShell ? presShell->GetPresContext() : nullptr;
|
||||
|
@ -8,9 +8,7 @@
|
||||
#define mozilla_Selection_h__
|
||||
|
||||
#include "mozilla/dom/StyledRange.h"
|
||||
#include "mozilla/AccessibleCaretEventHub.h"
|
||||
#include "mozilla/AutoRestore.h"
|
||||
#include "mozilla/PresShell.h"
|
||||
#include "mozilla/RangeBoundary.h"
|
||||
#include "mozilla/SelectionChangeEventDispatcher.h"
|
||||
#include "mozilla/TextRange.h"
|
||||
@ -35,6 +33,7 @@ class nsCopySupport;
|
||||
class nsHTMLCopyEncoder;
|
||||
|
||||
namespace mozilla {
|
||||
class AccessibleCaretEventHub;
|
||||
class ErrorResult;
|
||||
class HTMLEditor;
|
||||
class PostContentIterator;
|
||||
@ -84,19 +83,13 @@ class Selection final : public nsSupportsWeakReference,
|
||||
* MaybeNotifyAccessibleCaretEventHub() starts to notify
|
||||
* AccessibleCaretEventHub of selection change if aPresShell has it.
|
||||
*/
|
||||
void MaybeNotifyAccessibleCaretEventHub(PresShell* aPresShell) {
|
||||
if (!mAccessibleCaretEventHub && aPresShell) {
|
||||
mAccessibleCaretEventHub = aPresShell->GetAccessibleCaretEventHub();
|
||||
}
|
||||
}
|
||||
void MaybeNotifyAccessibleCaretEventHub(PresShell* aPresShell);
|
||||
|
||||
/**
|
||||
* StopNotifyingAccessibleCaretEventHub() stops notifying
|
||||
* AccessibleCaretEventHub of selection change.
|
||||
*/
|
||||
void StopNotifyingAccessibleCaretEventHub() {
|
||||
mAccessibleCaretEventHub = nullptr;
|
||||
}
|
||||
void StopNotifyingAccessibleCaretEventHub();
|
||||
|
||||
/**
|
||||
* EnableSelectionChangeEvent() starts to notify
|
||||
|
@ -16,6 +16,7 @@
|
||||
#include "nsPresContext.h"
|
||||
#include "mozilla/dom/Document.h"
|
||||
#include "DocumentInlines.h"
|
||||
#include "nsDocShell.h"
|
||||
#include "nsHTMLStyleSheet.h"
|
||||
#include "nsMappedAttributes.h"
|
||||
#include "nsIDocShell.h"
|
||||
|
@ -26,6 +26,7 @@
|
||||
#include "nsCOMArray.h"
|
||||
#include "nsContentList.h"
|
||||
#include "nsContentUtils.h"
|
||||
#include "nsDocShell.h"
|
||||
#include "nsError.h"
|
||||
#include "nsGkAtoms.h"
|
||||
#include "nsHTMLDocument.h"
|
||||
|
@ -6,6 +6,7 @@
|
||||
|
||||
#include "nsLayoutUtils.h"
|
||||
|
||||
#include "mozilla/AccessibleCaretEventHub.h"
|
||||
#include "mozilla/ArrayUtils.h"
|
||||
#include "mozilla/BasicEvents.h"
|
||||
#include "mozilla/dom/CanvasUtils.h"
|
||||
|
@ -6,6 +6,7 @@
|
||||
|
||||
#include "nsMathMLmactionFrame.h"
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsDocShell.h"
|
||||
#include "nsPresContext.h"
|
||||
#include "nsNameSpaceManager.h"
|
||||
#include "nsIDocShell.h"
|
||||
|
@ -23,6 +23,7 @@
|
||||
#include "mozilla/ComputedStyle.h"
|
||||
#include "nsIScrollableFrame.h"
|
||||
#include "nsContentUtils.h"
|
||||
#include "nsDocShell.h"
|
||||
#include "nsIContent.h"
|
||||
#include "nsStyleConsts.h"
|
||||
|
||||
|
@ -20,6 +20,7 @@
|
||||
#include "mozilla/net/NeckoChild.h"
|
||||
#include "mozilla/net/UrlClassifierCommon.h"
|
||||
#include "nsContentSecurityManager.h"
|
||||
#include "nsDocShell.h"
|
||||
#include "nsDocShellLoadState.h"
|
||||
#include "nsHttpHandler.h"
|
||||
#include "nsIInputStreamChannel.h"
|
||||
|
@ -14,6 +14,7 @@
|
||||
#include "mozilla/ScopeExit.h"
|
||||
#include "mozilla/Sprintf.h"
|
||||
#include "mozilla/dom/nsCSPContext.h"
|
||||
#include "mozilla/dom/nsCSPService.h"
|
||||
|
||||
#include "nsHttp.h"
|
||||
#include "nsHttpChannel.h"
|
||||
|
@ -10,6 +10,7 @@
|
||||
#include "mozilla/dom/StorageEvent.h"
|
||||
#include "mozilla/dom/BrowserChild.h"
|
||||
#include "nsGenericHTMLElement.h"
|
||||
#include "nsDocShell.h"
|
||||
#include "nsIAppWindow.h"
|
||||
#include "nsIDocShell.h"
|
||||
#include "nsIDocShellTreeOwner.h"
|
||||
|
@ -4,6 +4,7 @@
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsDocShell.h"
|
||||
#include "nsMemory.h"
|
||||
#include "mozilla/ErrorResult.h"
|
||||
#include "mozilla/ModuleUtils.h"
|
||||
|
@ -14,6 +14,7 @@
|
||||
#include "mozilla/PresShell.h"
|
||||
|
||||
#include "nsDocLoader.h"
|
||||
#include "nsDocShell.h"
|
||||
#include "nsNetUtil.h"
|
||||
#include "nsIHttpChannel.h"
|
||||
#include "nsIWebNavigation.h"
|
||||
|
@ -22,6 +22,7 @@
|
||||
#include "nsXULPopupManager.h"
|
||||
#include "nsIWidgetListener.h"
|
||||
#include "nsContentUtils.h" // for nsAutoScriptBlocker
|
||||
#include "nsDocShell.h"
|
||||
#include "mozilla/TimelineConsumers.h"
|
||||
#include "mozilla/CompositeTimelineMarker.h"
|
||||
|
||||
|
@ -42,6 +42,7 @@
|
||||
#include "nsStyleConsts.h"
|
||||
#include "nsPresContext.h"
|
||||
#include "nsContentUtils.h"
|
||||
#include "nsDocShell.h"
|
||||
#include "nsGlobalWindow.h"
|
||||
#include "nsXULTooltipListener.h"
|
||||
#include "nsXULPopupManager.h"
|
||||
|
Loading…
Reference in New Issue
Block a user