Changeset 77596 in webkit
- Timestamp:
- Feb 3, 2011 9:03:08 PM (13 years ago)
- Location:
- trunk/Source/WebKit/gtk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/gtk/ChangeLog
r77414 r77596 1 2011-02-03 Joone Hur <joone.hur@collabora.co.uk> 2 3 Reviewed by Martin Robinson. 4 5 [Gtk] No need to set text encoding in the provisional phase 6 https://bugs.webkit.org/show_bug.cgi?id=53487 7 8 According to changeset 67253, setEncoding could be called multiple times from 9 committedLoad, finishedLoading, dispatchDidFailLoading, and setMainDocumentError 10 in FrameLoaderClient. To fix this, the relevant code was removed from 11 FrameLoaderClient and moved to DocumentLoader::commitData. However, that 12 code was not removed from FrameLoaderClient::finishedLoading in WebKitGtk+. 13 14 Due to this reason, after loading a html document, other ports initialize the 15 text encoding from FrameLoaderClient::finishedLoading, but WebKitGtk+ sets 16 the same encoding again, even tries to set encoding in the provisional phase. 17 This causes unnecessary encoding setting. 18 19 * WebCoreSupport/FrameLoaderClientGtk.cpp: 20 (WebKit::FrameLoaderClient::FrameLoaderClient): Set m_hasRepresentation to false. 21 (WebKit::FrameLoaderClient::makeRepresentation): Set m_hasRepresentation to true. 22 (WebKit::FrameLoaderClient::revertToProvisionalState): Set m_hasRepresentation to true. 23 (WebKit::FrameLoaderClient::finishedLoading): Skip the encoding setting when 24 m_hasRepresentation is false. 25 * WebCoreSupport/FrameLoaderClientGtk.h: Added m_hasRepresentation. 26 1 27 2011-02-02 Alejandro G. Castro <alex@igalia.com> 2 28 -
trunk/Source/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp
r76872 r77596 98 98 , m_loadingErrorPage(false) 99 99 , m_pluginView(0) 100 , m_hasRepresentation(false) 100 101 , m_hasSentResponseToPlugin(false) 101 102 { … … 781 782 void FrameLoaderClient::makeRepresentation(WebCore::DocumentLoader*) 782 783 { 783 notImplemented();784 m_hasRepresentation = true; 784 785 } 785 786 … … 981 982 void FrameLoaderClient::revertToProvisionalState(WebCore::DocumentLoader*) 982 983 { 983 notImplemented();984 m_hasRepresentation = true; 984 985 } 985 986 … … 1029 1030 { 1030 1031 if (!m_pluginView) { 1031 FrameLoader* loader = documentLoader->frameLoader(); 1032 loader->writer()->setEncoding(m_response.textEncodingName(), false); 1032 // This is necessary to create an empty document, 1033 // but it has to be skipped in the provisional phase. 1034 if (m_hasRepresentation) 1035 documentLoader->frameLoader()->writer()->setEncoding("", false); 1033 1036 } else { 1034 1037 m_pluginView->didFinishLoading(); -
trunk/Source/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.h
r74571 r77596 202 202 WebCore::PluginView* m_pluginView; 203 203 bool m_hasSentResponseToPlugin; 204 205 bool m_hasRepresentation; 204 206 }; 205 207
Note: See TracChangeset
for help on using the changeset viewer.