To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
Hi Philip,
Sorry about the delay in replying as I was on a medical leave. Please find my comments inline.
On Jan 26, 2015 10:40 AM, "Philip Jägenstedt" <phi...@opera.com> wrote:
>
> The CanvasRenderingContext2D::direction() implementation looks wrong to me, as it never returns the default value "inherit" but rather "ltr" or "rtl". Simply returning the current value per spec should also remove the need for updateRenderTreeIfNeeded(), right?
>
Yes you are right. This was done considering the usage of computedStyle and determine directionality.
We need to have a sync between the specification and the implementation.
> It also looks like the way the attribute value is used isn't quite per spec:
> https://html.spec.whatwg.org/multipage/scripting.html#text-preparation-algorithm
>
> That algorithm uses the directionality of the canvas element or document.documentElement, but in CanvasRenderingContext2d.cpp I see use of the canvas element's computed style and the bidi determineDirectionality() algorithm on the text being rendered, which doesn't seem equivalent. I think that per spec neither CSS nor the text being rendered should have any influence. The latter seems a bit odd if true, so perhaps there's a spec bug?
>
I am not sure if the spec having a bug. We should discuss this on whatwg. I will post there soonish.
> Unless I'm wrong on all points, it would be good to sync the implementation with the spec before shipping.
>
Agreed.