Bug 153367 - document.charset should be an alias for document.characterSet
Summary: document.charset should be an alias for document.characterSet
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL: https://dom.spec.whatwg.org/#dom-docu...
Keywords: WebExposed
Depends on:
Blocks:
 
Reported: 2016-01-22 13:09 PST by Chris Dumez
Modified: 2016-01-24 17:19 PST (History)
5 users (show)

See Also:


Attachments
Patch (55.67 KB, patch)
2016-01-22 13:12 PST, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (51.93 KB, patch)
2016-01-22 16:28 PST, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Dumez 2016-01-22 13:09:56 PST
document.charset should be an alias for document.characterSet:
https://dom.spec.whatwg.org/#dom-document-charset

It should also be read-only.

Chrome matches the specification.
Comment 1 Chris Dumez 2016-01-22 13:12:36 PST
Created attachment 269599 [details]
Patch
Comment 2 Ryosuke Niwa 2016-01-22 15:00:05 PST
Comment on attachment 269599 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=269599&action=review

> Source/WebCore/ChangeLog:11
> +        It should also be read-only.

This seems like a risky change. Firefox (both released and nightly) has setter.
Can we split this into a separate patch if anything?
Comment 3 Ryosuke Niwa 2016-01-22 15:03:55 PST
Comment on attachment 269599 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=269599&action=review

>> Source/WebCore/ChangeLog:11
>> +        It should also be read-only.
> 
> This seems like a risky change. Firefox (both released and nightly) has setter.
> Can we split this into a separate patch if anything?

Never mind. Firefox just doesn't support this property, and we don't throw even if someone is assigning a value.
Comment 4 WebKit Commit Bot 2016-01-22 15:23:17 PST
Comment on attachment 269599 [details]
Patch

Rejecting attachment 269599 [details] from commit-queue.

Failed to run "['/Volumes/Data/EWS/WebKit/Tools/Scripts/webkit-patch', '--status-host=webkit-queues.webkit.org', '--bot-id=webkit-cq-02', 'apply-attachment', '--no-update', '--non-interactive', 269599, '--port=mac']" exit_code: 2 cwd: /Volumes/Data/EWS/WebKit

Last 500 characters of output:
imported/w3c/web-platform-tests/dom/nodes/Document-constructor-expected.txt.rej
patching file LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Node-properties-expected.txt
Hunk #1 succeeded at 155 with fuzz 2.
Hunk #2 succeeded at 229 with fuzz 2.
patching file LayoutTests/imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt

Failed to run "[u'/Volumes/Data/EWS/WebKit/Tools/Scripts/svn-apply', '--force', '--reviewer', u'Ryosuke Niwa']" exit_code: 1 cwd: /Volumes/Data/EWS/WebKit

Full output: http://webkit-queues.webkit.org/results/727029
Comment 5 Chris Dumez 2016-01-22 16:28:25 PST
Created attachment 269621 [details]
Patch
Comment 6 WebKit Commit Bot 2016-01-22 17:10:54 PST
Comment on attachment 269621 [details]
Patch

Clearing flags on attachment: 269621

Committed r195497: <http://trac.webkit.org/changeset/195497>
Comment 7 WebKit Commit Bot 2016-01-22 17:10:58 PST
All reviewed patches have been landed.  Closing bug.
Comment 8 Alexey Proskuryakov 2016-01-23 12:37:55 PST
Comment on attachment 269621 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=269621&action=review

> LayoutTests/fast/dom/Document/document-charset-expected.txt:23
>  Setting characterSet to KOI8-R (expected to fail, matching Firefox)...
>  
> - document.charset: UTF-8
> + document.charset: KOI8-R

This test should have been updated, because the expected results are nonsense now.
Comment 9 Chris Dumez 2016-01-24 17:19:29 PST
(In reply to comment #8)
> Comment on attachment 269621 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=269621&action=review
> 
> > LayoutTests/fast/dom/Document/document-charset-expected.txt:23
> >  Setting characterSet to KOI8-R (expected to fail, matching Firefox)...
> >  
> > - document.charset: UTF-8
> > + document.charset: KOI8-R
> 
> This test should have been updated, because the expected results are
> nonsense now.

Done in <http://trac.webkit.org/changeset/195521>, thanks.