Bug 1636508 - Make tabs.captureTab compatible with Fission r=mattwoodrow,robwu,geckoview-reviewers,agi
Also fix WindowGlobalParent.drawSnapshot() to render the currently visible viewport when called with a null rect, and clarify the webidl comment. Differential Revision: https://phabricator.services.mozilla.com/D87971
This commit is contained in:
@@ -623,8 +623,13 @@ already_AddRefed<mozilla::dom::Promise> WindowGlobalParent::DrawSnapshot(
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
if (!gfx::CrossProcessPaint::Start(this, aRect, (float)aScale, color,
|
||||
gfx::CrossProcessPaintFlags::None,
|
||||
gfx::CrossProcessPaintFlags flags = gfx::CrossProcessPaintFlags::None;
|
||||
if (!aRect) {
|
||||
// If no explicit Rect was passed, we want the currently visible viewport.
|
||||
flags = gfx::CrossProcessPaintFlags::DrawView;
|
||||
}
|
||||
|
||||
if (!gfx::CrossProcessPaint::Start(this, aRect, (float)aScale, color, flags,
|
||||
promise)) {
|
||||
aRv = NS_ERROR_FAILURE;
|
||||
return nullptr;
|
||||
|
||||
Reference in New Issue
Block a user