1. 16 May, 2012 1 commit
    • commit-queue@webkit.org's avatar
      [chromium] No modifier flags (shift/ctrl/alt) in drag&drop events on chromium linux · 621df958
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=86236
      
      Patch by Varun Jain <varunjain@google.com> on 2012-05-16
      Reviewed by Tony Chang.
      
      .:
      
      * ManualTests/chromium/modifiers-during-drag-and-drop.html: Added.
      
      Source/WebCore:
      
      ManualTests: ManualTests/chromium/modifiers-during-drag-and-drop.html
      
      * page/DragController.cpp:
      (WebCore::createMouseEvent):
      * platform/DragData.cpp:
      (WebCore):
      (WebCore::DragData::modifierKeyState):
      * platform/DragData.h:
      (DragData):
      * platform/chromium/ChromiumDataObject.cpp:
      (WebCore::ChromiumDataObject::ChromiumDataObject):
      * platform/chromium/ChromiumDataObject.h:
      (WebCore::ChromiumDataObject::modifierKeyState):
      (WebCore::ChromiumDataObject::setModifierKeyState):
      (ChromiumDataObject):
      * platform/chromium/DragDataChromium.cpp:
      (WebCore::DragData::modifierKeyState):
      (WebCore):
      
      Source/WebKit/chromium:
      
      * public/WebView.h:
      (WebView):
      * src/WebViewImpl.cpp:
      (WebKit::webInputEventKeyStateToPlatformEventKeyState):
      (WebKit):
      (WebKit::WebViewImpl::dragTargetDragEnter):
      (WebKit::WebViewImpl::dragTargetDragOver):
      (WebKit::WebViewImpl::dragTargetDrop):
      (WebKit::WebViewImpl::dragTargetDragEnterOrOver):
      * src/WebViewImpl.h:
      (WebViewImpl):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@117327 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      621df958
  2. 17 Mar, 2012 1 commit
  3. 28 Feb, 2012 1 commit
    • enrica@apple.com's avatar
      More Pasteboard code cleanup. · 3728b400
      enrica@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=79816
      
      Source/WebCore: 
      
      Removing the last references to NSPasteboard.
      
      Reviewed by Alexey Proskuryakov.
      
      No new tests. No change in functionality.
      
      * WebCore.xcodeproj/project.pbxproj:
      * editing/mac/EditorMac.mm:
      (WebCore::Editor::pasteWithPasteboard):
      (WebCore::Editor::takeFindStringFromSelection):
      * loader/EmptyClients.h:
      (WebCore::EmptyEditorClient::setInsertionPasteboard):
      * page/DragClient.h:
      * page/EditorClient.h:
      * platform/DragData.h:
      * platform/Pasteboard.h:
      * platform/mac/ClipboardMac.h:
      * platform/mac/PasteboardHelper.h: Removed.
      
      Source/WebKit/mac: 
      
      Removing the last references to NSPasteboard.
      
      Reviewed by Alexey Proskuryakov.
      
      * WebCoreSupport/WebEditorClient.h:
      * WebCoreSupport/WebEditorClient.mm:
      (WebEditorClient::setInsertionPasteboard):
      
      Source/WebKit2: 
      
      Removing the last references to NSPasteboard.
              
      Reviewed by Alexey Proskuryakov.
      
      * WebProcess/WebCoreSupport/WebEditorClient.h:
      * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
      (WebKit::WebEditorClient::setInsertionPasteboard):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@109147 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3728b400
  4. 17 Feb, 2012 1 commit
    • enrica@apple.com's avatar
      Refactor DragData class to use PlatformStrategies in the Mac implementation. · 1a0e7a68
      enrica@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=78768
      
      Reviewed by Darin Adler.
      
      Source/WebCore: 
      
      No new tests. No behavior change.
      
      * WebCore.exp.in: Added new exported method of the PlatformPasteboard class.
      * platform/DragData.h:
      (WebCore::DragData::pasteboardName): Added pasteboardName and removed pasteboard.
      * platform/PasteboardStrategy.h: Added color() method.
      * platform/PlatformPasteboard.h: Ditto.
      * platform/mac/ClipboardMac.mm:
      (WebCore::Clipboard::create): Changed to use pasteboardName() method.
      * platform/mac/DragDataMac.mm: All the methods below have been changed to use pasteboardName
      and the pasteboardStrategy() methods.
      (WebCore::DragData::DragData):
      (WebCore::DragData::canSmartReplace):
      (WebCore::DragData::containsColor):
      (WebCore::DragData::containsFiles):
      (WebCore::DragData::numberOfFiles):
      (WebCore::DragData::asFilenames):
      (WebCore::DragData::containsPlainText):
      (WebCore::DragData::asPlainText):
      (WebCore::DragData::asColor):
      (WebCore::DragData::containsCompatibleContent):
      (WebCore::DragData::asURL):
      (WebCore::DragData::asFragment):
      * platform/mac/PlatformPasteboardMac.mm:
      (WebCore::PlatformPasteboard::color): Added implementation of the color() method.
      
      Source/WebKit/mac: 
      
      * WebCoreSupport/WebPlatformStrategies.h: Added color() method.
      * WebCoreSupport/WebPlatformStrategies.mm:
      (WebPlatformStrategies::color):
      
      Source/WebKit2: 
      
      * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp: Added color() method.
      (WebKit::WebPlatformStrategies::color):
      * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@108101 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      1a0e7a68
  5. 17 Jan, 2012 1 commit
    • weinig@apple.com's avatar
      Add helper macro for forward declaring objective-c classes · c122cb2f
      weinig@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=76485
      
      Reviewed by Anders Carlsson.
      
      Source/JavaScriptCore:
      
      * wtf/Compiler.h:
      Add OBJC_CLASS macro which helps reduce code when forward declaring an
      objective-c class in a header which can be included from both Objective-C
      and non-Objective-C files.
      
      Source/WebCore:
      
      * accessibility/AccessibilityObject.h:
      * bindings/js/ScriptController.h:
      * bridge/objc/objc_utility.h:
      * page/DragClient.h:
      * page/EditorClient.h:
      * platform/AutodrainedPool.h:
      * platform/ContextMenuItem.h:
      * platform/Cursor.h:
      * platform/DragData.h:
      * platform/DragImage.h:
      * platform/KURL.h:
      * platform/Pasteboard.h:
      * platform/PlatformKeyboardEvent.h:
      * platform/PlatformMenuDescription.h:
      * platform/PlatformScreen.h:
      * platform/SharedBuffer.h:
      * platform/Widget.h:
      * platform/cf/SchedulePair.h:
      * platform/graphics/BitmapImage.h:
      * platform/graphics/FontPlatformData.h:
      * platform/graphics/GraphicsContext3D.h:
      * platform/graphics/GraphicsLayer.h:
      * platform/graphics/Icon.h:
      * platform/graphics/Image.h:
      * platform/graphics/MediaPlayer.h:
      * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
      * platform/graphics/ca/PlatformCAAnimation.h:
      * platform/graphics/ca/mac/TileCache.h:
      * platform/graphics/mac/ColorMac.h:
      * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
      * platform/graphics/mac/MediaPlayerProxy.h:
      * platform/mac/ClipboardMac.h:
      * platform/mac/LocalCurrentGraphicsContext.h:
      * platform/mac/PasteboardHelper.h:
      * platform/mac/PopupMenuMac.h:
      * platform/mac/ScrollAnimatorMac.h:
      * platform/mac/WebCoreSystemInterface.h:
      * platform/network/ResourceHandle.h:
      * platform/network/ResourceHandleClient.h:
      * platform/network/ResourceHandleInternal.h:
      * platform/network/cf/AuthenticationChallenge.h:
      * platform/network/cf/ResourceError.h:
      * platform/network/cf/ResourceRequest.h:
      * platform/network/cf/ResourceResponse.h:
      * rendering/RenderThemeMac.h:
      Deploy OBJC_CLASS for a little code reduction.
      
      Source/WebKit2:
      
      * WebProcess/WebCoreSupport/WebDragClient.h:
      Deploy OBJC_CLASS for a little code reduction.
      
      * config.h:
      Remove duplicate copy of OBJC_CLASS.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@105203 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c122cb2f
  6. 02 Nov, 2011 1 commit
    • jonlee@apple.com's avatar
      Expand DragController to provide more information about the dragging session · d18aac0a
      jonlee@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=71324
      <rdar://problem/10379175>
      
      Reviewed by Darin Adler.
      
      Source/WebCore:
      
      * WebCore.xcodeproj/project.pbxproj:
      * page/DragController.cpp:
      (WebCore::DragController::dragEntered):
      (WebCore::DragController::dragUpdated):
      (WebCore::DragController::dragEnteredOrUpdated):
      (WebCore::DragController::tryDocumentDrag): In addition to determining the
      drag operation, DragSession is updated with data regarding whether the mouse
      is over a file input, and the number of items that would be accepted based on
      the mouse's location.
      * page/DragController.h:
      * page/DragSession.h: Added.
      (WebCore::DragSession::DragSession): Keep track of current operation, whether
      the mouse is over a file input element, and how many files would be accepted if
      dropped.
      * platform/DragData.h: Added numberOfFiles()
      * platform/chromium/DragDataChromium.cpp:
      (WebCore::DragData::numberOfFiles):
      * platform/efl/DragDataEfl.cpp:
      (WebCore::DragData::numberOfFiles):
      * platform/gtk/DragDataGtk.cpp:
      (WebCore::DragData::numberOfFiles):
      * platform/mac/DragDataMac.mm:
      (WebCore::DragData::numberOfFiles):
      * platform/qt/DragDataQt.cpp:
      (WebCore::DragData::numberOfFiles):
      * platform/win/DragDataWin.cpp:
      (WebCore::DragData::numberOfFiles):
      * platform/wince/DragDataWinCE.cpp:
      (WebCore::DragData::numberOfFiles):
      * platform/wx/DragDataWx.cpp:
      (WebCore::DragData::numberOfFiles):
      
      Source/WebKit/chromium:
      
      * src/WebViewImpl.cpp:
      (WebKit::WebViewImpl::dragTargetDragEnterOrOver): The drag operation is contained
      within the new DragSession struct. Minor refactor.
      
      Source/WebKit/gtk:
      
      * webkit/webkitwebview.cpp:
      (webkit_web_view_drag_motion): Minor refactoring.
      (webkit_web_view_drag_data_received): Minor refactoring.
      
      Source/WebKit/mac:
      
      * WebView/WebView.mm:
      (-[WebView draggingEntered:]): DragOperation is now inside the DragSession struct.
      (-[WebView draggingUpdated:]):
      
      Source/WebKit/qt:
      
      * Api/qwebpage.cpp:
      (QWebPagePrivate::dragEnterEvent): Minor refactoring because operation is stored in
      new DragSession struct.
      (QWebPagePrivate::dragMoveEvent): Ditto.
      
      Source/WebKit/win:
      
      * WebView.cpp:
      (WebView::DragEnter): Minor refactoring because operation is stored in
      new DragSession struct.
      (WebView::DragOver): Ditto.
      
      Source/WebKit2:
      
      We now pass the DragSession struct from the Web to the UI process, instead of the
      DragOperation enum.
      
      * Scripts/webkit2/messages.py:
      * Shared/WebCoreArgumentCoders.cpp:
      (CoreIPC::::encode):
      (CoreIPC::::decode):
      * Shared/WebCoreArgumentCoders.h:
      * UIProcess/API/mac/WKView.mm:
      (-[WKView draggingUpdated:]):
      * UIProcess/WebPageProxy.cpp:
      (WebKit::WebPageProxy::WebPageProxy): We now cache the last known DragSession state
      (WebKit::WebPageProxy::didPerformDragControllerAction):
      * UIProcess/WebPageProxy.h:
      (WebKit::WebPageProxy::dragSession):
      (WebKit::WebPageProxy::resetDragOperation):
      * UIProcess/WebPageProxy.messages.in:
      * UIProcess/win/WebView.cpp:
      (WebKit::WebView::keyStateToDragOperation):
      (WebKit::WebView::DragEnter):
      (WebKit::WebView::DragOver):
      * WebProcess/WebPage/WebPage.cpp:
      (WebKit::WebPage::performDragControllerAction):
      
      LayoutTests:
      
      * editing/pasteboard/script-tests/file-input-files-access.js:
      (runTest): Change the expected behavior of the test-- dragging a file over a disabled
      control should not load that file. Instead, the file should be ignored, and the page
      remains as is.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@99108 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d18aac0a
  7. 08 Oct, 2011 1 commit
    • mrobinson@webkit.org's avatar
      [GTK] Implement drag and drop support in WebKit2 · 3a1633fa
      mrobinson@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=63706
      
      Reviewed by Philippe Normand.
      
      Source/WebCore:
      
      * platform/DragData.h:
      * platform/gtk/DataObjectGtk.cpp:
      (WebCore::DataObjectGtk::text): Mark as const.
      (WebCore::DataObjectGtk::markup): Ditto.
      (WebCore::DataObjectGtk::urlLabel): Ditto.
      * platform/gtk/DataObjectGtk.h: Remove unused member
      m_dragContext.
      (WebCore::DataObjectGtk::url): Mark as const.
      (WebCore::DataObjectGtk::uriList): Ditto.
      (WebCore::DataObjectGtk::filenames): Ditto.
      (WebCore::DataObjectGtk::image): Ditto.
      (WebCore::DataObjectGtk::hasText): Ditto.
      (WebCore::DataObjectGtk::hasMarkup): Ditto.
      (WebCore::DataObjectGtk::hasURIList): Ditto.
      (WebCore::DataObjectGtk::hasURL): Ditto.
      (WebCore::DataObjectGtk::hasFilenames): Ditto.
      (WebCore::DataObjectGtk::hasImage): Ditto.
      * platform/gtk/DragIcon.cpp: Added. A helper which takes care of
      creating a transparent drag window for drags.
      * platform/gtk/DragIcon.h: Added.
      
      Source/WebKit2:
      
      * GNUmakefile.am: Add new files to compilation.
      * Shared/gtk/ArgumentCodersGtk.cpp: Added.
      (CoreIPC::encodeImage): Encode a GdkPixbuf.
      (CoreIPC::decodeImage): Decode a GdkPixbuf.
      (CoreIPC::encodeDataObject): Encode a DataObjectGtk.
      (CoreIPC::decodeDataObject): Decode a DataObjectGtk.
      (CoreIPC::::encode): Encode DragData.
      (CoreIPC::::decode): Decode DragData.
      * Shared/gtk/ArgumentCodersGtk.h:
      * UIProcess/API/gtk/PageClientImpl.cpp:
      (WebKit::PageClientImpl::startDrag):
      * UIProcess/API/gtk/PageClientImpl.h:
      * UIProcess/API/gtk/WebKitWebViewBase.cpp:
      (webkit_web_view_base_init): Set the view as a potential drop destination.
      (webkitWebViewBaseDragDataGet): Added, delegate to GtkDragAndDropHelper.
      (webkitWebViewBaseDragEnd): Ditto.
      (webkitWebViewBaseDragDataReceived): Ditto.
      (webkitWebViewBaseDragEnter): Ditto.
      (webkitWebViewBaseDragMotion): Ditto.
      (doDragLeaveLater): Ditto.
      (webkitWebViewBaseDragLeave): Ditto.
      (webkitWebViewBaseDragDrop): Ditto.
      (webkit_web_view_base_class_init): Override GtkWidget drag and drop methods.
      (webkitWebViewBaseStartDrag): Calls gtk_drag_begin() to start a drag operation.
      * UIProcess/API/gtk/WebKitWebViewBasePrivate.h: Add webkitWebViewBaseStartDrag().
      * UIProcess/PageClient.h: Add startDrag().
      * UIProcess/WebPageProxy.cpp:
      (WebKit::WebPageProxy::performDragControllerAction): Share the Qt version.
      * UIProcess/WebPageProxy.h:
      * UIProcess/WebPageProxy.messages.in:
      * WebProcess/WebCoreSupport/WebDragClient.cpp:
      * WebProcess/WebCoreSupport/gtk/WebDragClientGtk.cpp: Added.
      * WebProcess/WebPage/WebPage.cpp: Add drag support for GTK+.
      * WebProcess/WebPage/WebPage.h: Ditto.
      * WebProcess/WebPage/WebPage.messages.in: Ditto.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@97012 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3a1633fa
  8. 25 Sep, 2011 1 commit
    • abarth@webkit.org's avatar
      Remove PLATFORM(HAIKU) and associated code · adb2d866
      abarth@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=68774
      
      Reviewed by Sam Weinig.
      
      .: 
      
      * Source/cmake/WebKitPackaging.cmake:
      * wscript:
      
      Source/JavaScriptCore: 
      
      * JavaScriptCore.gyp/JavaScriptCore.gyp:
      * JavaScriptCore.gypi:
      * gyp/JavaScriptCore.gyp:
      * heap/MachineStackMarker.cpp:
      * wtf/PageAllocation.h:
      * wtf/Platform.h:
      * wtf/StackBounds.cpp:
      * wtf/haiku: Removed.
      * wtf/haiku/MainThreadHaiku.cpp: Removed.
      * wtf/haiku/StringHaiku.cpp: Removed.
      * wtf/text/WTFString.h:
      
      Source/WebCore: 
      
      As discussed on webkit-dev, the Haiku port has been inactive for over a
      year.  A year and a half ago, we discussed removing the port, but folks
      said they planned to work on it more.  That work does not appear to
      have happened in the intervening time.
      
      * WebCore.gyp/WebCore.gyp:
      * WebCore.gypi:
      * bindings/js/ScriptControllerHaiku.cpp: Removed.
      * editing/haiku: Removed.
      * editing/haiku/EditorHaiku.cpp: Removed.
      * gyp/WebCore.gyp:
      * loader/cache/CachedFont.cpp:
      * page/EventHandler.cpp:
      (WebCore::EventHandler::eventInvertsTabsToLinksClientCallResult):
      * page/haiku: Removed.
      * page/haiku/DragControllerHaiku.cpp: Removed.
      * page/haiku/EventHandlerHaiku.cpp: Removed.
      * page/haiku/FrameHaiku.cpp: Removed.
      * platform/ContextMenuItem.h:
      * platform/Cursor.h:
      * platform/DragData.h:
      * platform/DragImage.h:
      * platform/PlatformKeyboardEvent.h:
      * platform/PlatformMenuDescription.h:
      * platform/PlatformMouseEvent.h:
      * platform/Widget.h:
      * platform/graphics/BitmapImage.h:
      * platform/graphics/Color.h:
      * platform/graphics/FloatPoint.h:
      * platform/graphics/FloatRect.h:
      * platform/graphics/Gradient.h:
      * platform/graphics/GraphicsContext.cpp:
      * platform/graphics/GraphicsContext.h:
      * platform/graphics/ImageBufferData.h:
      * platform/graphics/ImageSource.h:
      * platform/graphics/IntPoint.h:
      * platform/graphics/IntRect.h:
      * platform/graphics/IntSize.h:
      * platform/graphics/Path.h:
      * platform/graphics/Pattern.h:
      * platform/graphics/SimpleFontData.h:
      * platform/graphics/haiku: Removed.
      * platform/graphics/haiku/ColorHaiku.cpp: Removed.
      * platform/graphics/haiku/FloatPointHaiku.cpp: Removed.
      * platform/graphics/haiku/FloatRectHaiku.cpp: Removed.
      * platform/graphics/haiku/FontCacheHaiku.cpp: Removed.
      * platform/graphics/haiku/FontCustomPlatformData.cpp: Removed.
      * platform/graphics/haiku/FontCustomPlatformData.h: Removed.
      * platform/graphics/haiku/FontHaiku.cpp: Removed.
      * platform/graphics/haiku/FontPlatformData.h: Removed.
      * platform/graphics/haiku/GlyphPageTreeNodeHaiku.cpp: Removed.
      * platform/graphics/haiku/GradientHaiku.cpp: Removed.
      * platform/graphics/haiku/GraphicsContextHaiku.cpp: Removed.
      * platform/graphics/haiku/IconHaiku.cpp: Removed.
      * platform/graphics/haiku/ImageBufferDataHaiku.h: Removed.
      * platform/graphics/haiku/ImageBufferHaiku.cpp: Removed.
      * platform/graphics/haiku/ImageHaiku.cpp: Removed.
      * platform/graphics/haiku/IntPointHaiku.cpp: Removed.
      * platform/graphics/haiku/IntRectHaiku.cpp: Removed.
      * platform/graphics/haiku/IntSizeHaiku.cpp: Removed.
      * platform/graphics/haiku/PathHaiku.cpp: Removed.
      * platform/graphics/haiku/SimpleFontDataHaiku.cpp: Removed.
      * platform/graphics/haiku/StillImageHaiku.cpp: Removed.
      * platform/graphics/haiku/StillImageHaiku.h: Removed.
      * platform/haiku: Removed.
      * platform/haiku/ClipboardHaiku.cpp: Removed.
      * platform/haiku/ClipboardHaiku.h: Removed.
      * platform/haiku/ContextMenuHaiku.cpp: Removed.
      * platform/haiku/ContextMenuItemHaiku.cpp: Removed.
      * platform/haiku/CookieJarHaiku.cpp: Removed.
      * platform/haiku/CursorHaiku.cpp: Removed.
      * platform/haiku/DragDataHaiku.cpp: Removed.
      * platform/haiku/DragImageHaiku.cpp: Removed.
      * platform/haiku/EventLoopHaiku.cpp: Removed.
      * platform/haiku/FileSystemHaiku.cpp: Removed.
      * platform/haiku/LocalizedStringsHaiku.cpp: Removed.
      * platform/haiku/LoggingHaiku.cpp: Removed.
      * platform/haiku/MIMETypeRegistryHaiku.cpp: Removed.
      * platform/haiku/PasteboardHaiku.cpp: Removed.
      * platform/haiku/PlatformKeyboardEventHaiku.cpp: Removed.
      * platform/haiku/PlatformMouseEventHaiku.cpp: Removed.
      * platform/haiku/PlatformWheelEventHaiku.cpp: Removed.
      * platform/haiku/PopupMenuHaiku.cpp: Removed.
      * platform/haiku/PopupMenuHaiku.h: Removed.
      * platform/haiku/RenderThemeHaiku.cpp: Removed.
      * platform/haiku/RenderThemeHaiku.h: Removed.
      * platform/haiku/ScreenHaiku.cpp: Removed.
      * platform/haiku/ScrollbarThemeHaiku.cpp: Removed.
      * platform/haiku/ScrollbarThemeHaiku.h: Removed.
      * platform/haiku/SearchPopupMenuHaiku.cpp: Removed.
      * platform/haiku/SearchPopupMenuHaiku.h: Removed.
      * platform/haiku/SharedBufferHaiku.cpp: Removed.
      * platform/haiku/SharedTimerHaiku.cpp: Removed.
      * platform/haiku/SoundHaiku.cpp: Removed.
      * platform/haiku/TemporaryLinkStubs.cpp: Removed.
      * platform/haiku/WidgetHaiku.cpp: Removed.
      * platform/image-decoders/haiku: Removed.
      * platform/image-decoders/haiku/ImageDecoderHaiku.cpp: Removed.
      * platform/text/UnicodeRange.h:
      * platform/text/haiku: Removed.
      * platform/text/haiku/TextBreakIteratorInternalICUHaiku.cpp: Removed.
      
      Source/WebKit: 
      
      * haiku: Removed.
      * haiku/WebCoreSupport: Removed.
      * haiku/WebCoreSupport/ChromeClientHaiku.cpp: Removed.
      * haiku/WebCoreSupport/ChromeClientHaiku.h: Removed.
      * haiku/WebCoreSupport/ContextMenuClientHaiku.cpp: Removed.
      * haiku/WebCoreSupport/ContextMenuClientHaiku.h: Removed.
      * haiku/WebCoreSupport/DragClientHaiku.cpp: Removed.
      * haiku/WebCoreSupport/DragClientHaiku.h: Removed.
      * haiku/WebCoreSupport/EditorClientHaiku.cpp: Removed.
      * haiku/WebCoreSupport/EditorClientHaiku.h: Removed.
      * haiku/WebCoreSupport/FrameLoaderClientHaiku.cpp: Removed.
      * haiku/WebCoreSupport/FrameLoaderClientHaiku.h: Removed.
      * haiku/WebCoreSupport/InspectorClientHaiku.cpp: Removed.
      * haiku/WebCoreSupport/InspectorClientHaiku.h: Removed.
      
      Source/WebKit2: 
      
      * Scripts/generate-forwarding-headers.pl:
      
      Tools: 
      
      * Scripts/webkitpy/common/config/build.py:
      * waf/build/settings.py:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@95922 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      adb2d866
  9. 20 Sep, 2011 1 commit
    • ggaren@apple.com's avatar
      Removed BREWMP* platform #ifdefs · f903ca32
      ggaren@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=68425
              
      BREWMP* has no maintainer, and this is dead code.
      
      Reviewed by Darin Adler.
      
      ../JavaScriptCore: 
      
      * heap/MarkStack.h:
      (JSC::::shrinkAllocation):
      * jit/ExecutableAllocator.h:
      (JSC::ExecutableAllocator::cacheFlush):
      * runtime/TimeoutChecker.cpp:
      (JSC::getCPUTime):
      * wtf/Assertions.cpp:
      * wtf/Assertions.h:
      * wtf/CurrentTime.cpp:
      * wtf/DateMath.cpp:
      (WTF::calculateUTCOffset):
      * wtf/FastMalloc.cpp:
      (WTF::fastMalloc):
      (WTF::fastCalloc):
      (WTF::fastMallocSize):
      * wtf/FastMalloc.h:
      * wtf/MainThread.cpp:
      * wtf/MathExtras.h:
      * wtf/OwnPtrCommon.h:
      * wtf/Platform.h:
      * wtf/RandomNumber.cpp:
      (WTF::randomNumber):
      * wtf/RandomNumberSeed.h:
      (WTF::initializeRandomNumberGenerator):
      * wtf/text/WTFString.h:
      * wtf/unicode/Unicode.h:
      
      ../WebCore: 
      
      * WebCorePrefix.h:
      * loader/cache/CachedFont.cpp:
      * platform/DragData.h:
      * platform/DragImage.h:
      * platform/FileSystem.h:
      * platform/PlatformKeyboardEvent.h:
      * platform/PlatformMouseEvent.h:
      * platform/PlatformTouchEvent.h:
      * platform/PlatformTouchPoint.h:
      (WebCore::PlatformTouchPoint::PlatformTouchPoint):
      * platform/Widget.h:
      * platform/graphics/IntPoint.h:
      * platform/graphics/IntSize.h:
      * platform/graphics/WOFFFileFormat.cpp:
      * platform/graphics/skia/FontCustomPlatformData.cpp:
      (WebCore::FontCustomPlatformData::~FontCustomPlatformData):
      (WebCore::FontCustomPlatformData::fontPlatformData):
      (WebCore::createFontCustomPlatformData):
      * platform/graphics/skia/FontCustomPlatformData.h:
      * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
      * platform/text/TextBoundaries.cpp:
      * platform/text/TextEncoding.cpp:
      (WebCore::TextEncoding::encode):
      * platform/text/TextEncodingRegistry.cpp:
      * plugins/PluginViewNone.cpp:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@95555 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f903ca32
  10. 23 Jun, 2011 1 commit
    • yael.aharon@nokia.com's avatar
      2011-06-23 Yael Aharon <yael.aharon@nokia.com> · 2dc6a389
      yael.aharon@nokia.com authored
              Reviewed by Andreas Kling.
      
              [Qt] [WK2] Add drag and drop support
              https://bugs.webkit.org/show_bug.cgi?id=62838
      
              Add convenience methods to allow encoding/decoding of DragData.
              Move the call to dragEnded() to DragClient, to make WebKit1 and WebKit2
              consistent.
      
              * page/qt/DragControllerQt.cpp:
              (WebCore::DragController::cleanupAfterSystemDrag):
              * platform/DragData.h:
              (WebCore::DragData::flags):
              (WebCore::DragData::DragData):
              (WebCore::DragData::operator =):
      2011-06-23  Yael Aharon  <yael.aharon@nokia.com>
      
              Reviewed by Andreas Kling.
      
              [Qt] [WK2] Add drag and drop support
              https://bugs.webkit.org/show_bug.cgi?id=62838
      
              Call dragEnded from the DragClient to make WebKit1 and WebKit2 consistent.
      
              * WebCoreSupport/DragClientQt.cpp:
              (WebCore::DragClientQt::startDrag):
      2011-06-23  Yael Aharon  <yael.aharon@nokia.com>
      
              Reviewed by Andreas Kling.
      
              [Qt] [WK2] Add drag and drop support
              https://bugs.webkit.org/show_bug.cgi?id=62838
      
              Added missing pieces to add support for DnD in QtWebKit.
      
              * Shared/qt/ArgumentCodersQt.cpp: Added.
              (CoreIPC::::encode):
              (CoreIPC::::decode):
              * Shared/qt/ArgumentCodersQt.h: Added.
              Encode DragData so that we can transfer the QMimeData between the
              WebProcess and the UI Process.
              I encode the DragData and not QMimeData directly because we don't
              have an associated QMimeData for each message.
      
              * UIProcess/API/qt/qgraphicswkview.cpp:
              (QGraphicsWKView::init):
              (QGraphicsWKView::dragEnterEvent):
              (QGraphicsWKView::dragLeaveEvent):
              (QGraphicsWKView::dragMoveEvent):
              (QGraphicsWKView::dropEvent):
              * UIProcess/API/qt/qgraphicswkview.h:
              * UIProcess/API/qt/qwkpage.cpp:
              (dropActionToDragOperation):
              (dragOperationToDropAction):
              (dragOperationToDropActions):
              (QWKPagePrivate::dragEnterEvent):
              (QWKPagePrivate::dragLeaveEvent):
              (QWKPagePrivate::dragMoveEvent):
              (QWKPagePrivate::dropEvent):
              (QWKPagePrivate::startDrag):
      
              Send drag-and-drop related events to WebKit.
      
              * UIProcess/API/qt/qwkpage_p.h:
              * UIProcess/PageClient.h:
              * UIProcess/WebPageProxy.cpp:
              (WebKit::WebPageProxy::performDragControllerAction):
              (WebKit::WebPageProxy::startDrag):
              * UIProcess/WebPageProxy.h:
      
               Start the HTML5 drag operation from the UI process, because QDrag
               needs a handle to the QWidget under the mouse.
      
              * UIProcess/WebPageProxy.messages.in:
      
              Add message type that takes DragData as a parameter.
      
              * WebKit2.pro:
              * WebProcess/WebCoreSupport/WebDragClient.cpp:
              * WebProcess/WebCoreSupport/qt/WebDragClientQt.cpp: Added.
              (WebKit::convertImageToBitmap):
              (WebKit::WebDragClient::startDrag):
      
              Send a message to the UI process to start the HTML5 drag operation.
      
              * WebProcess/WebPage/WebPage.cpp:
              (WebKit::WebPage::performDragControllerAction):
              * WebProcess/WebPage/WebPage.h:
              * WebProcess/WebPage/WebPage.messages.in:
      
              Add message type that takes DragData as a parameter.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@89582 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2dc6a389
  11. 13 May, 2011 1 commit
    • enrica@apple.com's avatar
      REGRESSION (WK2): Can't drag and drop a link or image from Safari to Desktop · c9cd1be8
      enrica@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=60819
      <rdar://problem/9370689>
      
      Reviewed by Darin Adler and Brian Weinstein.
      
      Source/WebCore: 
      
      To support drag-and-drop to the desktop and other windows applications,
      we need to support the fileDescriptor and fileContentZero clipboard formats.
      This patch adds the support for serializing these types across the process boundary.
      It also fixes a regression introduced by r70914, that was causing the content of the
      shortcut files to be corrupted. Using ascii() to convert from String to CString was
      causing '\n' and '\r' to be replaced with '?'.
              
      * platform/DragData.h:
      * platform/win/ClipboardUtilitiesWin.cpp:
      (WebCore::fileDescriptorFormat): Moved from ClipboardWin.cpp.
      (WebCore::fileContentFormatZero): Moved from ClipboardWin.cpp.
      (WebCore::getFileDescriptorData): Serialize FileDescriptor type.
      (WebCore::getFileContentData): Serialize FileContent type.
      (WebCore::setFileDescriptorData): Deserialize FileDescriptor type.
      (WebCore::setFileContentData): Deserialize FileContent type.
      (WebCore::setCFData): Added missing initialization of the tymed field
      that was causing the cfHDrop format not to be deserialized correctly. 
      * platform/win/ClipboardUtilitiesWin.h:
      * platform/win/ClipboardWin.cpp:
      (WebCore::createGlobalHDropContent): Changed ascii() to latin1().
      (WebCore::ClipboardWin::writeURL):
      * platform/win/DragDataWin.cpp:
      (WebCore::DragData::getDragFileDescriptorData):
      (WebCore::DragData::getDragFileContentData):
      
      Source/WebKit2: 
      
      To support drag-and-drop to the desktop and other windows applications,
      we need to support the fileDescriptor and fileContentZero clipboard formats.
      This patch adds the support for serializing these types across the process boundary.
      
      * Platform/CoreIPC/Arguments.h: Added support for messages with 10 arguments.
      (CoreIPC::Arguments10::Arguments10):
      (CoreIPC::Arguments10::encode):
      (CoreIPC::Arguments10::decode):
      (CoreIPC::In):
      (CoreIPC::Out):
      * Platform/CoreIPC/HandleMessage.h:
      (CoreIPC::callMemberFunction): Added support for memebers with 10 arguments.
      * UIProcess/WebPageProxy.cpp:
      (WebKit::WebPageProxy::startDragDrop):
      * UIProcess/WebPageProxy.h:
      * UIProcess/WebPageProxy.messages.in:
      * WebProcess/WebCoreSupport/win/WebDragClientWin.cpp:
      (WebKit::WebDragClient::startDrag):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@86477 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c9cd1be8
  12. 06 Apr, 2011 1 commit
    • enrica@apple.com's avatar
      REGRESSION: Drag & Drop Gmail Attachments doesn't work. · b82803ec
      enrica@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=57909
      <rdar://problem/9103220>
      
      Reviewed by Darin Adler.
      
      Source/WebCore: 
      
      In WebKit2 we cannot rely on the value returned by platformData() that
      on Mac returns an NSDraggingInfo object. This is available only in the UI
      process. Therefore we should use m_pasteboard instead.
      We cannot change what platformData() returns on Mac, since there are
      delegate methods that receive a NSDraggingInfo object (only in WebKit).
              
      * platform/DragData.h:
      (WebCore::DragData::pasteboard): Added.
      * platform/mac/ClipboardMac.mm:
      (WebCore::Clipboard::create): Changed to use pasteboard() instead of platformData().
      * platform/mac/DragDataMac.mm:
      (WebCore::DragData::asColor): Replaced references to m_platformData with m_pasteboard.
      (WebCore::DragData::asURL): Same as above.
      
      Source/WebKit2: 
      
      Added _hitTest method to support drag and drop when the drag types cannot be matched.
      This is the case for elements that do not place content
      in the drag pasteboard automatically when the drag start (i.e. dragging a DIV element).
                     
      * UIProcess/API/mac/WKView.mm:
      (-[WKView _hitTest:dragTypes:]): Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@83070 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b82803ec
  13. 27 Jan, 2011 1 commit
    • enrica@apple.com's avatar
      Source/WebCore: WebKit2: add support for drag and drop on Windows · 466e2e16
      enrica@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=52775
      <rdar://problem/8514409>
              
      Reviewed by Darin Adler and Adam Roben.
      
      On Windows the access to the content being dragged is
      provided via the IDataObject interface that is made available
      to the window that registers itself as drop target.
      Since this interface cannot be accessed from the WebProcess,
      in every call to one of the methods of the IDropTarget interface
      we serialize the content of the drag clipboard and send it over to
      the WebProcess.
      The bulk of this patch consists in the refactoring needed in DragData
      and ClipboardWin classes to extract the data from the serialized object.
              
      * platform/DragData.cpp:
      * platform/DragData.h:
      * platform/win/ClipboardUtilitiesWin.cpp:
      (WebCore::getWebLocData):
      (WebCore::getURL):
      (WebCore::getPlainText):
      (WebCore::getTextHTML):
      (WebCore::getCFHTML):
      (WebCore::fragmentFromFilenames):
      (WebCore::containsFilenames):
      (WebCore::fragmentFromHTML):
      (WebCore::containsHTML):
      (WebCore::getClipboardData):
      * platform/win/ClipboardUtilitiesWin.h:
      * platform/win/ClipboardWin.cpp:
      (WebCore::Clipboard::create):
      (WebCore::ClipboardWin::ClipboardWin):
      (WebCore::ClipboardWin::getData):
      (WebCore::ClipboardWin::types):
      (WebCore::ClipboardWin::files):
      (WebCore::ClipboardWin::hasData):
      * platform/win/ClipboardWin.h:
      (WebCore::ClipboardWin::create):
      * platform/win/DragDataWin.cpp:
      (WebCore::DragData::DragData):
      (WebCore::DragData::containsURL):
      (WebCore::DragData::dragDataMap):
      (WebCore::DragData::asURL):
      (WebCore::DragData::containsFiles):
      (WebCore::DragData::asFilenames):
      (WebCore::DragData::containsPlainText):
      (WebCore::DragData::asPlainText):
      (WebCore::DragData::canSmartReplace):
      (WebCore::DragData::containsCompatibleContent):
      (WebCore::DragData::asFragment):
      
      Source/WebKit2: WebKit2: add support for drag and drop on Windows
      https://bugs.webkit.org/show_bug.cgi?id=52775
      <rdar://problem/8514409>
      
      Reviewed by Darin Adler and Adam Roben.
      
      On Windows the access to the content being dragged is
      provided via the IDataObject interface that is made available
      to the window that registers itself as drop target.
      Since this interface cannot be accessed from the WebProcess,
      in every call to one of the methods of the IDropTarget interface
      we serialize the content of the drag clipboard and send it over to
      the WebProcess. The implementation uses the same messages as the
      Mac one, with slightly different parameters to pass the serialized
      clipboard.
      
      * UIProcess/WebPageProxy.cpp:
      (WebKit::WebPageProxy::performDragControllerAction): Added Windows
      specific implementation.
      * UIProcess/WebPageProxy.h:
      * UIProcess/win/WebView.cpp:
      (WebKit::WebView::WebView): Added dropTargetHelper object creation.
      (WebKit::WebView::initialize): Added to register for drag/drop with out
      refcount issues.
      (WebKit::WebView::close):
      (WebKit::WebView::windowReceivedMessage):
      (WebKit::WebView::QueryInterface):
      (WebKit::WebView::AddRef):
      (WebKit::WebView::Release):
      (WebKit::dragOperationToDragCursor):
      (WebKit::WebView::keyStateToDragOperation):
      (WebKit::WebView::DragEnter):
      (WebKit::WebView::DragOver):
      (WebKit::WebView::DragLeave):
      (WebKit::WebView::Drop):
      * UIProcess/win/WebView.h:
      (WebKit::WebView::create):
      * WebProcess/WebPage/WebPage.cpp:
      (WebKit::WebPage::performDragControllerAction):
      * WebProcess/WebPage/WebPage.h:
      * WebProcess/WebPage/WebPage.messages.in:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76824 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      466e2e16
  14. 13 Jan, 2011 1 commit
    • enrica@apple.com's avatar
      Source/WebCore: WebKit2: Add support for drag and drop · 9d9813d0
      enrica@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=52343
      <rdar://problem/7660558>
                     
      Reviewed by Darin Adler.
      
      This patch contains the changes required to support dropping content
      in WebKit on the Mac. The DragData class has been extended to provide
      additional context from the application (keyboard state, modal windows, etc.)
      as well as information of the drag pasteboard being used.
      The support for WebKit as drag source will be added with a separate patch.
      
      * WebCore.exp.in:
      * page/DragController.cpp:
      (WebCore::DragController::dragIsMove): Added DragData parameter.
      (WebCore::DragController::tryDocumentDrag): Modified call to dragIsMove.
      (WebCore::DragController::concludeEditDrag): Same as above.
      * page/DragController.h: Added parameter to isCopyKeyDown.
      * page/mac/DragControllerMac.mm:
      The following methods have been modified to use the information stored
      in the DragData class.
      (WebCore::DragController::isCopyKeyDown):
      (WebCore::DragController::dragOperation):
      * platform/DragData.h:
      (WebCore::DragData::flags):
      * platform/DragData.cpp: Added default flags parameter to the constructor.
      * platform/mac/DragDataMac.mm:
      (WebCore::DragData::DragData): Added constructor that receives the name of the pasteboard to use.
      (WebCore::DragData::canSmartReplace):
      (WebCore::DragData::containsColor):
      (WebCore::DragData::containsFiles):
      (WebCore::DragData::asFilenames):
      (WebCore::DragData::containsPlainText):
      (WebCore::DragData::asPlainText):
      (WebCore::DragData::containsCompatibleContent):
      (WebCore::DragData::asURL):
      (WebCore::DragData::asFragment):
      All the following files have been modified to add the DragData
      parameter to isCopyKeyDown. I plan to improve this in the future
      and make isCopyKeyDown not platform specific.
      * page/android/DragControllerAndroid.cpp:
      (WebCore::DragController::isCopyKeyDown):
      * page/brew/DragControllerBrew.cpp:
      (WebCore::DragController::isCopyKeyDown):
      * page/chromium/DragControllerChromium.cpp:
      (WebCore::DragController::isCopyKeyDown):
      * page/efl/DragControllerEfl.cpp:
      (WebCore::DragController::isCopyKeyDown):
      * page/gtk/DragControllerGtk.cpp:
      (WebCore::DragController::isCopyKeyDown):
      * page/haiku/DragControllerHaiku.cpp:
      (WebCore::DragController::isCopyKeyDown):
      * page/mac/DragControllerMac.mm:
      (WebCore::DragController::isCopyKeyDown):
      (WebCore::DragController::dragOperation):
      * page/qt/DragControllerQt.cpp:
      (WebCore::DragController::isCopyKeyDown):
      * page/win/DragControllerWin.cpp:
      (WebCore::DragController::isCopyKeyDown):
      * page/wx/DragControllerWx.cpp:
      (WebCore::DragController::isCopyKeyDown):
      
      WebKit/mac: WebKit2: Add support for drag and drop
      https://bugs.webkit.org/show_bug.cgi?id=52343
      <rdar://problem/7660558>
              
      Reviewed by Darin Adler.
      
      The DragData class has been extended to provide
      additional context from the application (keyboard state, modal windows, etc.)
      as well as information of the drag pasteboard being used.
      These are the changes to align the behavior for WebKit.
      
      * WebView/WebView.mm:
      (-[WebView applicationFlags:]): Added.
      (-[WebView draggingEntered:]): Added parameter to the DragData constructor.
      (-[WebView draggingUpdated:]): Added parameter to the DragData constructor.
      (-[WebView draggingExited:]): Added parameter to the DragData constructor.
      (-[WebView performDragOperation:]): Added parameter to the DragData constructor.
      
      WebKit2: WebKit2: Add support for drag and drop
      https://bugs.webkit.org/show_bug.cgi?id=52343
      <rdar://problem/7660558>
                     
      Reviewed by Darin Adler.
      
      This patch contains the changes required to support dropping content
      in WebKit on the Mac. The DragData class has been extended to provide
      additional context from the application (keyboard state, modal windows, etc.)
      as well as information of the drag pasteboard being used.
      The support for WebKit as drag source will be added with a separate patch.
      
      * Shared/DragControllerAction.h: Added.
      * UIProcess/API/mac/WKView.mm:
      Added implemention of the methods required to add suport for a drop target.
      To maintain asynchronous communication with the WebProcess, we always return
      the previous calculated value for the drag operation.
      (-[WKView _registerDraggedTypes]):
      (-[WKView initWithFrame:contextRef:pageGroupRef:]):
      (-[WKView applicationFlags:]):
      (-[WKView draggingEntered:]):
      (-[WKView draggingUpdated:]):
      (-[WKView draggingExited:]):
      (-[WKView prepareForDragOperation:]):
      (-[WKView performDragOperation:]):
      * UIProcess/WebPageProxy.cpp:
      (WebKit::WebPageProxy::WebPageProxy):
      (WebKit::WebPageProxy::performDragControllerAction):
      (WebKit::WebPageProxy::didPerformDragControllerAction):
      * UIProcess/WebPageProxy.h:
      (WebKit::WebPageProxy::dragOperation):
      (WebKit::WebPageProxy::resetDragOperation):
      * UIProcess/WebPageProxy.messages.in:
      * WebKit2.xcodeproj/project.pbxproj:
      * WebProcess/WebCoreSupport/WebDragClient.cpp:
      (WebKit::WebDragClient::willPerformDragDestinationAction):
      (WebKit::WebDragClient::willPerformDragSourceAction):
      (WebKit::WebDragClient::actionMaskForDrag):
      (WebKit::WebDragClient::dragSourceActionMaskForPoint):
      (WebKit::WebDragClient::startDrag):
      * WebProcess/WebPage/WebPage.cpp:
      (WebKit::WebPage::performDragControllerAction):
      * WebProcess/WebPage/WebPage.h:
      * WebProcess/WebPage/WebPage.messages.in:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75743 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      9d9813d0
  15. 11 Jan, 2011 1 commit
    • enrica@apple.com's avatar
      Source/WebCore: Paste and drag and drop use different code paths to interact with the pasteboard. · 964ea218
      enrica@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=52093
      The change consists in a refactoring of the code to have only one class that
      deals with the pasteboard on Mac.
      
      Reviewed by Alexey Proskuryakov.
      
      No new tests. A test is already available for this
      (editing/pasteboard/drag-image-to-contenteditable-in-iframe.html) but had incorrect results.
      
      * WebCore.exp.in:
      * loader/EmptyClients.h: Added two Mac only methods to call into WebKit to use functionality
      that is in NSURLExtras.
      (WebCore::EmptyEditorClient::canonicalizeURL):
      (WebCore::EmptyEditorClient::canonicalizeURLString):
      * page/DragController.cpp:
      The following methods have been changed to pass a pointer to the Frame object
      to the DragData class.
      (WebCore::documentFragmentFromDragData):
      (WebCore::DragController::performDrag):
      (WebCore::DragController::dispatchTextInputEventFor):
      (WebCore::DragController::concludeEditDrag):
      * page/EditorClient.h: Added two Mac only methods to call into WebKit to use functionality
      that is in NSURLExtras.
      The following files have been modified to pass the Frame object to the DragData method calls.
      * page/chromium/DragControllerChromium.cpp:
      (WebCore::DragController::dragOperation):
      * page/gtk/DragControllerGtk.cpp:
      (WebCore::DragController::dragOperation):
      * page/mac/DragControllerMac.mm:
      (WebCore::DragController::dragOperation):
      * page/qt/DragControllerQt.cpp:
      (WebCore::DragController::dragOperation):
      * page/win/DragControllerWin.cpp:
      (WebCore::DragController::dragOperation):
      * platform/DragData.h: Removed Mac specific constructor and reference to PasteboardHelper class.
      * platform/Pasteboard.h: Added public constructor to create a Pasteboard object from an NSPasteboard.
      The following files were all modified to match the new parameters of the methods listed.
      * platform/android/DragDataAndroid.cpp:
      (WebCore::DragData::asPlainText):
      (WebCore::DragData::containsURL):
      (WebCore::DragData::asURL):
      (WebCore::DragData::asFragment):
      * platform/chromium/DragDataChromium.cpp:
      (WebCore::DragData::containsURL):
      (WebCore::DragData::asURL):
      (WebCore::DragData::asPlainText):
      (WebCore::DragData::containsCompatibleContent):
      (WebCore::DragData::asFragment):
      * platform/gtk/DragDataGtk.cpp:
      (WebCore::DragData::asPlainText):
      (WebCore::DragData::containsCompatibleContent):
      (WebCore::DragData::containsURL):
      (WebCore::DragData::asURL):
      (WebCore::DragData::asFragment):
      * platform/haiku/DragDataHaiku.cpp:
      (WebCore::DragData::asPlainText):
      (WebCore::DragData::containsURL):
      (WebCore::DragData::asURL):
      (WebCore::DragData::asFragment):
      * platform/mac/DragDataMac.mm:
      (WebCore::DragData::DragData):
      (WebCore::DragData::asPlainText):
      (WebCore::insertablePasteboardTypes):
      (WebCore::DragData::containsCompatibleContent):
      (WebCore::DragData::containsURL):
      (WebCore::DragData::asURL):
      (WebCore::DragData::asFragment):
      * platform/mac/PasteboardMac.mm:
      (WebCore::Pasteboard::getBestURL):
      (WebCore::Pasteboard::asURL):
      * platform/qt/DragDataQt.cpp:
      (WebCore::DragData::asPlainText):
      (WebCore::DragData::containsCompatibleContent):
      (WebCore::DragData::containsURL):
      (WebCore::DragData::asURL):
      (WebCore::DragData::asFragment):
      * platform/win/DragDataWin.cpp:
      (WebCore::DragData::containsURL):
      (WebCore::DragData::asURL):
      (WebCore::DragData::asPlainText):
      (WebCore::DragData::containsCompatibleContent):
      (WebCore::DragData::asFragment):
      * platform/wince/DragDataWinCE.cpp:
      (WebCore::DragData::containsURL):
      (WebCore::DragData::asURL):
      (WebCore::DragData::asPlainText):
      (WebCore::DragData::asFragment):
      * platform/wx/DragDataWx.cpp:
      (WebCore::DragData::asPlainText):
      (WebCore::DragData::containsURL):
      (WebCore::DragData::asURL):
      (WebCore::DragData::asFragment):
      
      WebKit: Paste and drag and drop use different code paths to interact with the pasteboard.
      https://bugs.webkit.org/show_bug.cgi?id=52093
      The change consists in a refactoring of the code to have only one class that
      deals with the pasteboard on Mac.
      
      Reviewed by Alexey Proskuryakov.
      
      * WebKit.xcodeproj/project.pbxproj: Removed WebPasteboardHelper.mm and WebPasteboardHelper.h.
      
      WebKit/mac: Paste and drag and drop use different code paths to interact with the pasteboard.
      https://bugs.webkit.org/show_bug.cgi?id=52093
      The change consists in a refactoring of the code to have only one class that
      deals with the pasteboard on Mac.
      
      Reviewed by Alexey Proskuryakov.
      
      * WebCoreSupport/WebEditorClient.h:
      * WebCoreSupport/WebEditorClient.mm: Added two methods to provide to WebCore functionality
      exposed by NSURLExtras.
      (WebEditorClient::canonicalizeURL):
      (WebEditorClient::canonicalizeURLString):
      * WebCoreSupport/WebPasteboardHelper.h: Removed.
      * WebCoreSupport/WebPasteboardHelper.mm: Removed.
      * WebView/WebHTMLView.mm: Removed comment.
      * WebView/WebView.mm: The following methods have been changed to use the new DragData
      constructor that doesn't use the WebPasteboardHelper reference.
      (-[WebView draggingEntered:]):
      (-[WebView draggingUpdated:]):
      (-[WebView draggingExited:]):
      (-[WebView performDragOperation:]):
      
      WebKit2: Paste and drag and drop use different code paths to interact with the pasteboard.
      https://bugs.webkit.org/show_bug.cgi?id=52093
      The change consists in a refactoring of the code to have only one class that
      deals with the pasteboard on Mac.
      
      Reviewed by Alexey Proskuryakov.
      
      * WebProcess/WebCoreSupport/WebEditorClient.h:
      * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm: Added two methods to provide to WebCore functionality
      exposed by NSURLExtras.
      (WebKit::WebEditorClient::canonicalizeURL):
      (WebKit::WebEditorClient::canonicalizeURLString):
      
      LayoutTests: Paste and drag and drop use different code paths to interact with the pasteboard.
      https://bugs.webkit.org/show_bug.cgi?id=52093
      
      Reviewed by Alexey Proskuryakov.
      
      New test results added to match the correct behavior.
              
      * platform/mac/editing/pasteboard/drag-image-to-contenteditable-in-iframe-expected.checksum:
      * platform/mac/editing/pasteboard/drag-image-to-contenteditable-in-iframe-expected.png:
      * platform/mac/editing/pasteboard/drag-image-to-contenteditable-in-iframe-expected.txt:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75523 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      964ea218
  16. 08 Jan, 2011 1 commit
  17. 27 Jul, 2010 1 commit
    • jianli@chromium.org's avatar
      Add ScriptExecutionContext argument to File/Blob constructors. · 37d8a583
      jianli@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=40587
      
      Reviewed by David Levin.
      
      Remove DragData::createClipboard and add Clipboard::create for it to be
      called directly in DragController. This is because we need to pass
      Frame pointer to Clipboard class and use it to get ScriptExecutionContext
      in order to construct File objects in Clipboard::files().
      
      * bindings/js/SerializedScriptValue.cpp:
      (WebCore::DeserializingTreeWalker::convertIfTerminal):
      * bindings/v8/SerializedScriptValue.cpp:
      (WebCore::ZigZag::Reader::readBlob):
      (WebCore::ZigZag::Reader::readFile):
      (WebCore::ZigZag::Reader::readFileList):
      * dom/Clipboard.h:
      * editing/Editor.cpp:
      (WebCore::Editor::dispatchCPPEvent):
      * editing/Editor.h:
      * editing/android/EditorAndroid.cpp:
      (WebCore::Editor::newGeneralClipboard):
      * editing/brew/EditorBrew.cpp:
      (WebCore::Editor::newGeneralClipboard):
      * editing/chromium/EditorChromium.cpp:
      (WebCore::Editor::newGeneralClipboard):
      * editing/haiku/EditorHaiku.cpp:
      (WebCore::Editor::newGeneralClipboard):
      * editing/mac/EditorMac.mm:
      (WebCore::Editor::newGeneralClipboard):
      * editing/qt/EditorQt.cpp:
      (WebCore::Editor::newGeneralClipboard):
      * editing/wx/EditorWx.cpp:
      (WebCore::Editor::newGeneralClipboard):
      * html/Blob.cpp:
      (WebCore::Blob::Blob):
      (WebCore::Blob::slice):
      * html/Blob.h:
      (WebCore::Blob::create):
      * html/Blob.idl:
      * html/BlobBuilder.cpp:
      (WebCore::BlobBuilder::getBlob):
      * html/BlobBuilder.h:
      * html/BlobBuilder.idl:
      * html/File.cpp:
      (WebCore::File::File):
      * html/File.h:
      (WebCore::File::create):
      * html/HTMLInputElement.cpp:
      (WebCore::HTMLInputElement::appendFormData):
      (WebCore::HTMLInputElement::setFileListFromRenderer):
      * page/DragController.cpp:
      (WebCore::DragController::dragExited):
      (WebCore::DragController::performDrag):
      (WebCore::DragController::tryDHTMLDrag):
      * page/chromium/EventHandlerChromium.cpp:
      (WebCore::EventHandler::createDraggingClipboard):
      * page/gtk/EventHandlerGtk.cpp:
      (WebCore::EventHandler::createDraggingClipboard):
      * page/win/EventHandlerWin.cpp:
      (WebCore::EventHandler::createDraggingClipboard):
      * platform/DragData.h:
      * platform/android/ClipboardAndroid.cpp:
      (WebCore::Clipboard::create):
      * platform/android/DragDataAndroid.cpp:
      * platform/brew/ClipboardBrew.cpp:
      (WebCore::Clipboard::create):
      * platform/brew/DragDataBrew.cpp:
      * platform/chromium/ClipboardChromium.cpp:
      (WebCore::Clipboard::create):
      (WebCore::ClipboardChromium::ClipboardChromium):
      (WebCore::ClipboardChromium::create):
      (WebCore::ClipboardChromium::files):
      * platform/chromium/ClipboardChromium.h:
      * platform/chromium/DragDataChromium.cpp:
      * platform/efl/ClipboardEfl.cpp:
      (WebCore::Editor::newGeneralClipboard):
      (WebCore::Clipboard::create):
      * platform/efl/DragDataEfl.cpp:
      * platform/gtk/ClipboardGtk.cpp:
      (WebCore::Editor::newGeneralClipboard):
      (WebCore::Clipboard::create):
      (WebCore::ClipboardGtk::ClipboardGtk):
      (WebCore::ClipboardGtk::files):
      * platform/gtk/ClipboardGtk.h:
      (WebCore::ClipboardGtk::create):
      * platform/gtk/DragDataGtk.cpp:
      * platform/haiku/ClipboardHaiku.cpp:
      (WebCore::Clipboard::create):
      * platform/haiku/DragDataHaiku.cpp:
      * platform/mac/ClipboardMac.mm:
      (WebCore::Clipboard::create):
      (WebCore::ClipboardMac::files):
      * platform/mac/DragDataMac.mm:
      * platform/qt/ClipboardQt.cpp:
      (WebCore::Clipboard::create):
      * platform/qt/DragDataQt.cpp:
      * platform/win/ClipboardWin.cpp:
      (WebCore::Clipboard::create):
      (WebCore::ClipboardWin::ClipboardWin):
      (WebCore::ClipboardWin::files):
      * platform/win/ClipboardWin.h:
      (WebCore::ClipboardWin::create):
      * platform/win/DragDataWin.cpp:
      * platform/win/EditorWin.cpp:
      (WebCore::Editor::newGeneralClipboard):
      * platform/wince/DragDataWince.cpp:
      * platform/wince/EditorWince.cpp:
      (WebCore::Editor::newGeneralClipboard):
      * platform/wx/ClipboardWx.cpp:
      (WebCore::Clipboard::create):
      * platform/wx/DragDataWx.cpp:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@64152 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      37d8a583
  18. 29 Jun, 2010 1 commit
    • mrobinson@webkit.org's avatar
      2010-06-29 Martin Robinson <mrobinson@igalia.com> · 88d63d4b
      mrobinson@webkit.org authored
              Reviewed by Xan Lopez.
      
              [GTK] DragDataGtk should use DataObjectGtk as the platformDragData
              https://bugs.webkit.org/show_bug.cgi?id=40307
      
              Use DataObjectGtk as the platformDragData for DragDataGtk. DataObjectGtk
              contains all the information necessary to keep track of drops in progress.
      
              * platform/DragData.h: Use a DataObjectGtk* as the platform drag data.
              * platform/gtk/DragDataGtk.cpp:
              (WebCore::DragData::containsFiles): Retrieve information via platformDragData.
              (WebCore::DragData::asFilenames): Ditto.
              (WebCore::DragData::containsPlainText): Ditto.
              (WebCore::DragData::asPlainText): Ditto.
              (WebCore::DragData::createClipboard): Create the Clipboard with the platformDragData.
              (WebCore::DragData::containsCompatibleContent): Retrieve information via platformDragData.
              (WebCore::DragData::containsURL): Ditto.
              (WebCore::DragData::asURL): Ditto.
              (WebCore::DragData::asFragment): Ditto.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@62124 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      88d63d4b
  19. 10 Jun, 2010 1 commit
    • eric@webkit.org's avatar
      2010-06-10 Daniel Cheng <dcheng@chromium.org> · ccf61be1
      eric@webkit.org authored
              Reviewed by Jian Li.
      
              Don't convert filenames to URLs in edit drags.
              https://bugs.webkit.org/show_bug.cgi?id=38826
      
              For security reasons, we don't want to expose file system paths to web
              content, so we filter them out of edit drags.
      
              * editing/pasteboard/file-drag-to-editable-expected.txt: Added.
              * editing/pasteboard/file-drag-to-editable.html: Added.
              * editing/pasteboard/script-tests/file-drag-to-editable.js: Added.
              * platform/gtk/Skipped:
              * platform/mac/Skipped:
              * platform/qt/Skipped:
              * platform/win/Skipped:
      2010-06-10  Daniel Cheng  <dcheng@chromium.org>
      
              Reviewed by Jian Li.
      
              Don't convert filenames to URLs in edit drags.
              https://bugs.webkit.org/show_bug.cgi?id=38826
      
              For security reasons, we don't want to expose file system paths to web
              content, so we filter them out of edit drags.
      
              Test: editing/pasteboard/file-drag-to-editable.html
      
              * page/DragController.cpp:
              (WebCore::documentFragmentFromDragData):
              * platform/DragData.h:
              (WebCore::DragData::):
              * platform/android/DragDataAndroid.cpp:
              (WebCore::DragData::containsURL):
              (WebCore::DragData::asURL):
              * platform/chromium/DragDataChromium.cpp:
              (WebCore::DragData::containsURL):
              (WebCore::DragData::asURL):
              * platform/efl/DragDataEfl.cpp:
              (WebCore::DragData::containsURL):
              (WebCore::DragData::asURL):
              * platform/gtk/DragDataGtk.cpp:
              (WebCore::DragData::containsURL):
              (WebCore::DragData::asURL):
              * platform/haiku/DragDataHaiku.cpp:
              (WebCore::DragData::containsURL):
              (WebCore::DragData::asURL):
              * platform/mac/DragDataMac.mm:
              (WebCore::DragData::containsURL):
              (WebCore::DragData::asURL):
              * platform/qt/DragDataQt.cpp:
              (WebCore::DragData::asPlainText):
              (WebCore::DragData::containsURL):
              (WebCore::DragData::asURL):
              * platform/win/ClipboardUtilitiesWin.cpp:
              (WebCore::getURL):
              (WebCore::getPlainText):
              * platform/win/ClipboardUtilitiesWin.h:
              * platform/win/ClipboardWin.cpp:
              (WebCore::ClipboardWin::getData):
              * platform/win/DragDataWin.cpp:
              (WebCore::DragData::containsURL):
              (WebCore::DragData::asURL):
              * platform/wince/DragDataWince.cpp:
              (WebCore::DragData::containsURL):
              (WebCore::DragData::asURL):
              * platform/wx/DragDataWx.cpp:
              (WebCore::DragData::containsURL):
              (WebCore::DragData::asURL):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@60957 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ccf61be1
  20. 22 May, 2010 1 commit
    • eric@webkit.org's avatar
      2010-05-22 Kwang Yul Seo <skyul@company100.net> · 5159bcef
      eric@webkit.org authored
              Reviewed by Eric Seidel.
      
              [BREWMP] Add DragData
              https://bugs.webkit.org/show_bug.cgi?id=39469
      
              As BREW MP does not support dragging, add dummy implementation of DragData.
      
              * platform/DragData.h:
              * platform/brew/DragDataBrew.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):
              (WebCore::DragData::asFilenames):
              (WebCore::DragData::containsFiles):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@60025 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5159bcef
  21. 22 Mar, 2010 1 commit
  22. 12 Aug, 2009 1 commit
    • eric@webkit.org's avatar
      2009-08-12 Maxime Simon <simon.maxime@gmail.com> · c4efd654
      eric@webkit.org authored
              Reviewed by Eric Seidel.
      
              [Haiku] Adding modification to the WebCore/platform/ files to allow
              the Haiku port.
              https://bugs.webkit.org/show_bug.cgi?id=28128
      
              * platform/ContextMenuItem.h: BMenu is the PlatformMenuItemDescription
              class of Haiku.
              * platform/Cursor.h: BCursor is the Cursor class of Haiku.
              * platform/DragData.h: Use a BMessage as DragDataRef.
              * platform/DragImage.h: Use a BBitmap as DragImageRef.
              * platform/PlatformKeyboardEvent.h: Use BMessage as event vehicle.
              * platform/PlatformMenuDescription.h: BMenu is the
              PlatformMenuDescription class of Haiku.
              * platform/PlatformMouseEvent.h: Use BMessage as event vehicle.
              * platform/PlatformWheelEvent.h: Use BMessage as event vehicle.
              * platform/PopupMenu.h: Adding a m_menu attribute for Haiku.
              * platform/Widget.h: BView is the PlatformWidget class of Haiku.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@47145 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c4efd654
  23. 14 Oct, 2008 1 commit
    • darin@chromium.org's avatar
      2008-10-10 Darin Fisher <darin@chromium.org> · 5a0619c2
      darin@chromium.org authored
              Reviewed by Darin Adler.
      
              Add some PLATFORM(CHROMIUM) ifdefs to WebCore
              https://bugs.webkit.org/show_bug.cgi?id=21511
      
              * loader/FTPDirectoryDocument.cpp:
              * loader/FTPDirectoryParser.cpp:
              * loader/FrameLoader.cpp:
              (WebCore::FrameLoader::finishedLoadingDocument):
              * platform/ContextMenuItem.h:
              * platform/Cursor.h:
              * platform/DragData.h:
              * platform/DragImage.h:
              * platform/Pasteboard.h:
              * platform/PlatformKeyboardEvent.h:
              (WebCore::PlatformKeyboardEvent::isSystemKey):
              * platform/PlatformMenuDescription.h:
              * platform/PlatformMouseEvent.h:
              * platform/PlatformWheelEvent.h:
              * platform/PopupMenu.h:
              * platform/ScrollView.h:
              * platform/Widget.h:
              * platform/network/NetworkStateNotifier.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@37599 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5a0619c2
  24. 14 Jun, 2008 1 commit
    • darin@apple.com's avatar
      JavaScriptCore: · d5ceaf86
      darin@apple.com authored
      2008-06-14  Darin Adler  <darin@apple.com>
      
              Reviewed by Sam.
      
              - more of https://bugs.webkit.org/show_bug.cgi?id=17257
                start ref counts at 1 instead of 0 for speed
      
              * kjs/nodes.cpp:
              (KJS::ParserRefCounted::hasOneRef): Added. Replaces refcount.
              * kjs/nodes.h: Replaced refcount with hasOneRef.
      
              * wtf/ListRefPtr.h:
              (WTF::ListRefPtr::~ListRefPtr): Changed to use hasOneRef instead of
              refcount, so this class can be used with the RefCounted template.
      
              * wtf/RefCounted.h:
              (WTF::RefCounted::hasOneRef): Made const, since there's no reason for
              it to be non-const.
      
      WebCore:
      
      2008-06-14  Darin Adler  <darin@apple.com>
      
              Reviewed by Sam.
      
              - more work on https://bugs.webkit.org/show_bug.cgi?id=17257
                start ref counts at 1 instead of 0 for speed
      
              * WebCore.base.exp: Added some new exports needed for functions that are now
              non-virtual.
      
              * WebCore.xcodeproj/project.pbxproj: Moved the "icon" group to the correct
              location in the project. Before it was inside "appcache"!
      
              * css/CSSStyleSelector.cpp:
              (WebCore::CSSStyleSelector::applyProperty):
              * dom/Clipboard.cpp:
              (WebCore::Clipboard::Clipboard):
              * editing/mac/EditorMac.mm:
              (WebCore::Editor::newGeneralClipboard):
              * editing/qt/EditorQt.cpp:
              (WebCore::Editor::newGeneralClipboard):
              * editing/wx/EditorWx.cpp:
              (WebCore::Editor::newGeneralClipboard):
              * loader/DocumentLoader.cpp:
              (WebCore::DocumentLoader::DocumentLoader):
              * loader/DocumentLoader.h:
              (WebCore::DocumentLoader::create):
              * loader/icon/IconDatabase.cpp:
              (WebCore::IconDatabase::defaultIcon):
              (WebCore::IconDatabase::setIconDataForIconURL):
              (WebCore::IconDatabase::setIconURLForPageURL):
              (WebCore::IconDatabase::getOrCreateIconRecord):
              (WebCore::IconDatabase::performURLImport):
              * loader/icon/IconDatabase.h:
              * loader/icon/IconRecord.cpp:
              (WebCore::IconRecord::IconRecord):
              * loader/icon/IconRecord.h:
              (WebCore::IconRecord::create):
              * page/EventHandler.h:
              * page/Frame.cpp:
              (WebCore::Frame::Frame):
              * page/Frame.h:
              (WebCore::Frame::create):
              * page/gtk/EventHandlerGtk.cpp:
              (WebCore::EventHandler::createDraggingClipboard):
              * page/mac/EventHandlerMac.mm:
              (WebCore::EventHandler::createDraggingClipboard):
              * page/qt/EventHandlerQt.cpp:
              (WebCore::EventHandler::createDraggingClipboard):
              * page/win/EventHandlerWin.cpp:
              (WebCore::EventHandler::createDraggingClipboard):
              * page/wx/EventHandlerWx.cpp:
              (WebCore::EventHandler::createDraggingClipboard):
              * platform/Cursor.h:
              (WebCore::SharedCursor::create):
              (WebCore::SharedCursor::~SharedCursor):
              (WebCore::SharedCursor::SharedCursor):
              * platform/DragData.h:
              * platform/PopupMenu.h:
              (WebCore::PopupMenu::create):
              (WebCore::PopupMenu::isActive):
              * platform/ScrollBar.cpp:
              (WebCore::Scrollbar::Scrollbar):
              * platform/SearchPopupMenu.h:
              (WebCore::SearchPopupMenu::create):
              * platform/graphics/FontFamily.cpp:
              (WebCore::FontFamily::FontFamily):
              (WebCore::operator==):
              * platform/graphics/FontFamily.h:
              (WebCore::FontFamily::FontFamily):
              (WebCore::SharedFontFamily::create):
              (WebCore::SharedFontFamily::SharedFontFamily):
              (WebCore::operator!=):
              (WebCore::FontFamily::next):
              (WebCore::FontFamily::appendFamily):
              (WebCore::FontFamily::releaseNext):
              * platform/graphics/Icon.h:
              * platform/graphics/gtk/IconGtk.cpp:
              (WebCore::Icon::Icon):
              (WebCore::Icon::~Icon):
              (WebCore::Icon::newIconForFile):
              * platform/graphics/mac/IconMac.mm:
              (WebCore::Icon::Icon):
              (WebCore::Icon::newIconForFile):
              * platform/graphics/qt/IconQt.cpp:
              (WebCore::Icon::Icon):
              (WebCore::Icon::newIconForFile):
              * platform/graphics/win/IconWin.cpp:
              (WebCore::Icon::Icon):
              (WebCore::Icon::~Icon):
              (WebCore::Icon::newIconForFile):
              * platform/gtk/ClipboardGtk.cpp:
              (WebCore::Editor::newGeneralClipboard):
              * platform/gtk/ClipboardGtk.h:
              (WebCore::ClipboardGtk::create):
              * platform/gtk/PlatformScrollBar.h:
              (WebCore::PlatformScrollbar::create):
              * platform/gtk/PopupMenuGtk.cpp:
              (WebCore::PopupMenu::PopupMenu):
              * platform/gtk/ScrollViewGtk.cpp:
              (WebCore::ScrollViewScrollbar::create):
              (WebCore::ScrollView::ScrollViewPrivate::setHasHorizontalScrollbar):
              (WebCore::ScrollView::ScrollViewPrivate::setHasVerticalScrollbar):
              * platform/mac/ClipboardMac.h:
              (WebCore::ClipboardMac::create):
              * platform/mac/DragDataMac.mm:
              (WebCore::DragData::createClipboard):
              (WebCore::DragData::containsCompatibleContent):
              * platform/mac/PlatformScrollBar.h:
              (WebCore::PlatformScrollbar::create):
              (WebCore::PlatformScrollbar::horizontalScrollbarHeight):
              (WebCore::PlatformScrollbar::verticalScrollbarWidth):
              * platform/mac/PopupMenuMac.mm:
              (WebCore::PopupMenu::PopupMenu):
              * platform/qt/ClipboardQt.h:
              (WebCore::ClipboardQt::create):
              * platform/qt/DragDataQt.cpp:
              (WebCore::DragData::createClipboard):
              * platform/qt/PlatformScrollBar.h:
              (WebCore::PlatformScrollbar::create):
              * platform/qt/PopupMenuQt.cpp:
              (WebCore::PopupMenu::PopupMenu):
              * platform/qt/ScrollViewQt.cpp:
              (WebCore::ScrollView::ScrollViewPrivate::setHasHorizontalScrollbar):
              (WebCore::ScrollView::ScrollViewPrivate::setHasVerticalScrollbar):
              * platform/win/ClipboardWin.h:
              (WebCore::ClipboardWin::create):
              * platform/win/CursorWin.cpp:
              (WebCore::Cursor::Cursor):
              (WebCore::loadSharedCursor):
              * platform/win/DragDataWin.cpp:
              (WebCore::DragData::createClipboard):
              * platform/win/EditorWin.cpp:
              (WebCore::Editor::newGeneralClipboard):
              * platform/win/PlatformScrollBar.h:
              (WebCore::PlatformScrollbar::create):
              * platform/win/PopupMenuWin.cpp:
              (WebCore::PopupMenu::PopupMenu):
              (WebCore::PopupMenu::show):
              * platform/win/ScrollViewWin.cpp:
              (WebCore::ScrollView::ScrollViewPrivate::setHasHorizontalScrollbar):
              (WebCore::ScrollView::ScrollViewPrivate::setHasVerticalScrollbar):
              * platform/wx/ClipboardWx.h:
              (WebCore::ClipboardWx::create):
              * platform/wx/PlatformScrollBar.h:
              (WebCore::PlatformScrollbar::create):
              * platform/wx/PopupMenuWx.cpp:
              (WebCore::PopupMenu::PopupMenu):
              * platform/wx/TemporaryLinkStubs.cpp:
              (Icon::Icon):
              (Icon::newIconForFile):
              * rendering/RenderLayer.cpp:
              (WebCore::RenderLayer::createScrollbar):
              * rendering/RenderListBox.cpp:
              (WebCore::RenderListBox::updateFromElement):
              * svg/graphics/SVGImage.cpp:
              (WebCore::SVGImage::dataChanged):
              * svg/graphics/SVGImageEmptyClients.h:
              (WebCore::SVGEmptyFrameLoaderClient::createDocumentLoader):
      
      WebKit/gtk:
      
      2008-06-14  Darin Adler  <darin@apple.com>
      
              Reviewed by Sam.
      
              - more https://bugs.webkit.org/show_bug.cgi?id=17257
                start ref counts at 1 instead of 0 for speed
      
              * WebCoreSupport/FrameLoaderClientGtk.cpp:
              (WebKit::FrameLoaderClient::createDocumentLoader): Use create instead of new.
              * webkit/webkitwebframe.cpp:
              (webkit_web_frame_new): Ditto.
              (webkit_web_frame_init_with_web_view): Ditto.
      
      WebKit/mac:
      
      2008-06-14  Darin Adler  <darin@apple.com>
      
              Reviewed by Sam.
      
              - more of https://bugs.webkit.org/show_bug.cgi?id=17257
                start ref counts at 1 instead of 0 for speed
      
              * WebCoreSupport/WebFrameLoaderClient.mm:
              (WebFrameLoaderClient::createDocumentLoader): Use create instead of new.
              (WebFrameLoaderClient::createFrame): Remove now-obsolete adoptRef that was balanced by
              a ref call inside the Frame constructor. The lifetime rules for Frame are now the
              conventional ones without a special case.
      
              * WebView/WebDataSource.mm:
              (-[WebDataSource _initWithDocumentLoader:]): Changed argument to be a PassRefPtr, since
              this function takes ownership of the DocumentLoader.
              (-[WebDataSource initWithRequest:]): Use create instead of new.
              * WebView/WebDataSourceInternal.h: Changed _initWithDocumentLoader argument to be a
              PassRefPtr and also cleaned up the header a bit.
      
              * WebView/WebDocumentLoaderMac.h:
              (WebDocumentLoaderMac::create): Added. Also made the constructor and a couple of virtual
              functions private.
      
              * WebView/WebFrame.mm:
              (+[WebFrame _createFrameWithPage:frameName:frameView:ownerElement:]): Use create instead
              of new.
      
      WebKit/qt:
      
      2008-06-14  Darin Adler  <darin@apple.com>
      
              Reviewed by Sam.
      
              - more https://bugs.webkit.org/show_bug.cgi?id=17257
                start ref counts at 1 instead of 0 for speed
      
              * Api/qwebframe.cpp:
              (QWebFramePrivate::init): Use create instead of new.
              * WebCoreSupport/FrameLoaderClientQt.cpp:
              (WebCore::FrameLoaderClientQt::createDocumentLoader): Ditto.
      
      WebKit/win:
      
      2008-06-14  Darin Adler  <darin@apple.com>
      
              Reviewed by Sam.
      
              - more of https://bugs.webkit.org/show_bug.cgi?id=17257
                start ref counts at 1 instead of 0 for speed
      
              * WebCoreSupport/WebFrameLoaderClient.cpp:
              (WebFrameLoaderClient::createFrame): Remove now-obsolete adoptRef that was balanced by
              a ref call inside the Frame constructor. The lifetime rules for Frame are now the
              conventional ones without a special case.
      
              * WebFrame.cpp:
              (WebFrame::init): Renamed function from initWithWebFrameView and removed the unused
              IWebFrameView argument (every caller was passing 0). Also changed this to return the
              WebCore Frame object, which is needed to straighten out the lifetime and ownership
              issues.
              * WebFrame.h: Ditto.
      
              * WebView.cpp:
              (WebView::initWithFrame): Changed to call new init function and use the return value.
      
      WebKit/wx:
      
      2008-06-14  Darin Adler  <darin@apple.com>
      
              Reviewed by Sam.
      
              - more https://bugs.webkit.org/show_bug.cgi?id=17257
                start ref counts at 1 instead of 0 for speed
      
              * WebKitSupport/FrameLoaderClientWx.cpp:
              (WebCore::FrameLoaderClientWx::createDocumentLoader): Use create function
              instead of new.
      
      LayoutTests:
      
      2008-06-14  Darin Adler  <darin@apple.com>
      
              Reviewed by Maciej.
      
              - test for https://bugs.webkit.org/show_bug.cgi?id=19538
                <rdar://problem/5957595> Reading transition property from the style JS gives the wrong value
      
              * fast/dom/CSSStyleDeclaration/resources/transition-property-names.js: Added.
              * fast/dom/CSSStyleDeclaration/transition-property-names-expected.txt: Added.
              * fast/dom/CSSStyleDeclaration/transition-property-names.html: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34544 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d5ceaf86
  25. 15 Apr, 2008 1 commit
    • hausmann@webkit.org's avatar
      Fix compilation with Qt namespaces · 511b001e
      hausmann@webkit.org authored
      Qt can be configured to have all of its classes inside a specified namespaces.
      This is for example used in plugin/component environments like Eclipse.
      
      This change makes it possible to let the Qt port compile against a namespaced
      Qt by the use of macros Qt provides to properly forward declare Qt classes in
      the namespace.
      
      Signed-off-by: Simon
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@31899 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      511b001e
  26. 28 Oct, 2007 1 commit
  27. 23 Sep, 2007 1 commit
    • zecke's avatar
      /: · 2752405f
      zecke authored
      2007-09-20  Holger Hans Peter Freyther  <zecke@selfish.org>
      
              Rubber stamped by Adam.
      
              Renamed files from *Gdk to *Gtk (see #14732) using the
              work of Juan A. Suarez Romero as a base.
      
              GDK -> GTK
      
              * WebKit.pri:
              * WebKit.pro:
      
      JavaScriptCore:
      2007-09-20  Holger Hans Peter Freyther  <zecke@selfish.org>
      
              Rubber stamped by Adam.
      
              Renamed files from *Gdk to *Gtk (see #14732) using the
              work of Juan A. Suarez Romero as a base.
      
              GDK -> GTK 
      
              * JavaScriptCore.pri:
              * kjs/testkjs.pro:
              * pcre/dftables.pro:
              * wtf/Platform.h: PLATFORM(GDK) to PLATFORM(GTK)
      
      WebCore:
      2007-09-20  Holger Hans Peter Freyther  <zecke@selfish.org>
      
              Rubber stamped by Adam.
      
              Renamed files from *Gdk to *Gtk (see #14732) using the
              work of Juan A. Suarez Romero as a base.
      
              GDK -> GTK
      
              * Projects/gdk/webcore-gdk.bkl:
              * WebCore.pro:
              * WebCoreSources.bkl:
              * loader/gdk: Removed.
              * loader/gdk/DocumentLoaderGdk.cpp: Removed.
              * loader/gtk: Added.
              * loader/gtk/DocumentLoaderGdk.cpp: Removed.
              * loader/gtk/DocumentLoaderGtk.cpp: Added.
              * page/FrameView.cpp:
              * page/FrameView.h:
              * page/gdk: Removed.
              * page/gdk/DragControllerGdk.cpp: Removed.
              * page/gdk/EventHandlerGdk.cpp: Removed.
              * page/gdk/FrameGdk.cpp: Removed.
              * page/gtk: Added.
              * page/gtk/DragControllerGdk.cpp: Removed.
              * page/gtk/DragControllerGtk.cpp: Added.
              * page/gtk/EventHandlerGdk.cpp: Removed.
              * page/gtk/EventHandlerGtk.cpp: Added.
              (WebCore::EventHandler::createDraggingClipboard):
              * page/gtk/FrameGdk.cpp: Removed.
              * page/gtk/FrameGtk.cpp: Added.
              * platform/ContextMenuItem.h:
              * platform/Cursor.h:
              * platform/DragData.h:
              * platform/DragImage.h:
              * platform/FontData.h:
              * platform/NotImplemented.h:
              * platform/PlatformKeyboardEvent.h:
              * platform/PlatformMenuDescription.h:
              * platform/PlatformMouseEvent.h:
              * platform/PlatformWheelEvent.h:
              * platform/ScrollView.h:
              * platform/Widget.h:
              * platform/gdk: Removed.
              * platform/gdk/ClipboardGdk.cpp: Removed.
              * platform/gdk/ClipboardGdk.h: Removed.
              * platform/gdk/ContextMenuGdk.cpp: Removed.
              * platform/gdk/ContextMenuItemGdk.cpp: Removed.
              * platform/gdk/CookieJarGdk.cpp: Removed.
              * platform/gdk/CursorGdk.cpp: Removed.
              * platform/gdk/DragDataGdk.cpp: Removed.
              * platform/gdk/DragImageGdk.cpp: Removed.
              * platform/gdk/FileChooserGdk.cpp: Removed.
              * platform/gdk/FileSystemGdk.cpp: Removed.
              * platform/gdk/FontCacheGdk.cpp: Removed.
              * platform/gdk/FontDataGdk.cpp: Removed.
              * platform/gdk/FontGdk.cpp: Removed.
              * platform/gdk/FontPlatformData.h: Removed.
              * platform/gdk/FontPlatformDataGdk.cpp: Removed.
              * platform/gdk/GlyphPageTreeNodeGdk.cpp: Removed.
              * platform/gdk/KeyEventGdk.cpp: Removed.
              * platform/gdk/KeyboardCodes.h: Removed.
              * platform/gdk/LocalizedStringsGdk.cpp: Removed.
              * platform/gdk/LoggingGdk.cpp: Removed.
              * platform/gdk/MIMETypeRegistryGdk.cpp: Removed.
              * platform/gdk/MouseEventGdk.cpp: Removed.
              * platform/gdk/PasteboardGdk.cpp: Removed.
              * platform/gdk/PlatformScreenGdk.cpp: Removed.
              * platform/gdk/PlatformScrollBar.h: Removed.
              * platform/gdk/PlatformScrollBarGdk.cpp: Removed.
              * platform/gdk/PopupMenuGdk.cpp: Removed.
              * platform/gdk/RenderThemeGdk.cpp: Removed.
              * platform/gdk/RenderThemeGdk.h: Removed.
              * platform/gdk/ScrollViewGdk.cpp: Removed.
              * platform/gdk/SearchPopupMenuGdk.cpp: Removed.
              * platform/gdk/SharedTimerLinux.cpp: Removed.
              * platform/gdk/SoundGdk.cpp: Removed.
              * platform/gdk/SystemTimeLinux.cpp: Removed.
              * platform/gdk/TemporaryLinkStubs.cpp: Removed.
              * platform/gdk/WheelEventGdk.cpp: Removed.
              * platform/gdk/WidgetGdk.cpp: Removed.
              * platform/graphics/GraphicsContext.h:
              * platform/graphics/cairo/GraphicsContextCairo.cpp:
              (WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate):
              (WebCore::GraphicsContext::setPlatformFont):
              * platform/graphics/gdk: Removed.
              * platform/graphics/gdk/IconGdk.cpp: Removed.
              * platform/graphics/gdk/ImageGdk.cpp: Removed.
              * platform/graphics/gtk: Added.
              * platform/graphics/gtk/IconGdk.cpp: Removed.
              * platform/graphics/gtk/IconGtk.cpp: Added.
              * platform/graphics/gtk/ImageGdk.cpp: Removed.
              * platform/graphics/gtk/ImageGtk.cpp: Added.
              * platform/gtk: Added.
              * platform/gtk/ClipboardGdk.cpp: Removed.
              * platform/gtk/ClipboardGdk.h: Removed.
              * platform/gtk/ClipboardGtk.cpp: Added.
              (WebCore::ClipboardGtk::ClipboardGtk):
              (WebCore::ClipboardGtk::~ClipboardGtk):
              (WebCore::ClipboardGtk::clearData):
              (WebCore::ClipboardGtk::clearAllData):
              (WebCore::ClipboardGtk::getData):
              (WebCore::ClipboardGtk::setData):
              (WebCore::ClipboardGtk::types):
              (WebCore::ClipboardGtk::dragLocation):
              (WebCore::ClipboardGtk::dragImage):
              (WebCore::ClipboardGtk::setDragImage):
              (WebCore::ClipboardGtk::dragImageElement):
              (WebCore::ClipboardGtk::setDragImageElement):
              (WebCore::ClipboardGtk::createDragImage):
              (WebCore::ClipboardGtk::declareAndWriteDragImage):
              (WebCore::ClipboardGtk::writeURL):
              (WebCore::ClipboardGtk::writeRange):
              (WebCore::ClipboardGtk::hasData):
              * platform/gtk/ClipboardGtk.h: Added.
              * platform/gtk/ContextMenuGdk.cpp: Removed.
              * platform/gtk/ContextMenuGtk.cpp: Added.
              * platform/gtk/ContextMenuItemGdk.cpp: Removed.
              * platform/gtk/ContextMenuItemGtk.cpp: Added.
              * platform/gtk/CookieJarGdk.cpp: Removed.
              * platform/gtk/CookieJarGtk.cpp: Added.
              * platform/gtk/CursorGdk.cpp: Removed.
              * platform/gtk/CursorGtk.cpp: Added.
              * platform/gtk/DragDataGdk.cpp: Removed.
              * platform/gtk/DragDataGtk.cpp: Added.
              * platform/gtk/DragImageGdk.cpp: Removed.
              * platform/gtk/DragImageGtk.cpp: Added.
              * platform/gtk/FileChooserGdk.cpp: Removed.
              * platform/gtk/FileChooserGtk.cpp: Added.
              * platform/gtk/FileSystemGdk.cpp: Removed.
              * platform/gtk/FileSystemGtk.cpp: Added.
              * platform/gtk/FontCacheGdk.cpp: Removed.
              * platform/gtk/FontCacheGtk.cpp: Added.
              * platform/gtk/FontDataGdk.cpp: Removed.
              * platform/gtk/FontDataGtk.cpp: Added.
              * platform/gtk/FontGdk.cpp: Removed.
              * platform/gtk/FontGtk.cpp: Added.
              * platform/gtk/FontPlatformDataGdk.cpp: Removed.
              * platform/gtk/FontPlatformDataGtk.cpp: Added.
              * platform/gtk/GlyphPageTreeNodeGdk.cpp: Removed.
              * platform/gtk/GlyphPageTreeNodeGtk.cpp: Added.
              * platform/gtk/KeyEventGdk.cpp: Removed.
              * platform/gtk/KeyEventGtk.cpp: Added.
              * platform/gtk/LocalizedStringsGdk.cpp: Removed.
              * platform/gtk/LocalizedStringsGtk.cpp: Added.
              * platform/gtk/LoggingGdk.cpp: Removed.
              * platform/gtk/LoggingGtk.cpp: Added.
              * platform/gtk/MIMETypeRegistryGdk.cpp: Removed.
              * platform/gtk/MIMETypeRegistryGtk.cpp: Added.
              * platform/gtk/MouseEventGdk.cpp: Removed.
              * platform/gtk/MouseEventGtk.cpp: Added.
              * platform/gtk/PasteboardGdk.cpp: Removed.
              * platform/gtk/PasteboardGtk.cpp: Added.
              * platform/gtk/PlatformScreenGdk.cpp: Removed.
              * platform/gtk/PlatformScreenGtk.cpp: Added.
              * platform/gtk/PlatformScrollBarGdk.cpp: Removed.
              * platform/gtk/PlatformScrollBarGtk.cpp: Added.
              * platform/gtk/PopupMenuGdk.cpp: Removed.
              * platform/gtk/PopupMenuGtk.cpp: Added.
              * platform/gtk/RenderThemeGdk.cpp: Removed.
              * platform/gtk/RenderThemeGdk.h: Removed.
              * platform/gtk/RenderThemeGtk.cpp: Added.
              (WebCore::theme):
              (WebCore::RenderThemeGtk::RenderThemeGtk):
              (WebCore::RenderThemeGtk::close):
              (WebCore::RenderThemeGtk::addIntrinsicMargins):
              (WebCore::RenderThemeGtk::supportsFocus):
              (WebCore::RenderThemeGtk::determineState):
              (WebCore::RenderThemeGtk::determineShadow):
              (WebCore::RenderThemeGtk::getThemeData):
              (WebCore::RenderThemeGtk::setCheckboxSize):
              (WebCore::RenderThemeGtk::paintCheckbox):
              (WebCore::RenderThemeGtk::setRadioSize):
              (WebCore::RenderThemeGtk::paintRadio):
              (WebCore::RenderThemeGtk::paintButton):
              (WebCore::RenderThemeGtk::adjustTextFieldStyle):
              (WebCore::RenderThemeGtk::paintTextField):
              (WebCore::RenderThemeGtk::paintTextArea):
              (WebCore::RenderThemeGtk::adjustButtonStyle):
              (WebCore::RenderThemeGtk::systemFont):
              (WebCore::RenderThemeGtk::gtkButton):
              (WebCore::RenderThemeGtk::gtkCheckbox):
              (WebCore::RenderThemeGtk::gtkRadioButton):
              (WebCore::RenderThemeGtk::gtkWindowContainer):
              * platform/gtk/RenderThemeGtk.h: Added.
              * platform/gtk/ScrollViewGdk.cpp: Removed.
              * platform/gtk/ScrollViewGtk.cpp: Added.
              * platform/gtk/SearchPopupMenuGdk.cpp: Removed.
              * platform/gtk/SearchPopupMenuGtk.cpp: Added.
              * platform/gtk/SoundGdk.cpp: Removed.
              * platform/gtk/SoundGtk.cpp: Added.
              * platform/gtk/WheelEventGdk.cpp: Removed.
              * platform/gtk/WheelEventGtk.cpp: Added.
              * platform/gtk/WidgetGdk.cpp: Removed.
              * platform/gtk/WidgetGtk.cpp: Added.
              * platform/network/ResourceHandle.h:
      
      WebKitTools:
      2007-09-20  Holger Hans Peter Freyther  <zecke@selfish.org>
      
              Rubber stamped by Adam.
      
              * GdkLauncher: Removed.
              * GdkLauncher/Bakefiles.bkgen: Removed.
              * GdkLauncher/ENV: Removed.
              * GdkLauncher/GdkLauncher.pro: Removed.
              * GdkLauncher/gdklauncher.bkl: Removed.
              * GdkLauncher/main.cpp: Removed.
              * GdkLauncher/mk: Removed.
              * GdkLauncher/simple.svg: Removed.
              * GdkLauncher/text.html: Removed.
              * GtkLauncher: Added.
              * GtkLauncher/GdkLauncher.pro: Removed.
              * GtkLauncher/GtkLauncher.pro: Added.
              * GtkLauncher/main.cpp:
              (updateWindowTitle):
              (main):
              * Scripts/build-webkit:
              * Scripts/regenerate-makefiles:
              * Scripts/run-javascriptcore-tests:
              * Scripts/run-launcher:
              * Scripts/run-webkit-tests:
              * Scripts/webkitdirs.pm:
      
      
      
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@25703 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2752405f
  28. 12 May, 2007 1 commit
    • oliver's avatar
      2007-05-12 Oliver Hunt <oliver@apple.com> · 52e744de
      oliver authored
      LayoutTests:
      
              Reviewed by Hyatt.
              
              Add test to verify files can be dragged to <input type="file">
      
              * fast/forms/dragging-to-file-input-expected.txt: Added.
              * fast/forms/dragging-to-file-input.html: Added.
      
      WebCore:
      
              Reviewed by Hyatt.
      
              <rdar://problem/4728842> Can't drag-and-drop files onto <input type="file">
              
              This patch allows a file to be dropped on to a file input field.  There
              are a few changes for data handling and a  few to allow the data to be
              threaded to the appropriate places.
      
              * page/DragController.cpp:
              (WebCore::asFileInput):
                 When dropping a file onto a file input we may mouse over either 
                 the element itself, or the contained button element.  This method
                 returns the base element for the file input in either of these
                 cases.
              (WebCore::DragController::tryDocumentDrag):
                 Don't try to set the drag caret to a file input.
              (WebCore::DragController::concludeDrag):
                 Handle dropping onto a file input element.
              (WebCore::DragController::canProcessDrag):
                 We can now process a file being dragged onto a file input element.
                 
              * platform/DragData.h:
                 New accessors
                 
              * platform/gdk/DragDataGdk.cpp:
              (WebCore::DragData::containsFiles):
              (WebCore::DragData::asFilenames):
                 Link stubs.
                 
              * platform/mac/DragDataMac.mm:
              (WebCore::DragData::containsFiles):
              (WebCore::DragData::asFilenames):
                 Implement new accessors
              (WebCore::DragData::containsCompatibleContent):
                 Update containsCompatibleContent to allow standalone files.
                
              * platform/qt/DragDataQt.cpp:
              (WebCore::DragData::containsFiles):
              (WebCore::DragData::asFilenames):
                 Link stubs
                            
              * rendering/RenderFileUploadControl.cpp:
              (WebCore::RenderFileUploadControl::receiveDroppedFile):
              * rendering/RenderFileUploadControl.h:
                 For security reasons we don't have an api to allow us to set 
                 a value directly on a file input -- attempts to do so are
                 blocked.  By adding a method to set the target through the 
                 render we bypass such restrictions, and ensure the renderer
                 is updated correctly.
      
      WebKitTools:
      
              Reviewed by Hyatt.
              
              Add new api to DRT to allow us to test a file being dragged 
              onto <input type="file">
      
              * DumpRenderTree/DumpRenderTree.h:
              * DumpRenderTree/DumpRenderTree.m:
              (+[LayoutTestController isSelectorExcludedFromWebScript:]):
              (-[LayoutTestController addFileToPasteboardOnDrag]):
              (runTest):
              * DumpRenderTree/UIDelegate.m:
              (-[UIDelegate webView:dragImage:at:offset:event:pasteboard:source:slideBack:forView:]):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@21437 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      52e744de
  29. 29 Apr, 2007 1 commit
    • oliver's avatar
      2007-04-29 Oliver Hunt <oliver@apple.com> · cadb62d9
      oliver authored
              Drag and drop support for WebKit/Qt
      
      WebCore:
      
              Reviewed by Zack.
      
              Implement basic drag and drop support for qt
              this allows content and link dragging but does not
              provide the DOM data access methods.
      
              * platform/DragData.h:
              * platform/qt/ClipboardQt.cpp:
              (WebCore::ClipboardQt::ClipboardQt):
              (WebCore::ClipboardQt::~ClipboardQt):
              (WebCore::ClipboardQt::clearData):
              (WebCore::ClipboardQt::clearAllData):
              (WebCore::ClipboardQt::setData):
              (WebCore::ClipboardQt::declareAndWriteDragImage):
              (WebCore::ClipboardQt::writeURL):
              (WebCore::ClipboardQt::writeRange):
              (WebCore::ClipboardQt::hasData):
              * platform/qt/ClipboardQt.h:
              (WebCore::ClipboardQt::clipboardData):
              (WebCore::ClipboardQt::invalidateWritableData):
              * platform/qt/DragDataQt.cpp:
              (WebCore::DragData::canSmartReplace):
              (WebCore::DragData::containsPlainText):
              (WebCore::DragData::asPlainText):
              (WebCore::DragData::createClipboard):
              (WebCore::DragData::containsCompatibleContent):
              (WebCore::DragData::containsURL):
              (WebCore::DragData::asURL):
              (WebCore::DragData::asFragment):
      
      WebKitQt:
      
              Reviewed by Zack.
      
              Tie QT drag events to the DragController logic
              to allow drag and drop events to be handled by
              webkit.
      
              * Api/qwebframe.cpp:
              * Api/qwebframe.h:
              * Api/qwebpage.cpp:
              (QWebPagePrivate::QWebPagePrivate):
              (QWebPage::QWebPage):
              (dropActionToDragOp):
              (dragOpToDropAction):
              (QWebPage::dragEnterEvent):
              (QWebPage::dragLeaveEvent):
              (QWebPage::dragMoveEvent):
              (QWebPage::dropEvent):
              * Api/qwebpage.h:
              * WebCoreSupport/DragClientQt.cpp:
              (WebCore::DragClientQt::startDrag):
              * WebCoreSupport/DragClientQt.h:
              (WebCore::DragClientQt::DragClientQt):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@21180 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      cadb62d9
  30. 07 Feb, 2007 1 commit
  31. 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