Bug 153367

Summary: document.charset should be an alias for document.characterSet
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: DOMAssignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: ahmad.saleem792, commit-queue, esprehn+autocc, kangil.han, kondapallykalyan, rniwa
Priority: P2 Keywords: WebExposed
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
URL: https://dom.spec.whatwg.org/#dom-document-charset
Attachments:
Description Flags
Patch
none
Patch none

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.
Comment 10 Sam Sneddon [:gsnedders] 2022-11-12 12:00:14 PST
*** Bug 247841 has been marked as a duplicate of this bug. ***