Bug 53487 - [Gtk] No need to set text encoding in the provisional phase
Summary: [Gtk] No need to set text encoding in the provisional phase
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-01 05:12 PST by Joone Hur
Modified: 2011-02-03 21:03 PST (History)
5 users (show)

See Also:


Attachments
Proposed Patch (3.57 KB, patch)
2011-02-01 05:29 PST, Joone Hur
no flags Details | Formatted Diff | Diff
Proposed Patch2 (3.96 KB, patch)
2011-02-03 06:56 PST, Joone Hur
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Joone Hur 2011-02-01 05:12:56 PST
After loading a html document, other ports initialize the encoding setting, but WebKitGtk+ sets the same encoding again, even tries to set encoding in the provisional phase. This causes unnecessary encoding setting.

Please, take a look at the following code.
http://trac.webkit.org/browser/trunk/Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp#L626
http://trac.webkit.org/browser/trunk/Source/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp#L1028

This patch allows to skip the encoding setting in the cases like other ports such as Mac and Qt.
Comment 1 Joone Hur 2011-02-01 05:29:20 PST
Created attachment 80748 [details]
Proposed Patch
Comment 2 Martin Robinson 2011-02-01 08:09:03 PST
 I recall looking at this issue briefly, but at this point I no longer remember why our implementation differs from Qt. Does this allow us to unskip any tests?j
Comment 3 Joone Hur 2011-02-01 14:37:39 PST
(In reply to comment #2)
>  I recall looking at this issue briefly, but at this point I no longer remember why our implementation differs from Qt. Does this allow us to unskip any tests?j

I tried to find any tests to be unskipped, but I couldn't find them.
Actually, there seems to be no problem without this patch until now, but I'm sure that this patch allows WebKitGtk+ to work like other ports. This may prevent unexpected errors.
Comment 4 Joone Hur 2011-02-03 06:56:03 PST
Created attachment 81057 [details]
Proposed Patch2

I added more details.
Comment 5 Martin Robinson 2011-02-03 08:24:27 PST
Comment on attachment 81057 [details]
Proposed Patch2

Thank you!
Comment 6 WebKit Commit Bot 2011-02-03 21:03:21 PST
Comment on attachment 81057 [details]
Proposed Patch2

Clearing flags on attachment: 81057

Committed r77596: <http://trac.webkit.org/changeset/77596>
Comment 7 WebKit Commit Bot 2011-02-03 21:03:26 PST
All reviewed patches have been landed.  Closing bug.