Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(233)

Issue 240243004: Update HTMLElement.dir / Document.dir to return only known values (Closed)

Created:
6 years, 8 months ago by Inactive
Modified:
6 years, 8 months ago
CC:
blink-reviews, arv+blink, eae+blinkwatch, dglazkov+blink, adamk+blink_chromium.org, watchdog-blink-watchlist_google.com, rwlbuis
Visibility:
Public.

Description

Update 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 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+75 lines, -8 lines) Patch
M LayoutTests/fast/dom/document-dir-property.html View 1 chunk +20 lines, -0 lines 0 comments Download
M LayoutTests/fast/dom/document-dir-property-expected.txt View 1 chunk +16 lines, -0 lines 0 comments Download
M LayoutTests/fast/dom/element-attribute-js-null.html View 1 chunk +1 line, -1 line 0 comments Download
M LayoutTests/fast/dom/element-attribute-js-null-expected.txt View 1 chunk +1 line, -1 line 0 comments Download
M Source/core/dom/Document.cpp View 3 chunks +4 lines, -5 lines 0 comments Download
M Source/core/html/HTMLElement.h View 1 chunk +3 lines, -0 lines 0 comments Download
M Source/core/html/HTMLElement.cpp View 1 2 1 chunk +29 lines, -0 lines 0 comments Download
M Source/core/html/HTMLElement.idl View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 18 (0 generated)
Inactive
6 years, 8 months ago (2014-04-16 16:22:58 UTC) #1
arv (Not doing code reviews)
LGTM
6 years, 8 months ago (2014-04-16 17:52:17 UTC) #2
sof
https://codereview.chromium.org/240243004/diff/20001/Source/core/html/HTMLElement.idl File Source/core/html/HTMLElement.idl (right): https://codereview.chromium.org/240243004/diff/20001/Source/core/html/HTMLElement.idl#newcode27 Source/core/html/HTMLElement.idl:27: attribute DOMString dir; Doesn't the use of [ReflectOnly] fit ...
6 years, 8 months ago (2014-04-16 17:58:25 UTC) #3
Inactive
https://codereview.chromium.org/240243004/diff/20001/Source/core/html/HTMLElement.idl File Source/core/html/HTMLElement.idl (right): https://codereview.chromium.org/240243004/diff/20001/Source/core/html/HTMLElement.idl#newcode27 Source/core/html/HTMLElement.idl:27: attribute DOMString dir; On 2014/04/16 17:58:25, sof wrote: > ...
6 years, 8 months ago (2014-04-16 18:03:30 UTC) #4
Inactive
https://codereview.chromium.org/240243004/diff/20001/Source/core/dom/Document.cpp File Source/core/dom/Document.cpp (right): https://codereview.chromium.org/240243004/diff/20001/Source/core/dom/Document.cpp#newcode1399 Source/core/dom/Document.cpp:1399: return toHTMLHtmlElement(rootElement)->dir(); By not using [Reflect] for HTMLElement.dir, I ...
6 years, 8 months ago (2014-04-16 18:05:54 UTC) #5
sof
https://codereview.chromium.org/240243004/diff/20001/Source/core/dom/Document.cpp File Source/core/dom/Document.cpp (right): https://codereview.chromium.org/240243004/diff/20001/Source/core/dom/Document.cpp#newcode1399 Source/core/dom/Document.cpp:1399: return toHTMLHtmlElement(rootElement)->dir(); On 2014/04/16 18:05:54, Chris Dumez wrote: > ...
6 years, 8 months ago (2014-04-16 18:19:05 UTC) #6
Inactive
On 2014/04/16 18:19:05, sof wrote: > https://codereview.chromium.org/240243004/diff/20001/Source/core/dom/Document.cpp > File Source/core/dom/Document.cpp (right): > > https://codereview.chromium.org/240243004/diff/20001/Source/core/dom/Document.cpp#newcode1399 > ...
6 years, 8 months ago (2014-04-16 18:23:24 UTC) #7
sof
On 2014/04/16 18:23:24, Chris Dumez wrote: > On 2014/04/16 18:19:05, sof wrote: > > > ...
6 years, 8 months ago (2014-04-16 18:37:03 UTC) #8
Inactive
On 2014/04/16 18:37:03, sof wrote: > On 2014/04/16 18:23:24, Chris Dumez wrote: > > On ...
6 years, 8 months ago (2014-04-16 18:40:54 UTC) #9
tkent
lgtm https://codereview.chromium.org/240243004/diff/20001/Source/core/html/HTMLElement.cpp File Source/core/html/HTMLElement.cpp (right): https://codereview.chromium.org/240243004/diff/20001/Source/core/html/HTMLElement.cpp#newcode653 Source/core/html/HTMLElement.cpp:653: return toValidDirValue(getAttribute(dirAttr)); nit: I think we can use ...
6 years, 8 months ago (2014-04-17 07:28:21 UTC) #10
Inactive
https://codereview.chromium.org/240243004/diff/20001/Source/core/html/HTMLElement.cpp File Source/core/html/HTMLElement.cpp (right): https://codereview.chromium.org/240243004/diff/20001/Source/core/html/HTMLElement.cpp#newcode653 Source/core/html/HTMLElement.cpp:653: return toValidDirValue(getAttribute(dirAttr)); On 2014/04/17 07:28:21, tkent wrote: > nit: ...
6 years, 8 months ago (2014-04-17 12:54:54 UTC) #11
Inactive
The CQ bit was checked by ch.dumez@samsung.com
6 years, 8 months ago (2014-04-17 12:55:07 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ch.dumez@samsung.com/240243004/40001
6 years, 8 months ago (2014-04-17 12:55:16 UTC) #13
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 8 months ago (2014-04-17 14:23:04 UTC) #14
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.blink on win_blink_rel
6 years, 8 months ago (2014-04-17 14:23:04 UTC) #15
Inactive
The CQ bit was checked by ch.dumez@samsung.com
6 years, 8 months ago (2014-04-17 14:23:51 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ch.dumez@samsung.com/240243004/40001
6 years, 8 months ago (2014-04-17 14:24:03 UTC) #17
commit-bot: I haz the power
6 years, 8 months ago (2014-04-17 14:59:18 UTC) #18
Message was sent while issue was closed.
Change committed as 171861

Powered by Google App Engine
This is Rietveld 408576698