Bug 1463511: Remove useless form.css rule and nsTextControlFrame anon class. r?heycam
Only <textarea> has GetWrapRows() > 0, and the rule for textarea disappeared in
bug 82711.
MozReview-Commit-ID: ERcoLVcufbH
--- a/layout/forms/nsTextControlFrame.cpp
+++ b/layout/forms/nsTextControlFrame.cpp
@@ -459,19 +459,16 @@ nsTextControlFrame::CreateRootNode()
// Make our root node editable
mRootNode->SetFlags(NODE_IS_EDITABLE);
// Set the necessary classes on the text control. We use class values instead
// of a 'style' attribute so that the style comes from a user-agent style
// sheet and is still applied even if author styles are disabled.
nsAutoString classValue;
classValue.AppendLiteral("anonymous-div");
- if (GetWrapCols() > 0) {
- classValue.AppendLiteral(" wrap");
- }
if (!IsSingleLineTextControl()) {
// We can't just inherit the overflow because setting visible overflow will
// crash when the number of lines exceeds the height of the textarea and
// setting -moz-hidden-unscrollable overflow (NS_STYLE_OVERFLOW_CLIP)
// doesn't paint the caret for some reason.
const nsStyleDisplay* disp = StyleDisplay();
if (disp->mOverflowX != NS_STYLE_OVERFLOW_VISIBLE &&
--- a/layout/forms/nsTextControlFrame.h
+++ b/layout/forms/nsTextControlFrame.h
@@ -207,17 +207,16 @@ public: //for methods who access nsTextC
NS_ASSERTION(txtCtrl, "Content not a text control element"); \
return txtCtrl->name(); \
}
DEFINE_TEXTCTRL_CONST_FORWARDER(bool, IsSingleLineTextControl)
DEFINE_TEXTCTRL_CONST_FORWARDER(bool, IsTextArea)
DEFINE_TEXTCTRL_CONST_FORWARDER(bool, IsPasswordTextControl)
DEFINE_TEXTCTRL_CONST_FORWARDER(int32_t, GetCols)
- DEFINE_TEXTCTRL_CONST_FORWARDER(int32_t, GetWrapCols)
DEFINE_TEXTCTRL_CONST_FORWARDER(int32_t, GetRows)
#undef DEFINE_TEXTCTRL_CONST_FORWARDER
protected:
class EditorInitializer;
friend class EditorInitializer;
friend class nsTextEditorState; // needs access to UpdateValueDisplay
--- a/layout/style/res/forms.css
+++ b/layout/style/res/forms.css
@@ -168,19 +168,16 @@ textarea > .preview-div {
}
input > .anonymous-div,
input::placeholder,
input > .preview-div {
white-space: pre;
}
-input > .anonymous-div.wrap {
- white-space: pre-wrap;
-}
textarea > .anonymous-div.inherit-overflow,
input > .anonymous-div.inherit-overflow {
overflow: inherit;
}
textarea > .anonymous-div.inherit-scroll-behavior,
input > .anonymous-div.inherit-scroll-behavior {
scroll-behavior: inherit;
overscroll-behavior: inherit;