mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 787623. Call MarkContextClean immediately if we're not going to receive a DidTransactionCallback. r=joedrew
--HG-- extra : rebase_source : 459c517fba4b6c2e6e6d95200aebec9369c0edb6
This commit is contained in:
parent
8f39d91f36
commit
d1f472b4ee
@ -4321,6 +4321,9 @@ nsCanvasRenderingContext2D::GetCanvasLayer(nsDisplayListBuilder* aBuilder,
|
||||
// If we don't have anything to draw, don't bother.
|
||||
if (!mValid || !mSurface || mSurface->CairoStatus() || !mThebes ||
|
||||
!mSurfaceCreated) {
|
||||
// No DidTransactionCallback will be received, so mark the context clean
|
||||
// now so future invalidations will be dispatched.
|
||||
MarkContextClean();
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
@ -4337,6 +4340,9 @@ nsCanvasRenderingContext2D::GetCanvasLayer(nsDisplayListBuilder* aBuilder,
|
||||
nsRefPtr<CanvasLayer> canvasLayer = aManager->CreateCanvasLayer();
|
||||
if (!canvasLayer) {
|
||||
NS_WARNING("CreateCanvasLayer returned null!");
|
||||
// No DidTransactionCallback will be received, so mark the context clean
|
||||
// now so future invalidations will be dispatched.
|
||||
MarkContextClean();
|
||||
return nullptr;
|
||||
}
|
||||
CanvasRenderingContext2DUserData *userData = nullptr;
|
||||
|
@ -4626,6 +4626,9 @@ nsCanvasRenderingContext2DAzure::GetCanvasLayer(nsDisplayListBuilder* aBuilder,
|
||||
LayerManager *aManager)
|
||||
{
|
||||
if (!mValid) {
|
||||
// No DidTransactionCallback will be received, so mark the context clean
|
||||
// now so future invalidations will be dispatched.
|
||||
MarkContextClean();
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
@ -4646,6 +4649,9 @@ nsCanvasRenderingContext2DAzure::GetCanvasLayer(nsDisplayListBuilder* aBuilder,
|
||||
nsRefPtr<CanvasLayer> canvasLayer = aManager->CreateCanvasLayer();
|
||||
if (!canvasLayer) {
|
||||
NS_WARNING("CreateCanvasLayer returned null!");
|
||||
// No DidTransactionCallback will be received, so mark the context clean
|
||||
// now so future invalidations will be dispatched.
|
||||
MarkContextClean();
|
||||
return nullptr;
|
||||
}
|
||||
CanvasRenderingContext2DUserDataAzure *userData = nullptr;
|
||||
|
6
layout/reftests/canvas/empty-transaction-1-ref.html
Normal file
6
layout/reftests/canvas/empty-transaction-1-ref.html
Normal file
@ -0,0 +1,6 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<body>
|
||||
<div style="background:black; width:100px; height:100px;"></div>
|
||||
</body>
|
||||
</html>
|
14
layout/reftests/canvas/empty-transaction-1.html
Normal file
14
layout/reftests/canvas/empty-transaction-1.html
Normal file
@ -0,0 +1,14 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html class="reftest-wait">
|
||||
<body>
|
||||
<canvas style="display:block" id="c" width="100" height="100"></canvas>
|
||||
<script>
|
||||
var ctx = document.getElementById("c").getContext("2d");
|
||||
function doTest() {
|
||||
document.documentElement.removeAttribute("class");
|
||||
ctx.fillRect(0, 0, 100, 100);
|
||||
}
|
||||
window.addEventListener("MozReftestInvalidate", doTest, false);
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -1,6 +1,8 @@
|
||||
== default-size.html default-size-ref.html
|
||||
== size-1.html size-1-ref.html
|
||||
|
||||
== empty-transaction-1.html empty-transaction-1-ref.html
|
||||
|
||||
== image-rendering-test.html image-rendering-ref.html
|
||||
== image-shadow.html image-shadow-ref.html
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user