[webkit-reviews] review granted: [Bug 136098] Canvas direction should reflect change in dir attribute and also across save/restore operations : [Attachment 237081] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Aug 25 09:46:06 PDT 2014


Darin Adler <darin at apple.com> has granted Vivek Galatage <vivekg at webkit.org>'s
request for review:
Bug 136098: Canvas direction should reflect change in dir attribute and also
across save/restore operations
https://bugs.webkit.org/show_bug.cgi?id=136098

Attachment 237081: Patch
https://bugs.webkit.org/attachment.cgi?id=237081&action=review

------- Additional Comments from Darin Adler <darin at apple.com>
View in context: https://bugs.webkit.org/attachment.cgi?id=237081&action=review


> Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp:2170
> +    RenderStyle* style = canvas()->computedStyle();
> +    if (computedStyle)
> +	   *computedStyle = style;
> +    switch (direction) {
> +    case Direction::Inherit:
> +	   return style ? style->direction() : LTR;
> +    case Direction::RTL:
> +	   return RTL;
> +    case Direction::LTR:
> +	   return LTR;
> +    }

If computedStyle is null and direction is not Inherit, we’d prefer not to call
canvas() or computedStyle() at all. Reorganizing so this is done would be
slightly ugly, but I think we should do it.


More information about the webkit-reviews mailing list