1. 29 Jan, 2007 1 commit
    • oliver's avatar
      2007-01-25 Oliver Hunt <oliver@apple.com> · e71315c1
      oliver authored
              Reviewed by Adam.
      WebKit:
              Migrated drag state and logic to WebCore, removed superfluous methods
      
              * ChangeLog:
              * WebCoreSupport/WebDragClient.h:
              * WebCoreSupport/WebDragClient.mm:
              (WebDragClient::dragSourceActionMaskForPoint):
              * WebCoreSupport/WebFrameBridge.mm:
                 allowDHTMLDrag move to WebCore::EventHandler
              * WebView/WebHTMLView.mm:
              (-[WebHTMLView _startDraggingImage:at:operation:event:sourceIsDHTML:DHTMLWroteData:]):
              (-[WebHTMLView draggedImage:movedTo:]):
              (-[WebHTMLView draggedImage:endedAt:operation:]):
                dragOffset and dragSourecAction is now stored in WebCore::DragController
                migrated _delegateDragSourceActionMask to WebCore::DragController
              * WebView/WebHTMLViewInternal.h:
                Removed dragOffset declaration, migrated to WebCore::DragController
              * WebView/WebView.mm:
                removed unnecessary method, _loadingDragOperationForDraggingInfo                       
      
      WebKitQt:       
              Reviewed by Adam.
      
              Stub for new DragClient method
      
              * WebCoreSupport/DragClientQt.cpp:
              (WebCore::DragClientQt::dragSourceActionMaskForPoint):
              * WebCoreSupport/DragClientQt.h:                  
      
      WebCore:
              Reviewed by Adam.
      
              Migrated more drag logic and state to WebCore
                                                    
              * page/DragClient.h:       
      
              * page/DragController.cpp:
              (WebCore::DragController::delegateDragSourceAction):
                New forwarding method for the UI delegate
              * page/DragController.h:
              (WebCore::DragController::dragOffset):
                Now store the drag offset -- the offset of the cursor relative to the drag image)
                in DragController
              * page/EventHandler.cpp:
              (WebCore::EventHandler::allowDHTMLDrag):
                Moved from WebFrameBridge
              * page/EventHandler.h:
              * page/mac/EventHandlerMac.mm:
              (WebCore::EventHandler::eventMayStartDrag):
              (WebCore::EventHandler::handleDrag):                  
                EventHandlerMac now uses EventHandler::allowDHTMLDrag rather than the 
                implementation in WebFrameBridge
              * page/mac/WebCoreFrameBridge.h:
                removed definition of allowDHTMLDrag from WebFrameBridge
              * platform/graphics/svg/SVGImageEmptyClients.h:
              (WebCore::SVGEmptyDragClient::dragSourceActionMaskForPoint):
                Updated empty DragClient
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@19230 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e71315c1
  2. 24 Jan, 2007 1 commit
    • oliver's avatar
      Oliver Hunt <oliver@apple.com> · e3c60694
      oliver authored
      WebCore:
              Reviewed by Maciej.
      
              Migrating more drag state information to WebCore
      
              * page/DragController.cpp:
              * page/DragController.h:
              (WebCore::DragController::dragOperation):
              (WebCore::DragController::setDraggingImageURL):
              (WebCore::DragController::draggingImageURL):
              (WebCore::DragController::setDragOffset):
              (WebCore::DragController::dragOffset): 
      WebKit:
              Reviewed by Maciej.
      
              Migrating more drag state information to WebCore
      
              * WebKit.xcodeproj/project.pbxproj:
              * WebView/WebHTMLView.mm:
              (-[WebHTMLViewPrivate dealloc]):
              (-[WebHTMLViewPrivate clear]):
              (-[WebHTMLView _startDraggingImage:at:operation:event:sourceIsDHTML:DHTMLWroteData:]):
              (-[WebHTMLView _mayStartDragAtEventLocation:]):
              (-[WebHTMLView close]):
              (-[WebHTMLView namesOfPromisedFilesDroppedAtDestination:]):
              (-[WebHTMLView _delegateDragSourceActionMask]):
              * WebView/WebHTMLViewInternal.h:         
                                                  
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@19104 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e3c60694
  3. 23 Jan, 2007 1 commit
    • oliver's avatar
      2007-01-23 Oliver Hunt <oliver@apple.com> · aeffa297
      oliver authored
              Reviewed by Adam.
      
              Added DragController to handled drag and drop state and control logic.
              Currently this only handles logic for Dragging and Dropping, and is 
              unable to initialise a drag itself.
      
              platform/DragData encapsulate the paltform Drag data (NSDraggingInfo on Mac, 
              QMimeType in Qt).  This provides methods to pull data out the drag data as a String, 
              a URL, a DocumentFragment (for rich content), or a Colour.
      
              * WebCore.exp:
              * WebCore.pro:
              * WebCore.xcodeproj/project.pbxproj:
              * dom/Clipboard.cpp: Added.
              (WebCore::Clipboard::setAccessPolicy):
              (WebCore::dragOpFromIEOp):
              (WebCore::IEOpFromDragOp):
              (WebCore::Clipboard::sourceOperation):
              (WebCore::Clipboard::destinationOperation):
              (WebCore::Clipboard::setSourceOperation):
              (WebCore::Clipboard::setDestinationOperation):
              (WebCore::Clipboard::setDropEffect):
              (WebCore::Clipboard::setEffectAllowed):
                move platform independent functions from ClipboardMac to Clipboard
      
              * dom/Clipboard.h:
              (WebCore::Clipboard::Clipboard):
              (WebCore::Clipboard::dropEffect):
              (WebCore::Clipboard::effectAllowed):
              (WebCore::Clipboard::policy):
                as above -- also removed virtual modifier from now 
                platform independent methods
      
              * editing/Editor.cpp:
              (WebCore::Editor::smartInsertDeleteEnabled): 
              (WebCore::Editor::shouldApplyStyle):
              * editing/Editor.h:
                adding calls through to EditorClient
               
              * page/DragActions.h: Added.
              (WebCore::):
                Replicates a number of NS* enums in the WebCore namespace
      
              * page/DragClient.h: Added.
              (WebCore::DragClient::~DragClient):
                Standard client interface for dragging UIDelegate
      
              * page/DragController.cpp: Added.
              (WebCore::createMouseEvent):
              (WebCore::DragController::DragController):
              (WebCore::DragController::~DragController):
              (WebCore::documentFragmentFromDragData):
              (WebCore::DragController::isMoveDrag):
              (WebCore::visiblePositionForPoint):
              (WebCore::DragController::cancelDrag):
              (WebCore::documentAtPoint):
              (WebCore::DragController::dragEntered):
              (WebCore::DragController::dragExited):
              (WebCore::DragController::dragUpdated):
              (WebCore::DragController::performDrag):
              (WebCore::DragController::dragEnteredOrUpdated):
              (WebCore::DragController::tryDocumentDrag):
              (WebCore::DragController::operationForLoad):
              (WebCore::DragController::concludeDrag):
              (WebCore::DragController::canProcessDrag):
              (WebCore::DragController::tryDHTMLDrag):
                Class to handle state and logic for dragging and dropping
      
              * page/DragController.h: Added.
              (WebCore::DragController::client):
              (WebCore::DragController::didInitiateDrag):
              (WebCore::DragController::isHandlingDrag):
              (WebCore::DragController::dragOperation):
              (WebCore::DragController::document):
              (WebCore::DragController::dragInitiator):
              (WebCore::DragController::dragDestinationAction):
              (WebCore::DragController::dragSourceAction):
              (WebCore::DragController::dragEnded):
              (WebCore::DragController::setIsHandlingDrag):
              (WebCore::DragController::setDidInitiateDrag):
              (WebCore::DragController::setDragOperation):
              (WebCore::DragController::setDragSourceAction):
              (WebCore::DragController::setDragInitiator):
                See above
      
              * page/Page.cpp:
              (WebCore::Page::Page):
                Update Page to have DragController
      
              * page/Page.h:
              (WebCore::Page::dragController):
                ditto
      
              * page/mac/DragControllerMac.mm: Added.
              (WebCore::DragController::isCopyKeyDown):
              (WebCore::DragController::dragOperation):
                Platform specific portions of the DragController
      
              * page/mac/EventHandlerMac.mm:
              (WebCore::EventHandler::handleDrag):
              (WebCore::EventHandler::dragSourceEndedAt):
                Convert from NSDragOperation to WebCore::DragOperation
      
              * page/mac/WebCoreFrameBridge.h:
              * page/mac/WebCoreFrameBridge.mm:
                Remove obsolete Drag functions
      
              * page/qt/DragControllerQt.cpp: Added.
              (WebCore::DragController::isCopyKeyDown):
              (WebCore::DragController::dragOperation):
                Basic stubs to maintain Qt  build
      
              * platform/DragData.cpp: Added.
              (WebCore::DragData::DragData):
              * platform/DragData.h: Added.
              (WebCore::DragData::clientPosition):
              (WebCore::DragData::globalPosition):
              (WebCore::DragData::platformData):
              (WebCore::DragData::draggingSourceOperationMask):
                DragData class to encapsulate platform drag data/event
      
              * platform/graphics/svg/SVGImage.cpp:
              (WebCore::SVGImage::setData):
                Addition of dummy DragClient
      
              * platform/graphics/svg/SVGImageEmptyClients.h:
              (WebCore::SVGEmptyDragClient::~SVGEmptyDragClient):
              (WebCore::SVGEmptyDragClient::willPerformDragDestinationAction):
              (WebCore::SVGEmptyDragClient::actionMaskForDrag):
              (WebCore::SVGEmptyDragClient::dragControllerDestroyed):
                ditto
      
              * platform/mac/ClipboardMac.h:
              * platform/mac/ClipboardMac.mm:
              (WebCore::ClipboardMac::ClipboardMac):
              (WebCore::ClipboardMac::clearData):
              (WebCore::ClipboardMac::clearAllData):
              (WebCore::ClipboardMac::getData):
              (WebCore::ClipboardMac::setData):
              (WebCore::ClipboardMac::types):
              (WebCore::ClipboardMac::setDragImage):
               Moving platform independent logic to Clipboard, and updating
               platform specific methods to use appropriate accessors rather than 
               directly manipulating data they no longer own
      
              * platform/mac/DragDataMac.mm: Added.
              (WebCore::DragData::DragData):
              (WebCore::DragData::canSmartReplace):
              (WebCore::DragData::containsColor):
              (WebCore::DragData::containsPlainText):
              (WebCore::DragData::asPlainText):
              (WebCore::DragData::asColor):
              (WebCore::DragData::createClipboard):
              (WebCore::imageExistsAtPaths):
              (WebCore::DragData::containsCompatibleContent):
              (WebCore::DragData::containsURL):
              (WebCore::DragData::asURL):
              (WebCore::DragData::asFragment):
                Mac implementations of DragData methods.  A number of these use
                a Helper class that accesses WebKit functionality.  That functionality 
                should be migrated to WebCore in the future.
      
              * platform/mac/PasteboardHelper.h: Added.
              (WebCore::PasteboardHelper::~PasteboardHelper):
                Temporary, and Mac only, helper class to access WebKit functionality 
                from WebCore
      
              * platform/qt/DragDataQt.cpp: Added.
              (WebCore::DragData::canSmartReplace):
              (WebCore::DragData::containsColor):
              (WebCore::DragData::containsPlainText):
              (WebCore::DragData::asPlainText):
              (WebCore::DragData::asColor):
              (WebCore::DragData::createClipboard):
              (WebCore::DragData::containsCompatibleContent):
              (WebCore::DragData::containsURL):
              (WebCore::DragData::asURL):
              (WebCore::DragData::asFragment):
               Basic stubs to maintain Qt build
      
              * rendering/HitTestResult.cpp:
              (WebCore::HitTestResult::HitTestResult):
               Correct HitTestResult copy contructor to copy localPoint
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@19039 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      aeffa297