mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1088158 - Update the visibility state of placeholders for textareas correctly when they get their anonymous content; r=roc
This commit is contained in:
parent
5ab6e267d4
commit
45eba4c718
2
editor/reftests/1088158-ref.html
Normal file
2
editor/reftests/1088158-ref.html
Normal file
@ -0,0 +1,2 @@
|
||||
<!DOCTYPE html>
|
||||
<textarea placeholder="placeholder"></textarea>
|
8
editor/reftests/1088158.html
Normal file
8
editor/reftests/1088158.html
Normal file
@ -0,0 +1,8 @@
|
||||
<!DOCTYPE html>
|
||||
<script>
|
||||
onload = function() {
|
||||
var t = document.createElement('textarea');
|
||||
t.placeholder = "placeholder";
|
||||
document.body.appendChild(t.cloneNode(true));
|
||||
}
|
||||
</script>
|
@ -127,3 +127,4 @@ needs-focus == spellcheck-contenteditable-focused-reframe.html spellcheck-conten
|
||||
== spellcheck-contenteditable-property-dynamic-override-inherit.html spellcheck-contenteditable-disabled-ref.html
|
||||
needs-focus == 969773.html 969773-ref.html
|
||||
== 997805.html 997805-ref.html
|
||||
== 1088158.html 1088158-ref.html
|
||||
|
@ -351,6 +351,13 @@ nsTextControlFrame::CreateAnonymousContent(nsTArray<ContentInfo>& aElements)
|
||||
placeholderStyleContext))) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
|
||||
if (!IsSingleLineTextControl()) {
|
||||
// For textareas, UpdateValueDisplay doesn't initialize the visibility
|
||||
// status of the placeholder because it returns early, so we have to
|
||||
// do that manually here.
|
||||
txtCtrl->UpdatePlaceholderVisibility(true);
|
||||
}
|
||||
}
|
||||
|
||||
rv = UpdateValueDisplay(false);
|
||||
|
Loading…
Reference in New Issue
Block a user