зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1013054. Don't propagate non-repaint change hints to the canvas frame. r=mattwoodrow
--HG-- extra : rebase_source : c5e9613baf7a444dafbb1b9677cf7b4bd5381140
This commit is contained in:
Родитель
eb7adfb6d1
Коммит
372f537079
|
@ -280,7 +280,7 @@ ApplyRenderingChangeToTree(nsPresContext* aPresContext,
|
|||
nsIFrame* aFrame,
|
||||
nsChangeHint aChange)
|
||||
{
|
||||
// We check StyleDisplay()->HasTransform() in addition to checking
|
||||
// We check StyleDisplay()->HasTransformStyle() in addition to checking
|
||||
// IsTransformed() since we can get here for some frames that don't support
|
||||
// CSS transforms.
|
||||
NS_ASSERTION(!(aChange & nsChangeHint_UpdateTransformLayer) ||
|
||||
|
@ -297,22 +297,29 @@ ApplyRenderingChangeToTree(nsPresContext* aPresContext,
|
|||
}
|
||||
}
|
||||
|
||||
// If the frame's background is propagated to an ancestor, walk up to
|
||||
// that ancestor.
|
||||
nsStyleContext *bgSC;
|
||||
while (!nsCSSRendering::FindBackground(aFrame, &bgSC)) {
|
||||
aFrame = aFrame->GetParent();
|
||||
NS_ASSERTION(aFrame, "root frame must paint");
|
||||
}
|
||||
|
||||
// Trigger rendering updates by damaging this frame and any
|
||||
// continuations of this frame.
|
||||
|
||||
// XXX this needs to detect the need for a view due to an opacity change and deal with it...
|
||||
|
||||
#ifdef DEBUG
|
||||
gInApplyRenderingChangeToTree = true;
|
||||
#endif
|
||||
if (aChange & nsChangeHint_RepaintFrame) {
|
||||
// If the frame's background is propagated to an ancestor, walk up to
|
||||
// that ancestor and apply the RepaintFrame change hint to it.
|
||||
nsStyleContext *bgSC;
|
||||
nsIFrame* propagatedFrame = aFrame;
|
||||
while (!nsCSSRendering::FindBackground(propagatedFrame, &bgSC)) {
|
||||
propagatedFrame = propagatedFrame->GetParent();
|
||||
NS_ASSERTION(aFrame, "root frame must paint");
|
||||
}
|
||||
|
||||
if (propagatedFrame != aFrame) {
|
||||
DoApplyRenderingChangeToTree(propagatedFrame, nsChangeHint_RepaintFrame);
|
||||
aChange = NS_SubtractHint(aChange, nsChangeHint_RepaintFrame);
|
||||
if (!aChange) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
DoApplyRenderingChangeToTree(aFrame, aChange);
|
||||
#ifdef DEBUG
|
||||
gInApplyRenderingChangeToTree = false;
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<body style="transform:translateY(10px);">
|
||||
<span style="padding:2px; background:yellow"> </span>
|
|
@ -0,0 +1,13 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html class="reftest-wait">
|
||||
<body style="transform:translateY(50px);">
|
||||
<span style="padding:2px; background:yellow"> </span>
|
||||
<script>
|
||||
console.log(document.body.getBoundingClientRect());
|
||||
document.body.style.transform = "translateY(30px)";
|
||||
function doTest() {
|
||||
document.body.style.transform = "translateY(10px)";
|
||||
document.documentElement.removeAttribute("class");
|
||||
}
|
||||
window.addEventListener("MozReftestInvalidate", doTest);
|
||||
</script>
|
|
@ -1811,6 +1811,7 @@ skip-if(Android) == 966510-2.html 966510-2-ref.html # same as above
|
|||
fuzzy-if(/^Windows\x20NT\x206\.2/.test(http.oscpu),1,24) == 991046-1.html 991046-1-ref.html
|
||||
pref(layout.css.overflow-clip-box.enabled,true) == 992447.html 992447-ref.html
|
||||
pref(layout.css.sticky.enabled,true) == 1005405-1.html 1005405-1-ref.html
|
||||
fuzzy-if(/^Windows\x20NT\x205\.1/.test(http.oscpu),255,1) == 1013054-1.html 1013054-1-ref.html
|
||||
pref(layout.css.will-change.enabled,true) == 1018522-1.html 1018522-1-ref.html
|
||||
pref(browser.display.use_document_fonts,0) == 1022481-1.html 1022481-1-ref.html
|
||||
== 1022612-1.html 1022612-1-ref.html
|
||||
|
|
Загрузка…
Ссылка в новой задаче