Reviewed by Maciej, reworked a bit by Darin.
authordarin <darin@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 5 Jul 2006 04:04:11 +0000 (04:04 +0000)
committerdarin <darin@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 5 Jul 2006 04:04:11 +0000 (04:04 +0000)
        Compile fixes for wx port / gcc 4.0.2

        * platform/PlatformString.h:
        * platform/StringImpl.h:
        Include CoreFoundation for CF-specific code.

        * dom/DocPtr.h:
        * doc/EventTargetNode.h:
        Silence warnings about 'extra tokens' after #endif on gcc 4.0.2.
        (Not an error but warnings appear frequently.)

        * WebCoreSources.bkl:
        * webcore-base.bkl:
        Synching ports sources file with TOT. Also, making sure SRCDIR variable
        overrides any previous values.

        * loader/ImageDocument.cpp:
        Use PLATFORM(MAC) for the parts that are specific to the Macintosh version,
        and move the Objective-C parts to another file.

        * loader/mac/ImageDocumentMac.h: Added.
        * loader/mac/ImageDocumentMac.mm: Added.

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

12 files changed:
WebCore/ChangeLog
WebCore/WebCore.xcodeproj/project.pbxproj
WebCore/WebCoreSources.bkl
WebCore/dom/DocPtr.h
WebCore/dom/EventTargetNode.h
WebCore/loader/ImageDocument.cpp
WebCore/loader/mac/ImageDocumentMac.h [new file with mode: 0644]
WebCore/loader/mac/ImageDocumentMac.mm [new file with mode: 0644]
WebCore/platform/PlatformString.h
WebCore/platform/StringImpl.h
WebCore/rendering/RenderTextField.cpp
WebCore/webcore-base.bkl

index 276f1a35161f18cd843468ed8bbb835568af3391..d5b5874c9f48c0cd4c9b6a6f775db3990a28ca25 100644 (file)
@@ -1,3 +1,30 @@
+2006-07-04  Kevin Ollivier  <kevino@theolliviers.com>
+
+        Reviewed by Maciej, reworked a bit by Darin.
+
+        Compile fixes for wx port / gcc 4.0.2
+        
+        * platform/PlatformString.h:
+        * platform/StringImpl.h:
+        Include CoreFoundation for CF-specific code.
+        
+        * dom/DocPtr.h:
+        * doc/EventTargetNode.h:
+        Silence warnings about 'extra tokens' after #endif on gcc 4.0.2.
+        (Not an error but warnings appear frequently.)
+        
+        * WebCoreSources.bkl:
+        * webcore-base.bkl:
+        Synching ports sources file with TOT. Also, making sure SRCDIR variable
+        overrides any previous values.
+        
+        * loader/ImageDocument.cpp:
+        Use PLATFORM(MAC) for the parts that are specific to the Macintosh version,
+        and move the Objective-C parts to another file.
+
+        * loader/mac/ImageDocumentMac.h: Added.
+        * loader/mac/ImageDocumentMac.mm: Added.
+
 2006-07-04  Sam Weinig  <sam.weinig@gmail.com>
 
         Build fix.
index c5ea558917bba7feafc0792dd0072bedd9a082d4..738984b574d08ab64f96ddb077f5a0eeeb832222 100644 (file)
@@ -95,7 +95,7 @@
                1A762C790A074F2600989F5B /* JSXPathResult.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A762C710A074F2600989F5B /* JSXPathResult.cpp */; };
                1A762C7A0A074F2600989F5B /* JSXPathResult.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A762C720A074F2600989F5B /* JSXPathResult.h */; };
                1A8086CC0A4D097600DFB6A7 /* DOMCSSInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A8083730A4C7CDA00DFB6A7 /* DOMCSSInternal.h */; };
-               1A820D910A13EBA600AF843C /* ImageDocument.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A820D8F0A13EBA600AF843C /* ImageDocument.cpp */; settings = {COMPILER_FLAGS = "-xobjective-c++"; }; };
+               1A820D910A13EBA600AF843C /* ImageDocument.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A820D8F0A13EBA600AF843C /* ImageDocument.cpp */; };
                1A820D920A13EBA600AF843C /* ImageDocument.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A820D900A13EBA600AF843C /* ImageDocument.h */; };
                1A85B18F0A1B18A200D8C87C /* JSHTMLHtmlElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A85B18D0A1B18A200D8C87C /* JSHTMLHtmlElement.cpp */; };
                1A85B1900A1B18A200D8C87C /* JSHTMLHtmlElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A85B18E0A1B18A200D8C87C /* JSHTMLHtmlElement.h */; };
                938E685409F0BE04008A48EC /* GraphicsTypes.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 938E685309F0BE04008A48EC /* GraphicsTypes.cpp */; };
                939885C308B7E3D100E707C4 /* EventNames.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 939885C108B7E3D100E707C4 /* EventNames.cpp */; };
                939885C408B7E3D100E707C4 /* EventNames.h in Headers */ = {isa = PBXBuildFile; fileRef = 939885C208B7E3D100E707C4 /* EventNames.h */; };
+               93A1EAA00A5634C9006960A0 /* ImageDocumentMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 93A1EA9F0A5634C9006960A0 /* ImageDocumentMac.mm */; };
+               93A1EAA80A563508006960A0 /* ImageDocumentMac.h in Headers */ = {isa = PBXBuildFile; fileRef = 93A1EAA70A563508006960A0 /* ImageDocumentMac.h */; };
                93B70D5B09EB0C7C009D8468 /* JSDOMParser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93B70D3F09EB0C7C009D8468 /* JSDOMParser.cpp */; };
                93B70D5C09EB0C7C009D8468 /* JSDOMParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 93B70D4009EB0C7C009D8468 /* JSDOMParser.h */; };
                93B70D5D09EB0C7C009D8468 /* JSXMLHttpRequest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93B70D4109EB0C7C009D8468 /* JSXMLHttpRequest.cpp */; };
                FAE04190097596C9000540BE /* SVGImageLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = FAE0418E097596C9000540BE /* SVGImageLoader.h */; };
 /* End PBXBuildFile section */
 
-/* Begin PBXBuildStyle section */
-               D06749E30A54CE6D00DA0E29 /* Development */ = {
-                       isa = PBXBuildStyle;
-                       buildSettings = {
-                               COPY_PHASE_STRIP = NO;
-                       };
-                       name = Development;
-               };
-               D06749E40A54CE6D00DA0E29 /* Deployment */ = {
-                       isa = PBXBuildStyle;
-                       buildSettings = {
-                               COPY_PHASE_STRIP = YES;
-                       };
-                       name = Deployment;
-               };
-/* End PBXBuildStyle section */
-
 /* Begin PBXContainerItemProxy section */
                DD041FF009D9E3250010AF2A /* PBXContainerItemProxy */ = {
                        isa = PBXContainerItemProxy;
                93955A4203D72932008635CE /* RenderTreeAsText.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RenderTreeAsText.cpp; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
                939885C108B7E3D100E707C4 /* EventNames.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.cpp.cpp; path = EventNames.cpp; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
                939885C208B7E3D100E707C4 /* EventNames.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = EventNames.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
+               93A1EA9F0A5634C9006960A0 /* ImageDocumentMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ImageDocumentMac.mm; sourceTree = "<group>"; };
+               93A1EAA70A563508006960A0 /* ImageDocumentMac.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ImageDocumentMac.h; sourceTree = "<group>"; };
                93ABCE5D06E1A42E0085925B /* FormData.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FormData.cpp; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
                93ABCE5E06E1A42E0085925B /* FormData.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = FormData.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
                93B641F106E28C5C0055F610 /* KWQFormData.mm */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = KWQFormData.mm; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
                        path = editing;
                        sourceTree = "<group>";
                };
+               93A1EAA20A5634D8006960A0 /* mac */ = {
+                       isa = PBXGroup;
+                       children = (
+                               93A1EAA70A563508006960A0 /* ImageDocumentMac.h */,
+                               93A1EA9F0A5634C9006960A0 /* ImageDocumentMac.mm */,
+                       );
+                       path = mac;
+                       sourceTree = "<group>";
+               };
                93EEC1EC09C2877700C515D1 /* html */ = {
                        isa = PBXGroup;
                        children = (
                BCB16BFB0979C38700467741 /* loader */ = {
                        isa = PBXGroup;
                        children = (
+                               93A1EAA20A5634D8006960A0 /* mac */,
                                BCB16BFE0979C3BD00467741 /* Cache.cpp */,
                                BCB16BFF0979C3BD00467741 /* Cache.h */,
                                BCB16C000979C3BD00467741 /* CachedCSSStyleSheet.cpp */,
                                1A8086CC0A4D097600DFB6A7 /* DOMCSSInternal.h in Headers */,
                                1A1D13800A5325520064BF5F /* DOMXPath.h in Headers */,
                                1A1D13CA0A5329090064BF5F /* DOMXPathInternal.h in Headers */,
+                               93A1EAA80A563508006960A0 /* ImageDocumentMac.h in Headers */,
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };
                0867D690FE84028FC02AAC07 /* Project object */ = {
                        isa = PBXProject;
                        buildConfigurationList = 149C284308902B11008A9EFC /* Build configuration list for PBXProject "WebCore" */;
-                       buildSettings = {
-                       };
-                       buildStyles = (
-                               D06749E30A54CE6D00DA0E29 /* Development */,
-                               D06749E40A54CE6D00DA0E29 /* Deployment */,
-                       );
                        hasScannedForEncodings = 1;
                        knownRegions = (
                                English,
                                E1052C320A4D70010072D99B /* DOMEventsNonstandard.mm in Sources */,
                                516149ED0A525E3A003DFC7A /* SiteIcon.cpp in Sources */,
                                1A1D13810A5325520064BF5F /* DOMXPath.mm in Sources */,
+                               93A1EAA00A5634C9006960A0 /* ImageDocumentMac.mm in Sources */,
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };
index 2509291e138b2128520737ac0695bfe25a074c8b..65eaf8ea14fde2270d9fd0dc3c92e839a82023e2 100644 (file)
@@ -6,6 +6,7 @@
                kwq/KWQTextStream.cpp
        </set>
        <set append="1" var="WEBCORE_SOURCES_DERIVEDSOURCES">
+               
                DerivedSources/WebCore/CharsetData.cpp
                DerivedSources/WebCore/ColorData.c
                DerivedSources/WebCore/CSSGrammar.cpp
                DerivedSources/WebCore/XLinkNames.cpp
                DerivedSources/WebCore/XMLNames.cpp
                DerivedSources/WebCore/XPathGrammar.cpp
-       </set>
 
-       <set append="1" var="WEBCORE_SOURCES_KHTML">
        </set>
+       <set append="1" var="WEBCORE_SOURCES_KHTML">
+               
 
-       <set append="1" var="WEBCORE_SOURCES_MISC">
        </set>
+       <set append="1" var="WEBCORE_SOURCES_MISC">
+               
 
+       </set>
        <set append="1" var="WEBCORE_SOURCES_PAGE">
                
                page/DOMWindow.cpp
                loader/FormData.cpp
                loader/ImageDocument.cpp
                loader/loader.cpp
+               loader/PluginDocument.cpp
                loader/Request.cpp
                loader/TextDocument.cpp
                loader/PluginDocument.cpp
                platform/image-decoders/gif/GIFImageReader.cpp
 
        </set>
-
-       <set append="1" var="WEBCORE_SOURCES_XBM">
-               platform/image-decoders/xbm/XBMImageDecoder.cpp
-       </set>
-
-       <set append="1" var="WEBCORE_SOURCES_ICO">
-               platform/image-decoders/ico/ICOImageDecoder.cpp
-       </set>
-
-       <set append="1" var="WEBCORE_SOURCES_BMP">
-               platform/image-decoders/bmp/BMPImageDecoder.cpp
-       </set>
-
        <set append="1" var="WEBCORE_SOURCES_PNG">
                
                platform/image-decoders/png/png.c
                platform/image-decoders/png/pngwutil.c
 
        </set>
-
        <set append="1" var="WEBCORE_SOURCES_ZLIB">
                
                platform/image-decoders/zlib/adler32.c
                platform/image-decoders/jpeg/jquant2.c
                platform/image-decoders/jpeg/jutils.c
 
+       </set>
+       <set append="1" var="WEBCORE_SOURCES_BMP">
+               
+               platform/image-decoders/bmp/BMPImageDecoder.cpp
+
+       </set>
+       <set append="1" var="WEBCORE_SOURCES_ICO">
+               
+               platform/image-decoders/ico/ICOImageDecoder.cpp
+
+       </set>
+       <set append="1" var="WEBCORE_SOURCES_XBM">
+               
+               platform/image-decoders/xbm/XBMImageDecoder.cpp
+
        </set>
        <set append="1" var="WEBCORE_SOURCES_CAIRO">
                
                platform/cairo/pixman/src/renderedge.c
 
        </set>
-       <set append="1" var="WEBCORE_SOURCES_CAIRO_CAIRO">
+       <set append="1" var="WEBCORE_SOURCES_CAIRO">
                
                platform/cairo/cairo/src/cairo-arc.c
                platform/cairo/cairo/src/cairo-array.c
                rendering/AutoTableLayout.cpp
                rendering/bidi.cpp
                rendering/break_lines.cpp
+               rendering/DeprecatedRenderSelect.cpp
+               rendering/DeprecatedSlider.cpp
                rendering/EllipsisBox.cpp
                rendering/FixedTableLayout.cpp
                rendering/InlineBox.cpp
                rendering/RenderFileButton.cpp
                rendering/RenderFlexibleBox.cpp
                rendering/RenderFlow.cpp
-               rendering/RenderView.cpp
                rendering/RenderFormElement.cpp
                rendering/RenderFrame.cpp
                rendering/RenderFrameSet.cpp
                rendering/RenderTextField.cpp
                rendering/RenderTextFragment.cpp
                rendering/RenderTheme.cpp
+               
                rendering/RenderTreeAsText.cpp
+               rendering/RenderView.cpp
                rendering/RenderWidget.cpp
                rendering/RootInlineBox.cpp
 
                dom/Attr.cpp
                dom/Attribute.cpp
                dom/BeforeTextInsertedEvent.cpp
+               dom/BeforeUnloadEvent.cpp
                dom/CDATASection.cpp
                dom/CharacterData.cpp
                dom/ChildNodeList.cpp
+               dom/ClipboardEvent.cpp
                dom/Comment.cpp
                dom/ContainerNode.cpp
                dom/CSSMappedAttributeDeclaration.cpp
                dom/ProcessingInstruction.cpp
                dom/QualifiedName.cpp
                dom/Range.cpp
-        dom/RegisteredEventListener.cpp
+               dom/RegisteredEventListener.cpp
                dom/StyledElement.cpp
                dom/Text.cpp
                dom/Traversal.cpp
                dom/TreeWalker.cpp
-               dom/WheelEvent.cpp
                dom/UIEvent.cpp
+               dom/WheelEvent.cpp
                dom/xml_tokenizer.cpp
 
        </set>
                bindings/js/kjs_proxy.cpp
                bindings/js/kjs_traversal.cpp
                bindings/js/kjs_window.cpp
-       </set>
 
+       </set>
 </makefile>
index afef38ae2f717e11c2b8cdfea952478c8703f6ca..66b1f331090eab9e8977906d92a51d244d041ea4 100644 (file)
@@ -113,4 +113,4 @@ template <class T> inline bool operator!=(const T *a, const DocPtr<T> &b)
 
 } // namespace WebCore
 
-#endif DOM_DocPtr_h
+#endif // DOM_DocPtr_h
index 1885100806e0e586d316f5c4d51ab1d20fa46cf9..a3517e033355e77a8bbab7707bb3fce50387aacd 100644 (file)
@@ -119,7 +119,7 @@ bool eventDispatchForbidden();
 inline void forbidEventDispatch() { }
 inline void allowEventDispatch() { }
 
-#endif NDEBUG
+#endif // NDEBUG 
 
 } //namespace WebCore
 
index 624d0829c0da38e865a81127efd2010e44917772..36a7e46f160d70b8a414c60de9f3e76ecc7575d3 100644 (file)
  */
 
 #include "config.h"
-
 #include "ImageDocument.h"
 
 #include "CachedImage.h"
 #include "Element.h"
+#include "HTMLImageElement.h"
 #include "HTMLNames.h"
 #include "SegmentedString.h"
 #include "Text.h"
-#include "HTMLImageElement.h"
 #include "xml_tokenizer.h"
 
-#ifdef __APPLE__
-#include <Cocoa/Cocoa.h>
-#include "FrameMac.h"
-#include "WebCoreFrameBridge.h"
+#if PLATFORM(MAC)
+#include "ImageDocumentMac.h"
 #endif 
 
 namespace WebCore {
@@ -54,7 +51,7 @@ public:
     virtual bool isWaitingForScripts() const;
     
     virtual bool wantsRawData() const { return true; }
-    virtual bool writeRawData(const char *data, int len);
+    virtual bool writeRawData(const chardata, int len);
 
     void createDocumentStructure();
 private:
@@ -115,22 +112,8 @@ void ImageTokenizer::finish()
         cachedImage->data(buffer, true);
 
         // FIXME: Need code to set the title for platforms other than Mac OS X.
-
-#ifdef __APPLE__
-        // FIXME: This is terrible! Makes an extra copy of the image data!
-        // Can't we get the NSData from NSURLConnection?
-        // Why is this different from image subresources?
-        NSData* nsData = [[NSData alloc] initWithBytes:buffer.data() length:buffer.size()];
-        cachedImage->setAllData(nsData);
-        [nsData release];
-
-        WebCoreFrameBridge* bridge = Mac(m_doc->frame())->bridge();
-        NSURLResponse* response = [bridge mainResourceURLResponse];
-        cachedImage->setResponse(response);
-
-        if (cachedImage->imageSize().width() > 0)
-            m_doc->setTitle([bridge imageTitleForFilename:[response suggestedFilename]
-                                                     size:cachedImage->imageSize()]);
+#if PLATFORM(MAC)
+        finishImageLoad(m_doc, cachedImage, buffer.data(), buffer.size());
 #endif
     }
 
diff --git a/WebCore/loader/mac/ImageDocumentMac.h b/WebCore/loader/mac/ImageDocumentMac.h
new file mode 100644 (file)
index 0000000..a31baca
--- /dev/null
@@ -0,0 +1,37 @@
+/*
+ * Copyright (C) 2006 Apple Computer, Inc.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
+ */
+
+#ifndef ImageDocumentMac_h
+#define ImageDocumentMac_h
+
+namespace WebCore {
+
+    class CachedImage;
+    class Document;
+
+    void finishImageLoad(Document*, CachedImage*, const void* imageData, size_t imageDataSize);
+
+}
+
+#endif
diff --git a/WebCore/loader/mac/ImageDocumentMac.mm b/WebCore/loader/mac/ImageDocumentMac.mm
new file mode 100644 (file)
index 0000000..fdff799
--- /dev/null
@@ -0,0 +1,53 @@
+/*
+ * Copyright (C) 2006 Apple Computer, Inc.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
+ */
+
+#import "config.h"
+#import "ImageDocumentMac.h"
+
+#include "CachedImage.h"
+#include "Document.h"
+#include "FrameMac.h"
+#include "WebCoreFrameBridge.h"
+
+namespace WebCore {
+    
+void finishImageLoad(Document* document, CachedImage* image, const void* imageData, size_t imageDataSize)
+{
+    // FIXME: This is terrible! Makes an extra copy of the image data!
+    // Can't we get the NSData from NSURLConnection?
+    // Why is this different from image subresources?
+    NSData* nsData = [[NSData alloc] initWithBytes:imageData length:imageDataSize];
+    image->setAllData(nsData);
+    [nsData release];
+
+    WebCoreFrameBridge* bridge = Mac(document->frame())->bridge();
+    NSURLResponse* response = [bridge mainResourceURLResponse];
+    image->setResponse(response);
+
+    IntSize size = image->imageSize();
+    if (size.width())
+        document->setTitle([bridge imageTitleForFilename:[response suggestedFilename] size:size]);
+}
+    
+}
index 34bc14afcf8197cc114e1917ef3b49e130e8df69..992ba4955811fa012f3dc812e0ad27c9c969a064 100644 (file)
 
 #include "StringImpl.h"
 
+#if __APPLE__
+#include <CoreFoundation/CoreFoundation.h>
+#endif
+
 namespace WebCore {
 
 /**
index 4719010e8f02fd279deab76fe9787c7aafcf60fc..7cf3cd77d5f3e5a9e039af5e7c8434dd99b61eb6 100644 (file)
 #include <unicode/umachine.h>
 #include <limits.h>
 
+#if __APPLE__
+#include <CoreFoundation/CoreFoundation.h>
+#endif
+
 #if __OBJC__
 @class NSString;
 #endif
index 38655dade21da5b33dc91e279cf8113e9c24736e..f7c68d9f0ba40f80e1b087088e9ea9e18d84760e 100644 (file)
@@ -141,24 +141,24 @@ void RenderTextField::updateFromElement()
         RenderFlexibleBox::addChild(divRenderer);
     }
 
-        HTMLGenericFormElement* element = static_cast<HTMLGenericFormElement*>(node());
-        m_div->renderer()->style()->setUserModify(element->isReadOnlyControl() ? READ_ONLY : READ_WRITE_PLAINTEXT_ONLY);
-        String value;
-        if (m_multiLine)
-            value = static_cast<HTMLTextAreaElement*>(element)->value().copy();    
-        else
-            value = static_cast<HTMLInputElement*>(element)->value().copy();        
-        if (!element->valueMatchesRenderer() || m_multiLine) {
-            String oldText = text();
-            if (value.isNull())
-                value = "";
-            value.replace('\\', backslashAsCurrencySymbol());
-            if (value != oldText || !m_div->hasChildNodes()) {
-                ExceptionCode ec = 0;
-                m_div->setInnerText(value, ec);
-                setEdited(false);
-            }
-          element->setValueMatchesRenderer();
+    HTMLGenericFormElement* element = static_cast<HTMLGenericFormElement*>(node());
+    m_div->renderer()->style()->setUserModify(element->isReadOnlyControl() ? READ_ONLY : READ_WRITE_PLAINTEXT_ONLY);
+    String value;
+    if (m_multiLine)
+        value = static_cast<HTMLTextAreaElement*>(element)->value().copy();    
+    else
+        value = static_cast<HTMLInputElement*>(element)->value().copy();        
+    if (!element->valueMatchesRenderer() || m_multiLine) {
+        String oldText = text();
+        if (value.isNull())
+            value = "";
+        value.replace('\\', backslashAsCurrencySymbol());
+        if (value != oldText || !m_div->hasChildNodes()) {
+            ExceptionCode ec = 0;
+            m_div->setInnerText(value, ec);
+            setEdited(false);
+        }
+        element->setValueMatchesRenderer();
     }
 }
 
index 74f7dbaafe279fea47dccff1c11e6d432c8beff6..94336eea3cb6c5f4f0e6a48440d1466c29f44d24 100644 (file)
@@ -33,7 +33,7 @@ Base settings shared by all Bakefile-based ports.
 
     <!-- Common definitions etc.: -->
 
-    <set var="SRCDIR">../..</set>
+    <set var="SRCDIR" append="0">../..</set>
 
     <include file="../Bakefiles/presets.bkl"/>
     <include file="WebCoreSources.bkl"/>
@@ -50,7 +50,6 @@ Base settings shared by all Bakefile-based ports.
                $(WEBCORE_SOURCES_BMP)
                $(WEBCORE_SOURCES_GIF)
                $(WEBCORE_SOURCES_ICO)
-               $(WEBCORE_SOURCES_ICON)
                $(WEBCORE_SOURCES_PNG)
                $(WEBCORE_SOURCES_XBM)
                $(WEBCORE_SOURCES_ZLIB)