WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED CONFIGURATION CHANGED
126057
Clearing 'dir' attribute does not correctly set page directionality
https://bugs.webkit.org/show_bug.cgi?id=126057
Summary
Clearing 'dir' attribute does not correctly set page directionality
Prashant Hiremath
Reported
2013-12-20 00:25:36 PST
Merge
https://chromium.googlesource.com/chromium/blink/+/2d592d1c998bec9438e421e1ce1ee6caba05a884
The dir attribute by default resolves to ltr. After its set to rtl, clearing it should cause it to once again resolve to its default, ltr. This patch makes this change from the current behavior where the rtl persists the clear.
Attachments
Patch
(2.94 KB, patch)
2013-12-20 00:43 PST
,
Prashant Hiremath
rniwa
: review-
buildbot
: commit-queue-
Details
Formatted Diff
Diff
Archive of layout-test-results from webkit-ews-07 for mac-mountainlion
(493.96 KB, application/zip)
2013-12-20 02:06 PST
,
Build Bot
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Prashant Hiremath
Comment 1
2013-12-20 00:43:23 PST
Created
attachment 219738
[details]
Patch proposed patch
Build Bot
Comment 2
2013-12-20 02:06:12 PST
Comment on
attachment 219738
[details]
Patch
Attachment 219738
[details]
did not pass mac-ews (mac): Output:
http://webkit-queues.appspot.com/results/49338234
New failing tests: fast/dom/HTMLElement/set-and-clear-dir-attribute.html
Build Bot
Comment 3
2013-12-20 02:06:14 PST
Created
attachment 219743
[details]
Archive of layout-test-results from webkit-ews-07 for mac-mountainlion The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: webkit-ews-07 Port: mac-mountainlion Platform: Mac OS X 10.8.5
Ryosuke Niwa
Comment 4
2013-12-20 09:06:47 PST
Comment on
attachment 219738
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=219738&action=review
> Source/WebCore/html/HTMLElement.cpp:209 > + AtomicString dirValue = isValidDirAttribute(value) ? value : "ltr";
This is incorrect. When dir="" attribute doesn't parse correctly, it needs to be treated as if it doesn't exist for the purpose of determining the directionality of text. I've specifically added a test case for this in fast/dom/HTMLElement/set-and-clear-dir-attribute.html i.e. the blink change is wrong.
Prashant Hiremath
Comment 5
2013-12-22 19:56:53 PST
(In reply to
comment #4
)
> (From update of
attachment 219738
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=219738&action=review
> > > Source/WebCore/html/HTMLElement.cpp:209 > > + AtomicString dirValue = isValidDirAttribute(value) ? value : "ltr"; > > This is incorrect. When dir="" attribute doesn't parse correctly, it needs to be treated as if it doesn't exist for the purpose of determining the directionality of text. > I've specifically added a test case for this in fast/dom/HTMLElement/set-and-clear-dir-attribute.html > > i.e. the blink change is wrong.
Ok, got it :) . will close the bug.
Ryosuke Niwa
Comment 6
2013-12-22 20:05:37 PST
I don't think we should close the bug given that the bug still exists in WebKit. It's just that the fix is incorrect.
Prashant Hiremath
Comment 7
2013-12-22 22:39:53 PST
(In reply to
comment #6
)
> I don't think we should close the bug given that the bug still exists in WebKit. > > It's just that the fix is incorrect.
Thanks. I'll try to look into this issue then :).
Ahmad Saleem
Comment 8
2022-07-26 10:34:19 PDT
This patch was modifying - equalIgnoringCase and it was removed in below:
https://github.com/WebKit/WebKit/commit/507aa34586fdcf0b9a5ea433c2402f295a717da8
->
rniwa@webkit.org
- I think you landed 'dir' related changes just recently, have this been addressed or is this something needed? Thanks!
Ryosuke Niwa
Comment 9
2022-07-26 21:58:03 PDT
Yeah, I'm sure I fixed this with my latest patches.
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