зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1013054. Don't propagate non-repaint change hints to the canvas frame. r=mattwoodrow
This commit is contained in:
Родитель
91f1cc1251
Коммит
291d28f350
|
@ -278,7 +278,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) ||
|
||||
|
@ -295,22 +295,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); background:yellow; padding:2px">Hello
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html class="reftest-wait">
|
||||
<body style="transform:translateY(50px); background:yellow; padding:2px">Hello
|
||||
<script>
|
||||
document.body.getBoundingClientRect();
|
||||
document.body.style.transform = "translateY(30px)";
|
||||
function doTest() {
|
||||
document.body.style.transform = "translateY(10px)";
|
||||
document.documentElement.removeAttribute("class");
|
||||
}
|
||||
// Using MozReftestInvalidate here does not work; unclear why.
|
||||
setTimeout(doTest, 250);
|
||||
</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
|
||||
== 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
|
||||
|
|
Загрузка…
Ссылка в новой задаче