DescriptionUpdate HTMLElement.dir / Document.dir to return only known values
Update HTMLElement.dir / Document.dir to return only known values ('ltr',
'rtl', 'auto'), in their canonical form, as per the specification:
- http://www.whatwg.org/specs/web-apps/current-work/multipage/elements.html#dom-dir
- http://www.whatwg.org/specs/web-apps/current-work/multipage/common-dom-interfaces.html#limited-to-only-known-values
Previously, Chromium was returning the 'dir' value exactly as set, no matter if
it is a known value or not, and no matter its case.
The new behavior is consistent with Firefox 28. The behavior of IE11 is
slightly different:
- When setting an unknown 'dir' value, an exception will be thrown.
- Setting a known 'dir' value in a non-canonical case (e.g. "RTL"), the value
will be directly converted to its canonical form (e.g. "rtl") before updating
the DOM tree.
R=arv@chromium.org,tkent@chromium.org
BUG=363628
TEST=fast/dom/document-dir-property.html
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=171861
Patch Set 1 #Patch Set 2 : Use nullAtom for consistency #
Total comments: 6
Patch Set 3 : Use fastGetAttribute #
Messages
Total messages: 18 (0 generated)
|