Bug 30311 - [Qt] Missing default value for the default text encoding
Summary: [Qt] Missing default value for the default text encoding
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Qt (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Nobody
Depends on:
Reported: 2009-10-12 12:55 PDT by Jakub Wieczorek
Modified: 2009-10-12 23:11 PDT (History)
1 user (show)

See Also:

proposed patch (6.06 KB, patch)
2009-10-12 13:20 PDT, Jakub Wieczorek
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jakub Wieczorek 2009-10-12 12:55:10 PDT
So far the default charset has been hardcoded in the constructor of QWebPagePrivate:

// ### should be configurable

But since the addition of an equivalent setting in QWebSettings (https://bugs.webkit.org/show_bug.cgi?id=25863), this default value has had no effect because the above two lines are followed by:

settings = new QWebSettings(page->settings());

which applies the default global settings, where the default text encoding string is empty.

The default value should be moved to QWebSettings (as a result, it would also work when a page-specific encoding is reset to QString()).

This bug seems to trigger the fast/dom/Document/default-charset.html test failure.
Comment 1 Jakub Wieczorek 2009-10-12 13:20:45 PDT
Created attachment 41056 [details]
proposed patch

Fixed the issue by moving the default setting to QWebSettings.
Added an auto test.
Unskipped fast/dom/Document/document-charset.html which is passing now.
Comment 2 Simon Hausmann 2009-10-12 22:52:28 PDT
Comment on attachment 41056 [details]
proposed patch

Comment 3 WebKit Commit Bot 2009-10-12 23:11:27 PDT
Comment on attachment 41056 [details]
proposed patch

Clearing flags on attachment: 41056

Committed r49492: <http://trac.webkit.org/changeset/49492>
Comment 4 WebKit Commit Bot 2009-10-12 23:11:30 PDT
All reviewed patches have been landed.  Closing bug.