Backed out 3 changesets (bug 1597679) for Android debug build bustage at build/src/dom/base/nsContentAreaDragDrop.cpp

Backed out changeset 6a73b58e0db4 (bug 1597679)
Backed out changeset 90a172eff2de (bug 1597679)
Backed out changeset d4a156cf28ff (bug 1597679)
This commit is contained in:
Coroiu Cristina
2019-11-24 09:02:53 +02:00
parent 60d868f4c2
commit 46945eade0
28 changed files with 513 additions and 564 deletions

View File

@@ -24,6 +24,7 @@
#include "nsCRTGlue.h"
#include "nsQueryObject.h"
#include "nsITextControlElement.h"
#include "nsIRadioVisitor.h"
#include "InputType.h"
@@ -944,8 +945,8 @@ static nsresult FireEventForAccessibility(HTMLInputElement* aTarget,
HTMLInputElement::HTMLInputElement(
already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo,
FromParser aFromParser, FromClone aFromClone)
: TextControlElement(std::move(aNodeInfo), aFromParser,
kInputDefaultType->value),
: nsGenericHTMLFormElementWithState(std::move(aNodeInfo), aFromParser,
kInputDefaultType->value),
mAutocompleteAttrState(nsContentUtils::eAutocompleteAttrState_Unknown),
mAutocompleteInfoState(nsContentUtils::eAutocompleteAttrState_Unknown),
mDisabledChanged(false),
@@ -1036,8 +1037,8 @@ TextControlState* HTMLInputElement::GetEditorState() const {
NS_IMPL_CYCLE_COLLECTION_CLASS(HTMLInputElement)
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(HTMLInputElement,
TextControlElement)
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(
HTMLInputElement, nsGenericHTMLFormElementWithState)
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mValidity)
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mControllers)
if (tmp->IsSingleLineTextControl(false)) {
@@ -1049,8 +1050,8 @@ NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(HTMLInputElement,
}
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(HTMLInputElement,
TextControlElement)
NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(
HTMLInputElement, nsGenericHTMLFormElementWithState)
NS_IMPL_CYCLE_COLLECTION_UNLINK(mValidity)
NS_IMPL_CYCLE_COLLECTION_UNLINK(mControllers)
if (tmp->IsSingleLineTextControl(false)) {
@@ -1063,11 +1064,9 @@ NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(HTMLInputElement,
// XXX should unlink more?
NS_IMPL_CYCLE_COLLECTION_UNLINK_END
NS_IMPL_ISUPPORTS_CYCLE_COLLECTION_INHERITED(HTMLInputElement,
TextControlElement,
imgINotificationObserver,
nsIImageLoadingContent,
nsIConstraintValidation)
NS_IMPL_ISUPPORTS_CYCLE_COLLECTION_INHERITED(
HTMLInputElement, nsGenericHTMLFormElementWithState, nsITextControlElement,
imgINotificationObserver, nsIImageLoadingContent, nsIConstraintValidation)
// nsINode
@@ -2235,11 +2234,11 @@ TextEditor* HTMLInputElement::GetTextEditorFromState() {
return nullptr;
}
TextEditor* HTMLInputElement::GetTextEditor() {
return GetTextEditorFromState();
}
NS_IMETHODIMP_(TextEditor*)
HTMLInputElement::GetTextEditor() { return GetTextEditorFromState(); }
TextEditor* HTMLInputElement::GetTextEditorWithoutCreation() {
NS_IMETHODIMP_(TextEditor*)
HTMLInputElement::GetTextEditorWithoutCreation() {
TextControlState* state = GetEditorState();
if (!state) {
return nullptr;
@@ -2247,7 +2246,8 @@ TextEditor* HTMLInputElement::GetTextEditorWithoutCreation() {
return state->GetTextEditorWithoutCreation();
}
nsISelectionController* HTMLInputElement::GetSelectionController() {
NS_IMETHODIMP_(nsISelectionController*)
HTMLInputElement::GetSelectionController() {
TextControlState* state = GetEditorState();
if (state) {
return state->GetSelectionController();
@@ -2263,7 +2263,8 @@ nsFrameSelection* HTMLInputElement::GetConstFrameSelection() {
return nullptr;
}
nsresult HTMLInputElement::BindToFrame(nsTextControlFrame* aFrame) {
NS_IMETHODIMP
HTMLInputElement::BindToFrame(nsTextControlFrame* aFrame) {
TextControlState* state = GetEditorState();
if (state) {
return state->BindToFrame(aFrame);
@@ -2271,14 +2272,16 @@ nsresult HTMLInputElement::BindToFrame(nsTextControlFrame* aFrame) {
return NS_ERROR_FAILURE;
}
void HTMLInputElement::UnbindFromFrame(nsTextControlFrame* aFrame) {
NS_IMETHODIMP_(void)
HTMLInputElement::UnbindFromFrame(nsTextControlFrame* aFrame) {
TextControlState* state = GetEditorState();
if (state && aFrame) {
state->UnbindFromFrame(aFrame);
}
}
nsresult HTMLInputElement::CreateEditor() {
NS_IMETHODIMP
HTMLInputElement::CreateEditor() {
TextControlState* state = GetEditorState();
if (state) {
return state->PrepareEditor();
@@ -2286,14 +2289,16 @@ nsresult HTMLInputElement::CreateEditor() {
return NS_ERROR_FAILURE;
}
void HTMLInputElement::UpdateOverlayTextVisibility(bool aNotify) {
NS_IMETHODIMP_(void)
HTMLInputElement::UpdateOverlayTextVisibility(bool aNotify) {
TextControlState* state = GetEditorState();
if (state) {
state->UpdateOverlayTextVisibility(aNotify);
}
}
bool HTMLInputElement::GetPlaceholderVisibility() {
NS_IMETHODIMP_(bool)
HTMLInputElement::GetPlaceholderVisibility() {
TextControlState* state = GetEditorState();
if (!state) {
return false;
@@ -2302,21 +2307,24 @@ bool HTMLInputElement::GetPlaceholderVisibility() {
return state->GetPlaceholderVisibility();
}
void HTMLInputElement::SetPreviewValue(const nsAString& aValue) {
NS_IMETHODIMP_(void)
HTMLInputElement::SetPreviewValue(const nsAString& aValue) {
TextControlState* state = GetEditorState();
if (state) {
state->SetPreviewText(aValue, true);
}
}
void HTMLInputElement::GetPreviewValue(nsAString& aValue) {
NS_IMETHODIMP_(void)
HTMLInputElement::GetPreviewValue(nsAString& aValue) {
TextControlState* state = GetEditorState();
if (state) {
state->GetPreviewText(aValue);
}
}
void HTMLInputElement::EnablePreview() {
NS_IMETHODIMP_(void)
HTMLInputElement::EnablePreview() {
if (mIsPreviewEnabled) {
return;
}
@@ -2327,9 +2335,11 @@ void HTMLInputElement::EnablePreview() {
nsChangeHint_ReconstructFrame);
}
bool HTMLInputElement::IsPreviewEnabled() { return mIsPreviewEnabled; }
NS_IMETHODIMP_(bool)
HTMLInputElement::IsPreviewEnabled() { return mIsPreviewEnabled; }
bool HTMLInputElement::GetPreviewVisibility() {
NS_IMETHODIMP_(bool)
HTMLInputElement::GetPreviewVisibility() {
TextControlState* state = GetEditorState();
if (!state) {
return false;
@@ -2723,7 +2733,8 @@ nsresult HTMLInputElement::SetValueInternal(const nsAString& aValue,
return NS_OK;
}
nsresult HTMLInputElement::SetValueChanged(bool aValueChanged) {
NS_IMETHODIMP
HTMLInputElement::SetValueChanged(bool aValueChanged) {
bool valueChangedBefore = mValueChanged;
mValueChanged = aValueChanged;
@@ -6705,17 +6716,21 @@ nsresult HTMLInputElement::GetValidationMessage(nsAString& aValidationMessage,
return mInputType->GetValidationMessage(aValidationMessage, aType);
}
bool HTMLInputElement::IsSingleLineTextControl() const {
NS_IMETHODIMP_(bool)
HTMLInputElement::IsSingleLineTextControl() const {
return IsSingleLineTextControl(false);
}
bool HTMLInputElement::IsTextArea() const { return false; }
NS_IMETHODIMP_(bool)
HTMLInputElement::IsTextArea() const { return false; }
bool HTMLInputElement::IsPasswordTextControl() const {
NS_IMETHODIMP_(bool)
HTMLInputElement::IsPasswordTextControl() const {
return mType == NS_FORM_INPUT_PASSWORD;
}
int32_t HTMLInputElement::GetCols() {
NS_IMETHODIMP_(int32_t)
HTMLInputElement::GetCols() {
// Else we know (assume) it is an input with size attr
const nsAttrValue* attr = GetParsedAttr(nsGkAtoms::size);
if (attr && attr->Type() == nsAttrValue::eInteger) {
@@ -6728,13 +6743,16 @@ int32_t HTMLInputElement::GetCols() {
return DEFAULT_COLS;
}
int32_t HTMLInputElement::GetWrapCols() {
NS_IMETHODIMP_(int32_t)
HTMLInputElement::GetWrapCols() {
return 0; // only textarea's can have wrap cols
}
int32_t HTMLInputElement::GetRows() { return DEFAULT_ROWS; }
NS_IMETHODIMP_(int32_t)
HTMLInputElement::GetRows() { return DEFAULT_ROWS; }
void HTMLInputElement::GetDefaultValueFromContent(nsAString& aValue) {
NS_IMETHODIMP_(void)
HTMLInputElement::GetDefaultValueFromContent(nsAString& aValue) {
TextControlState* state = GetEditorState();
if (state) {
GetDefaultValue(aValue);
@@ -6746,29 +6764,28 @@ void HTMLInputElement::GetDefaultValueFromContent(nsAString& aValue) {
}
}
bool HTMLInputElement::ValueChanged() const { return mValueChanged; }
NS_IMETHODIMP_(bool)
HTMLInputElement::ValueChanged() const { return mValueChanged; }
void HTMLInputElement::GetTextEditorValue(nsAString& aValue,
bool aIgnoreWrap) const {
NS_IMETHODIMP_(void)
HTMLInputElement::GetTextEditorValue(nsAString& aValue,
bool aIgnoreWrap) const {
TextControlState* state = GetEditorState();
if (state) {
state->GetValue(aValue, aIgnoreWrap);
}
}
bool HTMLInputElement::TextEditorValueEquals(const nsAString& aValue) const {
TextControlState* state = GetEditorState();
return state ? state->ValueEquals(aValue) : aValue.IsEmpty();
}
void HTMLInputElement::InitializeKeyboardEventListeners() {
NS_IMETHODIMP_(void)
HTMLInputElement::InitializeKeyboardEventListeners() {
TextControlState* state = GetEditorState();
if (state) {
state->InitializeKeyboardEventListeners();
}
}
void HTMLInputElement::OnValueChanged(bool aNotify, ValueChangeKind aKind) {
NS_IMETHODIMP_(void)
HTMLInputElement::OnValueChanged(bool aNotify, ValueChangeKind aKind) {
if (aKind != ValueChangeKind::Internal) {
mLastValueChangeWasInteractive = aKind == ValueChangeKind::UserInteraction;
}
@@ -6787,7 +6804,8 @@ void HTMLInputElement::OnValueChanged(bool aNotify, ValueChangeKind aKind) {
}
}
bool HTMLInputElement::HasCachedSelection() {
NS_IMETHODIMP_(bool)
HTMLInputElement::HasCachedSelection() {
bool isCached = false;
TextControlState* state = GetEditorState();
if (state) {