Reviewed by Brady.
authoraroben <aroben@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 26 Sep 2006 00:57:13 +0000 (00:57 +0000)
committeraroben <aroben@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 26 Sep 2006 00:57:13 +0000 (00:57 +0000)
        Build fixes.

        * WebCore.vcproj/WebCore/WebCore.vcproj: Fix malformed XML.
        * platform/ResourceLoader.h: Store whether a particular job
        has received a response within the ResourceLoader object itself, since
        it's possible that we will enter the InternetReadFileExA while loop
        twice for the same job.
        * platform/ResourceLoaderInternal.h: Add private instance variable to
        store whether we've received a response.
        (WebCore::ResourceLoaderInternal::ResourceLoaderInternal):
        * platform/win/GraphicsContextWin.cpp: Fix order of preprocessor
        directives.
        * platform/win/ResourceLoaderWin.cpp:
        (WebCore::ResourceLoader::onRequestComplete): Ask the ResourceLoader
        whether it has received a response instead of assuming it hasn't.
        (WebCore::ResourceLoader::setHasReceivedResponse): Added.
        (WebCore::ResourceLoader::hasReceivedResponse): Added.
        * platform/win/TemporaryLinkStubs.cpp: Rename setKnobProportion to
        setProportion
        (ScrollBar::setProportion):

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

WebCore/ChangeLog
WebCore/WebCore.vcproj/WebCore/WebCore.vcproj
WebCore/platform/ResourceLoader.h
WebCore/platform/ResourceLoaderInternal.h
WebCore/platform/win/GraphicsContextWin.cpp
WebCore/platform/win/ResourceLoaderWin.cpp
WebCore/platform/win/TemporaryLinkStubs.cpp

index 3497b9751058a9153f606b10d601f1e6ecaef102..af211d2de069dcd98e68757e07c03028f0476d71 100644 (file)
@@ -1,3 +1,28 @@
+2006-09-25  Adam Roben  <aroben@apple.com>
+
+        Reviewed by Brady.
+
+        Build fixes.
+
+        * WebCore.vcproj/WebCore/WebCore.vcproj: Fix malformed XML.
+        * platform/ResourceLoader.h: Store whether a particular job
+        has received a response within the ResourceLoader object itself, since
+        it's possible that we will enter the InternetReadFileExA while loop
+        twice for the same job.
+        * platform/ResourceLoaderInternal.h: Add private instance variable to
+        store whether we've received a response.
+        (WebCore::ResourceLoaderInternal::ResourceLoaderInternal):
+        * platform/win/GraphicsContextWin.cpp: Fix order of preprocessor
+        directives.
+        * platform/win/ResourceLoaderWin.cpp: 
+        (WebCore::ResourceLoader::onRequestComplete): Ask the ResourceLoader
+        whether it has received a response instead of assuming it hasn't.
+        (WebCore::ResourceLoader::setHasReceivedResponse): Added.
+        (WebCore::ResourceLoader::hasReceivedResponse): Added.
+        * platform/win/TemporaryLinkStubs.cpp: Rename setKnobProportion to
+        setProportion
+        (ScrollBar::setProportion):
+
 2006-09-25  Brady Eidson  <beidson@apple.com>
 
         Requested by ggaren
index 7ccd5ef6ae9dfb4d34ea50516d722a9bfa7ea9d7..e0715eca3baa0af18996f8025eacb461334e70ab 100644 (file)
                                </File>
                                 <File
                                         RelativePath="..\..\platform\win\GraphicsContextWin.cpp"
+                                        >
                                 </File>
                                <File
                                        RelativePath="..\..\platform\win\ImageWin.cpp"
index 01cff97a816883336c8280a13ce7e66e9ffba6bf..d71935c514db081e727f7c941ee6999504bfc6cb 100644 (file)
@@ -85,6 +85,8 @@ public:
 #endif
 
 #if USE(WININET)
+    void setHasReceivedResponse(bool b = true);
+    bool hasReceivedResponse() const;
     void fileLoadTimer(Timer<ResourceLoader>* timer);
     void onHandleCreated(LPARAM);
     void onRequestRedirected(LPARAM);
index 0f8b1e585c0059fd322c686317026c7de5a5577b..90e6209adbf3a0bdacc2facd642ba4258761cf09 100644 (file)
@@ -82,6 +82,7 @@ namespace WebCore {
             , m_formDataString(0)
             , m_formDataLength(0)
             , m_bytesRemainingToWrite(0)
+            , m_hasReceivedResponse(false)
 #endif
 #if PLATFORM(GDK)
             , m_handle(0)
@@ -114,6 +115,7 @@ namespace WebCore {
             , m_formDataString(0)
             , m_formDataLength(0)
             , m_bytesRemainingToWrite(0)
+            , m_hasReceivedResponse(false)
 #endif
 #if PLATFORM(GDK)
             , m_handle(0)
@@ -153,6 +155,7 @@ namespace WebCore {
         int m_formDataLength;
         int m_bytesRemainingToWrite;
         String m_postReferrer;
+        bool m_hasReceivedResponse;
 #endif
 #if PLATFORM(GDK)
         CURL *m_handle;
index c7229ad454446b90b02b7f3481fcbc95ea08bf77..c0724f17e77dc0a98efd96e56575a6807068e374 100644 (file)
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
-#if PLATFORM(CAIRO)
-
 #include "config.h"
 #include "GraphicsContext.h"
+
+#if PLATFORM(CAIRO)
+
 #include <cairo-win32.h>
 
 namespace WebCore
index 407469169dda25408622fa74a1a5e2b05327bf78..1b515b3f5072195fd88b89ebf6637d79c877d3ce 100644 (file)
@@ -225,8 +225,8 @@ void ResourceLoader::onRequestComplete(LPARAM lParam)
 
     bool receivedAnyData = false;
     while ((ok = InternetReadFileExA(handle, &buffers, IRF_NO_WAIT, (DWORD_PTR)this)) && buffers.dwBufferLength) {
-        if (!receivedAnyData) {
-            receivedAnyData = true;
+        if (!hasReceivedResponse()) {
+            setHasReceivedResponse();
             client()->receivedResponse(this, 0);
         }
         client()->receivedData(this, buffer, buffers.dwBufferLength);
@@ -419,4 +419,14 @@ void ResourceLoader::cancel()
         setError(1);
 }
 
+void ResourceLoader::setHasReceivedResponse(bool b)
+{
+    d->m_hasReceivedResponse = b;
+}
+
+bool ResourceLoader::hasReceivedResponse() const
+{
+    return d->m_hasReceivedResponse;
+}
+
 } // namespace WebCore
index 6e77ef24b11ad32975b172f22719636f90583830..3e1d2d1813dcb174490dc074edce69df41a06fc4 100644 (file)
@@ -356,7 +356,7 @@ ScrollBar::ScrollBar(ScrollBarClient*, ScrollBarOrientation) { }
 void ScrollBar::setSteps(int, int) { }
 bool ScrollBar::scroll(ScrollDirection, ScrollGranularity, float) { return false; }
 bool ScrollBar::setValue(int) { return false; }
-void ScrollBar::setKnobProportion(int, int) { }
+void ScrollBar::setProportion(int, int) { }
 
 ListBox::ListBox() { }
 ListBox::~ListBox() { }