mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-11 01:57:00 +00:00
Bug 553760, two resizers appear in textarea, hide the one for the placeholder scrollframe, r=dbaron
This commit is contained in:
parent
515419516b
commit
31fc4565a6
@ -2189,17 +2189,8 @@ nsGfxScrollFrameInner::CreateAnonymousContent(nsTArray<nsIContent*>& aElements)
|
||||
}
|
||||
|
||||
// Check if the frame is resizable.
|
||||
nsIFrame* resizableFrame = mOuter;
|
||||
if (parent) {
|
||||
// For textarea, mOuter is the frame for the anonymous div element,
|
||||
// so get the resizability from the parent textarea instead.
|
||||
nsCOMPtr<nsIDOMHTMLTextAreaElement> textAreaElement(do_QueryInterface(parent->GetContent()));
|
||||
if (textAreaElement) {
|
||||
resizableFrame = parent;
|
||||
}
|
||||
}
|
||||
|
||||
PRBool isResizable = resizableFrame->GetStyleDisplay()->mResize != NS_STYLE_RESIZE_NONE;
|
||||
PRInt8 resizeStyle = mOuter->GetStyleDisplay()->mResize;
|
||||
PRBool isResizable = resizeStyle != NS_STYLE_RESIZE_NONE;
|
||||
|
||||
nsIScrollableFrame *scrollable = do_QueryFrame(mOuter);
|
||||
|
||||
@ -2275,7 +2266,7 @@ nsGfxScrollFrameInner::CreateAnonymousContent(nsTArray<nsIContent*>& aElements)
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
nsAutoString dir;
|
||||
switch (resizableFrame->GetStyleDisplay()->mResize) {
|
||||
switch (resizeStyle) {
|
||||
case NS_STYLE_RESIZE_HORIZONTAL:
|
||||
if (IsScrollbarOnRight()) {
|
||||
dir.AssignLiteral("right");
|
||||
|
@ -12,6 +12,7 @@ HTTP(..) == text-control-baseline-1.html text-control-baseline-1-ref.html
|
||||
== input-text-dynamic-height-1.xul input-text-dynamic-height-1-ref.xul
|
||||
== textbox-align-baseline-1.xul textbox-align-baseline-1-ref.xul # test for bug 494901
|
||||
== textbox-setsize.xul textbox-setsize-ref.xul
|
||||
== textarea-resize.html textarea-resize-ref.html
|
||||
|
||||
== radio-label-dynamic.html radio-label-dynamic-ref.html
|
||||
== out-of-bounds-selectedindex.html out-of-bounds-selectedindex-ref.html # test for bug 471741
|
||||
|
3
layout/reftests/forms/textarea-resize-ref.html
Normal file
3
layout/reftests/forms/textarea-resize-ref.html
Normal file
@ -0,0 +1,3 @@
|
||||
<html><body>
|
||||
<div style="overflow: auto; -moz-resize: both; background: white; -moz-appearance: none; border: 0; padding: 0; margin: 0; width: 100px; height: 100px;"></div>
|
||||
</body></html>
|
3
layout/reftests/forms/textarea-resize.html
Normal file
3
layout/reftests/forms/textarea-resize.html
Normal file
@ -0,0 +1,3 @@
|
||||
<html><body>
|
||||
<textarea style="-moz-appearance: none; background: white; border: 0; padding: 0; margin: 0; width: 100px; height: 100px;" resizable="false" multiline="true" width="100" height="100"></textarea>
|
||||
</body></html>
|
@ -152,6 +152,7 @@ input > .anonymous-div {
|
||||
but it's needed to make 'text-decoration' "work" on text inputs. */
|
||||
text-decoration: inherit;
|
||||
ime-mode: inherit;
|
||||
-moz-resize: inherit;
|
||||
}
|
||||
|
||||
textarea > .anonymous-div.wrap,
|
||||
@ -168,6 +169,7 @@ textarea > .placeholder {
|
||||
color: GrayText;
|
||||
overflow: hidden;
|
||||
pointer-events: none;
|
||||
-moz-resize: none;
|
||||
}
|
||||
|
||||
textarea > .placeholder {
|
||||
|
Loading…
x
Reference in New Issue
Block a user