Bug 1456169 part 3. Remove the now-unnecessary nsITextControlElement::GetPreviewNode. r=emilio

MozReview-Commit-ID: 3goF5VXvQap
This commit is contained in:
Boris Zbarsky 2018-04-24 02:17:18 -04:00
Родитель f82660f831
Коммит 36ff5f731b
6 изменённых файлов: 1 добавлений и 24 удалений

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

@ -2480,16 +2480,6 @@ HTMLInputElement::GetPlaceholderVisibility()
return state->GetPlaceholderVisibility();
}
NS_IMETHODIMP_(Element*)
HTMLInputElement::GetPreviewNode()
{
nsTextEditorState* state = GetEditorState();
if (state) {
return state->GetPreviewNode();
}
return nullptr;
}
NS_IMETHODIMP_(void)
HTMLInputElement::SetPreviewValue(const nsAString& aValue)
{

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

@ -246,7 +246,6 @@ public:
NS_IMETHOD BindToFrame(nsTextControlFrame* aFrame) override;
NS_IMETHOD_(void) UnbindFromFrame(nsTextControlFrame* aFrame) override;
NS_IMETHOD CreateEditor() override;
NS_IMETHOD_(Element*) GetPreviewNode() override;
NS_IMETHOD_(void) UpdateOverlayTextVisibility(bool aNotify) override;
NS_IMETHOD_(void) SetPreviewValue(const nsAString& aValue) override;
NS_IMETHOD_(void) GetPreviewValue(nsAString& aValue) override;

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

@ -273,12 +273,6 @@ HTMLTextAreaElement::GetPlaceholderVisibility()
return mState.GetPlaceholderVisibility();
}
NS_IMETHODIMP_(Element*)
HTMLTextAreaElement::GetPreviewNode()
{
return mState.GetPreviewNode();
}
NS_IMETHODIMP_(void)
HTMLTextAreaElement::SetPreviewValue(const nsAString& aValue)
{

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

@ -99,7 +99,6 @@ public:
NS_IMETHOD BindToFrame(nsTextControlFrame* aFrame) override;
NS_IMETHOD_(void) UnbindFromFrame(nsTextControlFrame* aFrame) override;
NS_IMETHOD CreateEditor() override;
NS_IMETHOD_(Element*) GetPreviewNode() override;
NS_IMETHOD_(void) UpdateOverlayTextVisibility(bool aNotify) override;
NS_IMETHOD_(bool) GetPlaceholderVisibility() override;
NS_IMETHOD_(bool) GetPreviewVisibility() override;

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

@ -133,11 +133,6 @@ public:
*/
NS_IMETHOD CreateEditor() = 0;
/**
* Get the preview anonymous node for the text control.
*/
NS_IMETHOD_(mozilla::dom::Element*) GetPreviewNode() = 0;
/**
* Update preview value for the text control.
*/

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

@ -1409,7 +1409,7 @@ nsTextControlFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
// it if it has to be visible.
if (!((kid->GetContent() == mPlaceholderDiv &&
!txtCtrl->GetPlaceholderVisibility()) ||
(kid->GetContent() == txtCtrl->GetPreviewNode() &&
(kid->GetContent() == mPreviewDiv &&
!txtCtrl->GetPreviewVisibility()))) {
BuildDisplayListForChild(aBuilder, kid, set, 0);
}