Bug 166793 - [WebIDL] Remove custom bindings from CanvasRenderingContext2D
Summary: [WebIDL] Remove custom bindings from CanvasRenderingContext2D
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Sam Weinig
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-01-06 18:34 PST by Sam Weinig
Modified: 2017-01-06 22:20 PST (History)
5 users (show)

See Also:


Attachments
Patch (13.08 KB, patch)
2017-01-06 18:37 PST, Sam Weinig
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sam Weinig 2017-01-06 18:34:44 PST
[WebIDL] Remove custom bindings from CanvasRenderingContext2D
Comment 1 Sam Weinig 2017-01-06 18:37:16 PST
Created attachment 298245 [details]
Patch
Comment 2 Darin Adler 2017-01-06 20:33:44 PST
Comment on attachment 298245 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=298245&action=review

> Source/WebCore/ChangeLog:29
> +        Move existing setStrokeStyle/setFillStyle functions (which take CanvasStyle's) 
> +        down, and implement new ones that operate on Variants, matching the spec.

What does it mean to "move the existing functions down"? I guess you mean you made them private.

> Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp:1653
> +void CanvasRenderingContext2D::setStrokeStyle(CanvasStyle style)

Not sure you really need to move these in the source file, especially since I assume you aren’t otherwise changing them in this patch.

> Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp:1709
> +    if (auto* gradiant = style.canvasGradient())

Spelling error here, gradient has an "e".

> Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp:1725
> +        [this] (const RefPtr<CanvasGradient>& gradiant) { this->setStrokeStyle(CanvasStyle(*gradiant)); },

Spelling error here, gradient has an "e".

> Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp:1739
> +        [this] (const RefPtr<CanvasGradient>& gradiant) { this->setFillStyle(CanvasStyle(*gradiant)); },

Spelling error here, gradient has an "e".
Comment 3 Sam Weinig 2017-01-06 22:20:43 PST
Committed r210470: <http://trac.webkit.org/changeset/210470>