Attempt to fix Chromium build. We can just grab the encoding from the document.
authorabarth@webkit.org <abarth@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 8 Sep 2011 23:03:46 +0000 (23:03 +0000)
committerabarth@webkit.org <abarth@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 8 Sep 2011 23:03:46 +0000 (23:03 +0000)
* src/ContextMenuClientImpl.cpp:
(WebKit::ContextMenuClientImpl::getCustomMenuFromDefaultItems):
* src/WebDocument.cpp:
(WebKit::WebDocument::encoding):
* src/WebPageSerializerImpl.cpp:
(WebKit::WebPageSerializerImpl::preActionBeforeSerializeOpenTag):
* src/WebSearchableFormData.cpp:
(HTMLNames::GetFormEncoding):
* src/WebViewImpl.cpp:
(WebKit::WebViewImpl::pageEncoding):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@94816 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/src/ContextMenuClientImpl.cpp
Source/WebKit/chromium/src/WebDocument.cpp
Source/WebKit/chromium/src/WebPageSerializerImpl.cpp
Source/WebKit/chromium/src/WebSearchableFormData.cpp
Source/WebKit/chromium/src/WebViewImpl.cpp

index acd8a1e..6c82390 100644 (file)
@@ -1,3 +1,18 @@
+2011-09-08  Adam Barth  <abarth@webkit.org>
+
+        Attempt to fix Chromium build.  We can just grab the encoding from the document.
+
+        * src/ContextMenuClientImpl.cpp:
+        (WebKit::ContextMenuClientImpl::getCustomMenuFromDefaultItems):
+        * src/WebDocument.cpp:
+        (WebKit::WebDocument::encoding):
+        * src/WebPageSerializerImpl.cpp:
+        (WebKit::WebPageSerializerImpl::preActionBeforeSerializeOpenTag):
+        * src/WebSearchableFormData.cpp:
+        (HTMLNames::GetFormEncoding):
+        * src/WebViewImpl.cpp:
+        (WebKit::WebViewImpl::pageEncoding):
+
 2011-09-08  W. James MacLean  <wjmaclean@chromium.org>
 
         [chromium] Add backend compositor support for rescaling (zooming) textures during zoom animation.
index 919529f..d163307 100644 (file)
@@ -244,7 +244,7 @@ PlatformMenuDescription ContextMenuClientImpl::getCustomMenuFromDefaultItems(
     // If it's not a link, an image, a media element, or an image/media link,
     // show a selection menu or a more generic page menu.
     if (selectedFrame->document()->loader())
-        data.frameEncoding = selectedFrame->document()->loader()->writer()->encoding();
+        data.frameEncoding = selectedFrame->document()->encoding();
 
     // Send the frame and page URLs in any case.
     data.pageURL = urlFromFrame(m_webView->mainFrameImpl()->frame());
index a7766c4..d896b1e 100644 (file)
@@ -74,7 +74,7 @@ WebSecurityOrigin WebDocument::securityOrigin() const
 
 WebString WebDocument::encoding() const
 {
-    return constUnwrap<Document>()->loader()->writer()->encoding();
+    return constUnwrap<Document>()->encoding();
 }
 
 WebURL WebDocument::openSearchDescriptionURL() const
index 2792db8..ee3e963 100644 (file)
@@ -169,7 +169,7 @@ String WebPageSerializerImpl::preActionBeforeSerializeOpenTag(
             // Get encoding info.
             String xmlEncoding = param->document->xmlEncoding();
             if (xmlEncoding.isEmpty())
-                xmlEncoding = param->document->loader()->writer()->encoding();
+                xmlEncoding = param->document->encoding();
             if (xmlEncoding.isEmpty())
                 xmlEncoding = UTF8Encoding().name();
             result.append("<?xml version=\"");
index d61e845..e341c60 100644 (file)
@@ -66,7 +66,7 @@ void GetFormEncoding(const HTMLFormElement* form, TextEncoding* encoding)
     }
     if (!form->document()->loader())
          return;
-    *encoding = TextEncoding(form->document()->loader()->writer()->encoding());
+    *encoding = TextEncoding(form->document()->encoding());
 }
 
 // Returns true if the submit request results in an HTTP URL.
index 575b7c3..738d7a3 100644 (file)
@@ -1680,10 +1680,11 @@ WebString WebViewImpl::pageEncoding() const
     if (!m_page.get())
         return WebString();
 
+    // FIXME: Is this check needed?
     if (!m_page->mainFrame()->document()->loader())
         return WebString();
 
-    return m_page->mainFrame()->document()->loader()->writer()->encoding();
+    return m_page->mainFrame()->document()->encoding();
 }
 
 void WebViewImpl::setPageEncoding(const WebString& encodingName)