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

Issue 1180793002: Document attribute charset and its aliases to return UTF-8 (Closed)

Created:
5 years, 6 months ago by Habib Virji
Modified:
5 years, 5 months ago
CC:
arv+blink, blink-reviews, blink-reviews-dom_chromium.org, Inactive, dglazkov+blink, eae+blinkwatch, rwlbuis, sof, vivekg_samsung, vivekg
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

Document attribute charset and its aliases to return UTF-8 Document::charset returns value of the document::encodingName. The encodingName value is of type DocumentEncodingData, it has m_encoding of type TextEncoding which holds the encoding type. This type was not initialized and now has been updated to always initialize to UTF-8 as per <https://dom.spec.whatwg.org/#concept-document-encoding>;. ::characterSet replicates the functionality of the charset. ::inputEncoding uses characterSet. It has been updated to not return nullable value. document-attribute-js-null has been updated to reflect the changes. Also updated documentgetinputencoding02.js as it is based on old DOM3 and behavior does not match with DOM4 specification. In Firefox only characterSet is supported and it returns an "utf-8". It does not implement charset. In IE all characterSet and charset are supported. It returns for characterSet and charset UTF-8. BUG=497982 R=philipj, haraken Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=198563

Patch Set 1 #

Total comments: 2

Patch Set 2 : Clean up further Document.idl to not return undefined for null string #

Patch Set 3 : Sets m_encodingData as UTF-8 by default. If DocumentEncodingData is empty in setEncoding, default v… #

Patch Set 4 : Updated layout tests and defaultCharset to return UTF-8 #

Patch Set 5 : Updated expectation file with UTF-8 #

Total comments: 11

Patch Set 6 : Removed defaultCharset changes #

Total comments: 6

Patch Set 7 : Add utf-8, utf8 and unicode-1-1-utf-8 as the return type #

Total comments: 2

Patch Set 8 : Updated as per philipj suggestions #

Unified diffs Side-by-side diffs Delta from patch set Stats (+17 lines, -11 lines) Patch
M LayoutTests/dom/xhtml/level3/core/documentgetinputencoding02.js View 1 2 3 4 5 6 7 2 chunks +2 lines, -3 lines 0 comments Download
M LayoutTests/fast/dom/document-attribute-js-null.html View 1 2 3 4 5 1 chunk +4 lines, -1 line 0 comments Download
M LayoutTests/fast/dom/document-attribute-js-null-expected.txt View 1 2 3 4 5 1 chunk +4 lines, -1 line 0 comments Download
M Source/core/dom/Document.cpp View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/dom/Document.idl View 1 2 3 4 5 2 chunks +4 lines, -5 lines 0 comments Download
M Source/core/dom/DocumentEncodingData.cpp View 1 2 3 4 5 1 chunk +2 lines, -1 line 0 comments Download

Messages

Total messages: 70 (19 generated)
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1180793002/1
5 years, 6 months ago (2015-06-11 09:24:56 UTC) #2
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years, 6 months ago (2015-06-11 10:38:46 UTC) #4
Habib Virji
Please take a look.
5 years, 6 months ago (2015-06-11 10:59:56 UTC) #5
haraken
Given that these are non-standard attributes, would you describe the behavior of other browsers in ...
5 years, 6 months ago (2015-06-11 11:08:35 UTC) #6
philipj_slow
In the description, please also describe the conditions under which these getters will return null, ...
5 years, 6 months ago (2015-06-11 11:42:54 UTC) #7
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1180793002/20001
5 years, 6 months ago (2015-06-12 16:29:48 UTC) #9
Habib Virji
I have added a small description about what's supported. Let me know if more information ...
5 years, 6 months ago (2015-06-12 16:45:41 UTC) #10
Habib Virji
Thanks philip, updated test and also description of where it can return null. https://codereview.chromium.org/1180793002/diff/1/LayoutTests/fast/dom/document-attribute-js-null.html File ...
5 years, 6 months ago (2015-06-12 16:46:31 UTC) #11
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_blink_rel on tryserver.blink (JOB_FAILED, http://build.chromium.org/p/tryserver.blink/builders/linux_blink_rel/builds/66410)
5 years, 6 months ago (2015-06-12 17:59:32 UTC) #13
philipj_slow
Hmm, so the changes to characterSet and inputEncoding make it clear that this perhaps is ...
5 years, 6 months ago (2015-06-12 21:45:14 UTC) #14
Habib Virji
I had a look in the Gecko code in regards to characterSet value, particularly looking ...
5 years, 6 months ago (2015-06-15 08:59:27 UTC) #15
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1180793002/40001
5 years, 6 months ago (2015-06-15 11:28:59 UTC) #17
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1180793002/60001
5 years, 6 months ago (2015-06-15 11:42:11 UTC) #20
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1180793002/80001
5 years, 6 months ago (2015-06-15 11:48:01 UTC) #23
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years, 6 months ago (2015-06-15 12:57:50 UTC) #25
Habib Virji
Thanks philip, it has been updated now to initialize m_encodingData by default to UTF-8. Since ...
5 years, 6 months ago (2015-06-15 12:58:32 UTC) #26
philipj_slow
https://codereview.chromium.org/1180793002/diff/80001/LayoutTests/dom/xhtml/level3/core/documentgetinputencoding02.js File LayoutTests/dom/xhtml/level3/core/documentgetinputencoding02.js (right): https://codereview.chromium.org/1180793002/diff/80001/LayoutTests/dom/xhtml/level3/core/documentgetinputencoding02.js#newcode107 LayoutTests/dom/xhtml/level3/core/documentgetinputencoding02.js:107: assertEquals("documentgetinputencoding02", "UTF-8".toLowerCase(), encodingName.toLowerCase()); Why not compare the encodings case-sensitively? ...
5 years, 6 months ago (2015-06-15 15:31:38 UTC) #27
Habib Virji
Thanks philips. replied to your comments below. https://codereview.chromium.org/1180793002/diff/80001/LayoutTests/dom/xhtml/level3/core/documentgetinputencoding02.js File LayoutTests/dom/xhtml/level3/core/documentgetinputencoding02.js (right): https://codereview.chromium.org/1180793002/diff/80001/LayoutTests/dom/xhtml/level3/core/documentgetinputencoding02.js#newcode107 LayoutTests/dom/xhtml/level3/core/documentgetinputencoding02.js:107: assertEquals("documentgetinputencoding02", "UTF-8".toLowerCase(), ...
5 years, 6 months ago (2015-06-15 16:14:55 UTC) #28
Habib Virji
@philip: do let me know if comments are okay or should work on any of ...
5 years, 6 months ago (2015-06-16 16:04:18 UTC) #29
philipj_slow
So defaultCharset was trickier than I had hoped, but let's deal with that separately. https://codereview.chromium.org/1180793002/diff/80001/Source/core/dom/Document.cpp ...
5 years, 6 months ago (2015-06-16 22:05:57 UTC) #30
philipj_slow
Actually it looks like Document.defaultCharset and Document.charset are the only two remaining uses of [TreatReturnedNullStringAs=Undefined].
5 years, 6 months ago (2015-06-16 22:14:52 UTC) #31
philipj_slow
Actually it looks like Document.defaultCharset and Document.charset are the only two remaining uses of [TreatReturnedNullStringAs=Undefined].
5 years, 6 months ago (2015-06-16 22:14:53 UTC) #32
philipj_slow
haraken@, jl@, do you have any thoughts on what to do with Document.defaultCharset, and for ...
5 years, 6 months ago (2015-06-16 22:16:49 UTC) #34
haraken
On 2015/06/16 22:16:49, philipj wrote: > haraken@, jl@, do you have any thoughts on what ...
5 years, 6 months ago (2015-06-16 22:21:06 UTC) #35
philipj_slow
On 2015/06/16 22:21:06, haraken wrote: > On 2015/06/16 22:16:49, philipj wrote: > > haraken@, jl@, ...
5 years, 6 months ago (2015-06-16 22:43:52 UTC) #36
haraken
On 2015/06/16 22:43:52, philipj wrote: > On 2015/06/16 22:21:06, haraken wrote: > > On 2015/06/16 ...
5 years, 6 months ago (2015-06-16 23:00:56 UTC) #37
philipj_slow
On 2015/06/16 23:00:56, haraken wrote: > On 2015/06/16 22:43:52, philipj wrote: > > On 2015/06/16 ...
5 years, 6 months ago (2015-06-17 07:22:20 UTC) #38
haraken
On 2015/06/17 07:22:20, philipj wrote: > On 2015/06/16 23:00:56, haraken wrote: > > On 2015/06/16 ...
5 years, 6 months ago (2015-06-17 07:49:32 UTC) #39
philipj_slow
Habib, my advice is to back out the defaultCharset change from this CL. The long-term ...
5 years, 6 months ago (2015-06-17 11:04:31 UTC) #40
Habib Virji
Thanks, I was looking to find a way of addressing a "default encoding for the ...
5 years, 6 months ago (2015-06-17 11:10:38 UTC) #41
philipj_slow
On 2015/06/17 11:10:38, Habib Virji wrote: > Thanks, I was looking to find a way ...
5 years, 6 months ago (2015-06-17 11:20:34 UTC) #42
philipj_slow
Please also update the title and description of this CL to be more accurate about ...
5 years, 6 months ago (2015-06-17 12:17:00 UTC) #43
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1180793002/100001
5 years, 6 months ago (2015-06-17 15:38:14 UTC) #45
Habib Virji
Thanks philip, have uploaded patch without defaultCharset.
5 years, 6 months ago (2015-06-17 16:53:24 UTC) #46
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years, 6 months ago (2015-06-17 17:15:45 UTC) #48
philipj_slow
OK, this now LGTM, but since this does poke at some very central code I'd ...
5 years, 6 months ago (2015-06-17 20:50:14 UTC) #50
pdr.
On 2015/06/17 at 20:50:14, philipj wrote: > OK, this now LGTM, but since this does ...
5 years, 6 months ago (2015-06-17 20:56:36 UTC) #52
dominicc (has gone to gerrit)
On 2015/06/17 at 20:56:36, pdr wrote: > On 2015/06/17 at 20:50:14, philipj wrote: > > ...
5 years, 6 months ago (2015-06-22 01:23:00 UTC) #53
dominicc (has gone to gerrit)
Oops, and here are the comments. https://codereview.chromium.org/1180793002/diff/100001/LayoutTests/dom/xhtml/level3/core/documentgetinputencoding02.js File LayoutTests/dom/xhtml/level3/core/documentgetinputencoding02.js (right): https://codereview.chromium.org/1180793002/diff/100001/LayoutTests/dom/xhtml/level3/core/documentgetinputencoding02.js#newcode107 LayoutTests/dom/xhtml/level3/core/documentgetinputencoding02.js:107: assertEquals("documentgetinputencoding02", "UTF-8".toLowerCase(), encodingName.toLowerCase()); ...
5 years, 6 months ago (2015-06-22 01:23:31 UTC) #54
Habib Virji
https://codereview.chromium.org/1180793002/diff/100001/LayoutTests/dom/xhtml/level3/core/documentgetinputencoding02.js File LayoutTests/dom/xhtml/level3/core/documentgetinputencoding02.js (right): https://codereview.chromium.org/1180793002/diff/100001/LayoutTests/dom/xhtml/level3/core/documentgetinputencoding02.js#newcode107 LayoutTests/dom/xhtml/level3/core/documentgetinputencoding02.js:107: assertEquals("documentgetinputencoding02", "UTF-8".toLowerCase(), encodingName.toLowerCase()); The spec link I mentioned was ...
5 years, 6 months ago (2015-06-22 14:07:31 UTC) #55
philipj_slow
https://codereview.chromium.org/1180793002/diff/100001/LayoutTests/dom/xhtml/level3/core/documentgetinputencoding02.js File LayoutTests/dom/xhtml/level3/core/documentgetinputencoding02.js (right): https://codereview.chromium.org/1180793002/diff/100001/LayoutTests/dom/xhtml/level3/core/documentgetinputencoding02.js#newcode107 LayoutTests/dom/xhtml/level3/core/documentgetinputencoding02.js:107: assertEquals("documentgetinputencoding02", "UTF-8".toLowerCase(), encodingName.toLowerCase()); On 2015/06/22 14:07:30, Habib Virji wrote: ...
5 years, 6 months ago (2015-06-23 08:32:57 UTC) #56
Habib Virji
https://codereview.chromium.org/1180793002/diff/120001/LayoutTests/dom/xhtml/level3/core/documentgetinputencoding02.js File LayoutTests/dom/xhtml/level3/core/documentgetinputencoding02.js (right): https://codereview.chromium.org/1180793002/diff/120001/LayoutTests/dom/xhtml/level3/core/documentgetinputencoding02.js#newcode107 LayoutTests/dom/xhtml/level3/core/documentgetinputencoding02.js:107: assertEquals("documentgetinputencoding02", "utf-8", encodingName); On 2015/06/23 08:32:57, philipj (away until ...
5 years, 6 months ago (2015-06-23 13:58:09 UTC) #59
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1180793002/140001
5 years, 6 months ago (2015-06-23 13:58:45 UTC) #60
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: mac_blink_rel on tryserver.blink (JOB_FAILED, http://build.chromium.org/p/tryserver.blink/builders/mac_blink_rel/builds/60311)
5 years, 6 months ago (2015-06-23 15:23:15 UTC) #62
Habib Virji
@philipj/dominicc: The failure in mac and win are unrelated to my changes. Are changes good ...
5 years, 6 months ago (2015-06-25 14:08:56 UTC) #63
philipj_slow
LGTM for me, but I'll give dominicc@ the final say.
5 years, 6 months ago (2015-06-26 13:05:23 UTC) #64
Habib Virji
On 2015/06/26 13:05:23, philipj wrote: > LGTM for me, but I'll give dominicc@ the final ...
5 years, 5 months ago (2015-07-08 08:51:02 UTC) #65
dominicc (has gone to gerrit)
On 2015/07/08 at 08:51:02, habib.virji wrote: > On 2015/06/26 13:05:23, philipj wrote: > > LGTM ...
5 years, 5 months ago (2015-07-09 04:13:18 UTC) #66
dominicc (has gone to gerrit)
lgtm
5 years, 5 months ago (2015-07-09 04:13:35 UTC) #68
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1180793002/140001
5 years, 5 months ago (2015-07-09 04:13:48 UTC) #69
commit-bot: I haz the power
5 years, 5 months ago (2015-07-09 05:22:38 UTC) #70
Message was sent while issue was closed.
Committed patchset #8 (id:140001) as
https://src.chromium.org/viewvc/blink?view=rev&revision=198563

Powered by Google App Engine
This is Rietveld 408576698