Changeset 286608 in webkit
- Timestamp:
- Dec 7, 2021, 12:40:06 PM (5 years ago)
- Location:
- trunk/Websites/webkit.org
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
blog-files/wide-gamut-canvas/puzzle.html (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Websites/webkit.org/ChangeLog
r286348 r286608 1 2021-12-07 Cameron McCormack <heycam@apple.com> 2 3 Tweak puzzle to use feature detection 4 https://bugs.webkit.org/show_bug.cgi?id=233946 5 6 Unreviewed. 7 8 * blog-files/wide-gamut-canvas/puzzle.html: 9 1 10 2021-11-30 Cameron McCormack <heycam@apple.com> 2 11 -
trunk/Websites/webkit.org/blog-files/wide-gamut-canvas/puzzle.html
r286348 r286608 3 3 <meta name="viewport" content="width=device-width, initial-scale=1"> 4 4 <style> 5 body { text-align: center; white-space: nowrap; }5 body { text-align: center; white-space: nowrap; font: 16px Helvetica, sans-serif; } 6 6 img, #puzzleboard { box-shadow: 0 0 4px black; } 7 7 img { margin: 32px 8px 0; } 8 8 #puzzleboard { display: inline-flex; flex-direction: column; background-color: tan; padding: 16px; border-radius: 8px; } 9 9 canvas { border: 2px solid; border-color: rgba(0, 0, 0, 0.2) rgba(255, 255, 255, 0.2) rgba(255, 255, 255, 0.2) rgba(0, 0, 0, 0.2); background-color: rgba(255, 255, 255, 0.2); padding: 2px; } 10 label { padding-top: 16px; font : bold 16px Helvetica, sans-serif; color: #864; text-shadow: 0px 2px 0px rgba(255, 255, 255, 0.3); color: rgb(104, 90, 70); border-radius: 8px; -webkit-user-select: none; user-select: none; text-align: center; }10 label { padding-top: 16px; font-weight: bold; color: #864; text-shadow: 0px 2px 0px rgba(255, 255, 255, 0.3); color: rgb(104, 90, 70); border-radius: 8px; -webkit-user-select: none; user-select: none; text-align: center; } 11 11 input { vertical-align: middle; } 12 12 label span { display: none; } 13 .warning { display: none; } 14 .unsupported .warning { display: block; position: absolute; top: 0; left: 0; right: 0; } 15 .warning span { background-color: rgba(0, 0, 0, 0.5); padding: 4px; border; border-radius: 4px; color: white; } 16 .unsupported label { text-decoration: line-through; } 13 17 @media (prefers-color-scheme: dark) { 14 18 html { background-color: black; } … … 179 183 canvas.style.height = `${height / scale}px`; 180 184 181 ctx = canvas.getContext("2d", { colorSpace }); 185 try { 186 ctx = canvas.getContext("2d", { colorSpace }); 187 } catch { 188 ctx = canvas.getContext("2d"); 189 document.body.className = "unsupported"; 190 } 191 182 192 drawBoard(); 183 193 } … … 246 256 <label><input id=displayP3 type=checkbox onchange="updateCanvas()"> Use Display P3 <span>canvas</span></label> 247 257 </div> 258 <div class="warning"><span>This browser does not support Display P3 canvas.</span></div>
Note:
See TracChangeset
for help on using the changeset viewer.