mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-17 22:32:51 +00:00
Bug 1050493 - Invalidate ColorLayer bounds changes. r=roc
--HG-- extra : rebase_source : 2196e9cb32a41771b9078ec1e66dbb97ef430b71
This commit is contained in:
parent
3cefe14dd4
commit
f705025184
@ -324,6 +324,7 @@ struct ColorLayerProperties : public LayerPropertiesBase
|
||||
explicit ColorLayerProperties(ColorLayer *aLayer)
|
||||
: LayerPropertiesBase(aLayer)
|
||||
, mColor(aLayer->GetColor())
|
||||
, mBounds(aLayer->GetBounds())
|
||||
{ }
|
||||
|
||||
virtual nsIntRegion ComputeChangeInternal(NotifySubDocInvalidationFunc aCallback,
|
||||
@ -336,10 +337,17 @@ struct ColorLayerProperties : public LayerPropertiesBase
|
||||
return NewTransformedBounds();
|
||||
}
|
||||
|
||||
return nsIntRegion();
|
||||
nsIntRegion boundsDiff;
|
||||
boundsDiff.Xor(mBounds, color->GetBounds());
|
||||
|
||||
nsIntRegion result;
|
||||
AddTransformedRegion(result, boundsDiff, mTransform);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
gfxRGBA mColor;
|
||||
nsIntRect mBounds;
|
||||
};
|
||||
|
||||
struct ImageLayerProperties : public LayerPropertiesBase
|
||||
|
18
layout/reftests/bugs/1050493-1-ref.html
Normal file
18
layout/reftests/bugs/1050493-1-ref.html
Normal file
@ -0,0 +1,18 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<meta charset="utf-8">
|
||||
<title>Test for bug 1050493</title>
|
||||
|
||||
<style>
|
||||
body {
|
||||
position: relative;
|
||||
}
|
||||
#box {
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
background-color: red;
|
||||
position: absolute;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div style="left: 5.556750627747686px; top: 0.5041006554218519px;" id="box"></div>
|
41
layout/reftests/bugs/1050493-1.html
Normal file
41
layout/reftests/bugs/1050493-1.html
Normal file
@ -0,0 +1,41 @@
|
||||
<!DOCTYPE html>
|
||||
<html class="reftest-wait">
|
||||
<meta charset="utf-8">
|
||||
<title>Test for bug 1050493</title>
|
||||
|
||||
<style>
|
||||
body {
|
||||
position: relative;
|
||||
}
|
||||
#box {
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
background-color: red;
|
||||
position: absolute;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div style="left: 0; top: 0;" id="box"></div>
|
||||
|
||||
<script>
|
||||
var positions = [
|
||||
{ x: 4.6260797642782014, y: 0.46260797642782014 },
|
||||
{ x: 5.0304173163526205, y: 0.4878118314685598 },
|
||||
{ x: 5.0304173163526205, y: 0.5041006554218519 },
|
||||
{ x: 5.556750627747686, y: 0.5041006554218519 }];
|
||||
var s = document.getElementById('box').style,
|
||||
i = 0;
|
||||
function f() {
|
||||
if (i < positions.length) {
|
||||
s.left = positions[i].x + "px";
|
||||
s.top = positions[i].y + "px";
|
||||
i++;
|
||||
requestAnimationFrame(f);
|
||||
} else {
|
||||
document.documentElement.className = "";
|
||||
}
|
||||
}
|
||||
window.addEventListener("MozReftestInvalidate", function () {
|
||||
f();
|
||||
});
|
||||
</script>
|
@ -1826,6 +1826,7 @@ pref(browser.display.use_document_fonts,0) == 1022481-1.html 1022481-1-ref.html
|
||||
== 1042104-1.html 1042104-1-ref.html
|
||||
== 1044198-1.html 1044198-1-ref.html
|
||||
== 1049499-1.html 1049499-1-ref.html
|
||||
== 1050493-1.html 1050493-1-ref.html
|
||||
== 1050788-1.html about:blank
|
||||
== 1053035-1-flex.html 1053035-1-ref.html
|
||||
test-pref(layout.css.grid.enabled,true) == 1053035-1-grid.html 1053035-1-ref.html
|
||||
|
Loading…
x
Reference in New Issue
Block a user