Bug 1387143 part 16. Remove nsISelectionPrivate::GetType. r=mats

This commit is contained in:
Boris Zbarsky 2018-05-08 13:52:38 -04:00
Родитель 7fe6dda3aa
Коммит 5453e2995c
4 изменённых файлов: 12 добавлений и 24 удалений

Просмотреть файл

@ -16,7 +16,7 @@
#include "nsDocShellLoadTypes.h"
#include "nsIChannel.h"
#include "nsIInterfaceRequestorUtils.h"
#include "nsISelectionPrivate.h"
#include "nsISelectionController.h"
#include "nsTraceRefcnt.h"
#include "nsIWebProgress.h"
#include "prenv.h"
@ -24,6 +24,7 @@
#include "nsIURI.h"
#include "mozilla/dom/Element.h"
#include "mozilla/dom/HTMLBodyElement.h"
#include "mozilla/dom/Selection.h"
using namespace mozilla;
using namespace mozilla::a11y;
@ -590,18 +591,15 @@ logging::FocusDispatched(Accessible* aTarget)
}
void
logging::SelChange(nsISelection* aSelection, DocAccessible* aDocument,
logging::SelChange(dom::Selection* aSelection, DocAccessible* aDocument,
int16_t aReason)
{
nsCOMPtr<nsISelectionPrivate> privSel(do_QueryInterface(aSelection));
int16_t type = 0;
privSel->GetType(&type);
SelectionType type = aSelection->GetType();
const char* strType = 0;
if (type == nsISelectionController::SELECTION_NORMAL)
if (type == SelectionType::eNormal)
strType = "normal";
else if (type == nsISelectionController::SELECTION_SPELLCHECK)
else if (type == SelectionType::eSpellCheck)
strType = "spellcheck";
else
strType = "unknown";

Просмотреть файл

@ -14,11 +14,15 @@
class nsIDocument;
class nsINode;
class nsIRequest;
class nsISelection;
class nsISupports;
class nsIWebProgress;
namespace mozilla {
namespace dom {
class Selection;
} // namespace dom
namespace a11y {
class AccEvent;
@ -128,7 +132,7 @@ void FocusDispatched(Accessible* aTarget);
/**
* Log the selection change.
*/
void SelChange(nsISelection* aSelection, DocAccessible* aDocument,
void SelChange(dom::Selection* aSelection, DocAccessible* aDocument,
int16_t aReason);
/**

Просмотреть файл

@ -1295,14 +1295,6 @@ Selection::Clear(nsPresContext* aPresContext)
return NS_OK;
}
NS_IMETHODIMP
Selection::GetType(int16_t* aType)
{
NS_ENSURE_ARG_POINTER(aType);
*aType = ToRawSelectionType(Type());
return NS_OK;
}
// RangeMatches*Point
//
// Compares the range beginning or ending point, and returns true if it

Просмотреть файл

@ -31,12 +31,6 @@ native ScrollAxis(nsIPresShell::ScrollAxis);
[uuid(0c9f4f74-ee7e-4fe9-be6b-0ba856368178)]
interface nsISelectionPrivate : nsISupports
{
/**
* Returns the type of the selection (see nsISelectionController for
* available constants).
*/
readonly attribute short type;
/**
* Return array of ranges intersecting with the given DOM interval.
*/