mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-30 00:01:50 +00:00
Bug 734406. Fix printing and print preview for <canvas> by checking for script-enabled on the original document, not on the printing document. r=tnikkel
This commit is contained in:
parent
1171e866cf
commit
a260fe3935
@ -3534,7 +3534,15 @@ const nsCSSFrameConstructor::FrameConstructionData*
|
||||
nsCSSFrameConstructor::FindCanvasData(Element* aElement,
|
||||
nsStyleContext* aStyleContext)
|
||||
{
|
||||
if (!aElement->OwnerDoc()->IsScriptEnabled()) {
|
||||
// We want to check whether script is enabled on the document that
|
||||
// could be painting to the canvas. That's the owner document of
|
||||
// the canvas, except when the owner document is a static document,
|
||||
// in which case it's the original document it was cloned from.
|
||||
nsIDocument* doc = aElement->OwnerDoc();
|
||||
if (doc->IsStaticDocument()) {
|
||||
doc = doc->GetOriginalDocument();
|
||||
}
|
||||
if (!doc->IsScriptEnabled()) {
|
||||
return nsnull;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user