gecko-dev/testing/web-platform/tests/css/css-paint-api/background-repeat-x-ref.html
Xida Chen 251c4ce532 Bug 1567647 [wpt PR 17948] - [OT-PW] Implement DrawPattern, a=testonly
Automatic update from web-platform-tests
[OT-PW] Implement DrawPattern

Right now when we use CSS paint to paint the background-image, and have
background-repeat specified, our implementation cannot handle that
because PaintWorkletDeferredImage doesn't implement DrawPattern.
Currently the code path goes into the GeneratedImage::DrawPattern and
that cannot handle the off-thread case.

This CL implements DrawPattern for off-thread paint worklet, and two
layout tests are passing with it. Another layout test is added for
additional testing.

Bug: 957457
Change-Id: I707b4d8e47a6bcd747156e60f1860c1ecdae22e0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1691090
Reviewed-by: Khushal <khushalsagar@chromium.org>
Reviewed-by: Rune Lillesveen <futhark@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Xida Chen <xidachen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#684594}

--

wpt-commits: 424c4b83cbbe7dd792e83eebfcaa84d6e0c5826e
wpt-pr: 17948
2019-08-09 20:31:30 +00:00

12 lines
266 B
HTML

<!DOCTYPE html>
<html>
<body>
<canvas id ="canvas" width="200" height="200"></canvas>
<script>
var ctx = document.getElementById('canvas').getContext('2d');
ctx.fillStyle = 'green';
ctx.fillRect(0, 0, 50, 50);
ctx.fillRect(100, 0, 50, 50);
</script>
</body>
</html>