Bug 53487

Summary: [Gtk] No need to set text encoding in the provisional phase
Product: WebKit Reporter: Joone Hur <joone>
Component: WebKitGTKAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, gns, joone.hur, mrobinson, xan.lopez
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: OS X 10.5   
Attachments:
Description Flags
Proposed Patch
none
Proposed Patch2 none

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.