mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Remove <canvas>
Folks should use custom paint instead (see sky/engine/core/painting for a sketch). R=ojan@chromium.org Review URL: https://codereview.chromium.org/1001913003
This commit is contained in:
parent
0e7b1ddb53
commit
e6fca05936
@ -1,23 +0,0 @@
|
||||
layer at (0,0) size 800x600
|
||||
RenderView {#document} at (0,0) size 800x600
|
||||
RenderBlock {sky} at (0,0) size 800x353
|
||||
RenderBlock {h3} at (0,0) size 800x19
|
||||
RenderParagraph (anonymous) at (0,0) size 800x19
|
||||
RenderText {#text} at (0,0) size 92x19
|
||||
text run at (0,0) width 92: "It passes if:"
|
||||
RenderBlock {ul} at (0,19) size 800x57
|
||||
RenderBlock {li} at (0,0) size 800x19
|
||||
RenderParagraph (anonymous) at (0,0) size 800x19
|
||||
RenderText {#text} at (0,0) size 511x19
|
||||
text run at (0,0) width 511: "the canvas content has rounded corners (top-left and top-right)"
|
||||
RenderBlock {li} at (0,19) size 800x19
|
||||
RenderParagraph (anonymous) at (0,0) size 800x19
|
||||
RenderText {#text} at (0,0) size 457x19
|
||||
text run at (0,0) width 457: "the 10px red border is visible around the canvas content"
|
||||
RenderBlock {li} at (0,38) size 800x19
|
||||
RenderParagraph (anonymous) at (0,0) size 800x19
|
||||
RenderText {#text} at (0,0) size 200x19
|
||||
text run at (0,0) width 200: "gray border is not visible"
|
||||
layer at (0,76) size 277x277
|
||||
RenderHTMLCanvas {canvas} at (0,76) size 277x277 [bgcolor=#808080] [border: (10px solid #FF0000)]
|
||||
|
||||
@ -1,28 +0,0 @@
|
||||
<sky>
|
||||
<import src="../resources/dump-as-render-tree.sky" />
|
||||
<style>
|
||||
canvas {
|
||||
background-color: gray;
|
||||
border: 10px solid red;
|
||||
border-radius: 200px 100px 0px 0px;
|
||||
}
|
||||
</style>
|
||||
<!-- TODO(ojan): Make this a reftest. -->
|
||||
<h3>It passes if:</h3>
|
||||
<ul>
|
||||
<li>the canvas content has rounded corners (top-left and top-right)</li>
|
||||
<li>the 10px red border is visible around the canvas content</li>
|
||||
<li>gray border is not visible</li>
|
||||
</ul>
|
||||
<canvas id="theCanvas" width="257" height="257"></canvas>
|
||||
<script>
|
||||
import 'dart:sky';
|
||||
|
||||
void main() {
|
||||
var theCanvas = document.getElementById('theCanvas');
|
||||
var context = theCanvas.getContext('2d');
|
||||
context.fillColor = 'green';
|
||||
context.fillRect(0.0, 0.0, 1.0 * theCanvas.width, 1.0 * theCanvas.width);
|
||||
}
|
||||
</script>
|
||||
</sky>
|
||||
Loading…
x
Reference in New Issue
Block a user