Without patch 1, the final 4 of the set of 7 tests fail on Linux with
accelerated layers (whereas all the ones they were copied from, added in
bug 995661, pass, given the patches in that bug but not this one). (I
don't need to enable skia-canvas to see the failures without patch 1. I
thought that didn't match my earlier testing, but I probably just never
tested that combination. This means the failures happen even without
CanvasRenderingContext2D::DrawWindow going through the codepath where it
creates a DrawTarget.)
--HG--
rename : content/canvas/test/test_drawWindow.html => content/canvas/test/chrome/test_drawWindow_widget_layers.html
This test covers some basic cases, such as drawing the complete window
to a canvas of the same size, drawing a part of the window to a
different offset within the canvas, drawing parts of the window against
different backgrounds and against a transparent background, and doing
multiple such drawWindow calls on the same canvas.
It runs its tests both with an iframe (whose background is transparent)
and content in a new window (which has a white backdrop).
Bug 995721 will add further tests (in mochitest-chrome) that exercise
drawWindow from a toplevel chrome window, which exercises the
DRAWWINDOW_USE_WIDGET_LAYERS codepath, which these tests do not.
The final 4 tests in each set of 7 fail without patch 2 in this bug.
This is needed to allow us to return to using partial-canvas invalidates
in the reftest harness, though only for the platforms that go through
this codepath.
This patch was mostly generated with the following command:
find . -name "*.h" -o -name "*.cpp" | xargs sed -e '/WrapObject(JSContext/ {; N; s/\(WrapObject(JSContext *\* *a\{0,1\}[Cc]x\),\n\{0,1\} *JS::Handle<JSObject\*> a\{0,1\}[sS]cope/\1/ ; }' -i ""
and then reverting the changes that made to
dom/bindings/BindingUtils.h, since those WrapObject methods are not
the ones we're trying to change here, plus a bunch of manual fixups
for cases that this command did not catch (including all the callsites
of WrapObject()).
This patch was mostly generated with this command:
find . -name "*.h" -o -name "*.cpp" | xargs sed -e 's/Binding::Wrap(aCx, aScope, this/Binding::Wrap(aCx, this/' -e 's/Binding_workers::Wrap(aCx, aScope, this/Binding_workers::Wrap(aCx, this/' -e 's/Binding::Wrap(cx, scope, this/Binding::Wrap(cx, this/' -i ""
plus a few manual fixes to dom/bindings/Codegen.py, js/xpconnect/src/event_impl_gen.py, and a few C++ files that were not caught in the search-and-replace above.