зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1645773 - Make sure to reflow when author specified borders / backgrounds are changed if we're themed. r=jfkthame
As author-specified-background/border changes can change the effective border and padding of form controls. Differential Revision: https://phabricator.services.mozilla.com/D82689
This commit is contained in:
Родитель
307b94415a
Коммит
c3f3931f8c
|
@ -0,0 +1,8 @@
|
||||||
|
<!doctype html>
|
||||||
|
<style>
|
||||||
|
textarea, input {
|
||||||
|
background: transparent;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<textarea>FOO BAR</textarea><br>
|
||||||
|
<input value="FOO BAR">
|
|
@ -0,0 +1,11 @@
|
||||||
|
<!doctype html>
|
||||||
|
<textarea>FOO BAR</textarea><br>
|
||||||
|
<input value="FOO BAR">
|
||||||
|
<script>
|
||||||
|
onload = function() {
|
||||||
|
for (let e of document.querySelectorAll("input, textarea")) {
|
||||||
|
e.getBoundingClientRect().top;
|
||||||
|
e.style.background = "transparent";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
|
@ -14,3 +14,4 @@ fuzzy-if(skiaContent,0-1,0-1) == rtl.html rtl-dynamic-style.html
|
||||||
== rtl.html in-dynamic-rtl-doc.html
|
== rtl.html in-dynamic-rtl-doc.html
|
||||||
fuzzy-if(asyncPan&&!layersGPUAccelerated,0-102,0-4168) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == padding-scrollbar-placement.html padding-scrollbar-placement-ref.html # Bug 1392106
|
fuzzy-if(asyncPan&&!layersGPUAccelerated,0-102,0-4168) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == padding-scrollbar-placement.html padding-scrollbar-placement-ref.html # Bug 1392106
|
||||||
== various-cols.html various-cols-ref.html
|
== various-cols.html various-cols-ref.html
|
||||||
|
== appearance-background-change.html appearance-background-change-ref.html
|
||||||
|
|
|
@ -244,6 +244,14 @@ nsChangeHint ComputedStyle::CalcStyleDifference(const ComputedStyle& aNewStyle,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (HasAuthorSpecifiedBorderOrBackground() !=
|
||||||
|
aNewStyle.HasAuthorSpecifiedBorderOrBackground() &&
|
||||||
|
StyleDisplay()->HasAppearance()) {
|
||||||
|
// A background-specified change may cause padding to change, so we may need
|
||||||
|
// to reflow. We use the same hint here as we do for "appearance" changes.
|
||||||
|
hint |= nsChangeHint_AllReflowHints | nsChangeHint_RepaintFrame;
|
||||||
|
}
|
||||||
|
|
||||||
MOZ_ASSERT(NS_IsHintSubset(hint, nsChangeHint_AllHints),
|
MOZ_ASSERT(NS_IsHintSubset(hint, nsChangeHint_AllHints),
|
||||||
"Added a new hint without bumping AllHints?");
|
"Added a new hint without bumping AllHints?");
|
||||||
return hint & ~nsChangeHint_NeutralChange;
|
return hint & ~nsChangeHint_NeutralChange;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче