Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(58)

Side by Side Diff: third_party/WebKit/LayoutTests/csspaint/background-image-alpha.html

Issue 2077413005: Add "alpha" option to PaintWorklet (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix comments Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 <!DOCTYPE html>
ikilpatrick 2016/06/23 16:53:42 missing -expected.html for this?
Gleb Lanbin 2016/06/23 22:26:03 Done.
2 <html>
3 <head>
4 <script src="../resources/run-after-layout-and-paint.js"></script>
5 <script src="resources/test-runner-paint-worklet.js"></script>
6 <style>
7 .container {
8 width: 100px;
9 height: 100px;
10 }
11
12 #canvas-opaque {
13 background-image: paint(opaque);
14 }
15
16 #canvas-nonopaque {
17 background-image: paint(nonOpaque);
18 }
19
20 #background {
21 background-color: yellow;
22 display: inline-block;
23 }
24 </style>
25 </head>
26 <body>
27
28 <div id="background">
29 <div id="canvas-opaque" class="container"></div>
30 <div id="canvas-nonopaque" class="container"></div>
31 </div>
32
33 <script id="code" type="text/worklet">
34 registerPaint('opaque', class {
35 static get alpha() { return false; }
36 paint(ctx, geom) {
37 ctx.strokeStyle = 'blue';
38 ctx.lineWidth = 4;
39 ctx.strokeRect(20, 20, 60, 60);
40 }
41 });
42
43 registerPaint('nonOpaque', class {
44 static get alpha() { return true; }
45 paint(ctx, geom) {
46 ctx.strokeStyle = 'blue';
47 ctx.lineWidth = 4;
48 ctx.strokeRect(20, 20, 60, 60);
49 }
50 });
51 </script>
52
53 <script>
54 importPaintWorkletAndTerminateTestAfterAsyncPaint(document.getElementById('c ode').textContent);
55 </script>
56 </body>
57 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698