зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1456169 part 2. Remove the now-unnecessary nsITextControlElement::GetPlaceholderNode. r=emilio
MozReview-Commit-ID: FcVbeHEwkMz
This commit is contained in:
Родитель
ca622386bd
Коммит
f82660f831
|
@ -2460,16 +2460,6 @@ HTMLInputElement::CreateEditor()
|
|||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP_(Element*)
|
||||
HTMLInputElement::GetPlaceholderNode()
|
||||
{
|
||||
nsTextEditorState* state = GetEditorState();
|
||||
if (state) {
|
||||
return state->GetPlaceholderNode();
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP_(void)
|
||||
HTMLInputElement::UpdateOverlayTextVisibility(bool aNotify)
|
||||
{
|
||||
|
|
|
@ -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*) GetPlaceholderNode() override;
|
||||
NS_IMETHOD_(Element*) GetPreviewNode() override;
|
||||
NS_IMETHOD_(void) UpdateOverlayTextVisibility(bool aNotify) override;
|
||||
NS_IMETHOD_(void) SetPreviewValue(const nsAString& aValue) override;
|
||||
|
|
|
@ -261,12 +261,6 @@ HTMLTextAreaElement::CreateEditor()
|
|||
return mState.PrepareEditor();
|
||||
}
|
||||
|
||||
NS_IMETHODIMP_(Element*)
|
||||
HTMLTextAreaElement::GetPlaceholderNode()
|
||||
{
|
||||
return mState.GetPlaceholderNode();
|
||||
}
|
||||
|
||||
NS_IMETHODIMP_(void)
|
||||
HTMLTextAreaElement::UpdateOverlayTextVisibility(bool aNotify)
|
||||
{
|
||||
|
|
|
@ -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*) GetPlaceholderNode() override;
|
||||
NS_IMETHOD_(Element*) GetPreviewNode() override;
|
||||
NS_IMETHOD_(void) UpdateOverlayTextVisibility(bool aNotify) override;
|
||||
NS_IMETHOD_(bool) GetPlaceholderVisibility() override;
|
||||
|
|
|
@ -133,11 +133,6 @@ public:
|
|||
*/
|
||||
NS_IMETHOD CreateEditor() = 0;
|
||||
|
||||
/**
|
||||
* Get the placeholder anonymous node for the text control.
|
||||
*/
|
||||
NS_IMETHOD_(mozilla::dom::Element*) GetPlaceholderNode() = 0;
|
||||
|
||||
/**
|
||||
* Get the preview anonymous node for the text control.
|
||||
*/
|
||||
|
|
|
@ -1107,12 +1107,6 @@ nsTextEditorState::GetRootNode()
|
|||
return mBoundFrame ? mBoundFrame->GetRootNode() : nullptr;
|
||||
}
|
||||
|
||||
Element*
|
||||
nsTextEditorState::GetPlaceholderNode()
|
||||
{
|
||||
return mBoundFrame ? mBoundFrame->GetPlaceholderNode() : nullptr;
|
||||
}
|
||||
|
||||
Element*
|
||||
nsTextEditorState::GetPreviewNode()
|
||||
{
|
||||
|
|
|
@ -199,7 +199,6 @@ public:
|
|||
bool IsEmpty() const { return mValue ? mValue->IsEmpty() : true; }
|
||||
|
||||
mozilla::dom::Element* GetRootNode();
|
||||
mozilla::dom::Element* GetPlaceholderNode();
|
||||
mozilla::dom::Element* GetPreviewNode();
|
||||
|
||||
bool IsSingleLineTextControl() const {
|
||||
|
|
|
@ -1407,7 +1407,7 @@ nsTextControlFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||
while (kid) {
|
||||
// If the frame is the placeholder or preview frame, we should only show
|
||||
// it if it has to be visible.
|
||||
if (!((kid->GetContent() == txtCtrl->GetPlaceholderNode() &&
|
||||
if (!((kid->GetContent() == mPlaceholderDiv &&
|
||||
!txtCtrl->GetPlaceholderVisibility()) ||
|
||||
(kid->GetContent() == txtCtrl->GetPreviewNode() &&
|
||||
!txtCtrl->GetPreviewVisibility()))) {
|
||||
|
@ -1421,8 +1421,7 @@ mozilla::dom::Element*
|
|||
nsTextControlFrame::GetPseudoElement(CSSPseudoElementType aType)
|
||||
{
|
||||
if (aType == CSSPseudoElementType::placeholder) {
|
||||
nsCOMPtr<nsITextControlElement> txtCtrl = do_QueryInterface(GetContent());
|
||||
return txtCtrl->GetPlaceholderNode();
|
||||
return mPlaceholderDiv;
|
||||
}
|
||||
|
||||
return nsContainerFrame::GetPseudoElement(aType);
|
||||
|
|
|
@ -193,10 +193,6 @@ public: //for methods who access nsTextControlFrame directly
|
|||
return mRootNode;
|
||||
}
|
||||
|
||||
mozilla::dom::Element* GetPlaceholderNode() const {
|
||||
return mPlaceholderDiv;
|
||||
}
|
||||
|
||||
mozilla::dom::Element* GetPreviewNode() const {
|
||||
return mPreviewDiv;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче