Bug 1632425 - Part 2: Mark const methods as such r=masayuki

Depends on D77812

Differential Revision: https://phabricator.services.mozilla.com/D77942
This commit is contained in:
Kagami Sascha Rosylight 2020-06-03 03:08:58 +00:00
Родитель 60c853771e
Коммит c948a3aa98
6 изменённых файлов: 6 добавлений и 6 удалений

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

@ -133,7 +133,7 @@ void UIEvent::InitUIEvent(const nsAString& typeArg, bool canBubbleArg,
}
already_AddRefed<nsIContent> UIEvent::GetRangeParentContentAndOffset(
int32_t* aOffset) {
int32_t* aOffset) const {
if (NS_WARN_IF(!mPresContext)) {
return nullptr;
}

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

@ -85,7 +85,7 @@ class UIEvent : public Event {
* nullptr, you should use GetRangeParentContent() instead.
*/
MOZ_CAN_RUN_SCRIPT already_AddRefed<nsIContent>
GetRangeParentContentAndOffset(int32_t* aOffset);
GetRangeParentContentAndOffset(int32_t* aOffset) const;
/**
* If you also need to compute range parent in C++ code, you should use

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

@ -4692,7 +4692,7 @@ bool EditorBase::IsActiveInDOMWindow() const {
return SameCOMIdentity(content, piTarget);
}
bool EditorBase::IsAcceptableInputEvent(WidgetGUIEvent* aGUIEvent) {
bool EditorBase::IsAcceptableInputEvent(WidgetGUIEvent* aGUIEvent) const {
// If the event is trusted, the event should always cause input.
if (NS_WARN_IF(!aGUIEvent)) {
return false;

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

@ -565,7 +565,7 @@ class EditorBase : public nsIEditor,
* i.e., The aGUIEvent should be handled by another inner editor or ancestor
* elements.
*/
virtual bool IsAcceptableInputEvent(WidgetGUIEvent* aGUIEvent);
virtual bool IsAcceptableInputEvent(WidgetGUIEvent* aGUIEvent) const;
/**
* FindSelectionRoot() returns a selection root of this editor when aNode

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

@ -6132,7 +6132,7 @@ bool HTMLEditor::OurWindowHasFocus() const {
return ourWindow == focusedWindow;
}
bool HTMLEditor::IsAcceptableInputEvent(WidgetGUIEvent* aGUIEvent) {
bool HTMLEditor::IsAcceptableInputEvent(WidgetGUIEvent* aGUIEvent) const {
if (!EditorBase::IsAcceptableInputEvent(aGUIEvent)) {
return false;
}

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

@ -171,7 +171,7 @@ class HTMLEditor final : public TextEditor,
virtual bool IsActiveInDOMWindow() const override;
virtual dom::EventTarget* GetDOMEventTarget() const override;
virtual Element* FindSelectionRoot(nsINode* aNode) const override;
virtual bool IsAcceptableInputEvent(WidgetGUIEvent* aGUIEvent) override;
virtual bool IsAcceptableInputEvent(WidgetGUIEvent* aGUIEvent) const override;
virtual nsresult GetPreferredIMEState(widget::IMEState* aState) override;
/**