Bug 503355 - drawWindow should have an option to draw with scrollbars and at the current viewport r=vladimir

--HG--
extra : rebase_source : afad172931caa4d1fa37edeeaabec0e933cc447c
This commit is contained in:
Rob Arnold 2009-07-21 15:45:21 -07:00
parent 766d192858
commit 4b817e70c5
2 changed files with 6 additions and 0 deletions

View File

@ -3338,6 +3338,9 @@ nsCanvasRenderingContext2D::DrawWindow(nsIDOMWindow* aWindow, float aX, float aY
if (flags & nsIDOMCanvasRenderingContext2D::DRAWWINDOW_DRAW_CARET) {
renderDocFlags |= nsIPresShell::RENDER_CARET;
}
if (flags & nsIDOMCanvasRenderingContext2D::DRAWWINDOW_DRAW_VIEW) {
renderDocFlags &= ~nsIPresShell::RENDER_IGNORE_VIEWPORT_SCROLLING;
}
PRBool oldDisableValue = nsLayoutUtils::sDisableGetUsedXAssertions;
nsLayoutUtils::sDisableGetUsedXAssertions = oldDisableValue || skipFlush;

View File

@ -171,6 +171,9 @@ interface nsIDOMCanvasRenderingContext2D : nsISupports
// be batched up
const unsigned long DRAWWINDOW_DO_NOT_FLUSH = 0x02;
// Draw scrollbars and scroll the viewport if they are present
const unsigned long DRAWWINDOW_DRAW_VIEW = 0x04;
/**
* Renders a region of a window into the canvas. The contents of
* the window's viewport are rendered, ignoring viewport clipping