diff --git a/accessible/base/SelectionManager.cpp b/accessible/base/SelectionManager.cpp index 1c3788036a08..d846e356bc87 100644 --- a/accessible/base/SelectionManager.cpp +++ b/accessible/base/SelectionManager.cpp @@ -12,6 +12,7 @@ #include "nsAccUtils.h" #include "nsCoreUtils.h" #include "nsEventShell.h" +#include "nsFrameSelection.h" #include "nsIAccessibleTypes.h" #include "nsIDOMDocument.h" diff --git a/accessible/generic/HyperTextAccessible-inl.h b/accessible/generic/HyperTextAccessible-inl.h index f47a0e200941..81e421536839 100644 --- a/accessible/generic/HyperTextAccessible-inl.h +++ b/accessible/generic/HyperTextAccessible-inl.h @@ -14,6 +14,7 @@ #include "nsIEditor.h" #include "nsIPersistentProperties2.h" #include "nsIPlaintextEditor.h" +#include "nsFrameSelection.h" namespace mozilla { namespace a11y { @@ -143,7 +144,7 @@ HyperTextAccessible::IsCaretAtEndOfLine() const { nsRefPtr frameSelection = FrameSelection(); return frameSelection && - frameSelection->GetHint() == nsFrameSelection::HINTLEFT; + frameSelection->GetHint() == CARET_ASSOCIATE_BEFORE; } inline already_AddRefed diff --git a/accessible/generic/HyperTextAccessible.cpp b/accessible/generic/HyperTextAccessible.cpp index 738d3b00f0fa..cac3b749eb1f 100644 --- a/accessible/generic/HyperTextAccessible.cpp +++ b/accessible/generic/HyperTextAccessible.cpp @@ -1269,7 +1269,7 @@ HyperTextAccessible::CaretLineNumber() int32_t returnOffsetUnused; uint32_t caretOffset = domSel->FocusOffset(); - nsFrameSelection::HINT hint = frameSelection->GetHint(); + CaretAssociationHint hint = frameSelection->GetHint(); nsIFrame *caretFrame = frameSelection->GetFrameForNodeOffset(caretContent, caretOffset, hint, &returnOffsetUnused); NS_ENSURE_TRUE(caretFrame, -1); diff --git a/accessible/generic/HyperTextAccessible.h b/accessible/generic/HyperTextAccessible.h index 7dfd652c6adf..99f4a8338320 100644 --- a/accessible/generic/HyperTextAccessible.h +++ b/accessible/generic/HyperTextAccessible.h @@ -9,11 +9,22 @@ #include "AccessibleWrap.h" #include "nsIAccessibleTypes.h" #include "xpcAccessibleHyperText.h" +#include "nsDirection.h" +#include "WordMovementType.h" +#include "nsIFrame.h" -#include "nsFrameSelection.h" #include "nsISelectionController.h" +class nsFrameSelection; +class nsRange; +class nsIWidget; + namespace mozilla { + +namespace dom { +class Selection; +} + namespace a11y { class TextRange; diff --git a/accessible/windows/sdn/sdnAccessible.cpp b/accessible/windows/sdn/sdnAccessible.cpp index ad3a5fe8dc65..046d734c3a8a 100644 --- a/accessible/windows/sdn/sdnAccessible.cpp +++ b/accessible/windows/sdn/sdnAccessible.cpp @@ -17,6 +17,7 @@ #include "nsNameSpaceManager.h" #include "nsServiceManagerUtils.h" #include "nsWinUtils.h" +#include "nsRange.h" #include "nsAutoPtr.h" diff --git a/accessible/xpcom/xpcAccessibleTextRange.cpp b/accessible/xpcom/xpcAccessibleTextRange.cpp index 51226e4f866a..8f278979c733 100644 --- a/accessible/xpcom/xpcAccessibleTextRange.cpp +++ b/accessible/xpcom/xpcAccessibleTextRange.cpp @@ -8,8 +8,8 @@ #include "HyperTextAccessible.h" #include "TextRange.h" - - #include "nsIMutableArray.h" +#include "nsIMutableArray.h" +#include "nsComponentManagerUtils.h" using namespace mozilla; using namespace mozilla::a11y; diff --git a/content/html/content/src/nsTextEditorState.cpp b/content/html/content/src/nsTextEditorState.cpp index 9bb4f03f98e8..7989c94e035f 100644 --- a/content/html/content/src/nsTextEditorState.cpp +++ b/content/html/content/src/nsTextEditorState.cpp @@ -45,6 +45,7 @@ #include "mozilla/dom/ScriptSettings.h" #include "mozilla/dom/HTMLInputElement.h" #include "nsNumberControlFrame.h" +#include "nsFrameSelection.h" using namespace mozilla; using namespace mozilla::dom; @@ -546,7 +547,7 @@ nsTextInputSelectionImpl::CompleteMove(bool aForward, bool aExtend) // make the caret be either at the very beginning (0) or the very end int32_t offset = 0; - nsFrameSelection::HINT hint = nsFrameSelection::HINTLEFT; + CaretAssociationHint hint = CARET_ASSOCIATE_BEFORE; if (aForward) { offset = parentDIV->GetChildCount(); @@ -561,7 +562,7 @@ nsTextInputSelectionImpl::CompleteMove(bool aForward, bool aExtend) if (child->Tag() == nsGkAtoms::br) { --offset; - hint = nsFrameSelection::HINTRIGHT; // for Bug 106855 + hint = CARET_ASSOCIATE_AFTER; // for Bug 106855 } } } diff --git a/dom/base/nsGlobalWindow.cpp b/dom/base/nsGlobalWindow.cpp index cea15c8e38b6..302deea54bb3 100644 --- a/dom/base/nsGlobalWindow.cpp +++ b/dom/base/nsGlobalWindow.cpp @@ -40,6 +40,7 @@ #include "nsWindowMemoryReporter.h" #include "WindowNamedPropertiesHandler.h" #include "nsFrameSelection.h" +#include "nsISelectionListener.h" // Helper Classes #include "nsJSUtils.h" diff --git a/dom/events/ContentEventHandler.cpp b/dom/events/ContentEventHandler.cpp index 5fcffd9d9d19..65f48d9a3ffe 100644 --- a/dom/events/ContentEventHandler.cpp +++ b/dom/events/ContentEventHandler.cpp @@ -440,8 +440,8 @@ ContentEventHandler::ExpandToClusterBoundary(nsIContent* aContent, nsRefPtr fs = mPresShell->FrameSelection(); int32_t offsetInFrame; - nsFrameSelection::HINT hint = - aForward ? nsFrameSelection::HINTLEFT : nsFrameSelection::HINTRIGHT; + CaretAssociationHint hint = + aForward ? CARET_ASSOCIATE_BEFORE : CARET_ASSOCIATE_AFTER; nsIFrame* frame = fs->GetFrameForNodeOffset(aContent, int32_t(*aXPOffset), hint, &offsetInFrame); if (!frame) { diff --git a/dom/plugins/base/nsPluginInstanceOwner.cpp b/dom/plugins/base/nsPluginInstanceOwner.cpp index 98d56d562e52..a1edf28dd587 100644 --- a/dom/plugins/base/nsPluginInstanceOwner.cpp +++ b/dom/plugins/base/nsPluginInstanceOwner.cpp @@ -55,6 +55,7 @@ using mozilla::DefaultXDisplay; #include "mozilla/MouseEvents.h" #include "mozilla/TextEvents.h" #include "mozilla/dom/HTMLObjectElementBinding.h" +#include "nsFrameSelection.h" #include "nsContentCID.h" #include "nsWidgetsCID.h" diff --git a/editor/libeditor/html/tests/test_bug674770-1.html b/editor/libeditor/html/tests/test_bug674770-1.html index b422d2ee1769..f202a909897a 100644 --- a/editor/libeditor/html/tests/test_bug674770-1.html +++ b/editor/libeditor/html/tests/test_bug674770-1.html @@ -22,11 +22,6 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=674770