mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 597525 - Remove nsITextControlElement::GetDefaultValueFromContent(). r=ehsan
This commit is contained in:
parent
ee7bffc6cb
commit
fbe2869183
@ -18,8 +18,8 @@ class nsTextControlFrame;
|
||||
|
||||
// IID for the nsITextControl interface
|
||||
#define NS_ITEXTCONTROLELEMENT_IID \
|
||||
{ 0x3dd53b59, 0x9d8f, 0x40a3, \
|
||||
{ 0x81, 0xd7, 0xb3, 0x43, 0xa0, 0x51, 0xfc, 0xb5 } }
|
||||
{ 0x3558afa1, 0x6136, 0x4421, \
|
||||
{ 0xbd, 0xdc, 0x2c, 0x9d, 0x5f, 0xc1, 0xfb, 0x91 } }
|
||||
|
||||
/**
|
||||
* This interface is used for the text control frame to get the editor and
|
||||
@ -76,11 +76,6 @@ public:
|
||||
*/
|
||||
NS_IMETHOD_(int32_t) GetRows() = 0;
|
||||
|
||||
/**
|
||||
* Get the default value of the text control
|
||||
*/
|
||||
NS_IMETHOD_(void) GetDefaultValueFromContent(nsAString& aValue) = 0;
|
||||
|
||||
/**
|
||||
* Return true if the value of the control has been changed.
|
||||
*/
|
||||
|
@ -5192,20 +5192,6 @@ nsHTMLInputElement::GetRows()
|
||||
return DEFAULT_ROWS;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP_(void)
|
||||
nsHTMLInputElement::GetDefaultValueFromContent(nsAString& aValue)
|
||||
{
|
||||
nsTextEditorState *state = GetEditorState();
|
||||
if (state) {
|
||||
GetDefaultValue(aValue);
|
||||
// This is called by the frame to show the value.
|
||||
// We have to sanitize it when needed.
|
||||
if (!mParserCreating) {
|
||||
SanitizeValue(aValue);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
NS_IMETHODIMP_(bool)
|
||||
nsHTMLInputElement::ValueChanged() const
|
||||
{
|
||||
|
@ -142,7 +142,6 @@ public:
|
||||
NS_IMETHOD_(int32_t) GetCols();
|
||||
NS_IMETHOD_(int32_t) GetWrapCols();
|
||||
NS_IMETHOD_(int32_t) GetRows();
|
||||
NS_IMETHOD_(void) GetDefaultValueFromContent(nsAString& aValue);
|
||||
NS_IMETHOD_(bool) ValueChanged() const;
|
||||
NS_IMETHOD_(void) GetTextEditorValue(nsAString& aValue, bool aIgnoreWrap) const;
|
||||
NS_IMETHOD_(nsIEditor*) GetTextEditor();
|
||||
|
@ -112,7 +112,6 @@ public:
|
||||
NS_IMETHOD_(int32_t) GetCols();
|
||||
NS_IMETHOD_(int32_t) GetWrapCols();
|
||||
NS_IMETHOD_(int32_t) GetRows();
|
||||
NS_IMETHOD_(void) GetDefaultValueFromContent(nsAString& aValue);
|
||||
NS_IMETHOD_(bool) ValueChanged() const;
|
||||
NS_IMETHOD_(void) GetTextEditorValue(nsAString& aValue, bool aIgnoreWrap) const;
|
||||
NS_IMETHOD_(nsIEditor*) GetTextEditor();
|
||||
@ -579,9 +578,6 @@ nsHTMLTextAreaElement::SetValueChanged(bool aValueChanged)
|
||||
bool previousValue = mValueChanged;
|
||||
|
||||
mValueChanged = aValueChanged;
|
||||
if (!aValueChanged && !mState.IsEmpty()) {
|
||||
mState.EmptyValue();
|
||||
}
|
||||
|
||||
if (mValueChanged != previousValue) {
|
||||
UpdateState(true);
|
||||
@ -1492,12 +1488,6 @@ nsHTMLTextAreaElement::GetRows()
|
||||
return DEFAULT_ROWS_TEXTAREA;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP_(void)
|
||||
nsHTMLTextAreaElement::GetDefaultValueFromContent(nsAString& aValue)
|
||||
{
|
||||
GetDefaultValue(aValue);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP_(bool)
|
||||
nsHTMLTextAreaElement::ValueChanged() const
|
||||
{
|
||||
|
@ -1747,9 +1747,7 @@ nsTextEditorState::GetValue(nsAString& aValue, bool aIgnoreWrap) const
|
||||
mCachedValue.Truncate();
|
||||
}
|
||||
} else {
|
||||
if (!mTextCtrlElement->ValueChanged() || !mValue) {
|
||||
mTextCtrlElement->GetDefaultValueFromContent(aValue);
|
||||
} else {
|
||||
if (mValue) {
|
||||
aValue = NS_ConvertUTF8toUTF16(*mValue);
|
||||
}
|
||||
}
|
||||
|
@ -137,8 +137,6 @@ public:
|
||||
void SetValue(const nsAString& aValue, bool aUserInput,
|
||||
bool aSetValueAsChanged);
|
||||
void GetValue(nsAString& aValue, bool aIgnoreWrap) const;
|
||||
void EmptyValue() { if (mValue) mValue->Truncate(); }
|
||||
bool IsEmpty() const { return mValue ? mValue->IsEmpty() : true; }
|
||||
|
||||
nsresult CreatePlaceholderNode();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user