зеркало из https://github.com/mozilla/gecko-dev.git
Bug 913292 - Make sure that nsIFrame::AttributeChanged is only called after any final changes that Element::AfterSetAttr may make. r=bz
This commit is contained in:
Родитель
17392fdc76
Коммит
ba91cea8e3
|
@ -1712,10 +1712,6 @@ Element::SetAttrAndNotify(int32_t aNamespaceID,
|
|||
|
||||
UpdateState(aNotify);
|
||||
|
||||
if (aNotify) {
|
||||
nsNodeUtils::AttributeChanged(this, aNamespaceID, aName, aModType);
|
||||
}
|
||||
|
||||
if (aCallAfterSetAttr) {
|
||||
rv = AfterSetAttr(aNamespaceID, aName, &aValueForAfterSetAttr, aNotify);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
@ -1726,6 +1722,10 @@ Element::SetAttrAndNotify(int32_t aNamespaceID,
|
|||
}
|
||||
}
|
||||
|
||||
if (aNotify) {
|
||||
nsNodeUtils::AttributeChanged(this, aNamespaceID, aName, aModType);
|
||||
}
|
||||
|
||||
if (aFireMutation) {
|
||||
nsMutationEvent mutation(true, NS_MUTATION_ATTRMODIFIED);
|
||||
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<body>
|
||||
<input type=range value=100 max=100>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,20 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="reftest-wait">
|
||||
<!-- Test: when changing the 'max' IDL property, the thumb of the range
|
||||
should be moved to the appropriate position. This test also
|
||||
sets the max to less than the current value which checks that the
|
||||
rendering code handles repositioning correctly in the case that
|
||||
sanitization of the value is needed for a non-value change. -->
|
||||
<script type="text/javascript">
|
||||
function setValue()
|
||||
{
|
||||
document.getElementById('i').max = "10";
|
||||
document.documentElement.className = '';
|
||||
}
|
||||
document.addEventListener("MozReftestInvalidate", setValue);
|
||||
setTimeout(setValue, 2000); // useful when not running under reftest suite
|
||||
</script>
|
||||
<body>
|
||||
<input type=range id='i' max=100>
|
||||
</body>
|
||||
</html>
|
|
@ -23,6 +23,7 @@ default-preferences pref(dom.experimental_forms_range,true)
|
|||
== stepDown.html 75pct-common-ref.html
|
||||
== stepUp-unthemed.html 75pct-unthemed-common-ref.html
|
||||
== stepUp.html 75pct-common-ref.html
|
||||
== max-prop.html 100pct-common-ref.html
|
||||
|
||||
# 'direction' property:
|
||||
== direction-unthemed-1.html direction-unthemed-1-ref.html
|
||||
|
|
Загрузка…
Ссылка в новой задаче