WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
220624
Propagate explicit directionality into the Inspector DOM view
https://bugs.webkit.org/show_bug.cgi?id=220624
Summary
Propagate explicit directionality into the Inspector DOM view
Sam Sneddon [:gsnedders]
Reported
2021-01-14 06:24:43 PST
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?
Attachments
Add attachment
proposed patch, testcase, etc.
Ryosuke Niwa
Comment 1
2021-01-14 09:45:44 PST
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.
Radar WebKit Bug Importer
Comment 2
2021-01-21 06:25:13 PST
<
rdar://problem/73450217
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug