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

Unified Diff: tools/dom/docs/docs.json

Issue 12090035: Split the comment strings in docs extraction on newlines. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Merged master. Created 7 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tools/dom/docs/lib/docs.dart » ('j') | tools/dom/docs/lib/docs.dart » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/dom/docs/docs.json
diff --git a/tools/dom/docs/docs.json b/tools/dom/docs/docs.json
index 82aa7b9a8c8d9f437c0c7f7bffe9da9f5affb96a..a772b84da8ec4946bee0d6b0ffcfd5e39ccb2feb 100644
--- a/tools/dom/docs/docs.json
+++ b/tools/dom/docs/docs.json
@@ -2,22 +2,89 @@
"html": {
"CanvasGradient": {
"comment": [
- "/**\n * An opaque canvas object representing a gradient.\n *\n * Created by calling [createLinearGradient] or [createRadialGradient] on a\n * [CanvasRenderingContext2D] object.\n *\n * Example usage:\n *\n * var canvas = new CanvasElement(width: 600, height: 600);\n * var ctx = canvas.context2d;\n * ctx.clearRect(0, 0, 600, 600);\n * ctx.save();\n * // Create radial gradient.\n * CanvasGradient gradient = ctx.createRadialGradient(0, 0, 0, 0, 0, 600);\n * gradient.addColorStop(0, '#000');\n * gradient.addColorStop(1, 'rgb(255, 255, 255)');\n * // Assign gradients to fill.\n * ctx.fillStyle = gradient;\n * // Draw a rectangle with a gradient fill.\n * ctx.fillRect(0, 0, 600, 600);\n * ctx.save();\n * document.body.children.add(canvas);\n *\n * See also:\n *\n * * [CanvasGradient](https://developer.mozilla.org/en-US/docs/DOM/CanvasGradient) from MDN.\n * * [CanvasGradient](http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#canvasgradient) from whatwg.\n * * [CanvasGradient](http://www.w3.org/TR/2010/WD-2dcontext-20100304/#canvasgradient) from W3C.\n */"
+ "/**",
+ " * An opaque canvas object representing a gradient.",
+ " *",
+ " * Created by calling [createLinearGradient] or [createRadialGradient] on a",
+ " * [CanvasRenderingContext2D] object.",
+ " *",
+ " * Example usage:",
+ " *",
+ " * var canvas = new CanvasElement(width: 600, height: 600);",
+ " * var ctx = canvas.context2d;",
+ " * ctx.clearRect(0, 0, 600, 600);",
+ " * ctx.save();",
+ " * // Create radial gradient.",
+ " * CanvasGradient gradient = ctx.createRadialGradient(0, 0, 0, 0, 0, 600);",
+ " * gradient.addColorStop(0, '#000');",
+ " * gradient.addColorStop(1, 'rgb(255, 255, 255)');",
+ " * // Assign gradients to fill.",
+ " * ctx.fillStyle = gradient;",
+ " * // Draw a rectangle with a gradient fill.",
+ " * ctx.fillRect(0, 0, 600, 600);",
+ " * ctx.save();",
+ " * document.body.children.add(canvas);",
+ " *",
+ " * See also:",
+ " *",
+ " * * [CanvasGradient](https://developer.mozilla.org/en-US/docs/DOM/CanvasGradient) from MDN.",
+ " * * [CanvasGradient](http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#canvasgradient) from whatwg.",
+ " * * [CanvasGradient](http://www.w3.org/TR/2010/WD-2dcontext-20100304/#canvasgradient) from W3C.",
+ " */"
],
"members": {
"addColorStop": [
- "/**\n * Adds a color stop to this gradient at the offset.\n *\n * The [offset] can range between 0.0 and 1.0.\n *\n * See also:\n *\n * * [Multiple Color Stops](https://developer.mozilla.org/en-US/docs/CSS/linear-gradient#Gradient_with_multiple_color_stops) from MDN.\n */"
+ "/**",
+ " * Adds a color stop to this gradient at the offset.",
+ " *",
+ " * The [offset] can range between 0.0 and 1.0.",
+ " *",
+ " * See also:",
+ " *",
+ " * * [Multiple Color Stops](https://developer.mozilla.org/en-US/docs/CSS/linear-gradient#Gradient_with_multiple_color_stops) from MDN.",
+ " */"
]
}
},
"CanvasPattern": {
"comment": [
- "/**\n * An opaque object representing a pattern of image, canvas, or video.\n *\n * Created by calling [createPattern] on a [CanvasRenderingContext2D] object.\n *\n * Example usage:\n *\n * var canvas = new CanvasElement(width: 600, height: 600);\n * var ctx = canvas.context2d;\n * var img = new ImageElement();\n * // Image src needs to be loaded before pattern is applied.\n * img.onLoad.listen((event) {\n * // When the image is loaded, create a pattern\n * // from the ImageElement.\n * CanvasPattern pattern = ctx.createPattern(img, 'repeat');\n * ctx.rect(0, 0, canvas.width, canvas.height);\n * ctx.fillStyle = pattern;\n * ctx.fill();\n * });\n * img.src = \"images/foo.jpg\";\n * document.body.children.add(canvas);\n *\n * See also:\n * * [CanvasPattern](https://developer.mozilla.org/en-US/docs/DOM/CanvasPattern) from MDN.\n * * [CanvasPattern](http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#canvaspattern) from whatwg.\n * * [CanvasPattern](http://www.w3.org/TR/2010/WD-2dcontext-20100304/#canvaspattern) from W3C.\n */"
+ "/**",
+ " * An opaque object representing a pattern of image, canvas, or video.",
+ " *",
+ " * Created by calling [createPattern] on a [CanvasRenderingContext2D] object.",
+ " *",
+ " * Example usage:",
+ " *",
+ " * var canvas = new CanvasElement(width: 600, height: 600);",
+ " * var ctx = canvas.context2d;",
+ " * var img = new ImageElement();",
+ " * // Image src needs to be loaded before pattern is applied.",
+ " * img.onLoad.listen((event) {",
+ " * // When the image is loaded, create a pattern",
+ " * // from the ImageElement.",
+ " * CanvasPattern pattern = ctx.createPattern(img, 'repeat');",
+ " * ctx.rect(0, 0, canvas.width, canvas.height);",
+ " * ctx.fillStyle = pattern;",
+ " * ctx.fill();",
+ " * });",
+ " * img.src = \"images/foo.jpg\";",
+ " * document.body.children.add(canvas);",
+ " *",
+ " * See also:",
+ " * * [CanvasPattern](https://developer.mozilla.org/en-US/docs/DOM/CanvasPattern) from MDN.",
+ " * * [CanvasPattern](http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#canvaspattern) from whatwg.",
+ " * * [CanvasPattern](http://www.w3.org/TR/2010/WD-2dcontext-20100304/#canvaspattern) from W3C.",
+ " */"
]
},
"CanvasRenderingContext": {
"comment": [
- "/**\n * A rendering context for a canvas element.\n *\n * This context is extended by [CanvasRenderingContext2D] and\n * [WebGLRenderingContext].\n */"
+ "/**",
+ " * A rendering context for a canvas element.",
+ " *",
+ " * This context is extended by [CanvasRenderingContext2D] and",
+ " * [WebGLRenderingContext].",
+ " */"
],
"members": {
"canvas": [
@@ -98,7 +165,46 @@
"/// The height of this canvas element in CSS pixels."
],
"toDataURL": [
- "/**\n * Returns a data URI containing a representation of the image in the\n * format specified by type (defaults to 'image/png').\n *\n * Data Uri format is as follow `data:[<MIME-type>][;charset=<encoding>][;base64],<data>`\n *\n * Optional parameter [quality] in the range of 0.0 and 1.0 can be used when requesting [type]\n * 'image/jpeg' or 'image/webp'. If [quality] is not passed the default\n * value is used. Note: the default value varies by browser.\n *\n * If the height or width of this canvas element is 0, then 'data:' is returned,\n * representing no data.\n *\n * If the type requested is not 'image/png', and the returned value is\n * 'data:image/png', then the requested type is not supported.\n *\n * Example usage:\n *\n * CanvasElement canvas = new CanvasElement();\n * var ctx = canvas.context2d\n * ..fillStyle = \"rgb(200,0,0)\"\n * ..fillRect(10, 10, 55, 50);\n * var dataUrl = canvas.toDataURL(\"image/jpeg\", 0.95);\n * // The Data Uri would look similar to\n * // 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUA\n * // AAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO\n * // 9TXL0Y4OHwAAAABJRU5ErkJggg=='\n * //Create a new image element from the data URI.\n * var img = new ImageElement();\n * img.src = dataUrl;\n * document.body.children.add(img);\n *\n * See also:\n *\n * * [Data URI Scheme](http://en.wikipedia.org/wiki/Data_URI_scheme) from Wikipedia.\n *\n * * [HTMLCanvasElement](https://developer.mozilla.org/en-US/docs/DOM/HTMLCanvasElement) from MDN.\n *\n * * [toDataUrl](http://dev.w3.org/html5/spec/the-canvas-element.html#dom-canvas-todataurl) from W3C.\n */"
+ "/**",
+ " * Returns a data URI containing a representation of the image in the",
+ " * format specified by type (defaults to 'image/png').",
+ " *",
+ " * Data Uri format is as follow `data:[<MIME-type>][;charset=<encoding>][;base64],<data>`",
+ " *",
+ " * Optional parameter [quality] in the range of 0.0 and 1.0 can be used when requesting [type]",
+ " * 'image/jpeg' or 'image/webp'. If [quality] is not passed the default",
+ " * value is used. Note: the default value varies by browser.",
+ " *",
+ " * If the height or width of this canvas element is 0, then 'data:' is returned,",
+ " * representing no data.",
+ " *",
+ " * If the type requested is not 'image/png', and the returned value is",
+ " * 'data:image/png', then the requested type is not supported.",
+ " *",
+ " * Example usage:",
+ " *",
+ " * CanvasElement canvas = new CanvasElement();",
+ " * var ctx = canvas.context2d",
+ " * ..fillStyle = \"rgb(200,0,0)\"",
+ " * ..fillRect(10, 10, 55, 50);",
+ " * var dataUrl = canvas.toDataURL(\"image/jpeg\", 0.95);",
+ " * // The Data Uri would look similar to",
+ " * // 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUA",
+ " * // AAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO",
+ " * // 9TXL0Y4OHwAAAABJRU5ErkJggg=='",
+ " * //Create a new image element from the data URI.",
+ " * var img = new ImageElement();",
+ " * img.src = dataUrl;",
+ " * document.body.children.add(img);",
+ " *",
+ " * See also:",
+ " *",
+ " * * [Data URI Scheme](http://en.wikipedia.org/wiki/Data_URI_scheme) from Wikipedia.",
+ " *",
+ " * * [HTMLCanvasElement](https://developer.mozilla.org/en-US/docs/DOM/HTMLCanvasElement) from MDN.",
+ " *",
+ " * * [toDataUrl](http://dev.w3.org/html5/spec/the-canvas-element.html#dom-canvas-todataurl) from W3C.",
+ " */"
],
"width": [
"/// The width of this canvas element in CSS pixels."
« no previous file with comments | « no previous file | tools/dom/docs/lib/docs.dart » ('j') | tools/dom/docs/lib/docs.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698