mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-02 01:48:05 +00:00
Bug 1080352 - Update the rendering for <input type=range> after it was reset. r=jwatt
This commit is contained in:
parent
beb08bd4f1
commit
c3b2f7f0d5
@ -1833,13 +1833,6 @@ HTMLInputElement::SetValue(const nsAString& aValue, ErrorResult& aRv)
|
|||||||
|
|
||||||
SetValueInternal(aValue, false, true);
|
SetValueInternal(aValue, false, true);
|
||||||
|
|
||||||
if (mType == NS_FORM_INPUT_RANGE) {
|
|
||||||
nsRangeFrame* frame = do_QueryFrame(GetPrimaryFrame());
|
|
||||||
if (frame) {
|
|
||||||
frame->UpdateForValueChange();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (mFocusedValue.Equals(currentValue)) {
|
if (mFocusedValue.Equals(currentValue)) {
|
||||||
GetValue(mFocusedValue);
|
GetValue(mFocusedValue);
|
||||||
}
|
}
|
||||||
@ -2848,6 +2841,11 @@ HTMLInputElement::SetValueInternal(const nsAString& aValue,
|
|||||||
if (numberControlFrame) {
|
if (numberControlFrame) {
|
||||||
numberControlFrame->SetValueOfAnonTextControl(value);
|
numberControlFrame->SetValueOfAnonTextControl(value);
|
||||||
}
|
}
|
||||||
|
} else if (mType == NS_FORM_INPUT_RANGE) {
|
||||||
|
nsRangeFrame* frame = do_QueryFrame(GetPrimaryFrame());
|
||||||
|
if (frame) {
|
||||||
|
frame->UpdateForValueChange();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (!mParserCreating) {
|
if (!mParserCreating) {
|
||||||
OnValueChanged(true);
|
OnValueChanged(true);
|
||||||
|
@ -22,6 +22,7 @@ fuzzy-if(B2G,1,1) == stepDown.html 75pct-common-ref.html
|
|||||||
== stepUp-unthemed.html 75pct-unthemed-common-ref.html
|
== stepUp-unthemed.html 75pct-unthemed-common-ref.html
|
||||||
== stepUp.html 75pct-common-ref.html
|
== stepUp.html 75pct-common-ref.html
|
||||||
fuzzy-if(B2G,1,1) == max-prop.html 100pct-common-ref.html
|
fuzzy-if(B2G,1,1) == max-prop.html 100pct-common-ref.html
|
||||||
|
== reset-value.html reset-value-ref.html
|
||||||
|
|
||||||
# 'direction' property:
|
# 'direction' property:
|
||||||
== direction-unthemed-1.html direction-unthemed-1-ref.html
|
== direction-unthemed-1.html direction-unthemed-1-ref.html
|
||||||
@ -30,4 +31,3 @@ fuzzy-if(B2G,1,1) == max-prop.html 100pct-common-ref.html
|
|||||||
fails-if(B2G||Android) == moz-range-progress-1.html moz-range-progress-1-ref.html
|
fails-if(B2G||Android) == moz-range-progress-1.html moz-range-progress-1-ref.html
|
||||||
== moz-range-progress-2.html moz-range-progress-2-ref.html
|
== moz-range-progress-2.html moz-range-progress-2-ref.html
|
||||||
== moz-range-progress-3.html moz-range-progress-3-ref.html
|
== moz-range-progress-3.html moz-range-progress-3-ref.html
|
||||||
|
|
||||||
|
14
layout/reftests/forms/input/range/reset-value-ref.html
Normal file
14
layout/reftests/forms/input/range/reset-value-ref.html
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en-us">
|
||||||
|
<head>
|
||||||
|
<title>1080352</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<form id="form">
|
||||||
|
<input id='inputRange' type='range' step='10' min='0' max='50' value='20'><br>
|
||||||
|
<input id='inputNumber' type='number' step='10' min='0' max='500' value='30'><br>
|
||||||
|
|
||||||
|
<input type='reset'><br>
|
||||||
|
</form>
|
||||||
|
</body>
|
||||||
|
</html>
|
14
layout/reftests/forms/input/range/reset-value.html
Normal file
14
layout/reftests/forms/input/range/reset-value.html
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en-us">
|
||||||
|
<head>
|
||||||
|
<title>1080352</title>
|
||||||
|
</head>
|
||||||
|
<body onload="inputRange.value=40;inputNumber.value=40; form.reset()">
|
||||||
|
<form id="form">
|
||||||
|
<input id='inputRange' type='range' step='10' min='0' max='50' value='20'><br>
|
||||||
|
<input id='inputNumber' type='number' step='10' min='0' max='500' value='30'><br>
|
||||||
|
|
||||||
|
<input type='reset'><br>
|
||||||
|
</form>
|
||||||
|
</body>
|
||||||
|
</html>
|
Loading…
Reference in New Issue
Block a user