WebCore:
authormjs <mjs@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 14 Aug 2006 09:01:01 +0000 (09:01 +0000)
committermjs <mjs@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 14 Aug 2006 09:01:01 +0000 (09:01 +0000)
        Reviewed by Brady.

        - removed WebKit-level dependencies from WebFormDataStream. Use WebCore version of system interface

        * WebCore.exp: export new functions
        * platform/mac/WebCoreSystemInterface.h: Added CFReadStream related functions
        * platform/mac/WebCoreSystemInterface.mm: ditto

WebKit:

        Reviewed by Brady.

        - removed WebKit-level dependencies from WebFormDataStream. Use WebCore version of system interface

        * Loader/WebFormDataStream.m:
        (formCanRead):
        (formEventCallback):
        (webSetHTTPBody):
        * WebCoreSupport/WebSystemInterface.m:
        (InitWebCoreSystemInterface):

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

WebCore/ChangeLog
WebCore/WebCore.exp
WebCore/platform/mac/WebCoreSystemInterface.h
WebCore/platform/mac/WebCoreSystemInterface.mm
WebKit/ChangeLog
WebKit/Loader/WebFormDataStream.m
WebKit/WebCoreSupport/WebSystemInterface.m

index 63c07761a6979a20532bc187beb99d6b26aa92f7..2906c0874cedc4f62f84182a518738ad70304f9b 100644 (file)
@@ -1,3 +1,13 @@
+2006-08-14  Maciej Stachowiak  <mjs@apple.com>
+
+        Reviewed by Brady.
+
+        - removed WebKit-level dependencies from WebFormDataStream. Use WebCore version of system interface
+
+        * WebCore.exp: export new functions
+        * platform/mac/WebCoreSystemInterface.h: Added CFReadStream related functions
+        * platform/mac/WebCoreSystemInterface.mm: ditto
+
 2006-08-13  Maks Orlovich  <maksim@kde.org>
 
         Reviewed (and tweaked a little) by Maciej.
index 869a7977307a75294cfe6f022b3c2ea2c35f10d8..11edf42ecaefec54bec220c19d4832d18b0beb6d 100644 (file)
@@ -132,8 +132,9 @@ _WebCoreTextFloatWidth
 _wkCGContextGetShouldSmoothFonts
 _wkClearGlyphVector
 _wkConvertCharToGlyphs
-_wkDrawBezeledTextFieldCell
+_wkCreateCustomCFReadStream
 _wkDrawBezeledTextArea
+_wkDrawBezeledTextFieldCell
 _wkDrawFocusRing
 _wkFontSmoothingModeIsLCD
 _wkGetATSStyleGroup
@@ -156,3 +157,6 @@ _wkSetCGFontRenderingMode
 _wkSetDragImage
 _wkSetPatternPhaseInUserSpace
 _wkSetUpFontCache
+_wkSignalCFReadStreamEnd
+_wkSignalCFReadStreamError
+_wkSignalCFReadStreamHasBytes
index 08e1d22b5f03e9650109fd1376aadc9cf2169e4c..beebb83fdf55c5f59b945a3f8203a7c756063983 100644 (file)
@@ -92,6 +92,18 @@ extern void (*wkSetCGFontRenderingMode)(CGContextRef, NSFont*);
 extern void (*wkSetDragImage)(NSImage*, NSPoint offset);
 extern void (*wkSetPatternPhaseInUserSpace)(CGContextRef, CGPoint point);
 extern void (*wkSetUpFontCache)(size_t);
+extern void (*wkSignalCFReadStreamEnd)(CFReadStreamRef stream);
+extern void (*wkSignalCFReadStreamHasBytes)(CFReadStreamRef stream);
+extern void (*wkSignalCFReadStreamError)(CFReadStreamRef stream, CFStreamError *error);
+extern CFReadStreamRef (*wkCreateCustomCFReadStream)(void *(*formCreate)(CFReadStreamRef, void *), 
+    void (*formFinalize)(CFReadStreamRef, void *), 
+    Boolean (*formOpen)(CFReadStreamRef, CFStreamError *, Boolean *, void *), 
+    CFIndex (*formRead)(CFReadStreamRef, UInt8 *, CFIndex, CFStreamError *, Boolean *, void *), 
+    Boolean (*formCanRead)(CFReadStreamRef, void *), 
+    void (*formClose)(CFReadStreamRef, void *), 
+    void (*formSchedule)(CFReadStreamRef, CFRunLoopRef, CFStringRef, void *), 
+    void (*formUnschedule)(CFReadStreamRef, CFRunLoopRef, CFStringRef, void *),
+    void *context);
 
 #ifdef __cplusplus
 }
index c4aa8ba62b557d93b0b8fa057157071eae594335..85f1eb9fac624ab2506b7b726e92b03e2491264c 100644 (file)
@@ -53,3 +53,15 @@ void (*wkSetCGFontRenderingMode)(CGContextRef, NSFont*);
 void (*wkSetDragImage)(NSImage*, NSPoint offset);
 void (*wkSetPatternPhaseInUserSpace)(CGContextRef, CGPoint point);
 void (*wkSetUpFontCache)(size_t);
+void (*wkSignalCFReadStreamEnd)(CFReadStreamRef stream);
+void (*wkSignalCFReadStreamHasBytes)(CFReadStreamRef stream);
+void (*wkSignalCFReadStreamError)(CFReadStreamRef stream, CFStreamError *error);
+CFReadStreamRef (*wkCreateCustomCFReadStream)(void *(*formCreate)(CFReadStreamRef, void *), 
+    void (*formFinalize)(CFReadStreamRef, void *), 
+    Boolean (*formOpen)(CFReadStreamRef, CFStreamError *, Boolean *, void *), 
+    CFIndex (*formRead)(CFReadStreamRef, UInt8 *, CFIndex, CFStreamError *, Boolean *, void *), 
+    Boolean (*formCanRead)(CFReadStreamRef, void *), 
+    void (*formClose)(CFReadStreamRef, void *), 
+    void (*formSchedule)(CFReadStreamRef, CFRunLoopRef, CFStringRef, void *), 
+    void (*formUnschedule)(CFReadStreamRef, CFRunLoopRef, CFStringRef, void *),
+    void *context);
index bfe4692c57f152dbc75b51591da878038a82ef8b..15d791a8e89447a9439afa10c706bcd3bf0ad531 100644 (file)
@@ -1,3 +1,16 @@
+2006-08-14  Maciej Stachowiak  <mjs@apple.com>
+
+        Reviewed by Brady.
+        
+        - removed WebKit-level dependencies from WebFormDataStream. Use WebCore version of system interface
+
+        * Loader/WebFormDataStream.m:
+        (formCanRead):
+        (formEventCallback):
+        (webSetHTTPBody):
+        * WebCoreSupport/WebSystemInterface.m:
+        (InitWebCoreSystemInterface):
+
 2006-08-14  Maciej Stachowiak  <mjs@apple.com>
 
         Rubber stamped by Brady.
index 36f1db493cf6d4dfe32d7fa7bffc524305cb34ba..cd6093ef62c17a3092463f1b119c1eab176c6d17 100644 (file)
@@ -34,8 +34,7 @@
 #import <sys/stat.h>
 
 #import <JavaScriptCore/Assertions.h>
-#import "WebNSObjectExtras.h"
-#import <WebKitSystemInterface.h>
+#import <WebCore/WebCoreSystemInterface.h>
 
 static void formEventCallback(CFReadStreamRef stream, CFStreamEventType type, void *context);
 
@@ -224,7 +223,7 @@ static Boolean formCanRead(CFReadStreamRef stream, void *context)
         openNextStream(form);
     }
     if (!form->currentStream) {
-        WKSignalCFReadStreamEnd(stream);
+        wkSignalCFReadStreamEnd(stream);
         return FALSE;
     }
     return CFReadStreamHasBytesAvailable(form->currentStream);
@@ -265,17 +264,17 @@ static void formEventCallback(CFReadStreamRef stream, CFStreamEventType type, vo
 
     switch (type) {
     case kCFStreamEventHasBytesAvailable:
-        WKSignalCFReadStreamHasBytes(form->formStream);
+        wkSignalCFReadStreamHasBytes(form->formStream);
         break;
     case kCFStreamEventErrorOccurred: {
         CFStreamError readStreamError = CFReadStreamGetError(stream);
-        WKSignalCFReadStreamError(form->formStream, &readStreamError);
+        wkSignalCFReadStreamError(form->formStream, &readStreamError);
         break;
     }
     case kCFStreamEventEndEncountered:
         openNextStream(form);
         if (!form->currentStream) {
-            WKSignalCFReadStreamEnd(form->formStream);
+            wkSignalCFReadStreamEnd(form->formStream);
         }
         break;
     case kCFStreamEventNone:
@@ -328,7 +327,7 @@ void webSetHTTPBody(NSMutableURLRequest *request, NSArray *formData)
     [request setValue:[NSString stringWithFormat:@"%lld", length] forHTTPHeaderField:@"Content-Length"];
 
     // Create and set the stream.
-    CFReadStreamRef stream = WKCreateCustomCFReadStream(formCreate, formFinalize, formOpen, formRead, formCanRead, formClose, formSchedule, formUnschedule, formData);
+    CFReadStreamRef stream = wkCreateCustomCFReadStream(formCreate, formFinalize, formOpen, formRead, formCanRead, formClose, formSchedule, formUnschedule, formData);
     [request setHTTPBodyStream:(NSInputStream *)stream];
     CFRelease(stream);
 }
index 9685d3e8ef549eaf4d8b49e8c71febcfe42e8106..19e6ba63fec9e2f690c19f398db1c8b0ebfc40be 100644 (file)
@@ -66,6 +66,10 @@ void InitWebCoreSystemInterface(void)
     INIT(SetDragImage);
     INIT(SetPatternPhaseInUserSpace);
     INIT(SetUpFontCache);
+    INIT(SignalCFReadStreamEnd);
+    INIT(SignalCFReadStreamHasBytes);
+    INIT(SignalCFReadStreamError);
+    INIT(CreateCustomCFReadStream);
 
     didInit = true;
 }