From 6c30f8962cabc94656377cde15ec0d2340aeef4e Mon Sep 17 00:00:00 2001 From: Kartikaya Gupta Date: Fri, 20 Oct 2017 10:28:17 -0400 Subject: [PATCH] Bug 1410239 - Ensure the mozPrintCallback gets invoked when painting canvases. r=jrmuizel MozReview-Commit-ID: ADKQb3vVuPs --HG-- extra : rebase_source : 1f9c4ee6ca3fbdfdb300052736e20af676df4869 --- layout/generic/nsHTMLCanvasFrame.cpp | 2 ++ layout/reftests/pagination/reftest.list | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/layout/generic/nsHTMLCanvasFrame.cpp b/layout/generic/nsHTMLCanvasFrame.cpp index 0722154e6433..12d89abd3655 100644 --- a/layout/generic/nsHTMLCanvasFrame.cpp +++ b/layout/generic/nsHTMLCanvasFrame.cpp @@ -130,6 +130,8 @@ public: nsDisplayListBuilder* aDisplayListBuilder) override { HTMLCanvasElement* element = static_cast(mFrame->GetContent()); + element->HandlePrintCallback(mFrame->PresContext()->Type()); + switch(element->GetCurrentContextType()) { case CanvasContextType::Canvas2D: case CanvasContextType::WebGL1: diff --git a/layout/reftests/pagination/reftest.list b/layout/reftests/pagination/reftest.list index 27cd36fc26ae..207ed83fd8e7 100644 --- a/layout/reftests/pagination/reftest.list +++ b/layout/reftests/pagination/reftest.list @@ -103,7 +103,7 @@ fuzzy-if(skiaContent,1,23) == resize-reflow-001.html resize-reflow-001.ref.html == 115199-2a.html 115199-2-ref.html == 115199-2b.html 115199-2-ref.html == 652178-1.html 652178-1-ref2.html -fuzzy-if(cocoaWidget,1,5000) skip-if(webrender) == 745025-1.html 745025-1-ref.html +fuzzy-if(cocoaWidget,1,5000) == 745025-1.html 745025-1-ref.html == 820496-1.html 820496-1-ref.html # NOTE: These tests don't yet rigorously test what they're