Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
rename function to contextOptions
  • Loading branch information
xidachen committed Sep 8, 2017
commit e4ba80cae2e7341c9a4617f1da861600325a2004
9 changes: 4 additions & 5 deletions css-paint-api/Overview.bs
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ dictionary PaintRenderingContext2DSettings {
class MyPaint {
static get inputProperties() { return ['--foo']; }
static get inputArguments() { return ['<color>']; }
static get paintRenderingContext2DSettings() { return {alpha: true}; }
static get contextOptions() { return {alpha: true}; }

paint(ctx, size, styleMap) {
// Paint code goes here.
Expand Down Expand Up @@ -254,14 +254,13 @@ called, the user agent <em>must</em> run the following steps:

2. <a for=list>Append</a> |parsedSyntax| to |inputArgumentSyntaxes|.

12. Let |paintRenderingContext2DSettingsValue| be the result of
<a>Get</a>(|paintCtor|, "PaintRenderingContext2DSettings").
12. Let |contextOptionsValue| be the result of <a>Get</a>(|paintCtor|, "contextOptions").

13. Let |paintRenderingContext2DSettings| be the result of <a>converting</a>
|paintRenderingContext2DSettingsValue| to a {{PaintRenderingContext2DSettings}}.
|contextOptionsValue| to a {{PaintRenderingContext2DSettings}}.
If an exception is <a>thrown</a>, rethrow the exception and abort all these steps.

Note: Setting <code>PaintRenderingContext2DSettings.alpha</code> is <code>false</code> allows user agents
Note: Setting <code>paintRenderingContext2DSettings.alpha</code> is <code>false</code> allows user agents
to anti-alias text in addition to performing "visibility" optimizations, e.g. not
painting an image behind the paint image as the paint image is opaque.

Expand Down