mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 737889 - Make sure that clearing the readonly attribute does not disable spell checking; r=roc
This commit is contained in:
parent
1c087a36bd
commit
833302e22f
@ -855,6 +855,10 @@ nsHTMLInputElement::AfterSetAttr(PRInt32 aNameSpaceID, nsIAtom* aName,
|
|||||||
}
|
}
|
||||||
|
|
||||||
UpdateEditableState(aNotify);
|
UpdateEditableState(aNotify);
|
||||||
|
nsTextEditorState *state = GetEditorState();
|
||||||
|
if (state) {
|
||||||
|
state->UpdateEditableState(aNotify);
|
||||||
|
}
|
||||||
UpdateState(aNotify);
|
UpdateState(aNotify);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1293,6 +1293,7 @@ nsHTMLTextAreaElement::AfterSetAttr(PRInt32 aNameSpaceID, nsIAtom* aName,
|
|||||||
|
|
||||||
if (aName == nsGkAtoms::readonly) {
|
if (aName == nsGkAtoms::readonly) {
|
||||||
UpdateEditableState(aNotify);
|
UpdateEditableState(aNotify);
|
||||||
|
mState->UpdateEditableState(aNotify);
|
||||||
}
|
}
|
||||||
UpdateState(aNotify);
|
UpdateState(aNotify);
|
||||||
}
|
}
|
||||||
|
@ -44,6 +44,7 @@
|
|||||||
#include "nsITextControlElement.h"
|
#include "nsITextControlElement.h"
|
||||||
#include "nsITextControlFrame.h"
|
#include "nsITextControlFrame.h"
|
||||||
#include "nsCycleCollectionParticipant.h"
|
#include "nsCycleCollectionParticipant.h"
|
||||||
|
#include "nsIContent.h"
|
||||||
|
|
||||||
class nsTextInputListener;
|
class nsTextInputListener;
|
||||||
class nsTextControlFrame;
|
class nsTextControlFrame;
|
||||||
@ -238,6 +239,12 @@ public:
|
|||||||
void WillInitEagerly() { mSelectionRestoreEagerInit = true; }
|
void WillInitEagerly() { mSelectionRestoreEagerInit = true; }
|
||||||
bool HasNeverInitializedBefore() const { return !mEverInited; }
|
bool HasNeverInitializedBefore() const { return !mEverInited; }
|
||||||
|
|
||||||
|
void UpdateEditableState(bool aNotify) {
|
||||||
|
if (mRootNode) {
|
||||||
|
mRootNode->UpdateEditableState(aNotify);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
friend class RestoreSelectionState;
|
friend class RestoreSelectionState;
|
||||||
|
|
||||||
|
@ -44,6 +44,7 @@ fails-if(Android) != spellcheck-input-property-dynamic-override-inherit.html spe
|
|||||||
fails-if(Android) != spellcheck-textarea-attr.html spellcheck-textarea-ref.html
|
fails-if(Android) != spellcheck-textarea-attr.html spellcheck-textarea-ref.html
|
||||||
needs-focus == spellcheck-textarea-focused.html spellcheck-textarea-ref.html
|
needs-focus == spellcheck-textarea-focused.html spellcheck-textarea-ref.html
|
||||||
needs-focus == spellcheck-textarea-focused-reframe.html spellcheck-textarea-ref.html
|
needs-focus == spellcheck-textarea-focused-reframe.html spellcheck-textarea-ref.html
|
||||||
|
needs-focus == spellcheck-textarea-focused-notreadonly.html spellcheck-textarea-ref.html
|
||||||
fails-if(Android) != spellcheck-textarea-nofocus.html spellcheck-textarea-ref.html
|
fails-if(Android) != spellcheck-textarea-nofocus.html spellcheck-textarea-ref.html
|
||||||
fails-if(Android) != spellcheck-textarea-disabled.html spellcheck-textarea-ref.html
|
fails-if(Android) != spellcheck-textarea-disabled.html spellcheck-textarea-ref.html
|
||||||
fails-if(Android) != spellcheck-textarea-attr-inherit.html spellcheck-textarea-ref.html
|
fails-if(Android) != spellcheck-textarea-attr-inherit.html spellcheck-textarea-ref.html
|
||||||
|
@ -0,0 +1,18 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<textarea id="testBox" readonly></textarea>
|
||||||
|
<script type="text/javascript">
|
||||||
|
//Adding focus to the textbox should trigger a spellcheck
|
||||||
|
var textbox = document.getElementById("testBox");
|
||||||
|
addEventListener("load", function() {
|
||||||
|
textbox.readOnly = false;
|
||||||
|
textbox.focus();
|
||||||
|
textbox.value = "blahblahblah";
|
||||||
|
textbox.selectionStart = textbox.selectionEnd = 0;
|
||||||
|
}, false);
|
||||||
|
</script>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
Loading…
Reference in New Issue
Block a user