From Bug 220241: > There's probably a strong argument that if the page has <span dir=rtl>foo</span> then we want to end up with <span class="html-text-node" dir=rtl>foo</span> in the Inspector, rather than using auto there. In short, if the page has an explicitly defined directionality we almost certainly want to reuse that. Even more generally, we may just want to explicitly use the same directionality as the source element, using something like element.matches(":dir(ltr)") ? "ltr" : "rtl", though this would add a dependency on bug 64861. This is _probably_ the best fix, because it means we end up with the same directionality in every case. Adding a depends-on for that, given I think it is what we should do? I'm not totally sure what we want to do about attribute values here. Maybe always give them dir=auto?
The computed value of direction property can be used. No need to rely on :dir. in fact, that would be wrong because :dir by definition will ignore CSS based directionality changes. Furthermore, Web Inspector backend uses C++ code to figure out the directionality of text. No need to rely on any real web API.
<rdar://problem/73450217>