WebCore:
authordarin@apple.com <darin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 3 Mar 2008 18:44:12 +0000 (18:44 +0000)
committerdarin@apple.com <darin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 3 Mar 2008 18:44:12 +0000 (18:44 +0000)
        Reviewed by Adam.

        - some "cleanup" on the path to removing WebCoreFrameBridge

        * WebCore.base.exp: Exported some stuff we either already use or
        I am about to use in an upcoming patch.

        * WebCore.xcodeproj/project.pbxproj: Made FileChooser.h private rather
        than project, for future use in WebKit.

        * bindings/objc/WebScriptObject.mm: Removed some dead code.

        * dom/ContainerNode.cpp: Added a now-needed or soon-to-be-needed include.
        * editing/Editor.cpp: Ditto.

        * editing/Editor.h: Removed many unneeded declarations and includes.
        Removed the unused userVisibleString function.

        * editing/EditorCommand.cpp:
        (WebCore::executeYank): Added parameter for triggeringEvent, which no
        longer has a default value.
        (WebCore::executeYankAndSelect): Ditto.

        * editing/mac/EditorMac.mm: Removed userVisibleString.

        * page/mac/EventHandlerMac.mm:
        (WebCore::isKeyboardOptionTab): Tweaked formattin.

        * page/mac/WebCoreFrameBridge.mm:
        (-[WebCoreFrameBridge dragSourceMovedTo:]): Get window from -[NSView window]
        rather than from the bridge. There's no special value in the bridge's window
        method and we can use NSView directly.
        (-[WebCoreFrameBridge dragSourceEndedAt:operation:]): Ditto.

        * platform/graphics/mac/ImageMac.mm:
        (WebCore::Image::loadPlatformResource): Use a new WebCoreBundleFinder class to
        find the bundle rather than using WebCoreFrameBridge.

        * platform/mac/ClipboardMac.mm: Added a now-needed or soon-to-be-needed include.
        * platform/mac/PasteboardMac.mm: Ditto.

        * rendering/RenderObject.h:
        (WebCore::DashboardRegionValue::operator==): Fixed mistake where this wasn't
        comparing the clip rectangle.
        (WebCore::DashboardRegionValue::operator!=): Added. Needed by my future work.

WebKit/mac:

        Reviewed by Adam.

        - some "cleanup" on the path to removing WebCoreFrameBridge

        * Storage/WebDatabaseManager.mm: Tweak includes.
        * Storage/WebDatabaseTrackerClient.mm: Ditto.
        * Storage/WebSecurityOrigin.mm: Ditto.
        * Storage/WebSecurityOriginInternal.h: Ditto.

        * WebView/WebFrame.mm:
        (core): Changed to get rid of the requirement that WebKitEditableLinkBehavior exactly
        match WebCore::EditableLinkBehavior.
        * WebView/WebFrameInternal.h: Removed unused kit function.

        * WebView/WebHTMLView.mm: Moved WebHTMLViewPrivate class in here.
        * WebView/WebHTMLViewInternal.h: Moved WebHTMLVewPrivate class out of here.
        * WebView/WebHTMLViewPrivate.h: Tweaked formatting and removed some unneeded declarations.

        * WebView/WebPreferencesPrivate.h: Removed a no-longer-needed comment.

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

26 files changed:
WebCore/ChangeLog
WebCore/WebCore.base.exp
WebCore/WebCore.xcodeproj/project.pbxproj
WebCore/bindings/objc/WebScriptObject.mm
WebCore/dom/ContainerNode.cpp
WebCore/editing/Editor.cpp
WebCore/editing/Editor.h
WebCore/editing/EditorCommand.cpp
WebCore/editing/mac/EditorMac.mm
WebCore/page/mac/EventHandlerMac.mm
WebCore/page/mac/WebCoreFrameBridge.mm
WebCore/platform/graphics/mac/ImageMac.mm
WebCore/platform/mac/ClipboardMac.mm
WebCore/platform/mac/PasteboardMac.mm
WebCore/rendering/RenderObject.h
WebKit/mac/ChangeLog
WebKit/mac/Storage/WebDatabaseManager.mm
WebKit/mac/Storage/WebDatabaseTrackerClient.mm
WebKit/mac/Storage/WebSecurityOrigin.mm
WebKit/mac/Storage/WebSecurityOriginInternal.h
WebKit/mac/WebView/WebFrame.mm
WebKit/mac/WebView/WebFrameInternal.h
WebKit/mac/WebView/WebHTMLView.mm
WebKit/mac/WebView/WebHTMLViewInternal.h
WebKit/mac/WebView/WebHTMLViewPrivate.h
WebKit/mac/WebView/WebPreferencesPrivate.h

index b677bbc..29635c3 100644 (file)
@@ -1,3 +1,51 @@
+2008-03-03  Darin Adler  <darin@apple.com>
+
+        Reviewed by Adam.
+
+        - some "cleanup" on the path to removing WebCoreFrameBridge
+
+        * WebCore.base.exp: Exported some stuff we either already use or
+        I am about to use in an upcoming patch.
+
+        * WebCore.xcodeproj/project.pbxproj: Made FileChooser.h private rather
+        than project, for future use in WebKit.
+
+        * bindings/objc/WebScriptObject.mm: Removed some dead code.
+
+        * dom/ContainerNode.cpp: Added a now-needed or soon-to-be-needed include.
+        * editing/Editor.cpp: Ditto.
+
+        * editing/Editor.h: Removed many unneeded declarations and includes.
+        Removed the unused userVisibleString function.
+
+        * editing/EditorCommand.cpp:
+        (WebCore::executeYank): Added parameter for triggeringEvent, which no
+        longer has a default value.
+        (WebCore::executeYankAndSelect): Ditto.
+
+        * editing/mac/EditorMac.mm: Removed userVisibleString.
+
+        * page/mac/EventHandlerMac.mm:
+        (WebCore::isKeyboardOptionTab): Tweaked formattin.
+
+        * page/mac/WebCoreFrameBridge.mm:
+        (-[WebCoreFrameBridge dragSourceMovedTo:]): Get window from -[NSView window]
+        rather than from the bridge. There's no special value in the bridge's window
+        method and we can use NSView directly.
+        (-[WebCoreFrameBridge dragSourceEndedAt:operation:]): Ditto.
+
+        * platform/graphics/mac/ImageMac.mm:
+        (WebCore::Image::loadPlatformResource): Use a new WebCoreBundleFinder class to
+        find the bundle rather than using WebCoreFrameBridge.
+
+        * platform/mac/ClipboardMac.mm: Added a now-needed or soon-to-be-needed include.
+        * platform/mac/PasteboardMac.mm: Ditto.
+
+        * rendering/RenderObject.h:
+        (WebCore::DashboardRegionValue::operator==): Fixed mistake where this wasn't
+        comparing the clip rectangle.
+        (WebCore::DashboardRegionValue::operator!=): Added. Needed by my future work.
+
 2008-03-03  Oliver Hunt  <oliver@apple.com>
 
         Reviewed by Mark Rowe.
index b4381ad..7541b2e 100644 (file)
@@ -138,6 +138,8 @@ __ZN7WebCore10StringImplcvP8NSStringEv
 __ZN7WebCore11ContextMenu22setPlatformDescriptionEP14NSMutableArray
 __ZN7WebCore11EditCommand7reapplyEv
 __ZN7WebCore11EditCommand7unapplyEv
+__ZN7WebCore11FileChooser10chooseFileERKNS_6StringE
+__ZN7WebCore11FileChooserD1Ev
 __ZN7WebCore11FrameLoader11completeURLERKNS_6StringE
 __ZN7WebCore11FrameLoader12canCachePageEv
 __ZN7WebCore11FrameLoader12shouldReloadERKNS_4KURLES3_
@@ -244,7 +246,6 @@ __ZN7WebCore12iconDatabaseEv
 __ZN7WebCore13HitTestResultC1ERKS0_
 __ZN7WebCore13HitTestResultD1Ev
 __ZN7WebCore13KeyboardEventC1ERKNS_12AtomicStringEbbPNS_9DOMWindowERKNS_6StringEjbbbbb
-__ZNK7WebCore17ResourceErrorBase8lazyInitEv
 __ZN7WebCore13toDeviceSpaceERKNS_9FloatRectEP8NSWindow
 __ZN7WebCore14CachedResource5derefEPNS_20CachedResourceClientE
 __ZN7WebCore14DocumentLoader12setCommittedEb
@@ -323,6 +324,7 @@ __ZN7WebCore16NavigationActionC1ERKNS_4KURLENS_13FrameLoadTypeEb
 __ZN7WebCore16NavigationActionC1ERKNS_4KURLENS_14NavigationTypeE
 __ZN7WebCore16NavigationActionC1Ev
 __ZN7WebCore16colorFromNSColorEP7NSColor
+__ZN7WebCore17equalIgnoringCaseEPNS_10StringImplES1_
 __ZN7WebCore18PlatformMouseEventC1EP7NSEvent
 __ZN7WebCore19CSSStyleDeclaration11setPropertyERKNS_6StringES3_Ri
 __ZN7WebCore19InspectorController11showConsoleEv
@@ -607,6 +609,7 @@ __ZNK7WebCore14ResourceLoader11frameLoaderEv
 __ZNK7WebCore15ProgressTracker17estimatedProgressEv
 __ZNK7WebCore15ResourceRequest12nsURLRequestEv
 __ZNK7WebCore16ResourceResponse13nsURLResponseEv
+__ZNK7WebCore17ResourceErrorBase8lazyInitEv
 __ZNK7WebCore19ResourceRequestBase3urlEv
 __ZNK7WebCore19ResourceRequestBase7isEmptyEv
 __ZNK7WebCore19SelectionController17isInPasswordFieldEv
index be43531..f90f18d 100644 (file)
@@ -33,7 +33,7 @@
                06693DBB0BFBA2F400216072 /* InspectorController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 06693DB80BFBA2F400216072 /* InspectorController.cpp */; };
                06693DBC0BFBA2F400216072 /* InspectorController.h in Headers */ = {isa = PBXBuildFile; fileRef = 06693DB90BFBA2F400216072 /* InspectorController.h */; settings = {ATTRIBUTES = (Private, ); }; };
                06693F7B0BFBC91700216072 /* inspector in Resources */ = {isa = PBXBuildFile; fileRef = 06693F450BFBC91600216072 /* inspector */; };
-               066C772B0AB603B700238CC4 /* FileChooser.h in Headers */ = {isa = PBXBuildFile; fileRef = 066C772A0AB603B700238CC4 /* FileChooser.h */; };
+               066C772B0AB603B700238CC4 /* FileChooser.h in Headers */ = {isa = PBXBuildFile; fileRef = 066C772A0AB603B700238CC4 /* FileChooser.h */; settings = {ATTRIBUTES = (Private, ); }; };
                066C772D0AB603D200238CC4 /* FileChooserMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 066C772C0AB603D200238CC4 /* FileChooserMac.mm */; };
                066C77300AB603FD00238CC4 /* RenderFileUploadControl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 066C772E0AB603FD00238CC4 /* RenderFileUploadControl.cpp */; };
                066C77310AB603FD00238CC4 /* RenderFileUploadControl.h in Headers */ = {isa = PBXBuildFile; fileRef = 066C772F0AB603FD00238CC4 /* RenderFileUploadControl.h */; };
index 4f1168b..7c06b76 100644 (file)
@@ -30,7 +30,6 @@
 #import "Frame.h"
 #import "PlatformString.h"
 #import "WebCoreObjCExtras.h"
-#import "WebCoreFrameBridge.h"
 #import <JavaScriptCore/ExecState.h>
 #import <JavaScriptCore/objc_instance.h>
 #import <JavaScriptCore/runtime_object.h>
@@ -46,10 +45,6 @@ using namespace WebCore;
     if (Interpreter::shouldPrintExceptions()) \
         printf("%s:%d:[%d]  JavaScript exception:  %s\n", __FILE__, __LINE__, getpid(), exec->exception()->toObject(exec)->get(exec, exec->propertyNames().message)->toString(exec).ascii());
 
-@interface WebFrame
-- (WebCoreFrameBridge *)_bridge; // implemented in WebKit
-@end
-
 namespace WebCore {
 
 typedef HashMap<JSObject*, NSObject*> JSWrapperMap;
index 7103d72..bc48ec1 100644 (file)
@@ -28,6 +28,7 @@
 #include "Editor.h"
 #include "EventNames.h"
 #include "ExceptionCode.h"
+#include "Frame.h"
 #include "FrameView.h"
 #include "InlineTextBox.h"
 #include "MutationEvent.h"
index 7b25bec..db2a0e6 100644 (file)
@@ -42,6 +42,7 @@
 #include "EventNames.h"
 #include "FocusController.h"
 #include "FontData.h"
+#include "Frame.h"
 #include "FrameView.h"
 #include "HTMLInputElement.h"
 #include "HTMLTextAreaElement.h"
index a42ad12..776ed50 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2006, 2007 Apple Inc. All rights reserved.
+ * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
 #define Editor_h
 
 #include "ClipboardAccessPolicy.h"
+#include "Color.h"
+#include "EditAction.h"
 #include "EditorDeleteAction.h"
 #include "EditorInsertAction.h"
-#include "Frame.h"
 #include "SelectionController.h"
-#include <wtf/Forward.h>
-#include <wtf/OwnPtr.h>
-#include <wtf/RefPtr.h>
-
-#if PLATFORM(MAC)
-class NSString;
-class NSURL;
-#endif
 
 namespace WebCore {
 
+class CSSStyleDeclaration;
 class Clipboard;
 class DeleteButtonController;
-class DocumentFragment;
 class EditCommand;
-class EditorInternalCommand;
 class EditorClient;
-class EventTargetNode;
-class Frame;
+class EditorInternalCommand;
 class HTMLElement;
+class HitTestResult;
 class Pasteboard;
-class Range;
-class SelectionController;
-class Selection;
 class SimpleFontData;
+class Text;
 
 struct CompositionUnderline {
     CompositionUnderline() 
@@ -113,7 +103,7 @@ public:
     void outdent();
     void transpose();
 
-    bool shouldInsertFragment(PassRefPtr<DocumentFragment> fragment, PassRefPtr<Range> replacingDOMRange, EditorInsertAction givenAction);
+    bool shouldInsertFragment(PassRefPtr<DocumentFragment>, PassRefPtr<Range>, EditorInsertAction);
     bool shouldInsertText(const String&, Range*, EditorInsertAction) const;
     bool shouldShowDeleteInterface(HTMLElement*) const;
     bool shouldDeleteRange(Range*) const;
@@ -187,7 +177,7 @@ public:
     Command command(const String& commandName, EditorCommandSource);
 
     bool insertText(const String&, Event* triggeringEvent);
-    bool insertTextWithoutSendingTextEvent(const String&, bool selectInsertedText, Event* triggeringEvent = 0);
+    bool insertTextWithoutSendingTextEvent(const String&, bool selectInsertedText, Event* triggeringEvent);
     bool insertLineBreak();
     bool insertParagraphSeparator();
     
@@ -257,10 +247,6 @@ public:
 
     Selection selectionForCommand(Event*);
 
-#if PLATFORM(MAC)
-    NSString* userVisibleString(NSURL*);
-#endif
-
     void appendToKillRing(const String&);
     void prependToKillRing(const String&);
     String yankFromKillRing();
index 0fb64c1..82fa858 100644 (file)
@@ -34,6 +34,7 @@
 #include "EditorClient.h"
 #include "Event.h"
 #include "EventHandler.h"
+#include "Frame.h"
 #include "FormatBlockCommand.h"
 #include "HTMLFontElement.h"
 #include "HTMLImageElement.h"
@@ -938,14 +939,14 @@ static bool executeUnselect(Frame* frame, Event*, EditorCommandSource, const Str
 
 static bool executeYank(Frame* frame, Event*, EditorCommandSource, const String&)
 {
-    frame->editor()->insertTextWithoutSendingTextEvent(frame->editor()->yankFromKillRing(), false);
+    frame->editor()->insertTextWithoutSendingTextEvent(frame->editor()->yankFromKillRing(), false, 0);
     frame->editor()->setKillRingToYankedState();
     return true;
 }
 
 static bool executeYankAndSelect(Frame* frame, Event*, EditorCommandSource, const String&)
 {
-    frame->editor()->insertTextWithoutSendingTextEvent(frame->editor()->yankFromKillRing(), true);
+    frame->editor()->insertTextWithoutSendingTextEvent(frame->editor()->yankFromKillRing(), true, 0);
     frame->editor()->setKillRingToYankedState();
     return true;
 }
index f7ed539..26abde4 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2006, 2007 Apple Inc. All rights reserved.
+ * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -27,7 +27,9 @@
 #import "Editor.h"
 
 #import "ClipboardMac.h"
-#import "EditorClient.h"
+#import "DocLoader.h"
+#import "Frame.h"
+#import "FrameView.h"
 
 namespace WebCore {
 
@@ -49,13 +51,6 @@ PassRefPtr<Clipboard> Editor::newGeneralClipboard(ClipboardAccessPolicy policy)
     return new ClipboardMac(false, [NSPasteboard generalPasteboard], policy);
 }
 
-NSString* Editor::userVisibleString(NSURL* nsURL)
-{
-    if (client())
-        return client()->userVisibleString(nsURL);
-    return nil;
-}
-
 static void initializeKillRingIfNeeded()
 {
     static bool initializedKillRing = false;
index 5c2a979..81b5257 100644 (file)
@@ -93,9 +93,9 @@ PassRefPtr<KeyboardEvent> EventHandler::currentKeyboardEvent() const
 static inline bool isKeyboardOptionTab(KeyboardEvent* event)
 {
     return event
-    && (event->type() == keydownEvent || event->type() == keypressEvent)
-    && event->altKey()
-    && event->keyIdentifier() == "U+0009";    
+        && (event->type() == keydownEvent || event->type() == keypressEvent)
+        && event->altKey()
+        && event->keyIdentifier() == "U+0009";    
 }
 
 bool EventHandler::invertSenseOfTabsToLinks(KeyboardEvent* event) const
index 3f20706..d1ff04f 100644 (file)
@@ -1130,22 +1130,28 @@ static HTMLFormElement *formElementFromDOMElement(DOMElement *element)
 
 - (void)dragSourceMovedTo:(NSPoint)windowLoc
 {
-    if (m_frame) {
-        // FIXME: Fake modifier keys here.
-        PlatformMouseEvent event(IntPoint(windowLoc), globalPoint(windowLoc, [self window]),
-            LeftButton, MouseEventMoved, 0, false, false, false, false, currentTime());
-        m_frame->eventHandler()->dragSourceMovedTo(event);
-    }
+    if (!m_frame)
+        return;
+    FrameView* view = m_frame->view();
+    if (!view)
+        return;
+    // FIXME: These are fake modifier keys here, but they should be real ones instead.
+    PlatformMouseEvent event(IntPoint(windowLoc), globalPoint(windowLoc, [view->getView() window]),
+        LeftButton, MouseEventMoved, 0, false, false, false, false, currentTime());
+    m_frame->eventHandler()->dragSourceMovedTo(event);
 }
 
 - (void)dragSourceEndedAt:(NSPoint)windowLoc operation:(NSDragOperation)operation
 {
-    if (m_frame) {
-        // FIXME: Fake modifier keys here.
-        PlatformMouseEvent event(IntPoint(windowLoc), globalPoint(windowLoc, [self window]),
-            LeftButton, MouseEventMoved, 0, false, false, false, false, currentTime());
-        m_frame->eventHandler()->dragSourceEndedAt(event, (DragOperation)operation);
-    }
+    if (!m_frame)
+        return;
+    FrameView* view = m_frame->view();
+    if (!view)
+        return;
+    // FIXME: These are fake modifier keys here, but they should be real ones instead.
+    PlatformMouseEvent event(IntPoint(windowLoc), globalPoint(windowLoc, [view->getView() window]),
+        LeftButton, MouseEventMoved, 0, false, false, false, false, currentTime());
+    m_frame->eventHandler()->dragSourceEndedAt(event, (DragOperation)operation);
 }
 
 - (BOOL)getData:(NSData **)data andResponse:(NSURLResponse **)response forURL:(NSString *)url
index 121eb78..816f9cb 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc.  All rights reserved.
+ * Copyright (C) 2004, 2005, 2006, 2008 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
 #import "FoundationExtras.h"
 #import "GraphicsContext.h"
 #import "PlatformString.h"
-#import "WebCoreFrameBridge.h"
+
+@interface WebCoreBundleFinder : NSObject
+@end
+
+@implementation WebCoreBundleFinder
+@end
 
 namespace WebCore {
 
@@ -51,7 +56,7 @@ Image* Image::loadPlatformResource(const char *name)
 {
     static BitmapImage nullImage;
     
-    NSBundle *bundle = [NSBundle bundleForClass:[WebCoreFrameBridge class]];
+    NSBundle *bundle = [NSBundle bundleForClass:[WebCoreBundleFinder class]];
     NSString *imagePath = [bundle pathForResource:[NSString stringWithUTF8String:name] ofType:@"tiff"];
     NSData *namedImageData = [NSData dataWithContentsOfFile:imagePath];
     if (namedImageData) {
index efd1fcf..9c8ad36 100644 (file)
@@ -31,6 +31,7 @@
 #import "DragController.h"
 #import "Editor.h"
 #import "FoundationExtras.h"
+#import "Frame.h"
 #import "Image.h"
 #import "Page.h"
 #import "Pasteboard.h"
index 1433dbd..052ea23 100644 (file)
@@ -33,6 +33,7 @@
 #import "DocumentFragment.h"
 #import "Editor.h"
 #import "EditorClient.h"
+#import "Frame.h"
 #import "HitTestResult.h"
 #import "Image.h"
 #import "KURL.h"
index 5cbce20..67b9061 100644 (file)
@@ -111,7 +111,11 @@ enum VerticalPositionHint {
 struct DashboardRegionValue {
     bool operator==(const DashboardRegionValue& o) const
     {
-        return type == o.type && bounds == o.bounds && label == o.label;
+        return type == o.type && bounds == o.bounds && clip == o.clip && label == o.label;
+    }
+    bool operator!=(const DashboardRegionValue& o) const
+    {
+        return !(*this == o);
     }
 
     String label;
index 22dbd66..3766a40 100644 (file)
@@ -1,3 +1,25 @@
+2008-03-03  Darin Adler  <darin@apple.com>
+
+        Reviewed by Adam.
+
+        - some "cleanup" on the path to removing WebCoreFrameBridge
+
+        * Storage/WebDatabaseManager.mm: Tweak includes.
+        * Storage/WebDatabaseTrackerClient.mm: Ditto.
+        * Storage/WebSecurityOrigin.mm: Ditto.
+        * Storage/WebSecurityOriginInternal.h: Ditto.
+
+        * WebView/WebFrame.mm:
+        (core): Changed to get rid of the requirement that WebKitEditableLinkBehavior exactly
+        match WebCore::EditableLinkBehavior.
+        * WebView/WebFrameInternal.h: Removed unused kit function.
+
+        * WebView/WebHTMLView.mm: Moved WebHTMLViewPrivate class in here.
+        * WebView/WebHTMLViewInternal.h: Moved WebHTMLVewPrivate class out of here.
+        * WebView/WebHTMLViewPrivate.h: Tweaked formatting and removed some unneeded declarations.
+
+        * WebView/WebPreferencesPrivate.h: Removed a no-longer-needed comment.
+
 2008-03-01  Mark Rowe  <mrowe@apple.com>
 
         Reviewed by Tim Hatcher.
index c975007..fa9eea6 100644 (file)
@@ -30,7 +30,6 @@
 #import "WebDatabaseManagerInternal.h"
 
 #import "WebDatabaseTrackerClient.h"
-#import "WebSecurityOriginPrivate.h"
 #import "WebSecurityOriginInternal.h"
 
 #import <WebCore/DatabaseTracker.h>
index 7a2c809..48530d6 100644 (file)
@@ -29,7 +29,6 @@
 #import "WebDatabaseTrackerClient.h"
 
 #import "WebDatabaseManagerPrivate.h"
-#import "WebSecurityOriginPrivate.h"
 #import "WebSecurityOriginInternal.h"
 #import <wtf/RetainPtr.h>
 #import <WebCore/SecurityOrigin.h>
index c980744..8ee6cd5 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2007 Apple Inc.  All rights reserved.
+ * Copyright (C) 2007 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -25,7 +25,6 @@
  * (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 "WebSecurityOriginPrivate.h"
 
 #import "WebSecurityOriginInternal.h"
 
index d60f52b..7bd6817 100644 (file)
@@ -26,6 +26,8 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#include "WebSecurityOriginPrivate.h"
+
 namespace WebCore {
     class SecurityOrigin;
 }
index 25c6246..a2383f9 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2005, 2006 Apple Computer, Inc.  All rights reserved.
+ * Copyright (C) 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -217,19 +217,26 @@ DOMRange *kit(Range* range)
     return [DOMRange _wrapRange:range];
 }
 
-WebCore::EditableLinkBehavior core(WebKitEditableLinkBehavior editableLinkBehavior)
+EditableLinkBehavior core(WebKitEditableLinkBehavior editableLinkBehavior)
 {
-    return static_cast<WebCore::EditableLinkBehavior>(editableLinkBehavior);
-}
-
-WebKitEditableLinkBehavior kit(WebCore::EditableLinkBehavior editableLinkBehavior)
-{
-    return static_cast<WebKitEditableLinkBehavior>(editableLinkBehavior);
+    switch (editableLinkBehavior) {
+        case WebKitEditableLinkDefaultBehavior:
+            return EditableLinkDefaultBehavior;
+        case WebKitEditableLinkAlwaysLive:
+            return EditableLinkAlwaysLive;
+        case WebKitEditableLinkOnlyLiveWithShiftKey:
+            return EditableLinkOnlyLiveWithShiftKey;
+        case WebKitEditableLinkLiveWhenNotFocused:
+            return EditableLinkLiveWhenNotFocused;
+        case WebKitEditableLinkNeverLive:
+            return EditableLinkNeverLive;
+    }
+    ASSERT_NOT_REACHED();
+    return EditableLinkDefaultBehavior;
 }
 
 @implementation WebFrame (WebInternal)
 
-
 static inline WebFrame *frame(WebCoreFrameBridge *bridge)
 {
     return ((WebFrameBridge *)bridge)->_frame;
index 89b5b1d..6380482 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2005, 2006 Apple Computer, Inc.  All rights reserved.
+ * Copyright (C) 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -89,17 +89,13 @@ WebCore::Page* core(WebView *);
 WebView *kit(WebCore::Page*);
 
 WebCore::EditableLinkBehavior core(WebKitEditableLinkBehavior);
-WebKitEditableLinkBehavior kit(WebCore::EditableLinkBehavior);
 
 WebView *getWebView(WebFrame *webFrame);
 
-@interface WebFramePrivate : NSObject
-{
+@interface WebFramePrivate : NSObject {
 @public
     WebFrameView *webFrameView;
-
     WebFrameBridge *bridge;
-
     WebScriptDebugger *scriptDebugger;
     id internalLoadDelegate;
 }
index 485b850..8e1f999 100644 (file)
@@ -179,7 +179,7 @@ extern NSString *NSTextInputReplacementRangeAttributeName;
 
 }
 
-@interface NSView (AppKitSecretsIKnowAbout)
+@interface NSView (WebNSViewDetails)
 - (void)_recursiveDisplayRectIfNeededIgnoringOpacity:(NSRect)rect isVisibleRect:(BOOL)isVisibleRect rectIsVisibleRectForView:(NSView *)visibleView topView:(BOOL)topView;
 - (void)_recursiveDisplayAllDirtyWithLockFocus:(BOOL)needsLockFocus visRect:(NSRect)visRect;
 - (NSRect)_dirtyRect;
@@ -188,21 +188,21 @@ extern NSString *NSTextInputReplacementRangeAttributeName;
 - (void)_windowChangedKeyState;
 @end
 
-@interface NSApplication (AppKitSecretsIKnowAbout)
+@interface NSApplication (WebNSApplicationDetails)
 - (void)speakString:(NSString *)string;
 @end
 
-@interface NSWindow (AppKitSecretsIKnowAbout)
+@interface NSWindow (WebNSWindowDetails)
 - (id)_newFirstResponderAfterResigning;
 - (void)_setForceActiveControls:(BOOL)flag;
 @end
 
-@interface NSAttributedString (AppKitSecretsIKnowAbout)
-- (id)_initWithDOMRange:(DOMRange *)domRange;
+@interface NSAttributedString (WebNSAttributedStringDetails)
+- (id)_initWithDOMRange:(DOMRange *)range;
 - (DOMDocumentFragment *)_documentFromRange:(NSRange)range document:(DOMDocument *)document documentAttributes:(NSDictionary *)dict subresources:(NSArray **)subresources;
 @end
 
-@interface NSSpellChecker (CurrentlyPrivateForTextView)
+@interface NSSpellChecker (WebNSSpellCheckerDetails)
 - (void)learnWord:(NSString *)word;
 @end
 
@@ -360,6 +360,65 @@ struct WebHTMLViewInterpretKeyEventsParameters {
     BOOL consumedByIM;
 };
 
+@interface WebHTMLViewPrivate : NSObject {
+@public
+    BOOL closed;
+    BOOL needsLayout;
+    BOOL needsToApplyStyles;
+    BOOL ignoringMouseDraggedEvents;
+    BOOL printing;
+    BOOL avoidingPrintOrphan;
+    
+    id savedSubviews;
+    BOOL subviewsSetAside;
+
+    NSEvent *mouseDownEvent; // Kept after handling the event.
+    BOOL handlingMouseDownEvent;
+    NSEvent *keyDownEvent; // Kept after handling the event.
+    
+    NSSize lastLayoutSize;
+    
+    NSPoint lastScrollPosition;
+
+    WebPluginController *pluginController;
+    
+    NSString *toolTip;
+    NSToolTipTag lastToolTipTag;
+    id trackingRectOwner;
+    void *trackingRectUserData;
+    
+    NSTimer *autoscrollTimer;
+    NSEvent *autoscrollTriggerEvent;
+    
+    NSArray* pageRects;
+
+    NSMutableDictionary* highlighters;
+
+    BOOL resigningFirstResponder;
+    BOOL nextResponderDisabledOnce;
+    
+    WebTextCompleteController *compController;
+    
+    BOOL transparentBackground;
+
+    WebHTMLViewInterpretKeyEventsParameters *interpretKeyEventsParameters;
+    BOOL receivedNOOP;
+    
+    WebDataSource *dataSource;
+    WebCore::CachedImage *promisedDragTIFFDataSource;
+    
+    CFRunLoopTimerRef updateFocusedAndActiveStateTimer;
+    CFRunLoopTimerRef updateMouseoverTimer;
+
+    SEL selectorForDoCommandBySelector;
+
+#ifndef NDEBUG
+    BOOL enumeratingSubviews;
+#endif
+}
+- (void)clear;
+@end
+
 static NSCellStateValue kit(TriState state)
 {
     switch (state) {
index e54ab2d..3d01439 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2005 Apple Computer, Inc.  All rights reserved.
+ * Copyright (C) 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
 
 // Things internal to the WebKit framework; not SPI.
 
-#import <WebKit/WebHTMLViewPrivate.h>
+#import "WebHTMLViewPrivate.h"
 
-@class WebTextCompleteController;
-@class DOMDocumentFragment;
-@class DOMElement;
+@class WebFrame;
 
 namespace WebCore {
-    class KeyboardEvent;
     class CachedImage;
+    class KeyboardEvent;
 }
 
-struct WebHTMLViewInterpretKeyEventsParameters;
-
-@interface WebHTMLViewPrivate : NSObject
-{
-@public
-    BOOL closed;
-    BOOL needsLayout;
-    BOOL needsToApplyStyles;
-    BOOL ignoringMouseDraggedEvents;
-    BOOL printing;
-    BOOL avoidingPrintOrphan;
-    
-    id savedSubviews;
-    BOOL subviewsSetAside;
-
-    NSEvent *mouseDownEvent; // Kept after handling the event.
-    BOOL handlingMouseDownEvent;
-    NSEvent *keyDownEvent; // Kept after handling the event.
-    
-    NSSize lastLayoutSize;
-    
-    NSPoint lastScrollPosition;
-
-    WebPluginController *pluginController;
-    
-    NSString *toolTip;
-    NSToolTipTag lastToolTipTag;
-    id trackingRectOwner;
-    void *trackingRectUserData;
-    
-    NSTimer *autoscrollTimer;
-    NSEvent *autoscrollTriggerEvent;
-    
-    NSArray* pageRects;
-
-    NSMutableDictionary* highlighters;
-
-    BOOL resigningFirstResponder;
-    BOOL nextResponderDisabledOnce;
-    
-    WebTextCompleteController *compController;
-    
-    BOOL transparentBackground;
-
-    WebHTMLViewInterpretKeyEventsParameters *interpretKeyEventsParameters;
-    BOOL receivedNOOP;
-    
-    WebDataSource *dataSource;
-    WebCore::CachedImage *promisedDragTIFFDataSource;
-    
-    CFRunLoopTimerRef updateFocusedAndActiveStateTimer;
-    CFRunLoopTimerRef updateMouseoverTimer;
-
-    SEL selectorForDoCommandBySelector;
-
-#ifndef NDEBUG
-    BOOL enumeratingSubviews;
-#endif
-}
-- (void)clear;
-@end
-
 @interface WebHTMLView (WebInternal)
 - (void)_selectionChanged;
 - (void)_updateFontPanel;
@@ -109,14 +45,13 @@ struct WebHTMLViewInterpretKeyEventsParameters;
 - (void)_pauseNullEventsForAllNetscapePlugins;
 - (void)_resumeNullEventsForAllNetscapePlugins;
 #endif
-- (id<WebHTMLHighlighter>)_highlighterForType:(NSString*)type;
+- (id <WebHTMLHighlighter>)_highlighterForType:(NSString*)type;
 - (WebFrame *)_frame;
 - (void)paste:(id)sender;
-- (void)closeIfNotCurrentView;
 - (void)_lookUpInDictionaryFromMenu:(id)sender;
 - (void)_hoverFeedbackSuspendedChanged;
 - (BOOL)_interceptEditingKeyEvent:(WebCore::KeyboardEvent *)event shouldSaveCommand:(BOOL)shouldSave;
-- (DOMDocumentFragment*)_documentFragmentFromPasteboard:(NSPasteboard *)pasteboard;
+- (DOMDocumentFragment *)_documentFragmentFromPasteboard:(NSPasteboard *)pasteboard;
 - (NSEvent *)_mouseDownEvent;
 #ifndef BUILDING_ON_TIGER
 - (BOOL)isGrammarCheckingEnabled;
index a2773f4..5974ba4 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2005 Apple Computer, Inc.  All rights reserved.
+ * Copyright (C) 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
 #import <WebKit/WebHTMLView.h>
 
 @class DOMDocumentFragment;
-@class DOMElement;
 @class DOMNode;
 @class DOMRange;
-@class WebArchive;
-@class WebFrameBridge;
-@class WebView;
-@class WebFrame;
 @class WebPluginController;
 
 @protocol WebHTMLHighlighter
 - (BOOL)_isEditable;
 
 - (BOOL)_transparentBackground;
-- (void)_setTransparentBackground:(BOOL)f;
+- (void)_setTransparentBackground:(BOOL)isBackgroundTransparent;
 
 - (void)_setToolTip:(NSString *)string;
 
-// SPI's for Mail.
+// SPI used by Mail.
+// FIXME: These should all be moved to WebView; we won't always have a WebHTMLView.
 - (NSImage *)_selectionDraggingImage;
 - (NSRect)_selectionDraggingRect;
 - (DOMNode *)_insertOrderedList;
 - (DOMNode *)_increaseSelectionListLevelOrdered;
 - (DOMNode *)_increaseSelectionListLevelUnordered;
 - (void)_decreaseSelectionListLevel;
-- (void)_setHighlighter:(id<WebHTMLHighlighter>)highlighter ofType:(NSString*)type;
-- (void)_removeHighlighterOfType:(NSString*)type;
+- (void)_setHighlighter:(id <WebHTMLHighlighter>)highlighter ofType:(NSString *)type;
+- (void)_removeHighlighterOfType:(NSString *)type;
 - (DOMDocumentFragment *)_documentFragmentFromPasteboard:(NSPasteboard *)pasteboard forType:(NSString *)pboardType inContext:(DOMRange *)context subresources:(NSArray **)subresources;
 
 // SPI for DumpRenderTree
 
 - (BOOL)_canSmartReplaceWithPasteboard:(NSPasteboard *)pasteboard;
 
-
 @end
index a6b5cb2..30efd84 100644 (file)
@@ -29,9 +29,8 @@
 #import <WebKit/WebPreferences.h>
 #import <Quartz/Quartz.h>
 
-// WebKitEditableLinkBehavior needs to match the EditableLinkBehavior enum in WebCore
 typedef enum {
-    WebKitEditableLinkDefaultBehavior = 0,
+    WebKitEditableLinkDefaultBehavior,
     WebKitEditableLinkAlwaysLive,
     WebKitEditableLinkOnlyLiveWithShiftKey,
     WebKitEditableLinkLiveWhenNotFocused,