From adb2d8669b01850e923f2e53ed28639684232a51 Mon Sep 17 00:00:00 2001 From: "abarth@webkit.org" Date: Sun, 25 Sep 2011 19:35:21 +0000 Subject: [PATCH] Remove PLATFORM(HAIKU) and associated code 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 --- ChangeLog | 10 + Source/JavaScriptCore/ChangeLog | 19 + .../JavaScriptCore.gyp/JavaScriptCore.gyp | 1 - Source/JavaScriptCore/JavaScriptCore.gypi | 4 +- Source/JavaScriptCore/gyp/JavaScriptCore.gyp | 2 +- Source/JavaScriptCore/heap/MachineStackMarker.cpp | 6 - Source/JavaScriptCore/wtf/PageAllocation.h | 4 - Source/JavaScriptCore/wtf/Platform.h | 23 +- Source/JavaScriptCore/wtf/StackBounds.cpp | 18 +- .../JavaScriptCore/wtf/haiku/MainThreadHaiku.cpp | 48 - Source/JavaScriptCore/wtf/haiku/StringHaiku.cpp | 51 - Source/JavaScriptCore/wtf/text/WTFString.h | 9 - Source/WebCore/ChangeLog | 109 ++ Source/WebCore/WebCore.gyp/WebCore.gyp | 8 +- Source/WebCore/WebCore.gypi | 60 -- .../WebCore/bindings/js/ScriptControllerHaiku.cpp | 45 - Source/WebCore/editing/haiku/EditorHaiku.cpp | 44 - Source/WebCore/gyp/WebCore.gyp | 4 +- Source/WebCore/loader/cache/CachedFont.cpp | 2 +- Source/WebCore/page/EventHandler.cpp | 2 +- Source/WebCore/page/haiku/DragControllerHaiku.cpp | 76 -- Source/WebCore/page/haiku/EventHandlerHaiku.cpp | 141 --- Source/WebCore/page/haiku/FrameHaiku.cpp | 48 - Source/WebCore/platform/ContextMenuItem.h | 4 - Source/WebCore/platform/Cursor.h | 4 - Source/WebCore/platform/DragData.h | 3 - Source/WebCore/platform/DragImage.h | 4 - Source/WebCore/platform/PlatformKeyboardEvent.h | 8 - Source/WebCore/platform/PlatformMenuDescription.h | 4 - Source/WebCore/platform/PlatformMouseEvent.h | 8 - Source/WebCore/platform/Widget.h | 16 - Source/WebCore/platform/graphics/BitmapImage.h | 8 - Source/WebCore/platform/graphics/Color.h | 9 - Source/WebCore/platform/graphics/FloatPoint.h | 9 - Source/WebCore/platform/graphics/FloatRect.h | 9 - Source/WebCore/platform/graphics/Gradient.h | 3 - .../WebCore/platform/graphics/GraphicsContext.cpp | 2 +- Source/WebCore/platform/graphics/GraphicsContext.h | 8 - Source/WebCore/platform/graphics/ImageBufferData.h | 2 - Source/WebCore/platform/graphics/ImageSource.h | 4 - Source/WebCore/platform/graphics/IntPoint.h | 5 - Source/WebCore/platform/graphics/IntRect.h | 5 - Source/WebCore/platform/graphics/IntSize.h | 7 - Source/WebCore/platform/graphics/Path.h | 3 - Source/WebCore/platform/graphics/Pattern.h | 3 - Source/WebCore/platform/graphics/SimpleFontData.h | 4 - .../WebCore/platform/graphics/haiku/ColorHaiku.cpp | 46 - .../platform/graphics/haiku/FloatPointHaiku.cpp | 48 - .../platform/graphics/haiku/FloatRectHaiku.cpp | 49 - .../platform/graphics/haiku/FontCacheHaiku.cpp | 81 -- .../graphics/haiku/FontCustomPlatformData.cpp | 50 - .../graphics/haiku/FontCustomPlatformData.h | 50 - .../WebCore/platform/graphics/haiku/FontHaiku.cpp | 125 --- .../platform/graphics/haiku/FontPlatformData.h | 81 -- .../graphics/haiku/GlyphPageTreeNodeHaiku.cpp | 68 -- .../platform/graphics/haiku/GradientHaiku.cpp | 73 -- .../graphics/haiku/GraphicsContextHaiku.cpp | 548 ---------- .../WebCore/platform/graphics/haiku/IconHaiku.cpp | 51 - .../platform/graphics/haiku/ImageBufferDataHaiku.h | 44 - .../platform/graphics/haiku/ImageBufferHaiku.cpp | 380 ------- .../WebCore/platform/graphics/haiku/ImageHaiku.cpp | 195 ---- .../platform/graphics/haiku/IntPointHaiku.cpp | 48 - .../platform/graphics/haiku/IntRectHaiku.cpp | 48 - .../platform/graphics/haiku/IntSizeHaiku.cpp | 48 - .../WebCore/platform/graphics/haiku/PathHaiku.cpp | 164 --- .../graphics/haiku/SimpleFontDataHaiku.cpp | 123 --- .../platform/graphics/haiku/StillImageHaiku.cpp | 78 -- .../platform/graphics/haiku/StillImageHaiku.h | 58 -- Source/WebCore/platform/haiku/ClipboardHaiku.cpp | 217 ---- Source/WebCore/platform/haiku/ClipboardHaiku.h | 74 -- Source/WebCore/platform/haiku/ContextMenuHaiku.cpp | 122 --- .../platform/haiku/ContextMenuItemHaiku.cpp | 164 --- Source/WebCore/platform/haiku/CookieJarHaiku.cpp | 94 -- Source/WebCore/platform/haiku/CursorHaiku.cpp | 271 ----- Source/WebCore/platform/haiku/DragDataHaiku.cpp | 102 -- Source/WebCore/platform/haiku/DragImageHaiku.cpp | 74 -- Source/WebCore/platform/haiku/EventLoopHaiku.cpp | 41 - Source/WebCore/platform/haiku/FileSystemHaiku.cpp | 94 -- .../platform/haiku/LocalizedStringsHaiku.cpp | 506 --------- Source/WebCore/platform/haiku/LoggingHaiku.cpp | 48 - .../platform/haiku/MIMETypeRegistryHaiku.cpp | 97 -- Source/WebCore/platform/haiku/PasteboardHaiku.cpp | 227 ---- .../platform/haiku/PlatformKeyboardEventHaiku.cpp | 390 ------- .../platform/haiku/PlatformMouseEventHaiku.cpp | 80 -- .../platform/haiku/PlatformWheelEventHaiku.cpp | 63 -- Source/WebCore/platform/haiku/PopupMenuHaiku.cpp | 192 ---- Source/WebCore/platform/haiku/PopupMenuHaiku.h | 55 - Source/WebCore/platform/haiku/RenderThemeHaiku.cpp | 178 ---- Source/WebCore/platform/haiku/RenderThemeHaiku.h | 70 -- Source/WebCore/platform/haiku/ScreenHaiku.cpp | 86 -- .../WebCore/platform/haiku/ScrollbarThemeHaiku.cpp | 164 --- .../WebCore/platform/haiku/ScrollbarThemeHaiku.h | 55 - .../platform/haiku/SearchPopupMenuHaiku.cpp | 57 - .../WebCore/platform/haiku/SearchPopupMenuHaiku.h | 44 - .../WebCore/platform/haiku/SharedBufferHaiku.cpp | 51 - Source/WebCore/platform/haiku/SharedTimerHaiku.cpp | 123 --- Source/WebCore/platform/haiku/SoundHaiku.cpp | 42 - .../WebCore/platform/haiku/TemporaryLinkStubs.cpp | 96 -- Source/WebCore/platform/haiku/WidgetHaiku.cpp | 132 --- .../image-decoders/haiku/ImageDecoderHaiku.cpp | 74 -- Source/WebCore/platform/text/UnicodeRange.h | 4 - .../haiku/TextBreakIteratorInternalICUHaiku.cpp | 42 - Source/WebKit/ChangeLog | 22 + Source/WebKit/haiku/ChangeLog | 1096 -------------------- .../haiku/WebCoreSupport/ChromeClientHaiku.cpp | 410 -------- .../haiku/WebCoreSupport/ChromeClientHaiku.h | 167 --- .../WebCoreSupport/ContextMenuClientHaiku.cpp | 85 -- .../haiku/WebCoreSupport/ContextMenuClientHaiku.h | 53 - .../haiku/WebCoreSupport/DragClientHaiku.cpp | 68 -- .../WebKit/haiku/WebCoreSupport/DragClientHaiku.h | 45 - .../haiku/WebCoreSupport/EditorClientHaiku.cpp | 488 --------- .../haiku/WebCoreSupport/EditorClientHaiku.h | 127 --- .../WebCoreSupport/FrameLoaderClientHaiku.cpp | 865 --------------- .../haiku/WebCoreSupport/FrameLoaderClientHaiku.h | 258 ----- .../haiku/WebCoreSupport/InspectorClientHaiku.cpp | 77 -- .../haiku/WebCoreSupport/InspectorClientHaiku.h | 57 - Source/WebKit2/ChangeLog | 9 + .../WebKit2/Scripts/generate-forwarding-headers.pl | 2 +- Source/cmake/WebKitPackaging.cmake | 1 - Tools/ChangeLog | 10 + Tools/Scripts/webkitpy/common/config/build.py | 1 - Tools/waf/build/settings.py | 1 - wscript | 2 +- 123 files changed, 195 insertions(+), 11100 deletions(-) delete mode 100644 Source/JavaScriptCore/wtf/haiku/MainThreadHaiku.cpp delete mode 100644 Source/JavaScriptCore/wtf/haiku/StringHaiku.cpp delete mode 100644 Source/WebCore/bindings/js/ScriptControllerHaiku.cpp delete mode 100644 Source/WebCore/editing/haiku/EditorHaiku.cpp delete mode 100644 Source/WebCore/page/haiku/DragControllerHaiku.cpp delete mode 100644 Source/WebCore/page/haiku/EventHandlerHaiku.cpp delete mode 100644 Source/WebCore/page/haiku/FrameHaiku.cpp delete mode 100644 Source/WebCore/platform/graphics/haiku/ColorHaiku.cpp delete mode 100644 Source/WebCore/platform/graphics/haiku/FloatPointHaiku.cpp delete mode 100644 Source/WebCore/platform/graphics/haiku/FloatRectHaiku.cpp delete mode 100644 Source/WebCore/platform/graphics/haiku/FontCacheHaiku.cpp delete mode 100644 Source/WebCore/platform/graphics/haiku/FontCustomPlatformData.cpp delete mode 100644 Source/WebCore/platform/graphics/haiku/FontCustomPlatformData.h delete mode 100644 Source/WebCore/platform/graphics/haiku/FontHaiku.cpp delete mode 100644 Source/WebCore/platform/graphics/haiku/FontPlatformData.h delete mode 100644 Source/WebCore/platform/graphics/haiku/GlyphPageTreeNodeHaiku.cpp delete mode 100644 Source/WebCore/platform/graphics/haiku/GradientHaiku.cpp delete mode 100644 Source/WebCore/platform/graphics/haiku/GraphicsContextHaiku.cpp delete mode 100644 Source/WebCore/platform/graphics/haiku/IconHaiku.cpp delete mode 100644 Source/WebCore/platform/graphics/haiku/ImageBufferDataHaiku.h delete mode 100644 Source/WebCore/platform/graphics/haiku/ImageBufferHaiku.cpp delete mode 100644 Source/WebCore/platform/graphics/haiku/ImageHaiku.cpp delete mode 100644 Source/WebCore/platform/graphics/haiku/IntPointHaiku.cpp delete mode 100644 Source/WebCore/platform/graphics/haiku/IntRectHaiku.cpp delete mode 100644 Source/WebCore/platform/graphics/haiku/IntSizeHaiku.cpp delete mode 100644 Source/WebCore/platform/graphics/haiku/PathHaiku.cpp delete mode 100644 Source/WebCore/platform/graphics/haiku/SimpleFontDataHaiku.cpp delete mode 100644 Source/WebCore/platform/graphics/haiku/StillImageHaiku.cpp delete mode 100644 Source/WebCore/platform/graphics/haiku/StillImageHaiku.h delete mode 100644 Source/WebCore/platform/haiku/ClipboardHaiku.cpp delete mode 100644 Source/WebCore/platform/haiku/ClipboardHaiku.h delete mode 100644 Source/WebCore/platform/haiku/ContextMenuHaiku.cpp delete mode 100644 Source/WebCore/platform/haiku/ContextMenuItemHaiku.cpp delete mode 100644 Source/WebCore/platform/haiku/CookieJarHaiku.cpp delete mode 100644 Source/WebCore/platform/haiku/CursorHaiku.cpp delete mode 100644 Source/WebCore/platform/haiku/DragDataHaiku.cpp delete mode 100644 Source/WebCore/platform/haiku/DragImageHaiku.cpp delete mode 100644 Source/WebCore/platform/haiku/EventLoopHaiku.cpp delete mode 100644 Source/WebCore/platform/haiku/FileSystemHaiku.cpp delete mode 100644 Source/WebCore/platform/haiku/LocalizedStringsHaiku.cpp delete mode 100644 Source/WebCore/platform/haiku/LoggingHaiku.cpp delete mode 100644 Source/WebCore/platform/haiku/MIMETypeRegistryHaiku.cpp delete mode 100644 Source/WebCore/platform/haiku/PasteboardHaiku.cpp delete mode 100644 Source/WebCore/platform/haiku/PlatformKeyboardEventHaiku.cpp delete mode 100644 Source/WebCore/platform/haiku/PlatformMouseEventHaiku.cpp delete mode 100644 Source/WebCore/platform/haiku/PlatformWheelEventHaiku.cpp delete mode 100644 Source/WebCore/platform/haiku/PopupMenuHaiku.cpp delete mode 100644 Source/WebCore/platform/haiku/PopupMenuHaiku.h delete mode 100644 Source/WebCore/platform/haiku/RenderThemeHaiku.cpp delete mode 100644 Source/WebCore/platform/haiku/RenderThemeHaiku.h delete mode 100644 Source/WebCore/platform/haiku/ScreenHaiku.cpp delete mode 100644 Source/WebCore/platform/haiku/ScrollbarThemeHaiku.cpp delete mode 100644 Source/WebCore/platform/haiku/ScrollbarThemeHaiku.h delete mode 100644 Source/WebCore/platform/haiku/SearchPopupMenuHaiku.cpp delete mode 100644 Source/WebCore/platform/haiku/SearchPopupMenuHaiku.h delete mode 100644 Source/WebCore/platform/haiku/SharedBufferHaiku.cpp delete mode 100644 Source/WebCore/platform/haiku/SharedTimerHaiku.cpp delete mode 100644 Source/WebCore/platform/haiku/SoundHaiku.cpp delete mode 100644 Source/WebCore/platform/haiku/TemporaryLinkStubs.cpp delete mode 100644 Source/WebCore/platform/haiku/WidgetHaiku.cpp delete mode 100644 Source/WebCore/platform/image-decoders/haiku/ImageDecoderHaiku.cpp delete mode 100644 Source/WebCore/platform/text/haiku/TextBreakIteratorInternalICUHaiku.cpp delete mode 100644 Source/WebKit/haiku/ChangeLog delete mode 100644 Source/WebKit/haiku/WebCoreSupport/ChromeClientHaiku.cpp delete mode 100644 Source/WebKit/haiku/WebCoreSupport/ChromeClientHaiku.h delete mode 100644 Source/WebKit/haiku/WebCoreSupport/ContextMenuClientHaiku.cpp delete mode 100644 Source/WebKit/haiku/WebCoreSupport/ContextMenuClientHaiku.h delete mode 100644 Source/WebKit/haiku/WebCoreSupport/DragClientHaiku.cpp delete mode 100644 Source/WebKit/haiku/WebCoreSupport/DragClientHaiku.h delete mode 100644 Source/WebKit/haiku/WebCoreSupport/EditorClientHaiku.cpp delete mode 100644 Source/WebKit/haiku/WebCoreSupport/EditorClientHaiku.h delete mode 100644 Source/WebKit/haiku/WebCoreSupport/FrameLoaderClientHaiku.cpp delete mode 100644 Source/WebKit/haiku/WebCoreSupport/FrameLoaderClientHaiku.h delete mode 100644 Source/WebKit/haiku/WebCoreSupport/InspectorClientHaiku.cpp delete mode 100644 Source/WebKit/haiku/WebCoreSupport/InspectorClientHaiku.h diff --git a/ChangeLog b/ChangeLog index 594bc46..f0853f81 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2011-09-25 Adam Barth + + Remove PLATFORM(HAIKU) and associated code + https://bugs.webkit.org/show_bug.cgi?id=68774 + + Reviewed by Sam Weinig. + + * Source/cmake/WebKitPackaging.cmake: + * wscript: + 2011-09-25 Raphael Kubo da Costa [CMake] Remove FindLibXlst.cmake diff --git a/Source/JavaScriptCore/ChangeLog b/Source/JavaScriptCore/ChangeLog index bef64f4..0534779 100644 --- a/Source/JavaScriptCore/ChangeLog +++ b/Source/JavaScriptCore/ChangeLog @@ -1,3 +1,22 @@ +2011-09-25 Adam Barth + + Remove PLATFORM(HAIKU) and associated code + https://bugs.webkit.org/show_bug.cgi?id=68774 + + Reviewed by Sam Weinig. + + * 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: + 2011-09-24 Adam Barth Always enable ENABLE(OFFLINE_WEB_APPLICATIONS) diff --git a/Source/JavaScriptCore/JavaScriptCore.gyp/JavaScriptCore.gyp b/Source/JavaScriptCore/JavaScriptCore.gyp/JavaScriptCore.gyp index db7063c..4683657 100644 --- a/Source/JavaScriptCore/JavaScriptCore.gyp/JavaScriptCore.gyp +++ b/Source/JavaScriptCore/JavaScriptCore.gyp/JavaScriptCore.gyp @@ -129,7 +129,6 @@ ['exclude', '../wtf/efl'], ['exclude', '../wtf/gobject'], ['exclude', '../wtf/gtk'], - ['exclude', '../wtf/haiku'], ['exclude', '../wtf/mac'], ['exclude', '../wtf/qt'], ['exclude', '../wtf/url'], diff --git a/Source/JavaScriptCore/JavaScriptCore.gypi b/Source/JavaScriptCore/JavaScriptCore.gypi index 33235ea..2aa9cce 100644 --- a/Source/JavaScriptCore/JavaScriptCore.gypi +++ b/Source/JavaScriptCore/JavaScriptCore.gypi @@ -654,8 +654,6 @@ 'wtf/gobject/GTypedefs.h', 'wtf/gtk/MainThreadGtk.cpp', 'wtf/gtk/ThreadingGtk.cpp', - 'wtf/haiku/MainThreadHaiku.cpp', - 'wtf/haiku/StringHaiku.cpp', 'wtf/mac/MainThreadMac.mm', 'wtf/qt/MainThreadQt.cpp', 'wtf/qt/StringQt.cpp', @@ -666,7 +664,7 @@ 'wtf/text/StringImpl.cpp', 'wtf/text/StringStatics.cpp', 'wtf/text/WTFString.cpp', - 'wtf/threads/BinarySemaphore.cpp', + 'wtf/threads/BinarySemaphore.cpp', 'wtf/unicode/CollatorDefault.cpp', 'wtf/unicode/ScriptCodesFromICU.h', 'wtf/unicode/UTF8.cpp', diff --git a/Source/JavaScriptCore/gyp/JavaScriptCore.gyp b/Source/JavaScriptCore/gyp/JavaScriptCore.gyp index 23cccc7..c44cb2d 100644 --- a/Source/JavaScriptCore/gyp/JavaScriptCore.gyp +++ b/Source/JavaScriptCore/gyp/JavaScriptCore.gyp @@ -80,7 +80,7 @@ ['exclude', '(? #include -#elif OS(HAIKU) - -#include - #elif OS(UNIX) #include -#if !OS(HAIKU) #include -#endif #include #if OS(SOLARIS) diff --git a/Source/JavaScriptCore/wtf/PageAllocation.h b/Source/JavaScriptCore/wtf/PageAllocation.h index ff6f195..cbe52ab 100644 --- a/Source/JavaScriptCore/wtf/PageAllocation.h +++ b/Source/JavaScriptCore/wtf/PageAllocation.h @@ -38,10 +38,6 @@ #include #endif -#if OS(HAIKU) -#include -#endif - #if OS(WINDOWS) #include #include diff --git a/Source/JavaScriptCore/wtf/Platform.h b/Source/JavaScriptCore/wtf/Platform.h index b70c7c6..34f691c 100644 --- a/Source/JavaScriptCore/wtf/Platform.h +++ b/Source/JavaScriptCore/wtf/Platform.h @@ -351,11 +351,6 @@ #define WTF_OS_FREEBSD 1 #endif -/* OS(HAIKU) - Haiku */ -#ifdef __HAIKU__ -#define WTF_OS_HAIKU 1 -#endif - /* OS(LINUX) - Linux */ #ifdef __linux__ #define WTF_OS_LINUX 1 @@ -401,7 +396,6 @@ || OS(ANDROID) \ || OS(DARWIN) \ || OS(FREEBSD) \ - || OS(HAIKU) \ || OS(LINUX) \ || OS(NETBSD) \ || OS(OPENBSD) \ @@ -421,7 +415,6 @@ /* PLATFORM(QT) */ /* PLATFORM(WX) */ /* PLATFORM(GTK) */ -/* PLATFORM(HAIKU) */ /* PLATFORM(MAC) */ /* PLATFORM(WIN) */ #if defined(BUILDING_CHROMIUM__) @@ -432,8 +425,6 @@ #define WTF_PLATFORM_WX 1 #elif defined(BUILDING_GTK__) #define WTF_PLATFORM_GTK 1 -#elif defined(BUILDING_HAIKU__) -#define WTF_PLATFORM_HAIKU 1 #elif OS(DARWIN) #define WTF_PLATFORM_MAC 1 #elif OS(WINDOWS) @@ -630,15 +621,6 @@ #endif #endif -#if PLATFORM(HAIKU) -#define HAVE_POSIX_MEMALIGN 1 -#define WTF_USE_CURL 1 -#define WTF_USE_PTHREADS 1 -#define HAVE_PTHREAD_RWLOCK 1 -#define USE_SYSTEM_MALLOC 1 -#define ENABLE_NETSCAPE_PLUGIN_API 0 -#endif - #if !defined(HAVE_ACCESSIBILITY) #if PLATFORM(IOS) || PLATFORM(MAC) || PLATFORM(WIN) || PLATFORM(GTK) || PLATFORM(CHROMIUM) #define HAVE_ACCESSIBILITY 1 @@ -662,7 +644,7 @@ #endif #if !OS(WINDOWS) && !OS(SOLARIS) && !OS(QNX) \ - && !OS(SYMBIAN) && !OS(HAIKU) && !OS(RVCT) \ + && !OS(SYMBIAN) && !OS(RVCT) \ && !OS(ANDROID) #define HAVE_TM_GMTOFF 1 #define HAVE_TM_ZONE 1 @@ -748,10 +730,7 @@ /* FIXME: is this actually used or do other platforms generate their own config.h? */ #define HAVE_ERRNO_H 1 -/* As long as Haiku doesn't have a complete support of locale this will be disabled. */ -#if !OS(HAIKU) #define HAVE_LANGINFO_H 1 -#endif #define HAVE_MMAP 1 #define HAVE_SBRK 1 #define HAVE_STRINGS_H 1 diff --git a/Source/JavaScriptCore/wtf/StackBounds.cpp b/Source/JavaScriptCore/wtf/StackBounds.cpp index aa3a9b4..c94f99d 100644 --- a/Source/JavaScriptCore/wtf/StackBounds.cpp +++ b/Source/JavaScriptCore/wtf/StackBounds.cpp @@ -31,10 +31,6 @@ #include -#elif OS(HAIKU) - -#include - #elif OS(SOLARIS) #include @@ -64,10 +60,10 @@ namespace WTF { // These platforms should now be working correctly: // DARWIN, QNX, UNIX, SYMBIAN // These platforms are not: -// WINDOWS, SOLARIS, OPENBSD, HAIKU, WINCE +// WINDOWS, SOLARIS, OPENBSD, WINCE // // FIXME: remove this! - this code unsafely guesses at stack sizes! -#if OS(WINDOWS) || OS(SOLARIS) || OS(OPENBSD) || OS(HAIKU) +#if OS(WINDOWS) || OS(SOLARIS) || OS(OPENBSD) // Based on the current limit used by the JSC parser, guess the stack size. static const ptrdiff_t estimatedStackSize = 128 * sizeof(void*) * 1024; // This method assumes the stack is growing downwards. @@ -143,16 +139,6 @@ void StackBounds::initialize() m_bound = (void*)info.iLimit; } -#elif OS(HAIKU) - -void StackBounds::initialize() -{ - thread_info threadInfo; - get_thread_info(find_thread(NULL), &threadInfo); - m_origin = threadInfo.stack_end; - m_bound = estimateStackBound(m_origin); -} - #elif OS(UNIX) void StackBounds::initialize() diff --git a/Source/JavaScriptCore/wtf/haiku/MainThreadHaiku.cpp b/Source/JavaScriptCore/wtf/haiku/MainThreadHaiku.cpp deleted file mode 100644 index 10c4248..0000000 --- a/Source/JavaScriptCore/wtf/haiku/MainThreadHaiku.cpp +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (C) 2007 Kevin Ollivier - * Copyright (C) 2009 Maxime Simon - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of - * its contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "MainThread.h" - -#include "NotImplemented.h" - -namespace WTF { - -void initializeMainThreadPlatform() -{ - notImplemented(); -} - -void scheduleDispatchFunctionsOnMainThread() -{ - notImplemented(); -} - -} // namespace WTF - diff --git a/Source/JavaScriptCore/wtf/haiku/StringHaiku.cpp b/Source/JavaScriptCore/wtf/haiku/StringHaiku.cpp deleted file mode 100644 index fdf4e72..0000000 --- a/Source/JavaScriptCore/wtf/haiku/StringHaiku.cpp +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (C) 2007 Ryan Leavengood - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "PlatformString.h" - -#include -#include - -namespace WTF { - -// String conversions -String::String(const BString& string) -{ - if (string.Length()) - m_impl = String::fromUTF8(string.String(), string.Length()).impl(); - else - m_impl = StringImpl::empty(); -} - -String::operator BString() const -{ - BString string; - string.SetTo(utf8().data()); - - return string; -} - -} // namespace WTF diff --git a/Source/JavaScriptCore/wtf/text/WTFString.h b/Source/JavaScriptCore/wtf/text/WTFString.h index fcaabc3..bbb6562 100644 --- a/Source/JavaScriptCore/wtf/text/WTFString.h +++ b/Source/JavaScriptCore/wtf/text/WTFString.h @@ -46,10 +46,6 @@ QT_END_NAMESPACE class wxString; #endif -#if PLATFORM(HAIKU) -class BString; -#endif - namespace WTF { class CString; @@ -307,11 +303,6 @@ public: WTF_EXPORT_PRIVATE operator wxString() const; #endif -#if PLATFORM(HAIKU) - String(const BString&); - operator BString() const; -#endif - // String::fromUTF8 will return a null string if // the input data contains invalid UTF-8 sequences. WTF_EXPORT_PRIVATE static String fromUTF8(const char*, size_t); diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog index 67537e6..b157a40 100644 --- a/Source/WebCore/ChangeLog +++ b/Source/WebCore/ChangeLog @@ -1,5 +1,114 @@ 2011-09-25 Adam Barth + Remove PLATFORM(HAIKU) and associated code + https://bugs.webkit.org/show_bug.cgi?id=68774 + + Reviewed by Sam Weinig. + + 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. + +2011-09-25 Adam Barth + Attempted build fixes for GTK and Qt. * GNUmakefile.list.am: diff --git a/Source/WebCore/WebCore.gyp/WebCore.gyp b/Source/WebCore/WebCore.gyp/WebCore.gyp index 28c47ac..ee127d8 100644 --- a/Source/WebCore/WebCore.gyp/WebCore.gyp +++ b/Source/WebCore/WebCore.gyp/WebCore.gyp @@ -1293,7 +1293,7 @@ ], 'sources/': [ # FIXME: Figure out how to store these patterns in a variable. - ['exclude', '(brew|cairo|ca|cf|cg|curl|efl|freetype|gstreamer|gtk|haiku|linux|mac|opengl|openvg|opentype|pango|posix|qt|soup|svg|symbian|texmap|iphone|win|wince|wx)/'], + ['exclude', '(brew|cairo|ca|cf|cg|curl|efl|freetype|gstreamer|gtk|linux|mac|opengl|openvg|opentype|pango|posix|qt|soup|svg|symbian|texmap|iphone|win|wince|wx)/'], ['exclude', '(? ScriptController::createScriptInstanceForWidget(Widget* widget) -{ - if (!widget->isPluginView()) - return 0; - - return static_cast(widget)->bindingInstance(); -} - -} // namespace WebCore diff --git a/Source/WebCore/editing/haiku/EditorHaiku.cpp b/Source/WebCore/editing/haiku/EditorHaiku.cpp deleted file mode 100644 index 2b3d0ba..0000000 --- a/Source/WebCore/editing/haiku/EditorHaiku.cpp +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (C) 2007 Ryan Leavengood - * - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "Editor.h" - -#include "Clipboard.h" -#include "ClipboardAccessPolicy.h" -#include "ClipboardHaiku.h" - - -namespace WebCore { - -PassRefPtr Editor::newGeneralClipboard(ClipboardAccessPolicy policy, Frame*) -{ - return ClipboardHaiku::create(policy, Clipboard::CopyAndPaste); -} - -} // namespace WebCore - diff --git a/Source/WebCore/gyp/WebCore.gyp b/Source/WebCore/gyp/WebCore.gyp index 827b11b..2d0a0d9 100644 --- a/Source/WebCore/gyp/WebCore.gyp +++ b/Source/WebCore/gyp/WebCore.gyp @@ -74,8 +74,8 @@ ['exclude', 'thirdparty/'], # FIXME: Figure out how to store these patterns in a variable. - ['exclude', '(brew|cairo|chromium|curl|efl|freetype|fftw|gstreamer|gtk|haiku|linux|mkl|openvg|pango|qt|skia|soup|symbian|texmap|iphone|v8|win|wince|wx)/'], - ['exclude', '(Brew|Cairo|Curl|Chromium|Efl|Haiku|Gtk|Linux|OpenType|Qt|Safari|Soup|Symbian|V8|Win|WinCE|Wx)\\.(cpp|mm?)$'], + ['exclude', '(brew|cairo|chromium|curl|efl|freetype|fftw|gstreamer|gtk|linux|mkl|openvg|pango|qt|skia|soup|symbian|texmap|iphone|v8|win|wince|wx)/'], + ['exclude', '(Brew|Cairo|Curl|Chromium|Efl|Gtk|Linux|OpenType|Qt|Safari|Soup|Symbian|V8|Win|WinCE|Wx)\\.(cpp|mm?)$'], ['exclude', 'Chromium[^/]*\\.(cpp|mm?)$'], ['exclude', 'platform/image-decoders/'], diff --git a/Source/WebCore/loader/cache/CachedFont.cpp b/Source/WebCore/loader/cache/CachedFont.cpp index 3846058..b970428 100644 --- a/Source/WebCore/loader/cache/CachedFont.cpp +++ b/Source/WebCore/loader/cache/CachedFont.cpp @@ -28,7 +28,7 @@ #include "CachedFont.h" // FIXME: This should really be a blacklist instead of a whitelist -#if USE(CG) || PLATFORM(QT) || PLATFORM(GTK) || (PLATFORM(CHROMIUM) && (!OS(DARWIN) || USE(SKIA_ON_MAC_CHROMIUM))) || PLATFORM(HAIKU) || OS(WINCE) +#if USE(CG) || PLATFORM(QT) || PLATFORM(GTK) || (PLATFORM(CHROMIUM) && (!OS(DARWIN) || USE(SKIA_ON_MAC_CHROMIUM))) || OS(WINCE) #define STORE_FONT_CUSTOM_PLATFORM_DATA #endif diff --git a/Source/WebCore/page/EventHandler.cpp b/Source/WebCore/page/EventHandler.cpp index dc54317..c59e6bf 100644 --- a/Source/WebCore/page/EventHandler.cpp +++ b/Source/WebCore/page/EventHandler.cpp @@ -2948,7 +2948,7 @@ bool EventHandler::isKeyboardOptionTab(KeyboardEvent* event) bool EventHandler::eventInvertsTabsToLinksClientCallResult(KeyboardEvent* event) { -#if PLATFORM(MAC) || PLATFORM(QT) || PLATFORM(HAIKU) || PLATFORM(EFL) +#if PLATFORM(MAC) || PLATFORM(QT) || PLATFORM(EFL) return EventHandler::isKeyboardOptionTab(event); #else return false; diff --git a/Source/WebCore/page/haiku/DragControllerHaiku.cpp b/Source/WebCore/page/haiku/DragControllerHaiku.cpp deleted file mode 100644 index de8ca81..0000000 --- a/Source/WebCore/page/haiku/DragControllerHaiku.cpp +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Copyright (C) 2007 Apple Inc. All rights reserved. - * Copyright (C) 2007 Ryan Leavengood - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "DragController.h" - -#include "DragData.h" - -#include - - -namespace WebCore { - -// FIXME: These values are straight out of DragControllerMac, so probably have -// little correlation with Haiku standards... -const int DragController::LinkDragBorderInset = 2; -const int DragController::MaxOriginalImageArea = 1500 * 1500; -const int DragController::DragIconRightInset = 7; -const int DragController::DragIconBottomInset = 3; - -const float DragController::DragImageAlpha = 0.75f; - - -bool DragController::isCopyKeyDown(DragData*) -{ - if (modifiers() & B_COMMAND_KEY) - return true; - - return false; -} - -DragOperation DragController::dragOperation(DragData* dragData) -{ - // FIXME: This logic is incomplete - if (dragData->containsURL()) - return DragOperationCopy; - - return DragOperationNone; -} - -const IntSize& DragController::maxDragImageSize() -{ - static const IntSize maxDragImageSize(400, 400); - - return maxDragImageSize; -} - -void DragController::cleanupAfterSystemDrag() -{ -} - -} // namespace WebCore - diff --git a/Source/WebCore/page/haiku/EventHandlerHaiku.cpp b/Source/WebCore/page/haiku/EventHandlerHaiku.cpp deleted file mode 100644 index 5c53614..0000000 --- a/Source/WebCore/page/haiku/EventHandlerHaiku.cpp +++ /dev/null @@ -1,141 +0,0 @@ -/* - * Copyright (C) 2006 Zack Rusin - * Copyright (C) 2007 Ryan Leavengood - * Copyright (C) 2009 Maxime Simon - * Copyright (C) 2010 Stephan Aßmus - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "EventHandler.h" - -#include "ClipboardHaiku.h" -#include "EventNames.h" -#include "FocusController.h" -#include "Frame.h" -#include "FrameView.h" -#include "HitTestResult.h" -#include "KeyboardEvent.h" -#include "MouseEventWithHitTestResults.h" -#include "NotImplemented.h" -#include "Page.h" -#include "PlatformKeyboardEvent.h" -#include "PlatformWheelEvent.h" -#include "RenderWidget.h" - -#include - - -namespace WebCore { - -const double EventHandler::TextDragDelay = 0.0; - -bool EventHandler::tabsToAllFormControls(KeyboardEvent* event) const -{ - bool handlingOptionTab = isKeyboardOptionTab(event); - - return handlingOptionTab; -} - -void EventHandler::focusDocumentView() -{ - BView* view = m_frame->view()->platformWidget(); - if (view && view->LockLooperWithTimeout(5000) == B_OK) { - view->MakeFocus(true); - view->UnlockLooper(); - } - - Page* page = m_frame->page(); - if (page) - page->focusController()->setFocusedFrame(m_frame); -} - -bool EventHandler::passWidgetMouseDownEventToWidget(const MouseEventWithHitTestResults& event) -{ - // Figure out which view to send the event to. - RenderObject* target = targetNode(event) ? targetNode(event)->renderer() : 0; - if (!target || !target->isWidget()) - return false; - return passMouseDownEventToWidget(toRenderWidget(target)->widget()); -} - -bool EventHandler::passWidgetMouseDownEventToWidget(RenderWidget* renderWidget) -{ - return passMouseDownEventToWidget(renderWidget->widget()); -} - -bool EventHandler::passMouseDownEventToWidget(Widget* widget) -{ - notImplemented(); - return false; -} - -bool EventHandler::eventActivatedView(const PlatformMouseEvent& event) const -{ - // On Haiku, clicks which activate the window in non focus-follows-mouse mode - // are not passed to the window, so any event we generate is not the activation - // event. - return false; -} - -bool EventHandler::passWheelEventToWidget(PlatformWheelEvent& event, Widget* widget) -{ - if (!widget->isFrameView()) - return false; - - return static_cast(widget)->frame()->eventHandler()->handleWheelEvent(event); -} - -PassRefPtr EventHandler::createDraggingClipboard() const -{ - return ClipboardHaiku::create(ClipboardWritable, Clipboard::DragAndDrop); -} - -bool EventHandler::passMousePressEventToSubframe(MouseEventWithHitTestResults& mev, Frame* subframe) -{ - subframe->eventHandler()->handleMousePressEvent(mev.event()); - return true; -} - -bool EventHandler::passMouseMoveEventToSubframe(MouseEventWithHitTestResults& mev, Frame* subframe, HitTestResult* hoveredNode) -{ - subframe->eventHandler()->handleMouseMoveEvent(mev.event(), hoveredNode); - return true; -} - -bool EventHandler::passMouseReleaseEventToSubframe(MouseEventWithHitTestResults& mev, Frame* subframe) -{ - subframe->eventHandler()->handleMouseReleaseEvent(mev.event()); - return true; -} - -unsigned EventHandler::accessKeyModifiers() -{ - // NOTE: On Haiku, the user can choose Alt or Ctrl as access key, but - // the PlatformKeyboardEvent already takes care of this, internally, - // we always use Alt. - return PlatformKeyboardEvent::AltKey; -} - -} // namespace WebCore - diff --git a/Source/WebCore/page/haiku/FrameHaiku.cpp b/Source/WebCore/page/haiku/FrameHaiku.cpp deleted file mode 100644 index 5ff6950..0000000 --- a/Source/WebCore/page/haiku/FrameHaiku.cpp +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (C) 2007 Ryan Leavengood - * - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "Frame.h" - -#include "NotImplemented.h" - - -namespace WebCore { - -DragImageRef Frame::nodeImage(Node*) -{ - notImplemented(); - return 0; -} - -DragImageRef Frame::dragImageForSelection() -{ - notImplemented(); - return 0; -} - -} // namespace WebCore diff --git a/Source/WebCore/platform/ContextMenuItem.h b/Source/WebCore/platform/ContextMenuItem.h index a2734b2..e369348 100644 --- a/Source/WebCore/platform/ContextMenuItem.h +++ b/Source/WebCore/platform/ContextMenuItem.h @@ -48,8 +48,6 @@ typedef struct _GtkAction GtkAction; #include #elif PLATFORM(WX) class wxMenuItem; -#elif PLATFORM(HAIKU) -class BMenuItem; #endif namespace WebCore { @@ -208,8 +206,6 @@ namespace WebCore { bool checked; bool enabled; }; -#elif PLATFORM(HAIKU) - typedef BMenuItem* PlatformMenuItemDescription; #elif PLATFORM(CHROMIUM) struct PlatformMenuItemDescription { PlatformMenuItemDescription() diff --git a/Source/WebCore/platform/Cursor.h b/Source/WebCore/platform/Cursor.h index 3e01f21..41aaa23 100644 --- a/Source/WebCore/platform/Cursor.h +++ b/Source/WebCore/platform/Cursor.h @@ -43,8 +43,6 @@ typedef HICON HCURSOR; #include #elif PLATFORM(CHROMIUM) #include "PlatformCursor.h" -#elif PLATFORM(HAIKU) -#include #endif #if PLATFORM(MAC) @@ -96,8 +94,6 @@ namespace WebCore { typedef wxCursor* PlatformCursor; #elif PLATFORM(CHROMIUM) // See PlatformCursor.h -#elif PLATFORM(HAIKU) - typedef BCursor* PlatformCursor; #else typedef void* PlatformCursor; #endif diff --git a/Source/WebCore/platform/DragData.h b/Source/WebCore/platform/DragData.h index b3441df..ad9a7b8 100644 --- a/Source/WebCore/platform/DragData.h +++ b/Source/WebCore/platform/DragData.h @@ -62,9 +62,6 @@ class DataObjectGtk; typedef WebCore::DataObjectGtk* DragDataRef; #elif PLATFORM(CHROMIUM) #include "DragDataRef.h" -#elif PLATFORM(HAIKU) -class BMessage; -typedef class BMessage* DragDataRef; #elif PLATFORM(EFL) typedef void* DragDataRef; #endif diff --git a/Source/WebCore/platform/DragImage.h b/Source/WebCore/platform/DragImage.h index bf35f42..fefcce2 100644 --- a/Source/WebCore/platform/DragImage.h +++ b/Source/WebCore/platform/DragImage.h @@ -49,8 +49,6 @@ class wxDragImage; #include "DragImageRef.h" #elif PLATFORM(GTK) typedef struct _cairo_surface cairo_surface_t; -#elif PLATFORM(HAIKU) -class BBitmap; #endif //We need to #define YOffset as it needs to be shared with WebKit @@ -74,8 +72,6 @@ namespace WebCore { typedef wxDragImage* DragImageRef; #elif PLATFORM(GTK) typedef cairo_surface_t* DragImageRef; -#elif PLATFORM(HAIKU) - typedef BBitmap* DragImageRef; #elif PLATFORM(EFL) typedef void* DragImageRef; #endif diff --git a/Source/WebCore/platform/PlatformKeyboardEvent.h b/Source/WebCore/platform/PlatformKeyboardEvent.h index 1b3c75b..5a11bf5 100644 --- a/Source/WebCore/platform/PlatformKeyboardEvent.h +++ b/Source/WebCore/platform/PlatformKeyboardEvent.h @@ -58,10 +58,6 @@ QT_END_NAMESPACE class wxKeyEvent; #endif -#if PLATFORM(HAIKU) -class BMessage; -#endif - #if PLATFORM(EFL) typedef struct _Evas_Event_Key_Down Evas_Event_Key_Down; typedef struct _Evas_Event_Key_Up Evas_Event_Key_Up; @@ -187,10 +183,6 @@ namespace WebCore { PlatformKeyboardEvent(wxKeyEvent&); #endif -#if PLATFORM(HAIKU) - PlatformKeyboardEvent(BMessage*); -#endif - #if PLATFORM(WIN) || PLATFORM(CHROMIUM) bool isSystemKey() const { return m_isSystemKey; } #endif diff --git a/Source/WebCore/platform/PlatformMenuDescription.h b/Source/WebCore/platform/PlatformMenuDescription.h index f3cc001..1850726 100644 --- a/Source/WebCore/platform/PlatformMenuDescription.h +++ b/Source/WebCore/platform/PlatformMenuDescription.h @@ -38,8 +38,6 @@ class NSMutableArray; typedef struct _GtkMenu GtkMenu; #elif PLATFORM(WX) class wxMenu; -#elif PLATFORM(HAIKU) -class BMenu; #endif namespace WebCore { @@ -54,8 +52,6 @@ namespace WebCore { typedef GtkMenu* PlatformMenuDescription; #elif PLATFORM(WX) typedef wxMenu* PlatformMenuDescription; -#elif PLATFORM(HAIKU) - typedef BMenu* PlatformMenuDescription; #else typedef void* PlatformMenuDescription; #endif diff --git a/Source/WebCore/platform/PlatformMouseEvent.h b/Source/WebCore/platform/PlatformMouseEvent.h index 233cb5a..c964899 100644 --- a/Source/WebCore/platform/PlatformMouseEvent.h +++ b/Source/WebCore/platform/PlatformMouseEvent.h @@ -57,10 +57,6 @@ typedef long LPARAM; class wxMouseEvent; #endif -#if PLATFORM(HAIKU) -class BMessage; -#endif - namespace WebCore { // These button numbers match the ones used in the DOM API, 0 through 2, except for NoButton which isn't specified. @@ -163,10 +159,6 @@ namespace WebCore { PlatformMouseEvent(const wxMouseEvent&, const wxPoint& globalPoint, int clickCount); #endif -#if PLATFORM(HAIKU) - PlatformMouseEvent(const BMessage*); -#endif - protected: LayoutPoint m_position; LayoutPoint m_globalPosition; diff --git a/Source/WebCore/platform/Widget.h b/Source/WebCore/platform/Widget.h index 46bc3d5..5900ced 100644 --- a/Source/WebCore/platform/Widget.h +++ b/Source/WebCore/platform/Widget.h @@ -78,11 +78,6 @@ class wxWindow; typedef wxWindow* PlatformWidget; #endif -#if PLATFORM(HAIKU) -class BView; -typedef BView* PlatformWidget; -#endif - #if PLATFORM(EFL) typedef struct _Evas_Object Evas_Object; typedef struct _Evas Evas; @@ -133,14 +128,6 @@ public: PlatformWidget platformWidget() const; void setPlatformWidget(PlatformWidget); -#if PLATFORM(HAIKU) - PlatformWidget topLevelPlatformWidget() const { return m_topLevelPlatformWidget; } - void setTopLevelPlatformWidget(PlatformWidget widget) - { - m_topLevelPlatformWidget = widget; - } -#endif - int x() const { return frameRect().x(); } int y() const { return frameRect().y(); } int width() const { return frameRect().width(); } @@ -285,9 +272,6 @@ private: QWeakPointer m_bindingObject; #endif -#if PLATFORM(HAIKU) - PlatformWidget m_topLevelPlatformWidget; -#endif }; #if !PLATFORM(MAC) diff --git a/Source/WebCore/platform/graphics/BitmapImage.h b/Source/WebCore/platform/graphics/BitmapImage.h index 9085a65..e289dd4 100644 --- a/Source/WebCore/platform/graphics/BitmapImage.h +++ b/Source/WebCore/platform/graphics/BitmapImage.h @@ -45,10 +45,6 @@ class NSImage; typedef struct HBITMAP__ *HBITMAP; #endif -#if PLATFORM(HAIKU) -class BBitmap; -#endif - namespace WebCore { struct FrameData; } @@ -188,10 +184,6 @@ protected: const FloatPoint& phase, ColorSpace styleColorSpace, CompositeOperator, const FloatRect& destRect); #endif -#if PLATFORM(HAIKU) - virtual BBitmap* getBBitmap() const; -#endif - size_t currentFrame() const { return m_currentFrame; } size_t frameCount(); NativeImagePtr frameAtIndex(size_t); diff --git a/Source/WebCore/platform/graphics/Color.h b/Source/WebCore/platform/graphics/Color.h index 4d365d3..7481744 100644 --- a/Source/WebCore/platform/graphics/Color.h +++ b/Source/WebCore/platform/graphics/Color.h @@ -53,10 +53,6 @@ typedef struct _GdkRGBA GdkRGBA; class wxColour; #endif -#if PLATFORM(HAIKU) -struct rgb_color; -#endif - namespace WebCore { class Color; @@ -148,11 +144,6 @@ public: Color(CGColorRef); #endif -#if PLATFORM(HAIKU) - Color(const rgb_color&); - operator rgb_color() const; -#endif - static bool parseHexColor(const String& name, RGBA32& rgb); static bool parseHexColor(const UChar* name, unsigned length, RGBA32& rgb); diff --git a/Source/WebCore/platform/graphics/FloatPoint.h b/Source/WebCore/platform/graphics/FloatPoint.h index c9721ca..ea4bdf4 100644 --- a/Source/WebCore/platform/graphics/FloatPoint.h +++ b/Source/WebCore/platform/graphics/FloatPoint.h @@ -50,10 +50,6 @@ class QPointF; QT_END_NAMESPACE #endif -#if PLATFORM(HAIKU) -class BPoint; -#endif - #if USE(SKIA) struct SkPoint; #endif @@ -156,11 +152,6 @@ public: operator QPointF() const; #endif -#if PLATFORM(HAIKU) - FloatPoint(const BPoint&); - operator BPoint() const; -#endif - #if USE(SKIA) operator SkPoint() const; FloatPoint(const SkPoint&); diff --git a/Source/WebCore/platform/graphics/FloatRect.h b/Source/WebCore/platform/graphics/FloatRect.h index 24a6b19..4241716 100644 --- a/Source/WebCore/platform/graphics/FloatRect.h +++ b/Source/WebCore/platform/graphics/FloatRect.h @@ -51,10 +51,6 @@ QT_END_NAMESPACE class wxRect2DDouble; #endif -#if PLATFORM(HAIKU) -class BRect; -#endif - #if USE(SKIA) struct SkRect; #endif @@ -198,11 +194,6 @@ public: operator wxRect2DDouble() const; #endif -#if PLATFORM(HAIKU) - FloatRect(const BRect&); - operator BRect() const; -#endif - #if USE(SKIA) FloatRect(const SkRect&); operator SkRect() const; diff --git a/Source/WebCore/platform/graphics/Gradient.h b/Source/WebCore/platform/graphics/Gradient.h index e4e9c526..1ff346d 100644 --- a/Source/WebCore/platform/graphics/Gradient.h +++ b/Source/WebCore/platform/graphics/Gradient.h @@ -61,9 +61,6 @@ typedef cairo_pattern_t* PlatformGradient; class SkShader; typedef class SkShader* PlatformGradient; typedef class SkShader* PlatformPattern; -#elif PLATFORM(HAIKU) -class BGradient; -typedef BGradient* PlatformGradient; #else typedef void* PlatformGradient; #endif diff --git a/Source/WebCore/platform/graphics/GraphicsContext.cpp b/Source/WebCore/platform/graphics/GraphicsContext.cpp index aa2bc9d..988af9e 100644 --- a/Source/WebCore/platform/graphics/GraphicsContext.cpp +++ b/Source/WebCore/platform/graphics/GraphicsContext.cpp @@ -697,7 +697,7 @@ void GraphicsContext::setPlatformTextDrawingMode(TextDrawingModeFlags mode) } #endif -#if !PLATFORM(QT) && !USE(CAIRO) && !USE(SKIA) && !PLATFORM(HAIKU) && !PLATFORM(OPENVG) +#if !PLATFORM(QT) && !USE(CAIRO) && !USE(SKIA) && !PLATFORM(OPENVG) void GraphicsContext::setPlatformStrokeStyle(StrokeStyle) { } diff --git a/Source/WebCore/platform/graphics/GraphicsContext.h b/Source/WebCore/platform/graphics/GraphicsContext.h index 473374a..db0bf55 100644 --- a/Source/WebCore/platform/graphics/GraphicsContext.h +++ b/Source/WebCore/platform/graphics/GraphicsContext.h @@ -80,10 +80,6 @@ class PlatformContextSkia; typedef PlatformContextSkia GraphicsContextPlatformPrivate; } typedef WebCore::PlatformContextSkia PlatformGraphicsContext; -#elif PLATFORM(HAIKU) -class BView; -typedef BView PlatformGraphicsContext; -struct pattern; #elif OS(WINCE) typedef struct HDC__ PlatformGraphicsContext; #else @@ -501,10 +497,6 @@ namespace WebCore { GdkEventExpose* gdkExposeEvent() const; #endif -#if PLATFORM(HAIKU) - pattern getHaikuStrokeStyle(); -#endif - static void adjustLineToPixelBoundaries(FloatPoint& p1, FloatPoint& p2, float strokeWidth, StrokeStyle); private: diff --git a/Source/WebCore/platform/graphics/ImageBufferData.h b/Source/WebCore/platform/graphics/ImageBufferData.h index 670a10f..bacd24a 100644 --- a/Source/WebCore/platform/graphics/ImageBufferData.h +++ b/Source/WebCore/platform/graphics/ImageBufferData.h @@ -31,8 +31,6 @@ #include "ImageBufferDataQt.h" #elif USE(SKIA) #include "ImageBufferDataSkia.h" -#elif PLATFORM(HAIKU) -#include "ImageBufferDataHaiku.h" #elif OS(WINCE) #include "ImageBufferDataWince.h" #elif PLATFORM(WX) diff --git a/Source/WebCore/platform/graphics/ImageSource.h b/Source/WebCore/platform/graphics/ImageSource.h index 99e4fc4..dcc6755 100644 --- a/Source/WebCore/platform/graphics/ImageSource.h +++ b/Source/WebCore/platform/graphics/ImageSource.h @@ -50,8 +50,6 @@ typedef struct _cairo_surface cairo_surface_t; namespace WebCore { class NativeImageSkia; } -#elif PLATFORM(HAIKU) -class BBitmap; #elif OS(WINCE) #include "SharedBitmap.h" #endif @@ -92,8 +90,6 @@ typedef wxBitmap* NativeImagePtr; typedef cairo_surface_t* NativeImagePtr; #elif USE(SKIA) typedef WebCore::NativeImageSkia* NativeImagePtr; -#elif PLATFORM(HAIKU) -typedef BBitmap* NativeImagePtr; #elif OS(WINCE) typedef RefPtr NativeImagePtr; #endif diff --git a/Source/WebCore/platform/graphics/IntPoint.h b/Source/WebCore/platform/graphics/IntPoint.h index aea11e7..8d7fd7f 100644 --- a/Source/WebCore/platform/graphics/IntPoint.h +++ b/Source/WebCore/platform/graphics/IntPoint.h @@ -55,8 +55,6 @@ class QPoint; QT_END_NAMESPACE #elif PLATFORM(GTK) typedef struct _GdkPoint GdkPoint; -#elif PLATFORM(HAIKU) -class BPoint; #elif PLATFORM(EFL) typedef struct _Evas_Point Evas_Point; #endif @@ -138,9 +136,6 @@ public: #elif PLATFORM(GTK) IntPoint(const GdkPoint&); operator GdkPoint() const; -#elif PLATFORM(HAIKU) - explicit IntPoint(const BPoint&); - operator BPoint() const; #elif PLATFORM(EFL) explicit IntPoint(const Evas_Point&); operator Evas_Point() const; diff --git a/Source/WebCore/platform/graphics/IntRect.h b/Source/WebCore/platform/graphics/IntRect.h index 670ea3c..2e2ff0b 100644 --- a/Source/WebCore/platform/graphics/IntRect.h +++ b/Source/WebCore/platform/graphics/IntRect.h @@ -51,8 +51,6 @@ QT_END_NAMESPACE #ifdef GTK_API_VERSION_2 typedef struct _GdkRectangle GdkRectangle; #endif -#elif PLATFORM(HAIKU) -class BRect; #elif PLATFORM(EFL) typedef struct _Eina_Rectangle Eina_Rectangle; #endif @@ -189,9 +187,6 @@ public: IntRect(const GdkRectangle&); operator GdkRectangle() const; #endif -#elif PLATFORM(HAIKU) - explicit IntRect(const BRect&); - operator BRect() const; #elif PLATFORM(EFL) explicit IntRect(const Eina_Rectangle&); operator Eina_Rectangle() const; diff --git a/Source/WebCore/platform/graphics/IntSize.h b/Source/WebCore/platform/graphics/IntSize.h index 2384ea1..625db3c 100644 --- a/Source/WebCore/platform/graphics/IntSize.h +++ b/Source/WebCore/platform/graphics/IntSize.h @@ -45,8 +45,6 @@ typedef struct tagSIZE SIZE; QT_BEGIN_NAMESPACE class QSize; QT_END_NAMESPACE -#elif PLATFORM(HAIKU) -class BSize; #endif #if PLATFORM(WX) @@ -125,11 +123,6 @@ public: operator QSize() const; #endif -#if PLATFORM(HAIKU) - explicit IntSize(const BSize&); - operator BSize() const; -#endif - #if PLATFORM(WX) IntSize(const wxSize&); operator wxSize() const; diff --git a/Source/WebCore/platform/graphics/Path.h b/Source/WebCore/platform/graphics/Path.h index 4bd0068..f51c764 100644 --- a/Source/WebCore/platform/graphics/Path.h +++ b/Source/WebCore/platform/graphics/Path.h @@ -54,9 +54,6 @@ typedef WebCore::CairoPath PlatformPath; #elif USE(SKIA) class SkPath; typedef SkPath PlatformPath; -#elif PLATFORM(HAIKU) -class BRegion; -typedef BRegion PlatformPath; #elif OS(WINCE) namespace WebCore { class PlatformPath; diff --git a/Source/WebCore/platform/graphics/Pattern.h b/Source/WebCore/platform/graphics/Pattern.h index 1d0b0f8..db36612 100644 --- a/Source/WebCore/platform/graphics/Pattern.h +++ b/Source/WebCore/platform/graphics/Pattern.h @@ -55,9 +55,6 @@ typedef wxGraphicsBrush* PlatformPatternPtr; class wxBrush; typedef wxBrush* PlatformPatternPtr; #endif // USE(WXGC) -#elif PLATFORM(HAIKU) -#include -typedef pattern* PlatformPatternPtr; #elif OS(WINCE) typedef void* PlatformPatternPtr; #endif diff --git a/Source/WebCore/platform/graphics/SimpleFontData.h b/Source/WebCore/platform/graphics/SimpleFontData.h index dcb79f4..230b421 100644 --- a/Source/WebCore/platform/graphics/SimpleFontData.h +++ b/Source/WebCore/platform/graphics/SimpleFontData.h @@ -57,10 +57,6 @@ typedef struct OpaqueATSUStyle* ATSUStyle; #include #endif -#if PLATFORM(HAIKU) -#include -#endif - namespace WebCore { class FontDescription; diff --git a/Source/WebCore/platform/graphics/haiku/ColorHaiku.cpp b/Source/WebCore/platform/graphics/haiku/ColorHaiku.cpp deleted file mode 100644 index 7d08c36..0000000 --- a/Source/WebCore/platform/graphics/haiku/ColorHaiku.cpp +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (C) 2007 Ryan Leavengood - * - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "Color.h" - -#include - -namespace WebCore { - -Color::Color(const rgb_color& color) - : m_color(makeRGBA(color.red, color.green, color.blue, color.alpha)) - , m_valid(true) -{ -} - -Color::operator rgb_color() const -{ - return make_color(red(), green(), blue(), alpha()); -} - -} // namespace WebCore diff --git a/Source/WebCore/platform/graphics/haiku/FloatPointHaiku.cpp b/Source/WebCore/platform/graphics/haiku/FloatPointHaiku.cpp deleted file mode 100644 index 0f50898..0000000 --- a/Source/WebCore/platform/graphics/haiku/FloatPointHaiku.cpp +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (C) 2007 Ryan Leavengood - * - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "FloatPoint.h" - -#include - - -namespace WebCore { - -FloatPoint::FloatPoint(const BPoint& point) - : m_x(point.x) - , m_y(point.y) -{ -} - -FloatPoint::operator BPoint() const -{ - return BPoint(m_x, m_y); -} - -} // namespace WebCore - diff --git a/Source/WebCore/platform/graphics/haiku/FloatRectHaiku.cpp b/Source/WebCore/platform/graphics/haiku/FloatRectHaiku.cpp deleted file mode 100644 index 18fd94b..0000000 --- a/Source/WebCore/platform/graphics/haiku/FloatRectHaiku.cpp +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (C) 2007 Ryan Leavengood - * Copyright (C) 2010 Stephan Aßmus - * - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "FloatRect.h" - -#include - - -namespace WebCore { - -FloatRect::FloatRect(const BRect& rect) - : m_location(rect.LeftTop()) - , m_size(rect.Width() + 1, rect.Height() + 1) -{ -} - -FloatRect::operator BRect() const -{ - return BRect(BPoint(x(), y()), BSize(width() - 1, height() - 1)); -} - -} // namespace WebCore - diff --git a/Source/WebCore/platform/graphics/haiku/FontCacheHaiku.cpp b/Source/WebCore/platform/graphics/haiku/FontCacheHaiku.cpp deleted file mode 100644 index 03a9458..0000000 --- a/Source/WebCore/platform/graphics/haiku/FontCacheHaiku.cpp +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Copyright (C) 2006 Dirk Mueller - * Copyright (C) 2007 Ryan Leavengood - * Copyright (C) 2010 Stephan Aßmus - * - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of - * its contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "FontCache.h" - -#include "Font.h" -#include "FontData.h" -#include "FontPlatformData.h" -#include "NotImplemented.h" -#include -#include - -namespace WebCore { - -void FontCache::platformInit() -{ -} - -const SimpleFontData* FontCache::getFontDataForCharacters(const Font& font, const UChar* characters, int length) -{ - FontPlatformData data(font.fontDescription(), font.family().family()); - return getCachedFontData(&data, DoNotRetain); -} - -SimpleFontData* FontCache::getSimilarFontPlatformData(const Font& font) -{ - notImplemented(); - return 0; -} - -SimpleFontData* FontCache::getLastResortFallbackFont(const FontDescription& fontDescription, ShouldRetain shouldRetain) -{ - font_family family; - font_style style; - be_plain_font->GetFamilyAndStyle(&family, &style); - AtomicString plainFontFamily(family); - return getCachedFontData(fontDescription, plainFontFamily, false, shouldRetain); -} - -FontPlatformData* FontCache::createFontPlatformData(const FontDescription& fontDescription, const AtomicString& family) -{ - return new FontPlatformData(fontDescription, family); -} - -void FontCache::getTraitsInFamily(const AtomicString& familyName, Vector& traitsMasks) -{ - notImplemented(); -} - -} // namespace WebCore - diff --git a/Source/WebCore/platform/graphics/haiku/FontCustomPlatformData.cpp b/Source/WebCore/platform/graphics/haiku/FontCustomPlatformData.cpp deleted file mode 100644 index 352de67..0000000 --- a/Source/WebCore/platform/graphics/haiku/FontCustomPlatformData.cpp +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (C) 2008 Alp Toker - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public License - * along with this library; see the file COPYING.LIB. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - * - */ - -#include "config.h" -#include "FontCustomPlatformData.h" - -#include "SharedBuffer.h" -#include "FontPlatformData.h" - - -namespace WebCore { - -FontCustomPlatformData::~FontCustomPlatformData() -{ -} - -FontPlatformData FontCustomPlatformData::fontPlatformData(int size, bool bold, bool italic, FontOrientation, TextOrientation, FontWidthVariant, FontRenderingMode) -{ - return FontPlatformData(size, bold, italic); -} - -FontCustomPlatformData* createFontCustomPlatformData(SharedBuffer* buffer) -{ - // FIXME: We need support in Haiku to read fonts from memory to implement this. - return 0; -} - -bool FontCustomPlatformData::supportsFormat(const String& /* format */) -{ - return false; -} - -} diff --git a/Source/WebCore/platform/graphics/haiku/FontCustomPlatformData.h b/Source/WebCore/platform/graphics/haiku/FontCustomPlatformData.h deleted file mode 100644 index a319ce5..0000000 --- a/Source/WebCore/platform/graphics/haiku/FontCustomPlatformData.h +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (C) 2008 Alp Toker - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public License - * along with this library; see the file COPYING.LIB. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - * - */ - -#ifndef FontCustomPlatformData_h -#define FontCustomPlatformData_h - -#include "FontOrientation.h" -#include "FontRenderingMode.h" -#include "FontWidthVariant.h" -#include "TextOrientation.h" -#include - -namespace WebCore { - - class FontPlatformData; - class SharedBuffer; - - struct FontCustomPlatformData { - WTF_MAKE_NONCOPYABLE(FontCustomPlatformData); - public: - FontCustomPlatformData() { } - ~FontCustomPlatformData(); - - static bool supportsFormat(const String&); - - FontPlatformData fontPlatformData(int size, bool bold, bool italic, FontOrientation = Horizontal, TextOrientation = TextOrientationVerticalRight, FontWidthVariant = RegularWidth, FontRenderingMode = NormalRenderingMode); - }; - - FontCustomPlatformData* createFontCustomPlatformData(SharedBuffer*); - -} - -#endif diff --git a/Source/WebCore/platform/graphics/haiku/FontHaiku.cpp b/Source/WebCore/platform/graphics/haiku/FontHaiku.cpp deleted file mode 100644 index 5a1a1d0..0000000 --- a/Source/WebCore/platform/graphics/haiku/FontHaiku.cpp +++ /dev/null @@ -1,125 +0,0 @@ -/* - * Copyright (C) 2007 Ryan Leavengood - * - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "Font.h" - -#include "FontData.h" -#include "FontDescription.h" -#include "FontSelector.h" -#include "GraphicsContext.h" -#include "NotImplemented.h" -#include -#include -#include - - -// FIXME: Temp routine to convert unicode character to UTF8. -int charUnicodeToUTF8HACK(unsigned short glyph, char* out) -{ - int i = 0; - - if (glyph < 0x0080) - out[i++] = static_cast(glyph); - else if (glyph < 0x0800) { // 2 bytes - out[i++] = 0xc0 | (glyph >> 6); - out[i++] = 0x80 | (glyph & 0x3F); - } else if (glyph > 0x0800) { // 3 bytes - out[i++] = 0xe0 | (glyph >> 12); - out[i++] = 0x80 | ((glyph >> 6) & 0x3F); - out[i++] = 0x80 | (glyph & 0x3F); - } - - out[i] = '\0'; - return i; -} - -namespace WebCore { - -bool Font::canReturnFallbackFontsForComplexText() -{ - return false; -} - -bool Font::canExpandAroundIdeographsInComplexText() -{ - return false; -} - -void Font::drawGlyphs(GraphicsContext* graphicsContext, const SimpleFontData* font, - const GlyphBuffer& glyphBuffer, int from, int numGlyphs, const FloatPoint& point) const -{ - Color color = graphicsContext->fillColor(); - BView* view = graphicsContext->platformContext(); - BFont* m_font = font->platformData().font(); - - graphicsContext->setCompositeOperation(CompositeSourceOver); - view->SetHighColor(color); - view->SetFont(m_font); - - GlyphBufferGlyph* glyphs = const_cast(glyphBuffer.glyphs(from)); - float offset = point.x(); - for (int i = 0; i < numGlyphs; i++) { - char out[4]; - charUnicodeToUTF8HACK(glyphs[i], out); - - view->DrawString(out, sizeof(out), BPoint(offset, point.y())); - offset += glyphBuffer.advanceAt(from + i); - } -} - -void Font::drawComplexText(GraphicsContext* ctx, const TextRun& run, const FloatPoint& point, - int from, int to) const -{ - notImplemented(); -} - -void Font::drawEmphasisMarksForComplexText(GraphicsContext* /* context */, const TextRun& /* run */, const AtomicString& /* mark */, const FloatPoint& /* point */, int /* from */, int /* to */) const -{ - notImplemented(); -} - -float Font::floatWidthForComplexText(const TextRun& run, HashSet* fallbackFonts, GlyphOverflow* glyphOverflow) const -{ - notImplemented(); - return 0; -} - -FloatRect Font::selectionRectForComplexText(const TextRun&, const FloatPoint&, int, int, int) const -{ - notImplemented(); - return FloatRect(); -} - -int Font::offsetForPositionForComplexText(const TextRun&, float, bool) const -{ - notImplemented(); - return 0; -} - -} // namespace WebCore - diff --git a/Source/WebCore/platform/graphics/haiku/FontPlatformData.h b/Source/WebCore/platform/graphics/haiku/FontPlatformData.h deleted file mode 100644 index 4e86e16..0000000 --- a/Source/WebCore/platform/graphics/haiku/FontPlatformData.h +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Copyright (C) 2006 Apple Computer, Inc. - * Copyright (C) 2006 Zack Rusin - * Copyright (C) 2006 Dirk Mueller - * Copyright (C) 2006 Nikolas Zimmermann - * Copyright (C) 2007 Ryan Leavengood - * Copyright (C) 2009 Maxime Simon - * - * All rights reserved. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public License - * along with this library; see the file COPYING.LIB. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - * - */ - -#ifndef FontPlatformData_h -#define FontPlatformData_h - -#include "FontDescription.h" -#include "GlyphBuffer.h" -#include - -namespace WebCore { - - class FontPlatformData { - public: - FontPlatformData(WTF::HashTableDeletedValueType) - : m_font(hashTableDeletedFontValue()) - { } - - FontPlatformData() - : m_font(0) - { } - - FontPlatformData(const FontDescription&, const AtomicString& family); - FontPlatformData(float size, bool bold, bool oblique); - FontPlatformData(const FontPlatformData&); - - ~FontPlatformData(); - - BFont* font() const { return m_font; } - - bool isFixedPitch(); - float size() const { return m_size; } - bool bold() const { return m_bold; } - bool oblique() const { return m_oblique; } - - unsigned hash() const; - bool isHashTableDeletedValue() const; - - bool operator==(const FontPlatformData&) const; - -#ifndef NDEBUG - String description() const; -#endif - - BFont* m_font; - float m_size; - bool m_bold; - bool m_oblique; - - private: - static BFont* hashTableDeletedFontValue() { return reinterpret_cast(-1); } - }; - -} // namespace WebCore - -#endif - diff --git a/Source/WebCore/platform/graphics/haiku/GlyphPageTreeNodeHaiku.cpp b/Source/WebCore/platform/graphics/haiku/GlyphPageTreeNodeHaiku.cpp deleted file mode 100644 index 3ae9aeb..0000000 --- a/Source/WebCore/platform/graphics/haiku/GlyphPageTreeNodeHaiku.cpp +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright (C) 2006 George Staikos - * Copyright (C) 2006 Dirk Mueller - * Copyright (C) 2006 Zack Rusin - * Copyright (C) 2007 Ryan Leavengood - * - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "GlyphPageTreeNode.h" - -#include "SimpleFontData.h" -#include -#include - - -namespace WebCore { - -bool GlyphPage::fill(unsigned offset, unsigned length, UChar* characterBuffer, unsigned bufferLength, const SimpleFontData* fontData) -{ - bool isUtf16 = bufferLength != GlyphPage::size; - bool haveGlyphs = false; - - for (unsigned i = 0; i < GlyphPage::size; i++) { - UChar32 character; - - if (isUtf16) { - UChar lead = characterBuffer[i * 2]; - UChar trail = characterBuffer[i * 2 + 1]; - character = U16_GET_SUPPLEMENTARY(lead, trail); - } else - character = characterBuffer[i]; - - if (!character) - setGlyphDataForIndex(offset + i, 0, 0); - else { - haveGlyphs = true; - setGlyphDataForIndex(offset + i, character, fontData); - } - } - - return haveGlyphs; -} - -} // namespace WebCore - diff --git a/Source/WebCore/platform/graphics/haiku/GradientHaiku.cpp b/Source/WebCore/platform/graphics/haiku/GradientHaiku.cpp deleted file mode 100644 index fdc4690..0000000 --- a/Source/WebCore/platform/graphics/haiku/GradientHaiku.cpp +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright (C) 2008 Kevin Ollivier All rights reserved. - * Copyright (C) 2009 Maxime Simon - * Copyright (C) 2010 Stephan Aßmus - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "Gradient.h" - -#include "GraphicsContext.h" -#include -#include -#include - - -namespace WebCore { - -void Gradient::platformDestroy() -{ - delete m_gradient; -} - -PlatformGradient Gradient::platformGradient() -{ - if (m_gradient) - return m_gradient; - - if (m_radial) { - // TODO: Support m_r0? - m_gradient = new BGradientRadial(m_p0, m_r1); - } else - m_gradient = new BGradientLinear(m_p0, m_p1); - size_t size = m_stops.size(); - for (size_t i = 0; i < size; i++) { - const ColorStop& stop = m_stops[i]; - rgb_color color; - color.red = static_cast(stop.red * 255); - color.green = static_cast(stop.green * 255); - color.blue = static_cast(stop.blue * 255); - color.alpha = static_cast(stop.alpha * 255); - m_gradient->AddColor(color, stop.stop); - } - return m_gradient; -} - -void Gradient::fill(GraphicsContext* context, const FloatRect& rect) -{ - context->platformContext()->FillRect(rect, *platformGradient()); -} - -} // namespace WebCore - diff --git a/Source/WebCore/platform/graphics/haiku/GraphicsContextHaiku.cpp b/Source/WebCore/platform/graphics/haiku/GraphicsContextHaiku.cpp deleted file mode 100644 index 4dafe56..0000000 --- a/Source/WebCore/platform/graphics/haiku/GraphicsContextHaiku.cpp +++ /dev/null @@ -1,548 +0,0 @@ -/* - * Copyright (C) 2007 Ryan Leavengood - * - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "GraphicsContext.h" - -#include "AffineTransform.h" -#include "Color.h" -#include "Font.h" -#include "FontData.h" -#include "NotImplemented.h" -#include "Path.h" -#include -#include -#include -#include -#include -#include - - -namespace WebCore { - -class GraphicsContextPlatformPrivate { -public: - GraphicsContextPlatformPrivate(BView* view); - ~GraphicsContextPlatformPrivate(); - - BView* m_view; -}; - -GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate(BView* view) - : m_view(view) -{ -} - -GraphicsContextPlatformPrivate::~GraphicsContextPlatformPrivate() -{ -} - -void GraphicsContext::platformInit(PlatformGraphicsContext* context) -{ - m_data = new GraphicsContextPlatformPrivate(context); - setPaintingDisabled(!context); -} - -void GraphicsContext::platformDestroy() -{ - delete m_data; -} - -PlatformGraphicsContext* GraphicsContext::platformContext() const -{ - return m_data->m_view; -} - -void GraphicsContext::savePlatformState() -{ - m_data->m_view->PushState(); -} - -void GraphicsContext::restorePlatformState() -{ - m_data->m_view->PopState(); -} - -// Draws a filled rectangle with a stroked border. -void GraphicsContext::drawRect(const IntRect& rect) -{ - if (paintingDisabled()) - return; - - m_data->m_view->FillRect(rect); - if (strokeStyle() != NoStroke) - m_data->m_view->StrokeRect(rect, getHaikuStrokeStyle()); -} - -// This is only used to draw borders. -void GraphicsContext::drawLine(const IntPoint& point1, const IntPoint& point2) -{ - if (paintingDisabled()) - return; - - if (strokeStyle() == NoStroke) - return; - - m_data->m_view->StrokeLine(point1, point2, getHaikuStrokeStyle()); -} - -// This method is only used to draw the little circles used in lists. -void GraphicsContext::drawEllipse(const IntRect& rect) -{ - if (paintingDisabled()) - return; - - m_data->m_view->FillEllipse(rect); - if (strokeStyle() != NoStroke) - m_data->m_view->StrokeEllipse(rect, getHaikuStrokeStyle()); -} - -void GraphicsContext::strokeArc(const IntRect& rect, int startAngle, int angleSpan) -{ - if (paintingDisabled()) - return; - - m_data->m_view->StrokeArc(rect, startAngle, angleSpan, getHaikuStrokeStyle()); -} - -void GraphicsContext::strokePath(const Path&) -{ - notImplemented(); -} - -void GraphicsContext::drawConvexPolygon(size_t pointsLength, const FloatPoint* points, bool shouldAntialias) -{ - if (paintingDisabled()) - return; - - BPoint bPoints[pointsLength]; - for (size_t i = 0; i < pointsLength; i++) - bPoints[i] = points[i]; - - m_data->m_view->FillPolygon(bPoints, pointsLength); - if (strokeStyle() != NoStroke) - // Stroke with low color - m_data->m_view->StrokePolygon(bPoints, pointsLength, true, getHaikuStrokeStyle()); -} - -void GraphicsContext::clipConvexPolygon(size_t numPoints, const FloatPoint* points, bool antialiased) -{ - if (paintingDisabled()) - return; - - if (numPoints <= 1) - return; - - // FIXME: IMPLEMENT!! -} - -void GraphicsContext::fillRect(const FloatRect& rect, const Color& color, ColorSpace colorSpace) -{ - if (paintingDisabled()) - return; - - rgb_color oldColor = m_data->m_view->HighColor(); - m_data->m_view->SetHighColor(color); - m_data->m_view->FillRect(rect); - m_data->m_view->SetHighColor(oldColor); -} - -void GraphicsContext::fillRect(const FloatRect& rect) -{ - if (paintingDisabled()) - return; -} - -void GraphicsContext::fillRoundedRect(const IntRect& rect, const IntSize& topLeft, const IntSize& topRight, const IntSize& bottomLeft, const IntSize& bottomRight, const Color& color, ColorSpace colorSpace) -{ - if (paintingDisabled() || !color.alpha()) - return; - - notImplemented(); - // FIXME: A simple implementation could just use FillRoundRect if all - // the sizes are the same, or even if they are not. Otherwise several - // FillRect and FillArc calls are needed. -} - -void GraphicsContext::fillPath(const Path&) -{ - notImplemented(); -} - -void GraphicsContext::clip(const FloatRect& rect) -{ - if (paintingDisabled()) - return; - - BRegion region(rect); - m_data->m_view->ConstrainClippingRegion(®ion); -} - -void GraphicsContext::drawFocusRing(const Path& path, int width, int offset, const Color& color) -{ - // FIXME: implement -} - -void GraphicsContext::drawFocusRing(const Vector& rects, int /* width */, int /* offset */, const Color& color) -{ - if (paintingDisabled()) - return; - - unsigned rectCount = rects.size(); - - // FIXME: maybe we should implement this with BShape? - - if (rects.size() > 1) { - BRegion region; - for (int i = 0; i < rectCount; ++i) - region.Include(BRect(rects[i])); - - m_data->m_view->SetHighColor(color); - m_data->m_view->StrokeRect(region.Frame(), B_MIXED_COLORS); - } -} - -void GraphicsContext::drawLineForText(const IntPoint& origin, int width, bool printing) -{ - if (paintingDisabled()) - return; - - IntPoint endPoint = origin + IntSize(width, 0); - drawLine(origin, endPoint); -} - -void GraphicsContext::drawLineForTextChecking(const IntPoint&, int width, TextCheckingLineStyle) -{ - if (paintingDisabled()) - return; - - notImplemented(); -} - -FloatRect GraphicsContext::roundToDevicePixels(const FloatRect& rect) -{ - notImplemented(); - return rect; -} - -void GraphicsContext::beginPlatformTransparencyLayer(float opacity) -{ - if (paintingDisabled()) - return; - - notImplemented(); -} - -void GraphicsContext::endPlatformTransparencyLayer() -{ - if (paintingDisabled()) - return; - - notImplemented(); -} - -bool GraphicsContext::supportsTransparencyLayers() -{ - return false; -} - -void GraphicsContext::clearRect(const FloatRect& rect) -{ - if (paintingDisabled()) - return; - - notImplemented(); -} - -void GraphicsContext::strokeRect(const FloatRect& rect, float width) -{ - if (paintingDisabled()) - return; - - float oldSize = m_data->m_view->PenSize(); - m_data->m_view->SetPenSize(width); - m_data->m_view->StrokeRect(rect, getHaikuStrokeStyle()); - m_data->m_view->SetPenSize(oldSize); -} - -void GraphicsContext::setLineCap(LineCap lineCap) -{ - if (paintingDisabled()) - return; - - cap_mode mode = B_BUTT_CAP; - switch (lineCap) { - case RoundCap: - mode = B_ROUND_CAP; - break; - case SquareCap: - mode = B_SQUARE_CAP; - break; - case ButtCap: - default: - break; - } - - m_data->m_view->SetLineMode(mode, m_data->m_view->LineJoinMode(), m_data->m_view->LineMiterLimit()); -} - -void GraphicsContext::setLineJoin(LineJoin lineJoin) -{ - if (paintingDisabled()) - return; - - join_mode mode = B_MITER_JOIN; - switch (lineJoin) { - case RoundJoin: - mode = B_ROUND_JOIN; - break; - case BevelJoin: - mode = B_BEVEL_JOIN; - break; - case MiterJoin: - default: - break; - } - - m_data->m_view->SetLineMode(m_data->m_view->LineCapMode(), mode, m_data->m_view->LineMiterLimit()); -} - -void GraphicsContext::setMiterLimit(float limit) -{ - if (paintingDisabled()) - return; - - m_data->m_view->SetLineMode(m_data->m_view->LineCapMode(), m_data->m_view->LineJoinMode(), limit); -} - -void GraphicsContext::setAlpha(float opacity) -{ - if (paintingDisabled()) - return; - - notImplemented(); -} - -void GraphicsContext::setPlatformCompositeOperation(CompositeOperator op) -{ - if (paintingDisabled()) - return; - - drawing_mode mode = B_OP_COPY; - switch (op) { - case CompositeClear: - case CompositeCopy: - // Use the default above - break; - case CompositeSourceOver: - mode = B_OP_OVER; - break; - default: - printf("GraphicsContext::setPlatformCompositeOperation: Unsupported composite operation %s\n", - compositeOperatorName(op).utf8().data()); - } - m_data->m_view->SetDrawingMode(mode); -} - -void GraphicsContext::clip(const Path& path) -{ - if (paintingDisabled()) - return; - - m_data->m_view->ConstrainClippingRegion(path.platformPath()); -} - -void GraphicsContext::canvasClip(const Path& path) -{ - clip(path); -} - -void GraphicsContext::clipOut(const Path& path) -{ - if (paintingDisabled()) - return; - - notImplemented(); -} - -void GraphicsContext::clipToImageBuffer(const FloatRect&, const ImageBuffer*) -{ - notImplemented(); -} - -AffineTransform GraphicsContext::getCTM() const -{ - notImplemented(); - return AffineTransform(); -} - -void GraphicsContext::translate(float x, float y) -{ - if (paintingDisabled()) - return; - - notImplemented(); -} - -void GraphicsContext::rotate(float radians) -{ - if (paintingDisabled()) - return; - - notImplemented(); -} - -void GraphicsContext::scale(const FloatSize& size) -{ - if (paintingDisabled()) - return; - - notImplemented(); -} - -void GraphicsContext::clipOut(const IntRect& rect) -{ - if (paintingDisabled()) - return; - - notImplemented(); -} - -void GraphicsContext::addInnerRoundedRectClip(const IntRect& rect, int thickness) -{ - if (paintingDisabled()) - return; - - notImplemented(); -} - -void GraphicsContext::concatCTM(const AffineTransform& transform) -{ - if (paintingDisabled()) - return; - - notImplemented(); -} - -void GraphicsContext::setCTM(const AffineTransform& transform) -{ - if (paintingDisabled()) - return; - - notImplemented(); -} - -void GraphicsContext::setPlatformShouldAntialias(bool enable) -{ - if (paintingDisabled()) - return; - - notImplemented(); -} - -void GraphicsContext::setImageInterpolationQuality(InterpolationQuality) -{ -} - -InterpolationQuality GraphicsContext::imageInterpolationQuality() const -{ - notImplemented(); - return InterpolationDefault; -} - -void GraphicsContext::setURLForRect(const KURL& link, const IntRect& destRect) -{ - notImplemented(); -} - -void GraphicsContext::setPlatformFont(const Font& font) -{ - m_data->m_view->SetFont(font.primaryFont()->platformData().font()); -} - -void GraphicsContext::setPlatformStrokeColor(const Color& color, ColorSpace colorSpace) -{ - if (paintingDisabled()) - return; - - m_data->m_view->SetHighColor(color); -} - -pattern GraphicsContext::getHaikuStrokeStyle() -{ - switch (strokeStyle()) { - case SolidStroke: - return B_SOLID_HIGH; - break; - case DottedStroke: - return B_MIXED_COLORS; - break; - case DashedStroke: - // FIXME: use a better dashed stroke! - notImplemented(); - return B_MIXED_COLORS; - break; - default: - return B_SOLID_LOW; - break; - } -} - -void GraphicsContext::setPlatformStrokeStyle(StrokeStyle strokeStyle) -{ - // FIXME: see getHaikuStrokeStyle. - notImplemented(); -} - -void GraphicsContext::setPlatformStrokeThickness(float thickness) -{ - if (paintingDisabled()) - return; - - m_data->m_view->SetPenSize(thickness); -} - -void GraphicsContext::setPlatformFillColor(const Color& color, ColorSpace colorSpace) -{ - if (paintingDisabled()) - return; - - m_data->m_view->SetHighColor(color); -} - -void GraphicsContext::clearPlatformShadow() -{ - notImplemented(); -} - -void GraphicsContext::setPlatformShadow(FloatSize const&, float, Color const&, ColorSpace) -{ - notImplemented(); -} - -} // namespace WebCore - diff --git a/Source/WebCore/platform/graphics/haiku/IconHaiku.cpp b/Source/WebCore/platform/graphics/haiku/IconHaiku.cpp deleted file mode 100644 index 3663ee2..0000000 --- a/Source/WebCore/platform/graphics/haiku/IconHaiku.cpp +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (C) 2007 Ryan Leavengood - * - * All rights reserved. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public License - * along with this library; see the file COPYING.LIB. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - * - */ - -#include "config.h" -#include "Icon.h" - -#include "GraphicsContext.h" -#include "IntRect.h" -#include "NotImplemented.h" -#include "PlatformString.h" - - -namespace WebCore { - -Icon::~Icon() -{ - notImplemented(); -} - -PassRefPtr Icon::createIconForFiles(const Vector& filenames) -{ - notImplemented(); - return 0; -} - -void Icon::paint(GraphicsContext*, const IntRect&) -{ - notImplemented(); -} - -} // namespace WebCore - diff --git a/Source/WebCore/platform/graphics/haiku/ImageBufferDataHaiku.h b/Source/WebCore/platform/graphics/haiku/ImageBufferDataHaiku.h deleted file mode 100644 index 10285fc..0000000 --- a/Source/WebCore/platform/graphics/haiku/ImageBufferDataHaiku.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (C) 2010 Stephan Aßmus - * - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include -#include - -namespace WebCore { - -class IntSize; - -class ImageBufferData { -public: - ImageBufferData(const IntSize&); - ~ImageBufferData(); - - BBitmap m_bitmap; - BView m_view; -}; - -} // namespace WebCore diff --git a/Source/WebCore/platform/graphics/haiku/ImageBufferHaiku.cpp b/Source/WebCore/platform/graphics/haiku/ImageBufferHaiku.cpp deleted file mode 100644 index d26bfb5..0000000 --- a/Source/WebCore/platform/graphics/haiku/ImageBufferHaiku.cpp +++ /dev/null @@ -1,380 +0,0 @@ -/* - * Copyright (C) 2010 Stephan Aßmus - * Copyright (C) 2010 Torch Mobile (Beijing) Co. Ltd. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "ImageBuffer.h" - -#include "Base64.h" -#include "GraphicsContext.h" -#include "ImageData.h" -#include "MIMETypeRegistry.h" -#include "StillImageHaiku.h" -#include -#include -#include -#include -#include - -namespace WebCore { - -ImageBufferData::ImageBufferData(const IntSize& size) - : m_bitmap(BRect(0, 0, size.width() - 1, size.height() - 1), B_RGBA32, true) - , m_view(m_bitmap.Bounds(), "WebKit ImageBufferData", 0, 0) -{ - // Always keep the bitmap locked, we are the only client. - m_bitmap.Lock(); - m_bitmap.AddChild(&m_view); - - // Fill with completely transparent color. - memset(m_bitmap.Bits(), 0, m_bitmap.BitsLength()); - - // Since ImageBuffer is used mainly for Canvas, explicitly initialize - // its view's graphics state with the corresponding canvas defaults - // NOTE: keep in sync with CanvasRenderingContext2D::State - m_view.SetLineMode(B_BUTT_CAP, B_MITER_JOIN, 10); - m_view.SetDrawingMode(B_OP_ALPHA); - m_view.SetBlendingMode(B_PIXEL_ALPHA, B_ALPHA_COMPOSITE); -} - -ImageBufferData::~ImageBufferData() -{ - // Remove the view from the bitmap, keeping it from being free'd twice. - m_view.RemoveSelf(); - m_bitmap.Unlock(); -} - -ImageBuffer::ImageBuffer(const IntSize& size, ImageColorSpace imageColorSpace, RenderingMode, bool& success) - : m_data(size) - , m_size(size) -{ - m_context.set(new GraphicsContext(&m_data.m_view)); - success = true; -} - -ImageBuffer::~ImageBuffer() -{ -} - -size_t ImageBuffer::dataSize() const -{ - return m_size.width() * m_size.height() * 4; -} - -GraphicsContext* ImageBuffer::context() const -{ - ASSERT(m_data.m_view.Window()); - - return m_context.get(); -} - -Image* ImageBuffer::image() const -{ - if (!m_image) { - // It's assumed that if image() is called, the actual rendering to the - // GraphicsContext must be done. - ASSERT(context()); - m_data.m_view.Sync(); - m_image = StillImage::create(m_data.m_bitmap); - } - - return m_image.get(); -} - -void ImageBuffer::platformTransformColorSpace(const Vector& lookUpTable) -{ - uint8* rowData = reinterpret_cast(m_data.m_bitmap.Bits()); - unsigned bytesPerRow = m_data.m_bitmap.BytesPerRow(); - unsigned rows = m_size.height(); - unsigned columns = m_size.width(); - for (unsigned y = 0; y < rows; y++) { - uint8* pixel = rowData; - for (unsigned x = 0; x < columns; x++) { - // lookUpTable doesn't seem to support a LUT for each color channel - // separately (judging from the other ports). We don't need to - // convert from/to pre-multiplied color space since BBitmap storage - // is not pre-multiplied. - pixel[0] = lookUpTable[pixel[0]]; - pixel[1] = lookUpTable[pixel[1]]; - pixel[2] = lookUpTable[pixel[2]]; - // alpha stays unmodified. - pixel += 4; - } - rowData += bytesPerRow; - } -} - -static inline void convertFromData(const uint8* sourceRows, unsigned sourceBytesPerRow, - uint8* destRows, unsigned destBytesPerRow, - unsigned rows, unsigned columns) -{ - for (unsigned y = 0; y < rows; y++) { - const uint8* sourcePixel = sourceRows; - uint8* destPixel = destRows; - for (unsigned x = 0; x < columns; x++) { - // RGBA -> BGRA or BGRA -> RGBA - destPixel[0] = sourcePixel[2]; - destPixel[1] = sourcePixel[1]; - destPixel[2] = sourcePixel[0]; - destPixel[3] = sourcePixel[3]; - destPixel += 4; - sourcePixel += 4; - } - sourceRows += sourceBytesPerRow; - destRows += destBytesPerRow; - } -} - -static inline void convertFromInternalData(const uint8* sourceRows, unsigned sourceBytesPerRow, - uint8* destRows, unsigned destBytesPerRow, - unsigned rows, unsigned columns, - bool premultiplied) -{ - if (premultiplied) { - // Internal storage is not pre-multiplied, pre-multiply on the fly. - for (unsigned y = 0; y < rows; y++) { - const uint8* sourcePixel = sourceRows; - uint8* destPixel = destRows; - for (unsigned x = 0; x < columns; x++) { - // RGBA -> BGRA or BGRA -> RGBA - destPixel[0] = static_cast(sourcePixel[2]) * sourcePixel[3] / 255; - destPixel[1] = static_cast(sourcePixel[1]) * sourcePixel[3] / 255; - destPixel[2] = static_cast(sourcePixel[0]) * sourcePixel[3] / 255; - destPixel[3] = sourcePixel[3]; - destPixel += 4; - sourcePixel += 4; - } - sourceRows += sourceBytesPerRow; - destRows += destBytesPerRow; - } - } else { - convertFromData(sourceRows, sourceBytesPerRow, - destRows, destBytesPerRow, - rows, columns); - } -} - -static inline void convertToInternalData(const uint8* sourceRows, unsigned sourceBytesPerRow, - uint8* destRows, unsigned destBytesPerRow, - unsigned rows, unsigned columns, - bool premultiplied) -{ - if (premultiplied) { - // Internal storage is not pre-multiplied, de-multiply source data. - for (unsigned y = 0; y < rows; y++) { - const uint8* sourcePixel = sourceRows; - uint8* destPixel = destRows; - for (unsigned x = 0; x < columns; x++) { - // RGBA -> BGRA or BGRA -> RGBA - if (sourcePixel[3]) { - destPixel[0] = static_cast(sourcePixel[2]) * 255 / sourcePixel[3]; - destPixel[1] = static_cast(sourcePixel[1]) * 255 / sourcePixel[3]; - destPixel[2] = static_cast(sourcePixel[0]) * 255 / sourcePixel[3]; - destPixel[3] = sourcePixel[3]; - } else { - destPixel[0] = 0; - destPixel[1] = 0; - destPixel[2] = 0; - destPixel[3] = 0; - } - destPixel += 4; - sourcePixel += 4; - } - sourceRows += sourceBytesPerRow; - destRows += destBytesPerRow; - } - } else { - convertFromData(sourceRows, sourceBytesPerRow, - destRows, destBytesPerRow, - rows, columns); - } -} - -static PassRefPtr getImageData(const IntRect& rect, const ImageBufferData& imageData, const IntSize& size, bool premultiplied) -{ - RefPtr result = ImageData::create(IntSize(rect.width(), rect.height())); - unsigned char* data = result->data()->data()->data(); - - // If the destination image is larger than the source image, the outside - // regions need to be transparent. This way is simply, although with a - // a slight overhead for the inside region. - if (rect.x() < 0 || rect.y() < 0 || (rect.x() + rect.width()) > size.width() || (rect.y() + rect.height()) > size.height()) - memset(data, 0, result->data()->length()); - - // If the requested image is outside the source image, we can return at - // this point. - if (rect.x() > size.width() || rect.y() > size.height() || rect.right() < 0 || rect.bottom() < 0) - return result.release(); - - // Now we know there must be an intersection rect which we need to extract. - BRect sourceRect(0, 0, size.width() - 1, size.height() - 1); - sourceRect = BRect(rect) & sourceRect; - - unsigned destBytesPerRow = 4 * rect.width(); - unsigned char* destRows = data; - // Offset the destination pointer to point at the first pixel of the - // intersection rect. - destRows += (rect.x() - static_cast(sourceRect.left)) * 4 - + (rect.y() - static_cast(sourceRect.top)) * destBytesPerRow; - - const uint8* sourceRows = reinterpret_cast(imageData.m_bitmap.Bits()); - uint32 sourceBytesPerRow = imageData.m_bitmap.BytesPerRow(); - // Offset the source pointer to point at the first pixel of the - // intersection rect. - sourceRows += static_cast(sourceRect.left) * 4 - + static_cast(sourceRect.top) * sourceBytesPerRow; - - unsigned rows = sourceRect.IntegerHeight() + 1; - unsigned columns = sourceRect.IntegerWidth() + 1; - convertFromInternalData(sourceRows, sourceBytesPerRow, destRows, destBytesPerRow, - rows, columns, premultiplied); - - return result.release(); -} - - -PassRefPtr ImageBuffer::getUnmultipliedImageData(const IntRect& rect) const -{ - // Make sure all asynchronous drawing has finished - m_data.m_view.Sync(); - return getImageData(rect, m_data, m_size, false); -} - -PassRefPtr ImageBuffer::getPremultipliedImageData(const IntRect& rect) const -{ - // Make sure all asynchronous drawing has finished - m_data.m_view.Sync(); - return getImageData(rect, m_data, m_size, true); -} - -static void putImageData(ImageData* source, const IntRect& sourceRect, const IntPoint& destPoint, ImageBufferData& imageData, const IntSize& size, bool premultiplied) -{ - // If the source image is outside the destination image, we can return at - // this point. - // FIXME: Check if this isn't already done in WebCore. - if (destPoint.x() > size.width() || destPoint.y() > size.height() - || destPoint.x() + sourceRect.width() < 0 - || destPoint.y() + sourceRect.height() < 0) { - return; - } - - const unsigned char* sourceRows = source->data()->data()->data(); - unsigned sourceBytesPerRow = 4 * source->width(); - // Offset the source pointer to the first pixel of the source rect. - sourceRows += sourceRect.x() * 4 + sourceRect.y() * sourceBytesPerRow; - - // We know there must be an intersection rect. - BRect destRect(destPoint.x(), destPoint.y(), sourceRect.width() - 1, sourceRect.height() - 1); - destRect = destRect & BRect(0, 0, size.width() - 1, size.height() - 1); - - unsigned char* destRows = reinterpret_cast(imageData.m_bitmap.Bits()); - uint32 destBytesPerRow = imageData.m_bitmap.BytesPerRow(); - // Offset the source pointer to point at the first pixel of the - // intersection rect. - destRows += static_cast(destRect.left) * 4 - + static_cast(destRect.top) * destBytesPerRow; - - unsigned rows = sourceRect.height(); - unsigned columns = sourceRect.width(); - convertToInternalData(sourceRows, sourceBytesPerRow, destRows, destBytesPerRow, - rows, columns, premultiplied); -} - -void ImageBuffer::putUnmultipliedImageData(ImageData* source, const IntRect& sourceRect, const IntPoint& destPoint) -{ - // Make sure all asynchronous drawing has finished - m_data.m_view.Sync(); - putImageData(source, sourceRect, destPoint, m_data, m_size, false); -} - -void ImageBuffer::putPremultipliedImageData(ImageData* source, const IntRect& sourceRect, const IntPoint& destPoint) -{ - // Make sure all asynchronous drawing has finished - m_data.m_view.Sync(); - putImageData(source, sourceRect, destPoint, m_data, m_size, true); -} - -String ImageBuffer::toDataURL(const String& mimeType, const double*) const -{ - if (!MIMETypeRegistry::isSupportedImageMIMETypeForEncoding(mimeType)) - return "data:,"; - - BString mimeTypeString(mimeType); - - uint32 translatorType = 0; - - BTranslatorRoster* roster = BTranslatorRoster::Default(); - translator_id* translators; - int32 translatorCount; - roster->GetAllTranslators(&translators, &translatorCount); - for (int32 i = 0; i < translatorCount; i++) { - // Skip translators that don't support archived BBitmaps as input data. - const translation_format* inputFormats; - int32 formatCount; - roster->GetInputFormats(translators[i], &inputFormats, &formatCount); - bool supportsBitmaps = false; - for (int32 j = 0; j < formatCount; j++) { - if (inputFormats[j].type == B_TRANSLATOR_BITMAP) { - supportsBitmaps = true; - break; - } - } - if (!supportsBitmaps) - continue; - - const translation_format* outputFormats; - roster->GetOutputFormats(translators[i], &outputFormats, &formatCount); - for (int32 j = 0; j < formatCount; j++) { - if (outputFormats[j].group == B_TRANSLATOR_BITMAP - && mimeTypeString == outputFormats[j].MIME) { - translatorType = outputFormats[j].type; - } - } - if (translatorType) - break; - } - - - BMallocIO translatedStream; - BBitmap* bitmap = const_cast(&m_data.m_bitmap); - // BBitmapStream doesn't take "const Bitmap*"... - BBitmapStream bitmapStream(bitmap); - if (roster->Translate(&bitmapStream, 0, 0, &translatedStream, translatorType, - B_TRANSLATOR_BITMAP, mimeType.utf8().data()) != B_OK) { - bitmapStream.DetachBitmap(&bitmap); - return "data:,"; - } - - bitmapStream.DetachBitmap(&bitmap); - - Vector encodedBuffer; - base64Encode(reinterpret_cast(translatedStream.Buffer()), - translatedStream.BufferLength(), encodedBuffer); - - return "data:" + mimeType + ";base64," + encodedBuffer; -} - -} // namespace WebCore - diff --git a/Source/WebCore/platform/graphics/haiku/ImageHaiku.cpp b/Source/WebCore/platform/graphics/haiku/ImageHaiku.cpp deleted file mode 100644 index 5a55d7c..0000000 --- a/Source/WebCore/platform/graphics/haiku/ImageHaiku.cpp +++ /dev/null @@ -1,195 +0,0 @@ -/* - * Copyright (C) 2006 Dirk Mueller - * Copyright (C) 2006 Zack Rusin - * Copyright (C) 2006 Simon Hausmann - * Copyright (C) 2007 Ryan Leavengood - * Copyright (C) 2008 Andrea Anzani - * Copyright (C) 2010 Stephan Aßmus - * - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "Image.h" - -#include "BitmapImage.h" -#include "FloatRect.h" -#include "GraphicsContext.h" -#include "ImageObserver.h" -#include "NotImplemented.h" -#include "PlatformString.h" -#include "SharedBuffer.h" -#include "TransformationMatrix.h" -#include -#include -#include - -// This function loads resources from WebKit -Vector loadResourceIntoArray(const char*); - - -namespace WebCore { - -bool FrameData::clear(bool clearMetadata) -{ - if (clearMetadata) - m_haveMetadata = false; - - if (m_frame) { - delete m_frame; - m_frame = 0; - m_duration = 0.0f; - m_hasAlpha = true; - return true; - } - - return false; -} - -WTF::PassRefPtr Image::loadPlatformResource(const char* name) -{ - Vector array = loadResourceIntoArray(name); - WTF::PassRefPtr image = BitmapImage::create(); - RefPtr buffer = SharedBuffer::create(array.data(), array.size()); - image->setData(buffer, true); - - return image; -} - -void BitmapImage::initPlatformData() -{ -} - -void BitmapImage::invalidatePlatformData() -{ -} - -// Drawing Routines -void BitmapImage::draw(GraphicsContext* ctxt, const FloatRect& dst, const FloatRect& src, ColorSpace styleColorSpace, CompositeOperator op) -{ - if (!m_source.initialized()) - return; - - // Spin the animation to the correct frame before we try to draw it, so we - // don't draw an old frame and then immediately need to draw a newer one, - // causing flicker and wasting CPU. - startAnimation(); - - BBitmap* image = nativeImageForCurrentFrame(); - if (!image || !image->IsValid()) // If the image hasn't fully loaded. - return; - - if (mayFillWithSolidColor()) { - fillWithSolidColor(ctxt, dst, solidColor(), styleColorSpace, op); - return; - } - - ctxt->save(); - ctxt->setCompositeOperation(op); - - BRect srcRect(src); - BRect dstRect(dst); - - // Test using example site at - // http://www.meyerweb.com/eric/css/edge/complexspiral/demo.html - ctxt->platformContext()->SetDrawingMode(B_OP_ALPHA); - ctxt->platformContext()->DrawBitmapAsync(image, srcRect, dstRect); - ctxt->restore(); - - if (imageObserver()) - imageObserver()->didDraw(this); -} - -void Image::drawPattern(GraphicsContext* context, const FloatRect& tileRect, const AffineTransform& patternTransform, const FloatPoint& phase, ColorSpace, CompositeOperator op, const FloatRect& dstRect) -{ - BBitmap* image = nativeImageForCurrentFrame(); - if (!image || !image->IsValid()) // If the image hasn't fully loaded. - return; - - // Figure out if the image has any alpha transparency, we can use faster drawing if not - bool hasAlpha = false; - - uint8* bits = reinterpret_cast(image->Bits()); - uint32 width = image->Bounds().IntegerWidth() + 1; - uint32 height = image->Bounds().IntegerHeight() + 1; - - uint32 bytesPerRow = image->BytesPerRow(); - for (uint32 y = 0; y < height && !hasAlpha; y++) { - uint8* p = bits; - for (uint32 x = 0; x < width && !hasAlpha; x++) { - hasAlpha = p[3] < 255; - p += 4; - } - bits += bytesPerRow; - } - - context->save(); - if (hasAlpha) - context->platformContext()->SetDrawingMode(B_OP_ALPHA); - else - context->platformContext()->SetDrawingMode(B_OP_COPY); - context->clip(enclosingIntRect(dstRect)); - float currentW = phase.x(); - BRect bTileRect(tileRect); - while (currentW < dstRect.x() + dstRect.width()) { - float currentH = phase.y(); - while (currentH < dstRect.y() + dstRect.height()) { - BRect bDstRect(currentW, currentH, currentW + width - 1, currentH + height - 1); - context->platformContext()->DrawBitmapAsync(image, bTileRect, bDstRect); - currentH += height; - } - currentW += width; - } - context->restore(); - - if (imageObserver()) - imageObserver()->didDraw(this); -} - -void BitmapImage::checkForSolidColor() -{ - m_isSolidColor = false; - m_checkedForSolidColor = true; - - if (frameCount() > 1) - return; - - BBitmap* image = getBBitmap(); - if (!image || !image->Bounds().IsValid() - || image->Bounds().IntegerWidth() > 0 || image->Bounds().IntegerHeight() > 0) { - return; - } - - m_isSolidColor = true; - uint8* bits = reinterpret_cast(image->Bits()); - m_solidColor = Color(bits[2], bits[1], bits[0], bits[3]); -} - -BBitmap* BitmapImage::getBBitmap() const -{ - return const_cast(this)->frameAtIndex(0); -} - -} // namespace WebCore - diff --git a/Source/WebCore/platform/graphics/haiku/IntPointHaiku.cpp b/Source/WebCore/platform/graphics/haiku/IntPointHaiku.cpp deleted file mode 100644 index 327e503..0000000 --- a/Source/WebCore/platform/graphics/haiku/IntPointHaiku.cpp +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (C) 2007 Ryan Leavengood - * - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "IntPoint.h" - -#include - - -namespace WebCore { - -IntPoint::IntPoint(const BPoint& point) - : m_x(static_cast(point.x)) - , m_y(static_cast(point.y)) -{ -} - -IntPoint::operator BPoint() const -{ - return BPoint(m_x, m_y); -} - -} // namespace WebCore - diff --git a/Source/WebCore/platform/graphics/haiku/IntRectHaiku.cpp b/Source/WebCore/platform/graphics/haiku/IntRectHaiku.cpp deleted file mode 100644 index 5ee7207..0000000 --- a/Source/WebCore/platform/graphics/haiku/IntRectHaiku.cpp +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (C) 2007 Ryan Leavengood - * - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "IntRect.h" - -#include - - -namespace WebCore { - -IntRect::IntRect(const BRect& rect) - : m_location(rect.LeftTop()) - , m_size(rect.IntegerWidth() + 1, rect.IntegerHeight() + 1) -{ -} - -IntRect::operator BRect() const -{ - return BRect(BPoint(x(), y()), BSize(width() - 1, height() - 1)); -} - -} // namespace WebCore - diff --git a/Source/WebCore/platform/graphics/haiku/IntSizeHaiku.cpp b/Source/WebCore/platform/graphics/haiku/IntSizeHaiku.cpp deleted file mode 100644 index 08c3a9d..0000000 --- a/Source/WebCore/platform/graphics/haiku/IntSizeHaiku.cpp +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (C) 2007 Ryan Leavengood - * - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "IntSize.h" - -#include - - -namespace WebCore { - -IntSize::IntSize(const BSize& size) - : m_width(size.IntegerWidth()) - , m_height(size.IntegerHeight()) -{ -} - -IntSize::operator BSize() const -{ - return BSize(width(), height()); -} - -} // namespace WebCore - diff --git a/Source/WebCore/platform/graphics/haiku/PathHaiku.cpp b/Source/WebCore/platform/graphics/haiku/PathHaiku.cpp deleted file mode 100644 index 5377e10..0000000 --- a/Source/WebCore/platform/graphics/haiku/PathHaiku.cpp +++ /dev/null @@ -1,164 +0,0 @@ -/* - * Copyright (C) 2007 Ryan Leavengood - * - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "Path.h" - -#include "AffineTransform.h" -#include "FloatRect.h" -#include "NotImplemented.h" -#include "PlatformString.h" -#include - - -namespace WebCore { - -Path::Path() - : m_path(new BRegion()) -{ -} - -Path::~Path() -{ - delete m_path; -} - -Path::Path(const Path& other) - : m_path(new BRegion(*other.platformPath())) -{ -} - -Path& Path::operator=(const Path& other) -{ - if (&other != this) - m_path = other.platformPath(); - - return *this; -} - -bool Path::hasCurrentPoint() const -{ - return !isEmpty(); -} - -FloatPoint Path::currentPoint() const -{ - // FIXME: implement safe way to return current point of subpath. - notImplemented(); - float quietNaN = std::numeric_limits::quiet_NaN(); - return FloatPoint(quietNaN, quietNaN); -} - -bool Path::contains(const FloatPoint& point, WindRule rule) const -{ - return m_path->Contains(point); -} - -void Path::translate(const FloatSize& size) -{ - notImplemented(); -} - -FloatRect Path::boundingRect() const -{ - return m_path->Frame(); -} - -void Path::moveTo(const FloatPoint& point) -{ - // FIXME: Use OffsetBy? - notImplemented(); -} - -void Path::addLineTo(const FloatPoint& p) -{ - notImplemented(); -} - -void Path::addQuadCurveTo(const FloatPoint& cp, const FloatPoint& p) -{ - notImplemented(); -} - -void Path::addBezierCurveTo(const FloatPoint& cp1, const FloatPoint& cp2, const FloatPoint& p) -{ - notImplemented(); -} - -void Path::addArcTo(const FloatPoint& p1, const FloatPoint& p2, float radius) -{ - notImplemented(); -} - -void Path::closeSubpath() -{ - notImplemented(); -} - -void Path::addArc(const FloatPoint& p, float r, float sar, float ear, bool anticlockwise) -{ - notImplemented(); -} - -void Path::addRect(const FloatRect& r) -{ - m_path->Include(r); -} - -void Path::addEllipse(const FloatRect& r) -{ - notImplemented(); -} - -void Path::clear() -{ - m_path->MakeEmpty(); -} - -bool Path::isEmpty() const -{ - return !m_path->Frame().IsValid(); -} - -void Path::apply(void* info, PathApplierFunction function) const -{ - notImplemented(); -} - -void Path::transform(const AffineTransform& transform) -{ - notImplemented(); -} - -FloatRect Path::strokeBoundingRect(StrokeStyleApplier* applier) -{ - notImplemented(); - return FloatRect(); -} - -} // namespace WebCore - diff --git a/Source/WebCore/platform/graphics/haiku/SimpleFontDataHaiku.cpp b/Source/WebCore/platform/graphics/haiku/SimpleFontDataHaiku.cpp deleted file mode 100644 index 55d44af..0000000 --- a/Source/WebCore/platform/graphics/haiku/SimpleFontDataHaiku.cpp +++ /dev/null @@ -1,123 +0,0 @@ -/* - * Copyright (C) 2006 Apple Computer, Inc. All rights reserved. - * Copyright (C) 2009 Maxime Simon All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of - * its contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "SimpleFontData.h" - -#include "FloatRect.h" -#include "FontCache.h" -#include "FontDescription.h" -#include "NotImplemented.h" -#include "TextEncoding.h" -#include - - -namespace WebCore { - -void SimpleFontData::platformInit() -{ - const BFont* font = m_platformData.font(); - if (!font) - return; - - font_height height; - font->GetHeight(&height); - m_fontMetrics.setAscent(height.ascent); - m_fontMetrics.setDescent(height.descent); - m_fontMetrics.setXHeight(height.ascent * 0.56f); // Hack taken from the win port. - m_fontMetrics.setLineGap(height.leading); - m_fontMetrics.setLineSpacing(lroundf(height.ascent) + lroundf(height.descent) + lroundf(height.leading)); -} - -void SimpleFontData::platformCharWidthInit() -{ - m_avgCharWidth = 0.f; - m_maxCharWidth = 0.f; - initCharWidths(); -} - -void SimpleFontData::platformDestroy() -{ -} - -PassOwnPtr SimpleFontData::createScaledFontData(const FontDescription& fontDescription, float scaleFactor) const -{ - FontDescription desc = FontDescription(fontDescription); - desc.setSpecifiedSize(scaleFactor * fontDescription.computedSize()); - FontPlatformData fontPlatformData(desc, desc.family().family()); - return adoptPtr(new SimpleFontData(fontPlatformData, isCustomFont(), false)); -} - -SimpleFontData* SimpleFontData::smallCapsFontData(const FontDescription& fontDescription) const -{ - if (!m_derivedFontData) - m_derivedFontData = DerivedFontData::create(isCustomFont()); - if (!m_derivedFontData->smallCaps) - m_derivedFontData->smallCaps = createScaledFontData(fontDescription, .7); - - return m_derivedFontData->smallCaps.get(); -} - -SimpleFontData* SimpleFontData::emphasisMarkFontData(const FontDescription& fontDescription) const -{ - if (!m_derivedFontData) - m_derivedFontData = DerivedFontData::create(isCustomFont()); - if (!m_derivedFontData->emphasisMark) - m_derivedFontData->emphasisMark = createScaledFontData(fontDescription, .5); - - return m_derivedFontData->emphasisMark.get(); -} - -bool SimpleFontData::containsCharacters(const UChar* characters, int length) const -{ - // FIXME: We will need to implement this to load non-ASCII encoding sites - return true; -} - -void SimpleFontData::determinePitch() -{ - m_treatAsFixedPitch = m_platformData.font() && m_platformData.font()->IsFixed(); -} - -GlyphMetrics SimpleFontData::platformMetricsForGlyph(Glyph glyph, GlyphMetricsMode) const -{ - GlyphMetrics metrics; - if (!m_platformData.font()) - return metrics; - - CString encoded = UTF8Encoding().encode(static_cast(&glyph), 1, - URLEncodedEntitiesForUnencodables); - float escapements[1]; - m_platformData.font()->GetEscapements(encoded.data(), 1, escapements); - metrics.horizontalAdvance = escapements[0] * m_platformData.font()->Size(); - return metrics; -} - -} // namespace WebCore - diff --git a/Source/WebCore/platform/graphics/haiku/StillImageHaiku.cpp b/Source/WebCore/platform/graphics/haiku/StillImageHaiku.cpp deleted file mode 100644 index 7f9fb15..0000000 --- a/Source/WebCore/platform/graphics/haiku/StillImageHaiku.cpp +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Copyright (C) 2010 Stephan Aßmus - * - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "StillImageHaiku.h" - -#include "GraphicsContext.h" -#include "IntSize.h" -#include - -namespace WebCore { - -StillImage::StillImage(const BBitmap& bitmap) - : m_bitmap(&bitmap) -{ -} - -void StillImage::destroyDecodedData(bool destroyAll) -{ - // This is used for "large" animations to free image data. - // It appears it would not apply to StillImage. -} - -unsigned StillImage::decodedSize() const -{ - // FIXME: It could be wise to return 0 here, since we don't want WebCore - // to think we eat up memory, since we are not freeing any in - // destroyDecodedData() either. - return m_bitmap.BitsLength(); -} - -IntSize StillImage::size() const -{ - return IntSize(m_bitmap.Bounds().IntegerWidth() + 1, m_bitmap.Bounds().IntegerHeight() + 1); -} - -NativeImagePtr StillImage::nativeImageForCurrentFrame() -{ - return &m_bitmap; -} - -void StillImage::draw(GraphicsContext* context, const FloatRect& destRect, - const FloatRect& sourceRect, ColorSpace, CompositeOperator op) -{ - if (!m_bitmap.IsValid()) - return; - - context->save(); - context->setCompositeOperation(op); - context->platformContext()->DrawBitmap(&m_bitmap, sourceRect, destRect); - context->restore(); -} - -} diff --git a/Source/WebCore/platform/graphics/haiku/StillImageHaiku.h b/Source/WebCore/platform/graphics/haiku/StillImageHaiku.h deleted file mode 100644 index f4bcbe1..0000000 --- a/Source/WebCore/platform/graphics/haiku/StillImageHaiku.h +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright (C) 2010 Stephan Aßmus - * - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef StillImageHaiku_h -#define StillImageHaiku_h - -#include "Image.h" -#include - -namespace WebCore { - -class StillImage : public Image { -public: - static PassRefPtr create(const BBitmap& bitmap) - { - return adoptRef(new StillImage(bitmap)); - } - - virtual void destroyDecodedData(bool destroyAll = true); - virtual unsigned decodedSize() const; - - virtual IntSize size() const; - virtual NativeImagePtr nativeImageForCurrentFrame(); - virtual void draw(GraphicsContext*, const FloatRect& dstRect, const FloatRect& srcRect, ColorSpace styleColorSpace, CompositeOperator); - -private: - StillImage(const BBitmap&); - - BBitmap m_bitmap; -}; - -} // namespace WebCore - -#endif // StillImageHaiku_h diff --git a/Source/WebCore/platform/haiku/ClipboardHaiku.cpp b/Source/WebCore/platform/haiku/ClipboardHaiku.cpp deleted file mode 100644 index 495f1d2..0000000 --- a/Source/WebCore/platform/haiku/ClipboardHaiku.cpp +++ /dev/null @@ -1,217 +0,0 @@ -/* - * Copyright (C) 2007 Apple Inc. All rights reserved. - * Copyright (C) 2007 Ryan Leavengood - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "ClipboardHaiku.h" - -#include "FileList.h" -#include "IntPoint.h" -#include "NotImplemented.h" -#include "PlatformString.h" - -#include -#include -#include -#include -#include -#include - - -namespace WebCore { - -PassRefPtr Clipboard::create(ClipboardAccessPolicy policy, DragData*, Frame*) -{ - return ClipboardHaiku::create(policy, DragAndDrop); -} - -ClipboardHaiku::ClipboardHaiku(ClipboardAccessPolicy policy, ClipboardType clipboardType) - : Clipboard(policy, clipboardType) -{ -} - -void ClipboardHaiku::clearData(const String& type) -{ - if (be_clipboard->Lock()) { - BMessage* data = be_clipboard->Data(); - - if (data) { - data->RemoveName(BString(type).String()); - be_clipboard->Commit(); - } - - be_clipboard->Unlock(); - } -} - -void ClipboardHaiku::clearAllData() -{ - if (be_clipboard->Lock()) { - be_clipboard->Clear(); - be_clipboard->Commit(); - be_clipboard->Unlock(); - } -} - -String ClipboardHaiku::getData(const String& type, bool& success) const -{ - BString result; - success = false; - - if (be_clipboard->Lock()) { - BMessage* data = be_clipboard->Data(); - - if (data) - if (data->FindString(BString(type).String(), &result) == B_OK) - success = true; - - be_clipboard->Unlock(); - } - - return result; -} - -bool ClipboardHaiku::setData(const String& type, const String& data) -{ - bool result = false; - - if (be_clipboard->Lock()) { - BMessage* bdata = be_clipboard->Data(); - - if (bdata) { - bdata->RemoveName(BString(type).String()); - - if (bdata->AddString(BString(type).String(), BString(data)) == B_OK) - result = true; - } - - be_clipboard->Commit(); - be_clipboard->Unlock(); - } - - return result; -} - -// Extensions beyond IE's API. -HashSet ClipboardHaiku::types() const -{ - HashSet result; - - if (be_clipboard->Lock()) { - BMessage* data = be_clipboard->Data(); - - if (data) { - char* name; - uint32 type; - int32 count; - - for (int32 i = 0; data->GetInfo(B_ANY_TYPE, i, &name, &type, &count) == B_OK; i++) - result.add(name); - } - - be_clipboard->Unlock(); - } - - return result; -} - -PassRefPtr ClipboardHaiku::files() const -{ - notImplemented(); - return 0; -} - -IntPoint ClipboardHaiku::dragLocation() const -{ - notImplemented(); - return IntPoint(0, 0); -} - -CachedImage* ClipboardHaiku::dragImage() const -{ - notImplemented(); - return 0; -} - -void ClipboardHaiku::setDragImage(CachedImage*, const IntPoint&) -{ - notImplemented(); -} - -Node* ClipboardHaiku::dragImageElement() -{ - notImplemented(); - return 0; -} - -void ClipboardHaiku::setDragImageElement(Node*, const IntPoint&) -{ - notImplemented(); -} - -DragImageRef ClipboardHaiku::createDragImage(IntPoint& dragLocation) const -{ - notImplemented(); - return 0; -} - -void ClipboardHaiku::declareAndWriteDragImage(Element*, const KURL&, const String&, Frame*) -{ - notImplemented(); -} - -void ClipboardHaiku::writeURL(const KURL&, const String&, Frame*) -{ - notImplemented(); -} - -void ClipboardHaiku::writeRange(Range*, Frame*) -{ - notImplemented(); -} - -void ClipboardHaiku::writePlainText(const String&) -{ - notImplemented(); -} - -bool ClipboardHaiku::hasData() -{ - bool result = false; - - if (be_clipboard->Lock()) { - BMessage* data = be_clipboard->Data(); - - if (data) - result = !data->IsEmpty(); - - be_clipboard->Unlock(); - } - - return result; -} - -} // namespace WebCore - diff --git a/Source/WebCore/platform/haiku/ClipboardHaiku.h b/Source/WebCore/platform/haiku/ClipboardHaiku.h deleted file mode 100644 index 89dc7bd..0000000 --- a/Source/WebCore/platform/haiku/ClipboardHaiku.h +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright (C) 2007 Apple Inc. All rights reserved. - * Copyright (C) 2007 Ryan Leavengood - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef ClipboardHaiku_h -#define ClipboardHaiku_h - -#include "Clipboard.h" -#include "ClipboardAccessPolicy.h" - -namespace WebCore { - class CachedImage; - - // State available during IE's events for drag and drop and copy/paste. - class ClipboardHaiku : public Clipboard { - public: - static PassRefPtr create(ClipboardAccessPolicy policy, ClipboardType clipboardType) - { - return adoptRef(new ClipboardHaiku(policy, clipboardType)); - } - ~ClipboardHaiku() { } - - void clearData(const String& type); - void clearAllData(); - String getData(const String& type, bool& success) const; - bool setData(const String& type, const String& data); - - // Extensions beyond IE's API. - HashSet types() const; - virtual PassRefPtr files() const; - - IntPoint dragLocation() const; - CachedImage* dragImage() const; - void setDragImage(CachedImage*, const IntPoint&); - Node* dragImageElement(); - void setDragImageElement(Node*, const IntPoint&); - - virtual DragImageRef createDragImage(IntPoint& dragLoc) const; - virtual void declareAndWriteDragImage(Element*, const KURL&, const String& title, Frame*); - virtual void writeURL(const KURL&, const String&, Frame*); - virtual void writeRange(Range*, Frame*); - virtual void writePlainText(const String&); - - virtual bool hasData(); - - private: - ClipboardHaiku(ClipboardAccessPolicy, ClipboardType); - }; -} // namespace WebCore - -#endif // ClipboardHaiku_h - diff --git a/Source/WebCore/platform/haiku/ContextMenuHaiku.cpp b/Source/WebCore/platform/haiku/ContextMenuHaiku.cpp deleted file mode 100644 index aaff99b..0000000 --- a/Source/WebCore/platform/haiku/ContextMenuHaiku.cpp +++ /dev/null @@ -1,122 +0,0 @@ -/* - * Copyright (C) 2006 Zack Rusin - * Copyright (C) 2007 Ryan Leavengood - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "ContextMenu.h" - -#include "ContextMenuController.h" -#include "ContextMenuItem.h" -#include "Document.h" -#include "Frame.h" -#include "FrameView.h" -#include -#include -#include -#include - - -namespace WebCore { - -// FIXME: This class isn't used yet -class ContextMenuReceiver : public BLooper { -public: - ContextMenuReceiver(ContextMenu* menu) - : BLooper("context_menu_receiver") - , m_menu(menu) - , m_result(-1) - { - } - - void HandleMessage(BMessage* msg) - { - m_result = msg->what; - if (m_result != -1) { - BMenuItem* item = m_menu->platformDescription()->FindItem(m_result); - if (!item) { - printf("Error: Context menu item with code %i not found!\n", m_result); - return; - } - ContextMenuItem cmItem(item); - m_menu->controller()->contextMenuItemSelected(&cmItem); - cmItem.releasePlatformDescription(); - } - } - - int Result() - { - return m_result; - } - -private: - ContextMenu* m_menu; - int m_result; -}; - -ContextMenu::ContextMenu() - : m_platformDescription(new BMenu("context_menu")) -{ -} - -ContextMenu::~ContextMenu() -{ - delete m_platformDescription; -} - -void ContextMenu::appendItem(ContextMenuItem& item) -{ - BMenuItem* menuItem = item.releasePlatformDescription(); - if (menuItem) - m_platformDescription->AddItem(menuItem); -} - -unsigned ContextMenu::itemCount() const -{ - return m_platformDescription->CountItems(); -} - -void ContextMenu::insertItem(unsigned position, ContextMenuItem& item) -{ - BMenuItem* menuItem = item.releasePlatformDescription(); - if (menuItem) - m_platformDescription->AddItem(menuItem, position); -} - -PlatformMenuDescription ContextMenu::platformDescription() const -{ - return m_platformDescription; -} - -void ContextMenu::setPlatformDescription(PlatformMenuDescription menu) -{ - if (static_cast(menu) == m_platformDescription) - return; - - delete m_platformDescription; - m_platformDescription = static_cast(menu); -} - -} // namespace WebCore - diff --git a/Source/WebCore/platform/haiku/ContextMenuItemHaiku.cpp b/Source/WebCore/platform/haiku/ContextMenuItemHaiku.cpp deleted file mode 100644 index 469590d..0000000 --- a/Source/WebCore/platform/haiku/ContextMenuItemHaiku.cpp +++ /dev/null @@ -1,164 +0,0 @@ -/* - * Copyright (C) 2006 Zack Rusin - * Copyright (C) 2007 Ryan Leavengood - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "ContextMenuItem.h" - -#include "ContextMenu.h" -#include "NotImplemented.h" - -#include -#include -#include -#include - - -using namespace WebCore; - -ContextMenuItem::ContextMenuItem(PlatformMenuItemDescription item) -{ - m_platformDescription = item; -} - -ContextMenuItem::ContextMenuItem(ContextMenu* subMenu) -{ - m_platformDescription = new BMenuItem(subMenu->platformDescription(), - new BMessage(ContextMenuItemTagNoAction)); -} - -ContextMenuItem::ContextMenuItem(ContextMenuItemType type, ContextMenuAction action, - const String& title, ContextMenu* subMenu) -{ - if (type == ActionType) - m_platformDescription = new BMenuItem(BString(title).String(), new BMessage(action)); - else if (type == SeparatorType) - m_platformDescription = new BSeparatorItem(); - else { - m_platformDescription = new BMenuItem(subMenu->platformDescription(), new BMessage(action)); - m_platformDescription->SetLabel(BString(title).String()); - } -} - -ContextMenuItem::~ContextMenuItem() -{ - delete m_platformDescription; -} - -PlatformMenuItemDescription ContextMenuItem::releasePlatformDescription() -{ - BMenuItem* item = m_platformDescription; - m_platformDescription = 0; - return item; -} - -ContextMenuItemType ContextMenuItem::type() const -{ - if (dynamic_cast(m_platformDescription)) - return SeparatorType; - if (m_platformDescription->Submenu()) - return SubmenuType; - return ActionType; -} - -void ContextMenuItem::setType(ContextMenuItemType type) -{ - ContextMenuAction theAction = action(); - String theTitle = title(); - BMenu* subMenu = platformSubMenu(); - delete m_platformDescription; - - if (type == ActionType) - m_platformDescription = new BMenuItem(BString(theTitle).String(), new BMessage(theAction)); - else if (type == SeparatorType) - m_platformDescription = new BSeparatorItem(); - else { - if (subMenu) { - m_platformDescription = new BMenuItem(subMenu, new BMessage(theAction)); - m_platformDescription->SetLabel(BString(theTitle).String()); - } else - m_platformDescription = new BMenuItem(BString(theTitle).String(), new BMessage(theAction)); - } -} - -ContextMenuAction ContextMenuItem::action() const -{ - if (!m_platformDescription) - return ContextMenuItemTagNoAction; - return static_cast(m_platformDescription->Message()->what); -} - -void ContextMenuItem::setAction(ContextMenuAction action) -{ - if (m_platformDescription) - m_platformDescription->Message()->what = action; -} - -String ContextMenuItem::title() const -{ - if (m_platformDescription) - return ""; - return BString(m_platformDescription->Label()); -} - -void ContextMenuItem::setTitle(const String& title) -{ - // FIXME: We need to find a better way to convert WebKit Strings into c strings - m_platformDescription->SetLabel(BString(title).String()); -} - -PlatformMenuDescription ContextMenuItem::platformSubMenu() const -{ - return m_platformDescription->Submenu(); -} - -void ContextMenuItem::setSubMenu(ContextMenu* menu) -{ - // FIXME: We assume m_platformDescription is valid - const char* title = m_platformDescription->Label(); - delete m_platformDescription; - m_platformDescription = new BMenuItem(menu->platformDescription(), new BMessage(action())); - m_platformDescription->SetLabel(title); -} - -void ContextMenuItem::setChecked(bool checked) -{ - if (m_platformDescription) - m_platformDescription->SetMarked(checked); -} - -void ContextMenuItem::setEnabled(bool enable) -{ - if (m_platformDescription) - m_platformDescription->SetEnabled(enable); -} - -bool ContextMenuItem::enabled() const -{ - if (!m_platformDescription) - return true; - return m_platformDescription->IsEnabled(); -} - diff --git a/Source/WebCore/platform/haiku/CookieJarHaiku.cpp b/Source/WebCore/platform/haiku/CookieJarHaiku.cpp deleted file mode 100644 index 962846b..0000000 --- a/Source/WebCore/platform/haiku/CookieJarHaiku.cpp +++ /dev/null @@ -1,94 +0,0 @@ -/* - * Copyright (C) 2006 George Staikos - * Copyright (C) 2007 Ryan Leavengood - * - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "CookieJar.h" - -#include "Cookie.h" -#include "KURL.h" -#include "PlatformString.h" -#include -#include - - -namespace WebCore { - -// FIXME: Shouldn't this be saved to and restored from disk too? -static HashMap cookieJar; - -void setCookies(Document*, const KURL& url, const String& value) -{ - cookieJar.set(url.string(), value); -} - -String cookies(const Document*, const KURL& url) -{ - return cookieJar.get(url.string()); -} - -String cookieRequestHeaderFieldValue(const Document*, const KURL& url) -{ - // FIXME: include HttpOnly cookies. - return cookieJar.get(url.string()); -} - -bool cookiesEnabled(const Document*) -{ - // FIXME: This should probably be a setting - return true; -} - -bool getRawCookies(const Document*, const KURL&, Vector& rawCookies) -{ - // FIXME: Not yet implemented - rawCookies.clear(); - return false; // return true when implemented -} - -void deleteCookie(const Document*, const KURL&, const String&) -{ - // FIXME: Not yet implemented -} - -void getHostnamesWithCookies(HashSet& hostnames) -{ - // FIXME: Not yet implemented -} - -void deleteCookiesForHostname(const String& hostname) -{ - // FIXME: Not yet implemented -} - -void deleteAllCookies() -{ - // FIXME: Not yet implemented -} - -} // namespace WebCore - diff --git a/Source/WebCore/platform/haiku/CursorHaiku.cpp b/Source/WebCore/platform/haiku/CursorHaiku.cpp deleted file mode 100644 index 58833bc..0000000 --- a/Source/WebCore/platform/haiku/CursorHaiku.cpp +++ /dev/null @@ -1,271 +0,0 @@ -/* - * Copyright (C) 2007 Ryan Leavengood - * Copyright (C) 2010 Stephan Aßmus - * - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "Cursor.h" - -#include "NotImplemented.h" - -namespace WebCore { - -Cursor::Cursor(PlatformCursor cursor) - : m_platformCursor(cursor) -{ -} - -Cursor::Cursor(const Cursor& other) - : m_platformCursor(0) -{ - *this = other; -} - -Cursor::~Cursor() -{ - delete m_platformCursor; -} - -Cursor::Cursor(Image*, const IntPoint&) - : m_platformCursor(0) -{ - notImplemented(); -} - -Cursor& Cursor::operator=(const Cursor& other) -{ - delete m_platformCursor; - m_platformCursor = other.m_platformCursor ? new BCursor(*other.m_platformCursor) : 0; - return *this; -} - -static Cursor createCursorByID(BCursorID id) -{ - return Cursor(new BCursor(id)); -} - -const Cursor& pointerCursor() -{ - static Cursor cursorSystemDefault(0); - return cursorSystemDefault; -} - -const Cursor& moveCursor() -{ - static Cursor cursorMove = createCursorByID(B_CURSOR_ID_MOVE); - return cursorMove; -} - -const Cursor& crossCursor() -{ - static Cursor cursorCrossHair = createCursorByID(B_CURSOR_ID_CROSS_HAIR); - return cursorCrossHair; -} - -const Cursor& handCursor() -{ - static Cursor cursorFollowLink = createCursorByID(B_CURSOR_ID_FOLLOW_LINK); - return cursorFollowLink; -} - -const Cursor& iBeamCursor() -{ - static Cursor cursorIBeam = createCursorByID(B_CURSOR_ID_I_BEAM); - return cursorIBeam; -} - -const Cursor& waitCursor() -{ - static Cursor cursorProgress = createCursorByID(B_CURSOR_ID_PROGRESS); - return cursorProgress; -} - -const Cursor& helpCursor() -{ - static Cursor cursorHelp = createCursorByID(B_CURSOR_ID_HELP); - return cursorHelp; -} - -const Cursor& eastResizeCursor() -{ - static Cursor cursorResizeEast = createCursorByID(B_CURSOR_ID_RESIZE_EAST); - return cursorResizeEast; -} - -const Cursor& northResizeCursor() -{ - static Cursor cursorResizeNorth = createCursorByID(B_CURSOR_ID_RESIZE_NORTH); - return cursorResizeNorth; -} - -const Cursor& northEastResizeCursor() -{ - static Cursor cursorResizeNorthEast = createCursorByID(B_CURSOR_ID_RESIZE_NORTH_EAST); - return cursorResizeNorthEast; -} - -const Cursor& northWestResizeCursor() -{ - static Cursor cursorResizeNorthWest = createCursorByID(B_CURSOR_ID_RESIZE_NORTH_WEST); - return cursorResizeNorthWest; -} - -const Cursor& southResizeCursor() -{ - static Cursor cursorResizeSouth = createCursorByID(B_CURSOR_ID_RESIZE_SOUTH); - return cursorResizeSouth; -} - -const Cursor& southEastResizeCursor() -{ - static Cursor cursorResizeSouthEast = createCursorByID(B_CURSOR_ID_RESIZE_SOUTH_EAST); - return cursorResizeSouthEast; -} - -const Cursor& southWestResizeCursor() -{ - static Cursor cursorResizeSouthWest = createCursorByID(B_CURSOR_ID_RESIZE_SOUTH_WEST); - return cursorResizeSouthWest; -} - -const Cursor& westResizeCursor() -{ - static Cursor cursorResizeWest = createCursorByID(B_CURSOR_ID_RESIZE_WEST); - return cursorResizeWest; -} - -const Cursor& northSouthResizeCursor() -{ - static Cursor cursorResizeNorthSouth = createCursorByID(B_CURSOR_ID_RESIZE_NORTH_SOUTH); - return cursorResizeNorthSouth; -} - -const Cursor& eastWestResizeCursor() -{ - static Cursor cursorResizeEastWest = createCursorByID(B_CURSOR_ID_RESIZE_EAST_WEST); - return cursorResizeEastWest; -} - -const Cursor& northEastSouthWestResizeCursor() -{ - static Cursor cursorResizeNorthEastSouthWest = createCursorByID(B_CURSOR_ID_RESIZE_NORTH_EAST_SOUTH_WEST); - return cursorResizeNorthEastSouthWest; -} - -const Cursor& northWestSouthEastResizeCursor() -{ - static Cursor cursorResizeNorthWestSouthEast = createCursorByID(B_CURSOR_ID_RESIZE_NORTH_WEST_SOUTH_EAST); - return cursorResizeNorthWestSouthEast; -} - -const Cursor& columnResizeCursor() -{ - return eastWestResizeCursor(); -} - -const Cursor& rowResizeCursor() -{ - return northSouthResizeCursor(); -} - -const Cursor& verticalTextCursor() -{ - static Cursor cursorIBeamHorizontal = createCursorByID(B_CURSOR_ID_I_BEAM_HORIZONTAL); - return cursorIBeamHorizontal; -} - -const Cursor& cellCursor() -{ - return pointerCursor(); -} - -const Cursor& contextMenuCursor() -{ - static Cursor cursorContextMenu = createCursorByID(B_CURSOR_ID_CONTEXT_MENU); - return cursorContextMenu; -} - -const Cursor& noDropCursor() -{ - static Cursor cursorNotAllowed = createCursorByID(B_CURSOR_ID_NOT_ALLOWED); - return cursorNotAllowed; -} - -const Cursor& copyCursor() -{ - static Cursor cursorCopy = createCursorByID(B_CURSOR_ID_COPY); - return cursorCopy; -} - -const Cursor& progressCursor() -{ - static Cursor cursorProgress = createCursorByID(B_CURSOR_ID_PROGRESS); - return cursorProgress; -} - -const Cursor& aliasCursor() -{ - return handCursor(); -} - -const Cursor& noneCursor() -{ - static Cursor cursorNoCursor = createCursorByID(B_CURSOR_ID_NO_CURSOR); - return cursorNoCursor; -} - -const Cursor& notAllowedCursor() -{ - static Cursor cursorNotAllowed = createCursorByID(B_CURSOR_ID_NOT_ALLOWED); - return cursorNotAllowed; -} - -const Cursor& zoomInCursor() -{ - static Cursor cursorZoomIn = createCursorByID(B_CURSOR_ID_ZOOM_IN); - return cursorZoomIn; -} - -const Cursor& zoomOutCursor() -{ - static Cursor cursorZoomOut = createCursorByID(B_CURSOR_ID_ZOOM_OUT); - return cursorZoomOut; -} - -const Cursor& grabCursor() -{ - static Cursor cursorGrab = createCursorByID(B_CURSOR_ID_GRAB); - return cursorGrab; -} - -const Cursor& grabbingCursor() -{ - static Cursor cursorGrabbing = createCursorByID(B_CURSOR_ID_GRABBING); - return cursorGrabbing; -} - -} // namespace WebCore - diff --git a/Source/WebCore/platform/haiku/DragDataHaiku.cpp b/Source/WebCore/platform/haiku/DragDataHaiku.cpp deleted file mode 100644 index 5069c6f..0000000 --- a/Source/WebCore/platform/haiku/DragDataHaiku.cpp +++ /dev/null @@ -1,102 +0,0 @@ -/* - * Copyright (C) 2007 Apple Inc. All rights reserved. - * Copyright (C) 2007 Ryan Leavengood - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "DragData.h" - -#include "Document.h" -#include "DocumentFragment.h" -#include "NotImplemented.h" - - -namespace WebCore { - -bool DragData::canSmartReplace() const -{ - notImplemented(); - return false; -} - -bool DragData::containsColor() const -{ - notImplemented(); - return false; -} - -bool DragData::containsFiles() const -{ - notImplemented(); - return false; -} - -void DragData::asFilenames(Vector& result) const -{ - notImplemented(); -} - -bool DragData::containsPlainText() const -{ - notImplemented(); - return false; -} - -String DragData::asPlainText(Frame*) const -{ - notImplemented(); - return String(); -} - -Color DragData::asColor() const -{ - notImplemented(); - return Color(); -} - -bool DragData::containsCompatibleContent() const -{ - return containsColor() || containsURL() || containsPlainText(); -} - -bool DragData::containsURL(Frame*, FilenameConversionPolicy filenamePolicy) const -{ - notImplemented(); - return false; -} - -String DragData::asURL(Frame*, FilenameConversionPolicy filenamePolicy, String* title) const -{ - notImplemented(); - return String(); -} - -PassRefPtr DragData::asFragment(Frame*, PassRefPtr, bool, bool&) const -{ - notImplemented(); - return 0; -} - -} // namespace WebCore - diff --git a/Source/WebCore/platform/haiku/DragImageHaiku.cpp b/Source/WebCore/platform/haiku/DragImageHaiku.cpp deleted file mode 100644 index 87f780a..0000000 --- a/Source/WebCore/platform/haiku/DragImageHaiku.cpp +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright (C) 2007 Apple Inc. All rights reserved. - * Copyright (C) 2007 Ryan Leavengood - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "DragImage.h" - -#include "CachedImage.h" -#include "Image.h" - -#include "NotImplemented.h" - - -namespace WebCore { - -IntSize dragImageSize(DragImageRef) -{ - notImplemented(); - return IntSize(0, 0); -} - -void deleteDragImage(DragImageRef) -{ - notImplemented(); -} - -DragImageRef scaleDragImage(DragImageRef image, FloatSize) -{ - notImplemented(); - return image; -} - -DragImageRef dissolveDragImageToFraction(DragImageRef image, float) -{ - notImplemented(); - return image; -} - -DragImageRef createDragImageFromImage(Image*) -{ - notImplemented(); - return 0; -} - -DragImageRef createDragImageIconForCachedImage(CachedImage*) -{ - notImplemented(); - return 0; -} - -} // namespace WebCore - diff --git a/Source/WebCore/platform/haiku/EventLoopHaiku.cpp b/Source/WebCore/platform/haiku/EventLoopHaiku.cpp deleted file mode 100644 index 4750e6f..0000000 --- a/Source/WebCore/platform/haiku/EventLoopHaiku.cpp +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (C) 2009 Maxime Simon - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "EventLoop.h" - -#include - - -namespace WebCore { - -void EventLoop::cycle() -{ - if (!be_app) - m_ended = true; -} - -} // namespace WebCore - diff --git a/Source/WebCore/platform/haiku/FileSystemHaiku.cpp b/Source/WebCore/platform/haiku/FileSystemHaiku.cpp deleted file mode 100644 index 7985c54..0000000 --- a/Source/WebCore/platform/haiku/FileSystemHaiku.cpp +++ /dev/null @@ -1,94 +0,0 @@ -/* - * Copyright (C) 2007 Ryan Leavengood - * Copyright (C) 2010 Stephan Aßmus - * - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "FileSystem.h" - -#include "NotImplemented.h" -#include "PlatformString.h" -#include - -#include -#include -#include -#include -#include - - -namespace WebCore { - -CString fileSystemRepresentation(const String& string) -{ - return string.utf8(); -} - -String homeDirectoryPath() -{ - BPath path; - if (find_directory(B_USER_DIRECTORY, &path) != B_OK) - return String(); - - return String(path.Path()); -} - -String openTemporaryFile(const String&, PlatformFileHandle& handle) -{ - notImplemented(); - handle = invalidPlatformFileHandle; - return String(); -} - -void closeFile(PlatformFileHandle&) -{ - notImplemented(); -} - -int writeToFile(PlatformFileHandle, const char* data, int length) -{ - notImplemented(); - return 0; -} - -bool unloadModule(PlatformModule) -{ - notImplemented(); - return false; -} - -Vector listDirectory(const String& path, const String& filter) -{ - Vector entries; - BDirectory directory(path.utf8().data()); - entry_ref ref; - while (directory.GetNextRef(&ref) == B_OK) - entries.append(ref.name); - return entries; -} - -} // namespace WebCore - diff --git a/Source/WebCore/platform/haiku/LocalizedStringsHaiku.cpp b/Source/WebCore/platform/haiku/LocalizedStringsHaiku.cpp deleted file mode 100644 index d4c4495..0000000 --- a/Source/WebCore/platform/haiku/LocalizedStringsHaiku.cpp +++ /dev/null @@ -1,506 +0,0 @@ -/* - * Copyright (C) 2009 Maxime Simon - * - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "LocalizedStrings.h" - -#include "NotImplemented.h" -#include "PlatformString.h" - - -namespace WebCore { -String submitButtonDefaultLabel() -{ - return "Submit"; -} - -String inputElementAltText() -{ - return String(); -} - -String resetButtonDefaultLabel() -{ - return "Reset"; -} - -String defaultDetailsSummaryText() -{ - return "Details"; -} - -String defaultLanguage() -{ - return "en"; -} - -String searchableIndexIntroduction() -{ - return "Searchable Index"; -} - -String fileButtonChooseFileLabel() -{ - return "Choose File"; -} - -String fileButtonChooseMultipleFilesLabel() -{ - return "Choose Files"; -} - -String fileButtonNoFileSelectedLabel() -{ - return "No file selected"; -} - -String contextMenuItemTagOpenLinkInNewWindow() -{ - return "Open in new tab"; -} - -String contextMenuItemTagDownloadLinkToDisk() -{ - return "Download link to disk"; -} - -String contextMenuItemTagCopyLinkToClipboard() -{ - return "Copy link to clipboard"; -} - -String contextMenuItemTagOpenImageInNewWindow() -{ - return "Open image in new window"; -} - -String contextMenuItemTagDownloadImageToDisk() -{ - return "Download image to disk"; -} - -String contextMenuItemTagCopyImageToClipboard() -{ - return "Copy image to clipboard"; -} - -String contextMenuItemTagOpenVideoInNewWindow() -{ - return "Open video in new window"; -} - -String contextMenuItemTagOpenAudioInNewWindow() -{ - return "Open audio in new window"; -} - -String contextMenuItemTagCopyVideoLinkToClipboard() -{ - return "Copy video link location"; -} - -String contextMenuItemTagCopyAudioLinkToClipboard() -{ - return "Copy audio link location"; -} - -String contextMenuItemTagToggleMediaControls() -{ - return "Toggle media controls"; -} - -String contextMenuItemTagToggleMediaLoop() -{ - return "Toggle media loop playback"; -} - -String contextMenuItemTagEnterVideoFullscreen() -{ - return "Switch video to fullscreen"; -} - -String contextMenuItemTagMediaPlay() -{ - return "Play"; -} - -String contextMenuItemTagMediaPause() -{ - return "Pause"; -} - -String contextMenuItemTagMediaMute() -{ - return "Mute"; -} - -String contextMenuItemTagOpenFrameInNewWindow() -{ - return "Open frame in new window"; -} - -String contextMenuItemTagCopy() -{ - return "Copy"; -} - -String contextMenuItemTagGoBack() -{ - return "Go back"; -} - -String contextMenuItemTagGoForward() -{ - return "Go forward"; -} - -String contextMenuItemTagStop() -{ - return "Stop"; -} - -String contextMenuItemTagReload() -{ - return "Reload"; -} - -String contextMenuItemTagCut() -{ - return "Cut"; -} - -String contextMenuItemTagPaste() -{ - return "Paste"; -} - -String contextMenuItemTagNoGuessesFound() -{ - return "No guesses found"; -} - -String contextMenuItemTagIgnoreSpelling() -{ - return "Ignore spelling"; -} - -String contextMenuItemTagLearnSpelling() -{ - return "Learn spelling"; -} - -String contextMenuItemTagSearchWeb() -{ - return "Search web"; -} - -String contextMenuItemTagLookUpInDictionary(const String&) -{ - return "Lookup in dictionary"; -} - -String contextMenuItemTagOpenLink() -{ - return "Open link"; -} - -String contextMenuItemTagIgnoreGrammar() -{ - return "Ignore grammar"; -} - -String contextMenuItemTagSpellingMenu() -{ - return "Spelling menu"; -} - -String contextMenuItemTagShowSpellingPanel(bool show) -{ - return "Show spelling panel"; -} - -String contextMenuItemTagCheckSpelling() -{ - return "Check spelling"; -} - -String contextMenuItemTagCheckSpellingWhileTyping() -{ - return "Check spelling while typing"; -} - -String contextMenuItemTagCheckGrammarWithSpelling() -{ - return "Check for grammar with spelling"; -} - -String contextMenuItemTagFontMenu() -{ - return "Font menu"; -} - -String contextMenuItemTagBold() -{ - return "Bold"; -} - -String contextMenuItemTagItalic() -{ - return "Italic"; -} - -String contextMenuItemTagUnderline() -{ - return "Underline"; -} - -String contextMenuItemTagOutline() -{ - return "Outline"; -} - -String contextMenuItemTagWritingDirectionMenu() -{ - return "Writing direction menu"; -} - -String contextMenuItemTagDefaultDirection() -{ - return "Default direction"; -} - -String contextMenuItemTagLeftToRight() -{ - return "Left to right"; -} - -String contextMenuItemTagRightToLeft() -{ - return "Right to left"; -} - -String contextMenuItemTagInspectElement() -{ - return "Inspect"; -} - -String searchMenuNoRecentSearchesText() -{ - return "No recent text searches"; -} - -String searchMenuRecentSearchesText() -{ - return "Recent text searches"; -} - -String searchMenuClearRecentSearchesText() -{ - return "Clear recent text searches"; -} - -String unknownFileSizeText() -{ - return "Unknown"; -} - -String AXWebAreaText() -{ - return String(); -} - -String AXLinkText() -{ - return String(); -} - -String AXListMarkerText() -{ - return String(); -} - -String AXImageMapText() -{ - return String(); -} - -String AXHeadingText() -{ - return String(); -} - -String AXMenuListPopupActionVerb() -{ - return String(); -} - -String AXMenuListActionVerb() -{ - return String(); -} - -String imageTitle(const String& filename, const IntSize& size) -{ - return String(filename); -} - -String contextMenuItemTagTextDirectionMenu() -{ - return String(); -} - -String AXButtonActionVerb() -{ - return String(); -} - -String AXTextFieldActionVerb() -{ - return String(); -} - -String AXRadioButtonActionVerb() -{ - return String(); -} - -String AXCheckedCheckBoxActionVerb() -{ - return String(); -} - -String AXUncheckedCheckBoxActionVerb() -{ - return String(); -} - -String AXLinkActionVerb() -{ - return String(); -} - -String AXDefinitionListTermText() -{ - return String(); -} - -String AXDefinitionListDefinitionText() -{ - return String(); -} - -String validationMessageValueMissingText() -{ - notImplemented(); - return String(); -} - -String validationMessageValueMissingForCheckboxText() -{ - notImplemented(); - return validationMessageValueMissingText(); -} - -String validationMessageValueMissingForFileText() -{ - notImplemented(); - return validationMessageValueMissingText(); -} - -String validationMessageValueMissingForMultipleFileText() -{ - notImplemented(); - return validationMessageValueMissingText(); -} - -String validationMessageValueMissingForRadioText() -{ - notImplemented(); - return validationMessageValueMissingText(); -} - -String validationMessageValueMissingForSelectText() -{ - notImplemented(); - return validationMessageValueMissingText(); -} - -String validationMessageTypeMismatchText() -{ - notImplemented(); - return String(); -} - -String validationMessageTypeMismatchForEmailText() -{ - notImplemented(); - return validationMessageTypeMismatchText(); -} - -String validationMessageTypeMismatchForMultipleEmailText() -{ - notImplemented(); - return validationMessageTypeMismatchText(); -} - -String validationMessageTypeMismatchForURLText() -{ - notImplemented(); - return validationMessageTypeMismatchText(); -} - -String validationMessagePatternMismatchText() -{ - notImplemented(); - return String(); -} - -String validationMessageTooLongText(int, int) -{ - notImplemented(); - return String(); -} - -String validationMessageRangeUnderflowText(const String&) -{ - notImplemented(); - return String(); -} - -String validationMessageRangeOverflowText(const String&) -{ - notImplemented(); - return String(); -} - -String validationMessageStepMismatchText(const String&, const String&) -{ - notImplemented(); - return String(); -} - -} // namespace WebCore diff --git a/Source/WebCore/platform/haiku/LoggingHaiku.cpp b/Source/WebCore/platform/haiku/LoggingHaiku.cpp deleted file mode 100644 index f09c483..0000000 --- a/Source/WebCore/platform/haiku/LoggingHaiku.cpp +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (C) 2009 Maxime Simon - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "Logging.h" - - -namespace WebCore { - -void InitializeLoggingChannelsIfNecessary() -{ - // FIXME: Should read the logging channels from a file. - static bool haveInitializedLoggingChannels = false; - if (haveInitializedLoggingChannels) - return; - - haveInitializedLoggingChannels = true; - - LogEvents.state = WTFLogChannelOn; - LogFrames.state = WTFLogChannelOn; - LogLoading.state = WTFLogChannelOn; - LogPlatformLeaks.state = WTFLogChannelOn; -} - -} // namespace WebCore - diff --git a/Source/WebCore/platform/haiku/MIMETypeRegistryHaiku.cpp b/Source/WebCore/platform/haiku/MIMETypeRegistryHaiku.cpp deleted file mode 100644 index 3cfddf9..0000000 --- a/Source/WebCore/platform/haiku/MIMETypeRegistryHaiku.cpp +++ /dev/null @@ -1,97 +0,0 @@ -/* - * Copyright (C) 2006 Zack Rusin - * Copyright (C) 2006 Apple Computer, Inc. All rights reserved. - * Copyright (C) 2007 Trolltech ASA - * Copyright (C) 2010 Stephan Aßmus - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "MIMETypeRegistry.h" - -#include "PlatformString.h" -#include -#include -#include -#include - -namespace WebCore { -struct ExtensionMap { - const char* extension; - const char* mimeType; -}; - -static const ExtensionMap extensionMap[] = { - { "bmp", "image/bmp" }, - { "gif", "image/gif" }, - { "html", "text/html" }, - { "ico", "image/x-icon" }, - { "jpeg", "image/jpeg" }, - { "jpg", "image/jpeg" }, - { "js", "application/x-javascript" }, - { "pdf", "application/pdf" }, - { "png", "image/png" }, - { "rss", "application/rss+xml" }, - { "svg", "image/svg+xml" }, - { "text", "text/plain" }, - { "txt", "text/plain" }, - { "xbm", "image/x-xbitmap" }, - { "xml", "text/xml" }, - { "xsl", "text/xsl" }, - { "xhtml", "application/xhtml+xml" }, - { 0, 0 } -}; - -String MIMETypeRegistry::getMIMETypeForExtension(const String& ext) -{ - ASSERT(isMainThread()); - - String str = ext.lower(); - - // Try WebCore built-in types. - const ExtensionMap* extMap = extensionMap; - while (extMap->extension) { - if (str == extMap->extension) - return extMap->mimeType; - ++extMap; - } - - // Try system mime database. - String fakeFileName("filename."); - fakeFileName.append(str); - - BMimeType type; - if (BMimeType::GuessMimeType(fakeFileName.utf8().data(), &type) == B_OK) - return type.Type(); - - // unknown - return String(); -} - -bool MIMETypeRegistry::isApplicationPluginMIMEType(const String&) -{ - return false; -} - -} // namespace WebCore - diff --git a/Source/WebCore/platform/haiku/PasteboardHaiku.cpp b/Source/WebCore/platform/haiku/PasteboardHaiku.cpp deleted file mode 100644 index 35a464e..0000000 --- a/Source/WebCore/platform/haiku/PasteboardHaiku.cpp +++ /dev/null @@ -1,227 +0,0 @@ -/* - * Copyright (C) 2006 Zack Rusin - * Copyright (C) 2007 Ryan Leavengood - * Copyright (C) 2010 Stephan Aßmus - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "Pasteboard.h" - -#include "DocumentFragment.h" -#include "Editor.h" -#include "Frame.h" -#include "KURL.h" -#include "NotImplemented.h" -#include "TextResourceDecoder.h" -#include "markup.h" -#include -#include -#include -#include -#include - - -namespace WebCore { - -Pasteboard::Pasteboard() -{ -} - -Pasteboard::~Pasteboard() -{ -} - -Pasteboard* Pasteboard::generalPasteboard() -{ - static Pasteboard pasteboard; - return &pasteboard; -} - -// BClipboard unfortunately does not derive from BLocker, so we cannot use BAutolock. -class AutoClipboardLocker { -public: - AutoClipboardLocker(BClipboard* clipboard) - : m_clipboard(clipboard) - , m_isLocked(clipboard && clipboard->Lock()) - { - } - - ~AutoClipboardLocker() - { - if (m_isLocked) - m_clipboard->Unlock(); - } - - bool isLocked() const - { - return m_isLocked; - } - -private: - BClipboard* m_clipboard; - bool m_isLocked; -}; - -void Pasteboard::writeSelection(Range* selectedRange, bool canSmartCopyOrDelete, Frame* frame) -{ - AutoClipboardLocker locker(be_clipboard); - if (!locker.isLocked()) - return; - - be_clipboard->Clear(); - BMessage* data = be_clipboard->Data(); - if (!data) - return; - - BString string(frame->selectedText()); - - // Replace unwanted representation of blank lines - const char* utf8BlankLine = "\302\240\n"; - string.ReplaceAll(utf8BlankLine, "\n"); - - data->AddData("text/plain", B_MIME_TYPE, string.String(), string.Length()); - - BString markupString(createMarkup(selectedRange, 0, AnnotateForInterchange, false, ResolveNonLocalURLs)); - data->AddData("text/html", B_MIME_TYPE, markupString.String(), markupString.Length()); - - be_clipboard->Commit(); -} - -void Pasteboard::writePlainText(const String& text) -{ - AutoClipboardLocker locker(be_clipboard); - if (!locker.isLocked()) - return; - - be_clipboard->Clear(); - BMessage* data = be_clipboard->Data(); - if (!data) - return; - - BString string(text); - data->AddData("text/plain", B_MIME_TYPE, string.String(), string.Length()); - be_clipboard->Commit(); -} - -bool Pasteboard::canSmartReplace() -{ - notImplemented(); - return false; -} - -String Pasteboard::plainText(Frame* frame) -{ - AutoClipboardLocker locker(be_clipboard); - if (!locker.isLocked()) - return String(); - - BMessage* data = be_clipboard->Data(); - if (!data) - return String(); - - const char* buffer = 0; - ssize_t bufferLength; - BString string; - if (data->FindData("text/plain", B_MIME_TYPE, reinterpret_cast(&buffer), &bufferLength) == B_OK) - string.Append(buffer, bufferLength); - - return string; -} - -PassRefPtr Pasteboard::documentFragment(Frame* frame, PassRefPtr context, - bool allowPlainText, bool& chosePlainText) -{ - chosePlainText = false; - - AutoClipboardLocker locker(be_clipboard); - if (!locker.isLocked()) - return 0; - - BMessage* data = be_clipboard->Data(); - if (!data) - return 0; - - const char* buffer = 0; - ssize_t bufferLength; - if (data->FindData("text/html", B_MIME_TYPE, reinterpret_cast(&buffer), &bufferLength) == B_OK) { - RefPtr decoder = TextResourceDecoder::create("text/plain", "UTF-8", true); - String html = decoder->decode(buffer, bufferLength); - html += decoder->flush(); - - if (!html.isEmpty()) { - RefPtr fragment = createFragmentFromMarkup(frame->document(), html, "", FragmentScriptingNotAllowed); - if (fragment) - return fragment.release(); - } - } - - if (!allowPlainText) - return 0; - - if (data->FindData("text/plain", B_MIME_TYPE, reinterpret_cast(&buffer), &bufferLength) == B_OK) { - BString plainText(buffer, bufferLength); - - chosePlainText = true; - RefPtr fragment = createFragmentFromText(context.get(), plainText); - if (fragment) - return fragment.release(); - } - - return 0; -} - -void Pasteboard::writeURL(const KURL& url, const String&, Frame*) -{ - AutoClipboardLocker locker(be_clipboard); - if (!locker.isLocked()) - return; - - be_clipboard->Clear(); - - BMessage* data = be_clipboard->Data(); - if (!data) - return; - - BString string(url.string()); - data->AddData("text/plain", B_MIME_TYPE, string.String(), string.Length()); - be_clipboard->Commit(); -} - -void Pasteboard::writeImage(Node*, const KURL&, const String&) -{ - notImplemented(); -} - -void Pasteboard::clear() -{ - AutoClipboardLocker locker(be_clipboard); - if (!locker.isLocked()) - return; - - be_clipboard->Clear(); - be_clipboard->Commit(); -} - -} // namespace WebCore - diff --git a/Source/WebCore/platform/haiku/PlatformKeyboardEventHaiku.cpp b/Source/WebCore/platform/haiku/PlatformKeyboardEventHaiku.cpp deleted file mode 100644 index ecf5921..0000000 --- a/Source/WebCore/platform/haiku/PlatformKeyboardEventHaiku.cpp +++ /dev/null @@ -1,390 +0,0 @@ -/* - * Copyright (C) 2007 Ryan Leavengood - * Copyright (C) 2008 Andrea Anzani - * Copyright (C) 2010 Stephan Aßmus - * - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "PlatformKeyboardEvent.h" - -#include "NotImplemented.h" -#include "WindowsKeyboardCodes.h" -#include -#include -#include -#include - - -namespace WebCore { - -static String keyIdentifierForHaikuKeyCode(char singleByte, int keyCode) -{ - switch (singleByte) { - case B_FUNCTION_KEY: - - switch (keyCode) { - case B_F1_KEY: - return "F1"; - case B_F2_KEY: - return "F2"; - case B_F3_KEY: - return "F3"; - case B_F4_KEY: - return "F4"; - case B_F5_KEY: - return "F5"; - case B_F6_KEY: - return "F6"; - case B_F7_KEY: - return "F7"; - case B_F8_KEY: - return "F8"; - case B_F9_KEY: - return "F9"; - case B_F10_KEY: - return "F10"; - case B_F11_KEY: - return "F11"; - case B_F12_KEY: - return "F12"; - case B_PRINT_KEY: - return "Print"; - case B_PAUSE_KEY: - return "Pause"; - case B_SCROLL_KEY: - return ""; // FIXME - } - break; - - case B_BACKSPACE: - return "U+0008"; - case B_LEFT_ARROW: - return "Left"; - case B_RIGHT_ARROW: - return "Right"; - case B_UP_ARROW: - return "Up"; - case B_DOWN_ARROW: - return "Down"; - case B_INSERT: - return "Insert"; - case B_ENTER: - return "Enter"; - case B_DELETE: - return "U+007F"; - case B_HOME: - return "Home"; - case B_END: - return "End"; - case B_PAGE_UP: - return "PageUp"; - case B_PAGE_DOWN: - return "PageDown"; - case B_TAB: - return "U+0009"; - } - - return String::format("U+%04X", toASCIIUpper(singleByte)); -} - -static int windowsKeyCodeForKeyEvent(char singleByte, int keyCode) -{ - switch (singleByte) { - case B_FUNCTION_KEY: - switch (keyCode) { - case B_F1_KEY: - return VK_F1; - case B_F2_KEY: - return VK_F2; - case B_F3_KEY: - return VK_F3; - case B_F4_KEY: - return VK_F4; - case B_F5_KEY: - return VK_F5; - case B_F6_KEY: - return VK_F6; - case B_F7_KEY: - return VK_F7; - case B_F8_KEY: - return VK_F8; - case B_F9_KEY: - return VK_F9; - case B_F10_KEY: - return VK_F10; - case B_F11_KEY: - return VK_F11; - case B_F12_KEY: - return VK_F12; - case B_PRINT_KEY: - return VK_PRINT; - case B_PAUSE_KEY: - return 0; // FIXME - case B_SCROLL_KEY: - return 0; // FIXME - } - break; - - case B_BACKSPACE: - return VK_BACK; // (08) BACKSPACE key - case B_TAB: - return VK_TAB; // (09) TAB key - case B_RETURN: - return VK_RETURN; //(0D) Return key - case B_ESCAPE: - return VK_ESCAPE; // (1B) ESC key - case B_SPACE: - return VK_SPACE; // (20) SPACEBAR - case B_PAGE_UP: - return VK_PRIOR; // (21) PAGE UP key - case B_PAGE_DOWN: - return VK_NEXT; // (22) PAGE DOWN key - case B_END: - return VK_END; // (23) END key - case B_HOME: - return VK_HOME; // (24) HOME key - case B_LEFT_ARROW: - return VK_LEFT; // (25) LEFT ARROW key - case B_UP_ARROW: - return VK_UP; // (26) UP ARROW key - case B_RIGHT_ARROW: - return VK_RIGHT; // (27) RIGHT ARROW key - case B_DOWN_ARROW: - return VK_DOWN; // (28) DOWN ARROW key - case B_INSERT: - return VK_INSERT; // (2D) INS key - case B_DELETE: - return VK_DELETE; // (2E) DEL key - - case '0': - case ')': - return VK_0; - case '1': - case '!': - return VK_1; - case '2': - case '@': - return VK_2; - case '3': - case '#': - return VK_3; - case '4': - case '$': - return VK_4; - case '5': - case '%': - return VK_5; - case '6': - case '^': - return VK_6; - case '7': - case '&': - return VK_7; - case '8': - case '*': - return VK_8; - case '9': - case '(': - return VK_9; - case 'a': - case 'A': - return VK_A; - case 'b': - case 'B': - return VK_B; - case 'c': - case 'C': - return VK_C; - case 'd': - case 'D': - return VK_D; - case 'e': - case 'E': - return VK_E; - case 'f': - case 'F': - return VK_F; - case 'g': - case 'G': - return VK_G; - case 'h': - case 'H': - return VK_H; - case 'i': - case 'I': - return VK_I; - case 'j': - case 'J': - return VK_J; - case 'k': - case 'K': - return VK_K; - case 'l': - case 'L': - return VK_L; - case 'm': - case 'M': - return VK_M; - case 'n': - case 'N': - return VK_N; - case 'o': - case 'O': - return VK_O; - case 'p': - case 'P': - return VK_P; - case 'q': - case 'Q': - return VK_Q; - case 'r': - case 'R': - return VK_R; - case 's': - case 'S': - return VK_S; - case 't': - case 'T': - return VK_T; - case 'u': - case 'U': - return VK_U; - case 'v': - case 'V': - return VK_V; - case 'w': - case 'W': - return VK_W; - case 'x': - case 'X': - return VK_X; - case 'y': - case 'Y': - return VK_Y; - case 'z': - case 'Z': - return VK_Z; - case ';': - case ':': - return VK_OEM_1; - case '+': - case '=': - return VK_OEM_PLUS; - case ',': - case '<': - return VK_OEM_COMMA; - case '-': - case '_': - return VK_OEM_MINUS; - case '.': - case '>': - return VK_OEM_PERIOD; - case '/': - case '?': - return VK_OEM_2; - case '`': - case '~': - return VK_OEM_3; - case '[': - case '{': - return VK_OEM_4; - case '\\': - case '|': - return VK_OEM_5; - case ']': - case '}': - return VK_OEM_6; - case '\'': - case '"': - return VK_OEM_7; - } - return singleByte; -} - -PlatformKeyboardEvent::PlatformKeyboardEvent(BMessage* message) - : m_autoRepeat(false) - , m_isKeypad(false) - , m_shiftKey(false) - , m_ctrlKey(false) - , m_altKey(false) - , m_metaKey(false) -{ - BString bytes = message->FindString("bytes"); - - m_nativeVirtualKeyCode = message->FindInt32("key"); - - m_text = String::fromUTF8(bytes.String(), bytes.Length()); - m_unmodifiedText = String(bytes.String(), bytes.Length()); - m_keyIdentifier = keyIdentifierForHaikuKeyCode(bytes.ByteAt(0), m_nativeVirtualKeyCode); - - m_windowsVirtualKeyCode = windowsKeyCodeForKeyEvent(bytes.ByteAt(0), m_nativeVirtualKeyCode); - - if (message->what == B_KEY_UP) - m_type = KeyUp; - else if (message->what == B_KEY_DOWN) - m_type = KeyDown; - - int32 modifiers = message->FindInt32("modifiers"); - m_shiftKey = modifiers & B_SHIFT_KEY; - m_ctrlKey = modifiers & B_COMMAND_KEY; - m_altKey = modifiers & B_CONTROL_KEY; - m_metaKey = modifiers & B_OPTION_KEY; -} - -void PlatformKeyboardEvent::disambiguateKeyDownEvent(Type type, bool backwardCompatibilityMode) -{ - // Can only change type from KeyDown to RawKeyDown or Char, as we lack information for other conversions. - ASSERT(m_type == KeyDown); - m_type = type; - - if (backwardCompatibilityMode) - return; - - if (type == RawKeyDown) { - m_text = String(); - m_unmodifiedText = String(); - } else { - m_keyIdentifier = String(); - m_windowsVirtualKeyCode = 0; - } -} - -bool PlatformKeyboardEvent::currentCapsLockState() -{ - return ::modifiers() & B_CAPS_LOCK; -} - -void PlatformKeyboardEvent::getCurrentModifierState(bool& shiftKey, bool& ctrlKey, bool& altKey, bool& metaKey) -{ - unit32 modifiers = ::modifiers(); - shiftKey = modifiers & B_SHIFT_KEY; - ctrlKey = modifiers & B_COMMAND_KEY; - altKey = modifiers & B_CONTROL_KEY; - metaKey = modifiers & B_OPTION_KEY; -} - -} // namespace WebCore - diff --git a/Source/WebCore/platform/haiku/PlatformMouseEventHaiku.cpp b/Source/WebCore/platform/haiku/PlatformMouseEventHaiku.cpp deleted file mode 100644 index f1051a5..0000000 --- a/Source/WebCore/platform/haiku/PlatformMouseEventHaiku.cpp +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright (C) 2007 Ryan Leavengood - * Copyright (C) 2009 Maxime Simon - * Copyright (C) 2010 Stephan Aßmus - * - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "PlatformMouseEvent.h" - -#include -#include - -namespace WebCore { - -PlatformMouseEvent::PlatformMouseEvent(const BMessage* message) - : m_position(message->FindPoint("be:view_where")) - , m_globalPosition(message->FindPoint("screen_where")) - , m_clickCount(message->FindInt32("clicks")) - , m_timestamp(message->FindInt64("when") / 1000000.0) -{ - int32 buttons = 0; - if (message->what == B_MOUSE_UP) - message->FindInt32("previous buttons", &buttons); - else - message->FindInt32("buttons", &buttons); - - if (buttons & B_PRIMARY_MOUSE_BUTTON) - m_button = LeftButton; - else if (buttons & B_SECONDARY_MOUSE_BUTTON) - m_button = RightButton; - else if (buttons & B_TERTIARY_MOUSE_BUTTON) - m_button = MiddleButton; - else - m_button = NoButton; - - switch (message->what) { - case B_MOUSE_DOWN: - m_eventType = MouseEventPressed; - break; - case B_MOUSE_UP: - m_eventType = MouseEventReleased; - break; - case B_MOUSE_MOVED: - default: - m_eventType = MouseEventMoved; - break; - }; - - int32 modifiers = message->FindInt32("modifiers"); - m_shiftKey = modifiers & B_SHIFT_KEY; - m_ctrlKey = modifiers & B_CONTROL_KEY; - m_altKey = modifiers & B_COMMAND_KEY; - m_metaKey = modifiers & B_OPTION_KEY; -} - -} // namespace WebCore - diff --git a/Source/WebCore/platform/haiku/PlatformWheelEventHaiku.cpp b/Source/WebCore/platform/haiku/PlatformWheelEventHaiku.cpp deleted file mode 100644 index 351b4ec..0000000 --- a/Source/WebCore/platform/haiku/PlatformWheelEventHaiku.cpp +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright (C) 2007 Ryan Leavengood - * Copyright (C) 2009 Maxime Simon - * Copyright (C) 2010 Stephan Aßmus - * - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "PlatformWheelEvent.h" - -#include "Scrollbar.h" - -#include -#include -#include - - -namespace WebCore { - -PlatformWheelEvent::PlatformWheelEvent(BMessage* message) - : m_position(message->FindPoint("be:view_where")) - , m_globalPosition(message->FindPoint("screen_where")) - , m_deltaX(message->FindFloat("be:wheel_delta_x")) - , m_deltaY(message->FindFloat("be:wheel_delta_y")) - , m_wheelTicksX(m_deltaX) - , m_wheelTicksY(m_deltaY) - , m_granularity(ScrollByPixelWheelEvent) - , m_isAccepted(false) -{ - m_deltaX *= -Scrollbar::pixelsPerLineStep(); - m_deltaY *= -Scrollbar::pixelsPerLineStep(); - - int32 modifiers = message->FindInt32("modifiers"); - m_shiftKey = modifiers & B_SHIFT_KEY; - m_ctrlKey = modifiers & B_CONTROL_KEY; - m_altKey = modifiers & B_COMMAND_KEY; - m_metaKey = modifiers & B_OPTION_KEY; -} - -} // namespace WebCore - diff --git a/Source/WebCore/platform/haiku/PopupMenuHaiku.cpp b/Source/WebCore/platform/haiku/PopupMenuHaiku.cpp deleted file mode 100644 index e3edb83..0000000 --- a/Source/WebCore/platform/haiku/PopupMenuHaiku.cpp +++ /dev/null @@ -1,192 +0,0 @@ -/* - * This file is part of the popup menu implementation for can't display right-to-left (rtl) languages - https://bugs.webkit.org/show_bug.cgi?id=19785 - - * WebCoreSupport/ChromeClientHaiku.cpp: - (WebCore::ChromeClientHaiku::selectItemAlignmentFollowsMenuWritingDirection): Added. - * WebCoreSupport/ChromeClientHaiku.h: - -2011-01-27 Nate Chapin - - Reviewed by Adam Barth. - - Use Document::url() instead of FrameLoader::url(). - https://bugs.webkit.org/show_bug.cgi?id=41165 - - * WebCoreSupport/FrameLoaderClientHaiku.cpp: - (WebCore::FrameLoaderClientHaiku::dispatchDidFinishDocumentLoad): - -2010-12-22 Sam Weinig - - Reviewed by Darin Adler. - - WebKit2 needs to mirror the frame tree in the UIProcess - https://bugs.webkit.org/show_bug.cgi?id=51546 - - - Add client functions to notify that a frame has been added or - removed from the page cache. - - * WebCoreSupport/FrameLoaderClientHaiku.cpp: - (WebCore::FrameLoaderClientHaiku::didSaveToPageCache): - (WebCore::FrameLoaderClientHaiku::didRestoreFromPageCache): - * WebCoreSupport/FrameLoaderClientHaiku.h: - -2010-12-22 Ryosuke Niwa - - Reviewed by Eric Seidel. - - Editor.h doesn't need to include SelectionController.h - https://bugs.webkit.org/show_bug.cgi?id=51441 - - Renamed SelectionController::EDirection to SelectionDirection. - - * WebCoreSupport/EditorClientHaiku.cpp: - (WebCore::EditorClientHaiku::handleKeyboardEvent): - -2010-10-28 MORITA Hajime - - Reviewed by Ojan Vafai. - - spellcheck does not check pasted text - https://bugs.webkit.org/show_bug.cgi?id=40092 - - Added a stub implememntation. - - * WebCoreSupport/EditorClientHaiku.h: - (WebCore::EditorClientHaiku::requestCheckingOfString): - -2010-12-01 Jia Pu - - Reviewed by Darin Adler. - - Support multiple correction candidates panel for misspelled word on Mac OS X. - https://bugs.webkit.org/show_bug.cgi?id=50137 - - - Adopted new function signature defined in base class. - - * WebCoreSupport/EditorClientHaiku.cpp: - (WebCore::EditorClientHaiku::getGuessesForWord): - * WebCoreSupport/EditorClientHaiku.h: - -2010-11-08 Alexey Proskuryakov - - Reviewed by Darin Adler. - - https://bugs.webkit.org/show_bug.cgi?id=48685 - Notify UI process about focused frame - - Added an empty implementation of the new ChromeClient method. Also, added missing "virtual" - keywords all over the place. - - * WebCoreSupport/ChromeClientHaiku.cpp: - (WebCore::ChromeClientHaiku::focusedFrameChanged): - * WebCoreSupport/ChromeClientHaiku.h: - (WebCore::ChromeClientHaiku::scrollbarsModeDidChange): - (WebCore::ChromeClientHaiku::cancelGeolocationPermissionRequestForFrame): - -2010-11-01 Brady Eidson - - Reviewed by Anders Carlsson. - - and https://bugs.webkit.org/show_bug.cgi?id=48699 - Context menu support for WebKit 2. - - * WebCoreSupport/ChromeClientHaiku.h: - (WebCore::ChromeClientHaiku::showContextMenu): - -2010-10-29 Alexey Proskuryakov - - Reviewed by Darin Adler. - - https://bugs.webkit.org/show_bug.cgi?id=48576 - Let WebKit2 client know when a frame is a frameset - - Added a blank implementation of the new FrameLoaderClient method. - - * WebCoreSupport/FrameLoaderClientHaiku.h: - * WebCoreSupport/FrameLoaderClientHaiku.cpp: - (WebCore::FrameLoaderClientHaiku::dispatchDidBecomeFrameset): - -2010-10-26 Jenn Braithwaite - - Reviewed by Dmitry Titov. - - Resource tracking failure when trying to move a frame between documents - https://bugs.webkit.org/show_bug.cgi?id=44713 - - * WebCoreSupport/FrameLoaderClientHaiku.cpp: - (WebCore::FrameLoaderClientHaiku::transferLoadingResourceFromPage): - Empty method. - * WebCoreSupport/FrameLoaderClientHaiku.h: - -2010-10-22 Sam Weinig - - Reviewed by Anders Carlsson. - - WebKit2 needs to pass the current event modifier flags when requesting a new window - https://bugs.webkit.org/show_bug.cgi?id=48140 - - * WebCoreSupport/ChromeClientHaiku.cpp: - (WebCore::ChromeClientHaiku::createWindow): - * WebCoreSupport/ChromeClientHaiku.h: - * WebCoreSupport/FrameLoaderClientHaiku.cpp: - (WebCore::FrameLoaderClientHaiku::dispatchCreatePage): - * WebCoreSupport/FrameLoaderClientHaiku.h: - Add NavigationAction parameter. - -2010-09-28 Jenn Braithwaite - - Reviewed by Dmitry Titov. - - Added oldPage param to FrameLoaderClient::didTransferChildFrameToNewDocument. - https://bugs.webkit.org/show_bug.cgi?id=46663 - - * WebCoreSupport/FrameLoaderClientHaiku.cpp: - (WebCore::FrameLoaderClientHaiku::didTransferChildFrameToNewDocument): - * WebCoreSupport/FrameLoaderClientHaiku.h: - -2010-09-13 Enrica Casucci - - Reviewed by Sam Weinig. - - Paste should be implemented in WebCore like Copy and Cut for Mac also. - https://bugs.webkit.org/show_bug.cgi?id=45494 - - - On the Mac platform, the implementation of the paste operation is all done - at the WebKit level. In order to support it on WebKit2 it is necessary to - refactor the code and move this functionality at the level of WebCore like - we already have on Windows. - The original code relies on some in AppKit functions that call back into - WebKit causing problems in WebKit2. All this functionality has been moved - at the level of the editor client where it can be dealt with appropriately. - - * WebCoreSupport/FrameLoaderClientHaiku.cpp: - (WebCore::FrameLoaderClientHaiku::canShowMIMETypeAsHTML): Added stub. - * WebCoreSupport/FrameLoaderClientHaiku.h: - -2010-09-10 Adam Barth - - Reviewed by Darin Fisher. - - Move code from WebKit-layer to DocumentLoader - https://bugs.webkit.org/show_bug.cgi?id=45569 - - * WebCoreSupport/FrameLoaderClientHaiku.cpp: - (WebCore::FrameLoaderClientHaiku::committedLoad): - -2010-09-10 Adam Barth - - Reviewed by Eric Seidel. - - Main resource bytes shouldn't bounce through FrameLoader - https://bugs.webkit.org/show_bug.cgi?id=45496 - - Now return the bytes to the DocumentLoader. - - * WebCoreSupport/FrameLoaderClientHaiku.cpp: - (WebCore::FrameLoaderClientHaiku::committedLoad): - -2010-08-06 Gavin Barraclough - - Rubber stamped by Sam Weinig - - Bug 43594 - Add string forwards to Forward.h - This allows us to remove forward declarations for these classes from - WebCore/WebKit (a step in moving these class from WebCore:: to WTF::). - - * WebCoreSupport/FrameLoaderClientHaiku.h: - * WebCoreSupport/InspectorClientHaiku.h: - -2010-08-06 Jessie Berlin - - Roll out http://trac.webkit.org/changeset/64801, which broke the Safari Windows Build. - Unreviewed. - - * WebCoreSupport/FrameLoaderClientHaiku.h: - * WebCoreSupport/InspectorClientHaiku.h: - -2010-07-27 Luiz Agostini - - Reviewed by Darin Fisher. - - PopupMenu refactoring in preparation to WebKit2 - https://bugs.webkit.org/show_bug.cgi?id=42592 - - As ChromeClient was made responsible for providing PopupMenu and SearchPopupMenu - instances, concrete classes that inherit from ChromeClient needed to be changed to - implement the new methods. - - * WebCoreSupport/ChromeClientHaiku.cpp: - (WebCore::ChromeClientHaiku::selectItemWritingDirectionIsNatural): - (WebCore::ChromeClientHaiku::createPopupMenu): - (WebCore::ChromeClientHaiku::createSearchPopupMenu): - * WebCoreSupport/ChromeClientHaiku.h: - -2010-08-02 Jeremy Orlow - - Speculative revert of 64425 due to Chromium instability - https://bugs.webkit.org/show_bug.cgi?id=43347 - - * WebCoreSupport/ChromeClientHaiku.cpp: - * WebCoreSupport/ChromeClientHaiku.h: - -2010-07-27 Luiz Agostini - - Reviewed by Darin Fisher. - - PopupMenu refactoring in preparation to WebKit2 - https://bugs.webkit.org/show_bug.cgi?id=42592 - - As ChromeClient was made responsible for providing PopupMenu and SearchPopupMenu - instances, concrete classes that inherit from ChromeClient needed to be changed to - implement the new methods. - - * WebCoreSupport/ChromeClientHaiku.cpp: - (WebCore::ChromeClientHaiku::selectItemWritingDirectionIsNatural): - (WebCore::ChromeClientHaiku::createPopupMenu): - (WebCore::ChromeClientHaiku::createSearchPopupMenu): - * WebCoreSupport/ChromeClientHaiku.h: - -2010-07-31 Sheriff Bot - - Unreviewed, rolling out r64422. - http://trac.webkit.org/changeset/64422 - https://bugs.webkit.org/show_bug.cgi?id=43304 - - Build fixes are needed for Snow Leopard and Windows. - (Requested by lca on #webkit). - - * WebCoreSupport/ChromeClientHaiku.cpp: - * WebCoreSupport/ChromeClientHaiku.h: - -2010-07-27 Luiz Agostini - - Reviewed by Darin Fisher. - - PopupMenu refactoring in preparation to WebKit2 - https://bugs.webkit.org/show_bug.cgi?id=42592 - - As ChromeClient was made responsible for providing PopupMenu and SearchPopupMenu - instances, concrete classes that inherit from ChromeClient needed to be changed to - implement the new methods. - - * WebCoreSupport/ChromeClientHaiku.cpp: - (WebCore::ChromeClientHaiku::selectItemWritingDirectionIsNatural): - (WebCore::ChromeClientHaiku::createPopupMenu): - (WebCore::ChromeClientHaiku::createSearchPopupMenu): - * WebCoreSupport/ChromeClientHaiku.h: - -2010-07-30 Joseph Pecoraro - - Reviewed by David Kilzer. - - Limit ApplicationCache Total and Per-Origin Storage Capacity (Quotas) - https://bugs.webkit.org/show_bug.cgi?id=40627 - - * WebCoreSupport/ChromeClientHaiku.cpp: - (WebCore::ChromeClientWx::reachedApplicationCacheOriginQuota): - * WebCoreSupport/ChromeClientHaiku.h: - -2010-07-16 Zhe Su - - Reviewed by Darin Adler. - - REGRESSION(r61484): Broke focus behaviour on Qt and probably other platforms - https://bugs.webkit.org/show_bug.cgi?id=42253 - - Dummy implementation of EditorClient::willSetInputMethodState. - - * WebCoreSupport/EditorClientHaiku.cpp: - (WebCore::EditorClientHaiku::willSetInputMethodState): - * WebCoreSupport/EditorClientHaiku.h: - -2010-07-14 Sam Weinig - - Reviewed by Darin Adler. - - Patch for https://bugs.webkit.org/show_bug.cgi?id=42232 - Make changing Cursors work in WebKit2. - - * WebCoreSupport/ChromeClientHaiku.cpp: - (WebCore::ChromeClientHaiku::setCursor): - * WebCoreSupport/ChromeClientHaiku.h: - Change prototype to match new one. - -2010-06-14 Ilya Tikhonovsky - - Reviewed by Pavel Feldman. - - WebInspector: On the way to Remote Debugging we want to transfer dom/timeline/etc - data from inspected page to WebInspector as JSON string via http. The native - serialization to JSON string is supported by InspectorValue's classes. This patch - has the implementation of sendMessageToFrontend function. WebKit version of it still - uses ScriptFunctionCall and will be switched to another transport a little bit later. - https://bugs.webkit.org/show_bug.cgi?id=40134 - - * WebCoreSupport/InspectorClientHaiku.cpp: - (WebCore::InspectorClientHaiku::sendMessageToFrontend): - * WebCoreSupport/InspectorClientHaiku.h: - -2010-06-09 Sheriff Bot - - Unreviewed, rolling out r60889. - http://trac.webkit.org/changeset/60889 - https://bugs.webkit.org/show_bug.cgi?id=40365 - - gtk bot has some kind of memory corruption (Requested by - loislo on #webkit). - - * WebCoreSupport/InspectorClientHaiku.cpp: - * WebCoreSupport/InspectorClientHaiku.h: - -2010-06-07 Ilya Tikhonovsky - - Reviewed by Pavel Feldman. - - WebInspector: On the way to Remote Debugging we want to transfer dom/timeline/etc - data from inspected page to WebInspector as JSON string via http. The native - serialization to JSON string is supported by InspectorValue's classes. This patch - has the implementation of sendMessageToFrontend function. WebKit version of it still - uses ScriptFunctionCall and will be switched to another transport a little bit later. - https://bugs.webkit.org/show_bug.cgi?id=40134 - - * WebCoreSupport/InspectorClientHaiku.cpp: - (WebCore::InspectorClientHaiku::sendMessageToFrontend): - * WebCoreSupport/InspectorClientHaiku.h: - -2010-05-31 Lyon Chen - - Reviewed by Kent Tamura. - - Enum value FORWARD, BACKWARD, RIGHT, LEFT are causing macro conflicts. - https://bugs.webkit.org/show_bug.cgi?id=35530 - - Change enum EAlteration from { MOVE, EXTEND } to { AlterationMove, AlterationExtend } and enum EDirection { FORWARD, BACKWARD, RIGHT, LEFT} to { DirectionForward, DirectionBackward, DirectionRight, DirectionLeft } to avoid macro conflict, and also better coding style conformance. - - * WebCoreSupport/EditorClientHaiku.cpp: - (WebCore::EditorClientHaiku::handleKeyboardEvent): - -2010-05-30 Lyon Chen - - Reviewed by Kent Tamura. - - This is a coding style cleanup before fixing to bug 35530. - - Enum value FORWARD, BACKWARD, RIGHT, LEFT are causing macro conflicts. - https://bugs.webkit.org/show_bug.cgi?id=35530 - - * WebCoreSupport/EditorClientHaiku.cpp: - (WebCore::EditorClientHaiku::handleKeyboardEvent): - -2010-05-03 Jens Alfke - - Reviewed by Darin Fisher. - - [chromium] Add "willSendSubmitEvent" hook to WebFrameClient and FrameLoaderClient - https://bugs.webkit.org/show_bug.cgi?id=38397 - - No tests (functionality is exposed only through native WebKit API.) - - * WebCoreSupport/FrameLoaderClientHaiku.h: - (WebCore::FrameLoaderClientHaiku::dispatchWillSendSubmitEvent): - -2010-04-20 Adam Barth - - Reviewed by Eric Seidel. - - Factor DocumentWriter out of FrameLoader - https://bugs.webkit.org/show_bug.cgi?id=37175 - - Update these callsites because the method moved to DocumentWriter. - - * WebCoreSupport/FrameLoaderClientHaiku.cpp: - (WebCore::FrameLoaderClientHaiku::committedLoad): - -2010-04-20 Kent Tamura - - Reviewed by Darin Adler. - - Change a parameter type of chooseIconForFiles() - https://bugs.webkit.org/show_bug.cgi?id=37504 - - * WebCoreSupport/ChromeClientHaiku.cpp: - (WebCore::ChromeClientHaiku::chooseIconForFiles): - * WebCoreSupport/ChromeClientHaiku.h: - -2010-04-11 Sheriff Bot - - Unreviewed, rolling out r57468. - http://trac.webkit.org/changeset/57468 - https://bugs.webkit.org/show_bug.cgi?id=37433 - - Broke the world... Must have applied the patch wrong - (Requested by abarth on #webkit). - - * WebCoreSupport/FrameLoaderClientHaiku.cpp: - (WebCore::FrameLoaderClientHaiku::committedLoad): - -2010-04-11 Adam Barth - - Reviewed by Eric Seidel. - - Factor DocumentWriter out of FrameLoader - https://bugs.webkit.org/show_bug.cgi?id=37175 - - Update these callsites because the method moved to DocumentWriter. - - * WebCoreSupport/FrameLoaderClientHaiku.cpp: - (WebCore::FrameLoaderClientHaiku::committedLoad): - -2010-04-07 Andrey Kosyakov - - Reviewed by Yury Semikhatsky. - - Removed redundant FrameLoaderClient::dispatchDidLoadResourceByXMLHttpRequest() - https://bugs.webkit.org/show_bug.cgi?id=36949 - - * WebCoreSupport/FrameLoaderClientHaiku.cpp: - * WebCoreSupport/FrameLoaderClientHaiku.h: - -2010-03-31 Marcus Bulach - - Reviewed by Jeremy Orlow. - - Adds Geolocation param for cancelGeolocationPermissionRequestForFrame. - https://bugs.webkit.org/show_bug.cgi?id=35031 - - * WebCoreSupport/ChromeClientHaiku.h: - (WebCore::ChromeClientHaiku::cancelGeolocationPermissionRequestForFrame): - -2010-03-28 Alexey Proskuryakov - - Build fix. Include WindowsKeyboardCodes.h instead of KeyboardCodes.h. - - * WebCoreSupport/EditorClientHaiku.cpp: - -2010-03-24 Kent Tamura - - Reviewed by Darin Adler. - - Make Icon::createIconForFiles() optional. - https://bugs.webkit.org/show_bug.cgi?id=35072 - - - Rename iconForFiles() to chooseIconForFiles(). - - Call Icon::createIconForFiles() from chooseIconForFiles(). - - * WebCoreSupport/ChromeClientHaiku.cpp: - (WebCore::ChromeClientHaiku::chooseIconForFiles): - * WebCoreSupport/ChromeClientHaiku.h: - -2010-03-16 Yury Semikhatsky - - Reviewed by Pavel Feldman. - - Introduce InspectorFrontendClient that provides InspectorFrontend with an interface to the embedder. InspectorClient now serves as a delegate for InspectorController and does not contain methods for managing inspector frontend window. That allows to create remote InspectorFrontendHost. - - Introduce InspectorFrontendClient that would provide InspectorFrontend with an interface to the embedder - https://bugs.webkit.org/show_bug.cgi?id=35036 - - * WebCoreSupport/InspectorClientHaiku.cpp: - (WebCore::InspectorClientHaiku::openInspectorFrontend): - * WebCoreSupport/InspectorClientHaiku.h: - -2010-03-11 Anders Carlsson - - Reviewed by David Hyatt. - - Remove invalidateContents, it isn't used and it never makes sense to only invalidate the contents. - - * WebCoreSupport/ChromeClientHaiku.cpp: - * WebCoreSupport/ChromeClientHaiku.h: - -2010-03-02 Adam Treat - - Reviewed by Dave Hyatt. - - Adapt the haiku port to the refactoring of repaint methods. - - https://bugs.webkit.org/show_bug.cgi?id=34214 - - * WebCoreSupport/ChromeClientHaiku.cpp: - (WebCore::ChromeClientHaiku::invalidateContents): - (WebCore::ChromeClientHaiku::invalidateWindow): - (WebCore::ChromeClientHaiku::invalidateContentsAndWindow): - (WebCore::ChromeClient::invalidateContentsForSlowScroll): - * WebCoreSupport/ChromeClientHaiku.h: - -2010-02-23 Steve Block - - Reviewed by Darin Adler. - - Adds ChromeClient::cancelGeolocationPermissionRequestForFrame - https://bugs.webkit.org/show_bug.cgi?id=34962 - - This method is required so that a Geolocation object can cancel an - asynchronous permission request. This allows the chrome client to cancel - any UI it is showing for the permission request. - - * WebCoreSupport/ChromeClientHaiku.h: - (WebCore::ChromeClientHaiku::cancelGeolocationPermissionRequestForFrame): - -2010-02-17 Dmitry Titov - - Reviewed by David Levin, Darin Fisher, Simon Hausmann. - - When a live iframe element is moved between pages, it still depends on the old page. - https://bugs.webkit.org/show_bug.cgi?id=34382 - - * WebCoreSupport/FrameLoaderClientHaiku.cpp: - (WebCore::FrameLoaderClientHaiku::didTransferChildFrameToNewDocument): - Added empty implementation of a new virtual method. - - * WebCoreSupport/FrameLoaderClientHaiku.h: - -2010-02-17 Kent Tamura - - Reviewed by Eric Seidel. - - Introduces new Icon loading interface in order to support - asynchronous loading. - https://bugs.webkit.org/show_bug.cgi?id=32054 - - Add an empty implementation of ChromeClient::iconForFiles(). - - * WebCoreSupport/ChromeClientHaiku.cpp: - (WebCore::ChromeClientHaiku::iconForFiles): - * WebCoreSupport/ChromeClientHaiku.h: - -2009-12-06 Maxime Simon - - Reviewed by Adam Barth. - - Build fix. Add in FrameLoaderClientHaiku the declaration of three functions introduced in r51644. - - * WebCoreSupport/FrameLoaderClientHaiku.cpp: - (WebCore::FrameLoaderClientHaiku::dispatchDidPushStateWithinPage): - (WebCore::FrameLoaderClientHaiku::dispatchDidReplaceStateWithinPage): - (WebCore::FrameLoaderClientHaiku::dispatchDidPopStateWithinPage): - * WebCoreSupport/FrameLoaderClientHaiku.h: - -2009-12-03 Pavel Feldman - - Reviewed by Timothy Hatcher. - - Web Inspector: Simplify the settings support in inspector controller. - - https://bugs.webkit.org/show_bug.cgi?id=32076 - - * WebCoreSupport/InspectorClientHaiku.cpp: - (WebCore::InspectorClientHaiku::populateSetting): - (WebCore::InspectorClientHaiku::storeSetting): - * WebCoreSupport/InspectorClientHaiku.h: - -2009-12-03 Ben Murdoch - - Reviewed by Brady Eidson. - - [Android] The FrameLoaderClient is unaware of BackForwardList changes. - https://bugs.webkit.org/show_bug.cgi?id=31914 - - * WebCoreSupport/FrameLoaderClientHaiku.cpp: - (WebCore::FrameLoaderClientHaiku::dispatchDidAddBackForwardItem): Add an empty implementation. Method added to FrameLoaderClient by Android (see bug). - (WebCore::FrameLoaderClientHaiku::dispatchDidRemoveBackForwardItem): ditto. - (WebCore::FrameLoaderClientHaiku::dispatchDidChangeBackForwardIndex): ditto. - * WebCoreSupport/FrameLoaderClientHaiku.h: - -2009-11-13 Adam Roben - - Update for changes to FrameLoaderClient - - Fixes Tell the WebFrameLoadDelegate when - window objects in isolated worlds are cleared - - Reviewed by Dave Hyatt. - - * WebCoreSupport/FrameLoaderClientHaiku.cpp: - (WebCore::FrameLoaderClientHaiku::dispatchDidClearWindowObjectInWorld): - * WebCoreSupport/FrameLoaderClientHaiku.h: - Replaced windowObjectCleared with this function. Does nothing if the - passed-in world is not the mainThreadNormalWorld(). - -2009-10-30 Evan Stade - - Reviewed by David Levin. - - Notify the chrome when the focused node has changed. - https://bugs.webkit.org/show_bug.cgi?id=30832 - - Added stub implementation for new ChromeClient function. - - * WebCoreSupport/ChromeClientHaiku.cpp: - (WebCore::ChromeClientHaiku::focusedNodeChanged): - * WebCoreSupport/ChromeClientHaiku.h: - -2009-10-07 Adam Barth - - Reviewed by Darin Adler. - - Factor PolicyChecker out of FrameLoader - https://bugs.webkit.org/show_bug.cgi?id=30155 - - Move the policy callback to the policy object. - - * WebCoreSupport/FrameLoaderClientHaiku.cpp: - (WebCore::FrameLoaderClientHaiku::dispatchWillSubmitForm): - (WebCore::FrameLoaderClientHaiku::dispatchDecidePolicyForMIMEType): - (WebCore::FrameLoaderClientHaiku::dispatchDecidePolicyForNewWindowAction): - (WebCore::FrameLoaderClientHaiku::dispatchDecidePolicyForNavigationAction): - -2009-09-17 Kenneth Rohde Christiansen - - Reviewed by Simon Hausmann. - - Make PlatformWindow return something else than PlatformWidget - https://bugs.webkit.org/show_bug.cgi?id=29085 - - Reflect the rename of platformWindow and it's return type. - - * WebCoreSupport/ChromeClientHaiku.cpp: - (WebCore::ChromeClientHaiku::platformPageClient): - * WebCoreSupport/ChromeClientHaiku.h: - -2009-08-28 Gustavo Noronha Silva - - Reviewed by Holger Freyther. - - https://bugs.webkit.org/show_bug.cgi?id=25889 - [GTK] scrollbar policy for main frame is not implementable - - Add empty implementation for new ChromeClient method. - - * WebCoreSupport/ChromeClientHaiku.h: - (ChromeClientHaiku::scrollbarsModeDidChange): - -2009-07-29 Kevin McCullough - - Reviewed by Darin Adler. - - Added foundation work to allow a testing infrastructure for the Web - Inspector. - - * WebCoreSupport/InspectorClientHaiku.cpp: - (WebCore::InspectorClientHaiku::inspectorWindowObjectCleared): - * WebCoreSupport/InspectorClientHaiku.h: - diff --git a/Source/WebKit/haiku/WebCoreSupport/ChromeClientHaiku.cpp b/Source/WebKit/haiku/WebCoreSupport/ChromeClientHaiku.cpp deleted file mode 100644 index a0a0051..0000000 --- a/Source/WebKit/haiku/WebCoreSupport/ChromeClientHaiku.cpp +++ /dev/null @@ -1,410 +0,0 @@ -/* - * Copyright (C) 2006 Zack Rusin - * Copyright (C) 2006 Apple Computer, Inc. All rights reserved. - * Copyright (C) 2007 Ryan Leavengood All rights reserved. - * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). - * - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -#include "config.h" -#include "ChromeClientHaiku.h" - -#include "FileIconLoader.h" -#include "Frame.h" -#include "FrameLoadRequest.h" -#include "FrameView.h" -#include "HitTestResult.h" -#include "Icon.h" -#include "NavigationAction.h" -#include "NotImplemented.h" -#include "PlatformString.h" -#include "SecurityOrigin.h" -#include "PopupMenuHaiku.h" -#include "SearchPopupMenuHaiku.h" - -#include -#include - - -namespace WebCore { - -ChromeClientHaiku::ChromeClientHaiku() -{ -} - -ChromeClientHaiku::~ChromeClientHaiku() -{ -} - -void ChromeClientHaiku::chromeDestroyed() -{ - notImplemented(); -} - -void ChromeClientHaiku::setWindowRect(const FloatRect&) -{ - notImplemented(); -} - -FloatRect ChromeClientHaiku::windowRect() -{ - notImplemented(); - return FloatRect(0, 0, 200, 200); -} - -FloatRect ChromeClientHaiku::pageRect() -{ - notImplemented(); - return FloatRect(0, 0, 200, 200); -} - -void ChromeClientHaiku::focus() -{ - notImplemented(); -} - -void ChromeClientHaiku::unfocus() -{ - notImplemented(); -} - -bool ChromeClientHaiku::canTakeFocus(FocusDirection) -{ - notImplemented(); - return true; -} - -void ChromeClientHaiku::takeFocus(FocusDirection) -{ - notImplemented(); -} - -void ChromeClientHaiku::focusedNodeChanged(Node*) -{ -} - -void ChromeClientHaiku::focusedFrameChanged(Frame*) -{ -} - -Page* ChromeClientHaiku::createWindow(Frame*, const FrameLoadRequest&, const WebCore::WindowFeatures&, const WebCore::NavigationAction&) -{ - notImplemented(); - return 0; -} - -Page* ChromeClientHaiku::createModalDialog(Frame*, const FrameLoadRequest&) -{ - notImplemented(); - return 0; -} - -void ChromeClientHaiku::show() -{ - notImplemented(); -} - -bool ChromeClientHaiku::canRunModal() -{ - notImplemented(); - return false; -} - -void ChromeClientHaiku::runModal() -{ - notImplemented(); -} - -void ChromeClientHaiku::setToolbarsVisible(bool) -{ - notImplemented(); -} - -bool ChromeClientHaiku::toolbarsVisible() -{ - notImplemented(); - return false; -} - -void ChromeClientHaiku::setStatusbarVisible(bool) -{ - notImplemented(); -} - -bool ChromeClientHaiku::statusbarVisible() -{ - notImplemented(); - return false; -} - -void ChromeClientHaiku::setScrollbarsVisible(bool) -{ - notImplemented(); -} - -bool ChromeClientHaiku::scrollbarsVisible() -{ - notImplemented(); - return true; -} - -void ChromeClientHaiku::setMenubarVisible(bool) -{ - notImplemented(); -} - -bool ChromeClientHaiku::menubarVisible() -{ - notImplemented(); - return false; -} - -void ChromeClientHaiku::setResizable(bool) -{ - notImplemented(); -} - -void ChromeClientHaiku::addMessageToConsole(const String& message, unsigned int lineNumber, - const String& sourceID) -{ - printf("MESSAGE %s:%i %s\n", BString(sourceID).String(), lineNumber, BString(message).String()); -} - -void ChromeClientHaiku::addMessageToConsole(MessageSource, MessageLevel, const String& message, - unsigned int lineNumber, const String& sourceID) -{ - printf("MESSAGE %s:%i %s\n", BString(sourceID).String(), lineNumber, BString(message).String()); -} - -void ChromeClientHaiku::addMessageToConsole(MessageSource, MessageType, MessageLevel, const String& message, - unsigned int lineNumber, const String& sourceID) -{ - printf("MESSAGE %s:%i %s\n", BString(sourceID).String(), lineNumber, BString(message).String()); -} - -bool ChromeClientHaiku::canRunBeforeUnloadConfirmPanel() -{ - notImplemented(); - return false; -} - -bool ChromeClientHaiku::runBeforeUnloadConfirmPanel(const String& message, Frame* frame) -{ - notImplemented(); - return false; -} - -void ChromeClientHaiku::closeWindowSoon() -{ - notImplemented(); -} - -void ChromeClientHaiku::runJavaScriptAlert(Frame*, const String& msg) -{ - BAlert* alert = new BAlert("JavaScript", BString(msg).String(), "OK"); - alert->Go(); -} - -bool ChromeClientHaiku::runJavaScriptConfirm(Frame*, const String& msg) -{ - BAlert* alert = new BAlert("JavaScript", BString(msg).String(), "Yes", "No"); - return !alert->Go(); -} - -bool ChromeClientHaiku::runJavaScriptPrompt(Frame*, const String& message, const String& defaultValue, String& result) -{ - notImplemented(); - return false; -} - -void ChromeClientHaiku::setStatusbarText(const String&) -{ - notImplemented(); -} - -bool ChromeClientHaiku::shouldInterruptJavaScript() -{ - notImplemented(); - return false; -} - -KeyboardUIMode ChromeClientHaiku::keyboardUIMode() -{ - return KeyboardAccessDefault; -} - -IntRect ChromeClientHaiku::windowResizerRect() const -{ - return IntRect(); -} - -void ChromeClientHaiku::invalidateWindow(const IntRect&, bool) -{ - notImplemented(); -} - -void ChromeClientHaiku::invalidateContentsAndWindow(const IntRect&, bool) -{ - notImplemented(); -} - -void ChromeClientHaiku::invalidateContentsForSlowScroll(const IntRect&, bool) -{ - notImplemented(); -} - -void ChromeClientHaiku::scroll(const IntSize& scrollDelta, const IntRect& rectToScroll, const IntRect& clipRect) -{ - notImplemented(); -} - -IntPoint ChromeClientHaiku::screenToWindow(const IntPoint&) const -{ - notImplemented(); - return IntPoint(); -} - -IntRect ChromeClientHaiku::windowToScreen(const IntRect&) const -{ - notImplemented(); - return IntRect(); -} - -PlatformPageClient ChromeClientHaiku::platformPageClient() const -{ - notImplemented(); - return PlatformWidget(); -} - -void ChromeClientHaiku::contentsSizeChanged(Frame*, const IntSize&) const -{ - notImplemented(); -} - -void ChromeClientHaiku::scrollRectIntoView(const IntRect&) const -{ - notImplemented(); -} - -void ChromeClientHaiku::addToDirtyRegion(const IntRect&) -{ -} - -void ChromeClientHaiku::scrollBackingStore(int, int, const IntRect&, const IntRect&) -{ -} - -void ChromeClientHaiku::updateBackingStore() -{ -} - -void ChromeClientHaiku::mouseDidMoveOverElement(const HitTestResult& hit, unsigned /*modifierFlags*/) -{ - // Some extra info - notImplemented(); -} - -void ChromeClientHaiku::setToolTip(const String& tip) -{ - notImplemented(); -} - -void ChromeClientHaiku::setToolTip(const String& tip, TextDirection) -{ - notImplemented(); -} - -void ChromeClientHaiku::print(Frame*) -{ - notImplemented(); -} - -void ChromeClientHaiku::exceededDatabaseQuota(Frame*, const String& databaseName) -{ - notImplemented(); -} - -void ChromeClientWx::reachedMaxAppCacheSize(int64_t spaceNeeded) -{ - notImplemented(); -} - -void ChromeClientWx::reachedApplicationCacheOriginQuota(SecurityOrigin*, int64_t) -{ - notImplemented(); -} - -void ChromeClientHaiku::requestGeolocationPermissionForFrame(Frame*, Geolocation*) -{ - notImplemented(); -} - -void ChromeClientHaiku::runOpenPanel(Frame*, PassRefPtr) -{ - notImplemented(); -} - -void ChromeClientHaiku::loadIconForFiles(const Vector& filenames, FileIconLoader* loader) -{ - loader->notifyFinished(Icon::createIconForFiles(filenames)); -} - -void ChromeClientHaiku::setCursor(const Cursor&) -{ - notImplemented(); -} - -/void ChromeClientHaiku::setCursorHiddenUntilMouseMoves(bool) -{ - notImplemented(); -} - -/ Notification that the given form element has changed. This function -// will be called frequently, so handling should be very fast. -void ChromeClientHaiku::formStateDidChange(const Node*) -{ - notImplemented(); -} - -bool ChromeClientHaiku::selectItemWritingDirectionIsNatural() -{ - return false; -} - -bool ChromeClientHaiku::selectItemAlignmentFollowsMenuWritingDirection() -{ - return false; -} - -PassRefPtr ChromeClientHaiku::createPopupMenu(PopupMenuClient* client) const -{ - return adoptRef(new PopupMenuHaiku(client)); -} - -PassRefPtr ChromeClientHaiku::createSearchPopupMenu(PopupMenuClient* client) const -{ - return adoptRef(new SearchPopupMenuHaiku(client)); -} - -} // namespace WebCore - diff --git a/Source/WebKit/haiku/WebCoreSupport/ChromeClientHaiku.h b/Source/WebKit/haiku/WebCoreSupport/ChromeClientHaiku.h deleted file mode 100644 index d0f52ca..0000000 --- a/Source/WebKit/haiku/WebCoreSupport/ChromeClientHaiku.h +++ /dev/null @@ -1,167 +0,0 @@ -/* - * Copyright (C) 2006 Zack Rusin - * Copyright (C) 2007 Ryan Leavengood All rights reserved. - * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). - * - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef ChromeClientHaiku_h -#define ChromeClientHaiku_h - -#include "ChromeClient.h" -#include "FloatRect.h" -#include "RefCounted.h" - -namespace WebCore { - - class FloatRect; - class Page; - struct FrameLoadRequest; - - class ChromeClientHaiku : public ChromeClient { - public: - ChromeClientHaiku(); - virtual ~ChromeClientHaiku(); - virtual void chromeDestroyed(); - - virtual void* webView() const { return 0; } - virtual void setWindowRect(const FloatRect&); - virtual FloatRect windowRect(); - - virtual FloatRect pageRect(); - - virtual void focus(); - virtual void unfocus(); - - virtual bool canTakeFocus(FocusDirection); - virtual void takeFocus(FocusDirection); - - virtual void focusedNodeChanged(Node*); - virtual void focusedFrameChanged(Frame*); - - virtual Page* createWindow(Frame*, const FrameLoadRequest&, const WebCore::WindowFeatures&, const WebCore::NavigationAction&); - virtual Page* createModalDialog(Frame*, const FrameLoadRequest&); - virtual void show(); - - virtual bool canRunModal(); - virtual void runModal(); - - virtual void setToolbarsVisible(bool); - virtual bool toolbarsVisible(); - - virtual void setStatusbarVisible(bool); - virtual bool statusbarVisible(); - - virtual void setScrollbarsVisible(bool); - virtual bool scrollbarsVisible(); - - virtual void setMenubarVisible(bool); - virtual bool menubarVisible(); - - virtual void setResizable(bool); - - virtual void addMessageToConsole(const String& message, unsigned int lineNumber, - const String& sourceID); - virtual void addMessageToConsole(MessageSource, MessageLevel, const String& message, - unsigned int lineNumber, const String& sourceID); - virtual void addMessageToConsole(MessageSource, MessageType, MessageLevel, - const String&, unsigned int, const String&); - - virtual bool canRunBeforeUnloadConfirmPanel(); - - virtual bool runBeforeUnloadConfirmPanel(const String& message, Frame* frame); - - virtual void closeWindowSoon(); - - virtual void runJavaScriptAlert(Frame*, const String&); - virtual bool runJavaScriptConfirm(Frame*, const String&); - virtual bool runJavaScriptPrompt(Frame*, const String& message, const String& defaultValue, String& result); - virtual bool shouldInterruptJavaScript(); - - virtual void setStatusbarText(const WTF::String&); - virtual WebCore::KeyboardUIMode keyboardUIMode(); - virtual IntRect windowResizerRect() const; - - virtual void invalidateWindow(const IntRect&, bool); - virtual void invalidateContentsAndWindow(const IntRect&, bool); - virtual void invalidateContentsForSlowScroll(const IntRect&, bool); - virtual void scroll(const IntSize& scrollDelta, const IntRect& rectToScroll, const IntRect& clipRect); - - virtual IntPoint screenToWindow(const IntPoint&) const; - virtual IntRect windowToScreen(const IntRect&) const; - virtual PlatformPageClient platformPageClient() const; - virtual void contentsSizeChanged(Frame*, const IntSize&) const; - virtual void scrollRectIntoView(const IntRect&, const ScrollView*) const; - - void addToDirtyRegion(const IntRect&); - void scrollBackingStore(int, int, const IntRect&, const IntRect&); - void updateBackingStore(); - - virtual void scrollbarsModeDidChange() const { } - virtual void mouseDidMoveOverElement(const HitTestResult&, unsigned modifierFlags); - - void setToolTip(const String&); - - virtual void setToolTip(const String&, TextDirection); - - void print(Frame*); - -#if ENABLE(SQL_DATABASE) - virtual void exceededDatabaseQuota(Frame*, const String& databaseName); -#endif - - virtual bool selectItemWritingDirectionIsNatural(); - virtual bool selectItemAlignmentFollowsMenuWritingDirection(); - virtual PassRefPtr createPopupMenu(PopupMenuClient*) const; - virtual PassRefPtr createSearchPopupMenu(PopupMenuClient*) const; - - virtual void reachedMaxAppCacheSize(int64_t spaceNeeded); - virtual void reachedApplicationCacheOriginQuota(SecurityOrigin*, int64_t totalSpaceNeeded); -#if ENABLE(CONTEXT_MENUS) - virtual void showContextMenu() { } -#endif - - // This is an asynchronous call. The ChromeClient can display UI asking the user for permission - // to use Geolococation. - virtual void requestGeolocationPermissionForFrame(Frame*, Geolocation*); - virtual void cancelGeolocationPermissionRequestForFrame(Frame*, Geolocation*) { } - - virtual void runOpenPanel(Frame*, PassRefPtr); - virtual void loadIconForFiles(const Vector&, FileIconLoader*); - - virtual void setCursor(const Cursor&); - virtual void setCursorHiddenUntilMouseMoves(bool); - - // Notification that the given form element has changed. This function - // will be called frequently, so handling should be very fast. - virtual void formStateDidChange(const Node*); - - virtual bool shouldRubberBandInDirection(WebCore::ScrollDirection) const { return true; } - virtual void numWheelEventHandlersChanged(unsigned) { } - }; - -} // namespace WebCore - -#endif - diff --git a/Source/WebKit/haiku/WebCoreSupport/ContextMenuClientHaiku.cpp b/Source/WebKit/haiku/WebCoreSupport/ContextMenuClientHaiku.cpp deleted file mode 100644 index 228adc7..0000000 --- a/Source/WebKit/haiku/WebCoreSupport/ContextMenuClientHaiku.cpp +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Copyright (C) 2006 Zack Rusin - * Copyright (C) 2007 Ryan Leavengood - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -#include "config.h" -#include "ContextMenuClientHaiku.h" - -#include "ContextMenu.h" -#include "HitTestResult.h" -#include "KURL.h" - -#include "NotImplemented.h" - - -namespace WebCore { - -void ContextMenuClientHaiku::contextMenuDestroyed() -{ - notImplemented(); -} - -PlatformMenuDescription ContextMenuClientHaiku::getCustomMenuFromDefaultItems(ContextMenu* menu) -{ - return menu->platformDescription(); -} - -void ContextMenuClientHaiku::contextMenuItemSelected(ContextMenuItem*, const ContextMenu*) -{ - notImplemented(); -} - -void ContextMenuClientHaiku::downloadURL(const KURL& url) -{ - notImplemented(); -} - -void ContextMenuClientHaiku::lookUpInDictionary(Frame*) -{ - notImplemented(); -} - -void ContextMenuClientHaiku::speak(const String&) -{ - notImplemented(); -} - -bool ContextMenuClientHaiku::isSpeaking() -{ - notImplemented(); - return false; -} - -void ContextMenuClientHaiku::stopSpeaking() -{ - notImplemented(); -} - -void ContextMenuClientHaiku::searchWithGoogle(const Frame*) -{ - notImplemented(); -} - -} // namespace WebCore - diff --git a/Source/WebKit/haiku/WebCoreSupport/ContextMenuClientHaiku.h b/Source/WebKit/haiku/WebCoreSupport/ContextMenuClientHaiku.h deleted file mode 100644 index 756b3cf..0000000 --- a/Source/WebKit/haiku/WebCoreSupport/ContextMenuClientHaiku.h +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright (C) 2006 Zack Rusin - * Copyright (C) 2007 Ryan Leavengood - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef ContextMenuClientHaiku_h -#define ContextMenuClientHaiku_h - -#include "ContextMenuClient.h" - - -namespace WebCore { - class ContextMenu; - - class ContextMenuClientHaiku : public ContextMenuClient { - public: - virtual void contextMenuDestroyed(); - - virtual PlatformMenuDescription getCustomMenuFromDefaultItems(ContextMenu*); - virtual void contextMenuItemSelected(ContextMenuItem*, const ContextMenu*); - - virtual void downloadURL(const KURL& url); - virtual void searchWithGoogle(const Frame*); - virtual void lookUpInDictionary(Frame*); - virtual void speak(const String&); - virtual bool isSpeaking(); - virtual void stopSpeaking(); - }; -} // namespace WebCore - -#endif // ContextMenuClientHaiku_h - diff --git a/Source/WebKit/haiku/WebCoreSupport/DragClientHaiku.cpp b/Source/WebKit/haiku/WebCoreSupport/DragClientHaiku.cpp deleted file mode 100644 index 4a8f9f4..0000000 --- a/Source/WebKit/haiku/WebCoreSupport/DragClientHaiku.cpp +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright (C) 2007 Apple Inc. All rights reserved. - * Copyright (C) 2007 Ryan Leavengood - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "DragClientHaiku.h" - -#include "NotImplemented.h" - - -namespace WebCore { - -DragDestinationAction DragClientHaiku::actionMaskForDrag(DragData*) -{ - notImplemented(); - return DragDestinationActionAny; -} - -void DragClientHaiku::willPerformDragDestinationAction(DragDestinationAction, DragData*) -{ - notImplemented(); -} - -void DragClientHaiku::dragControllerDestroyed() -{ - notImplemented(); -} - -DragSourceAction DragClientHaiku::dragSourceActionMaskForPoint(const IntPoint&) -{ - notImplemented(); - return DragSourceActionAny; -} - -void DragClientHaiku::willPerformDragSourceAction(DragSourceAction, const IntPoint&, Clipboard*) -{ - notImplemented(); -} - -void DragClientHaiku::startDrag(DragImageRef dragImage, const IntPoint&, const IntPoint&, Clipboard*, Frame*, bool) -{ - notImplemented(); -} - -} // namespace WebCore - diff --git a/Source/WebKit/haiku/WebCoreSupport/DragClientHaiku.h b/Source/WebKit/haiku/WebCoreSupport/DragClientHaiku.h deleted file mode 100644 index 40860e3..0000000 --- a/Source/WebKit/haiku/WebCoreSupport/DragClientHaiku.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (C) 2007 Apple Inc. All rights reserved. - * Copyright (C) 2007 Ryan Leavengood - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "DragClient.h" - - -namespace WebCore { - - class DragClientHaiku : public DragClient { - public: - virtual void willPerformDragDestinationAction(DragDestinationAction, - DragData*); - virtual WebCore::DragDestinationAction actionMaskForDrag(DragData*); - virtual void dragControllerDestroyed(); - virtual DragSourceAction dragSourceActionMaskForPoint(const IntPoint&); - virtual void willPerformDragSourceAction(DragSourceAction, const IntPoint&, Clipboard*); - virtual void startDrag(DragImageRef dragImage, const IntPoint& dragImageOrigin, - const IntPoint& eventPos, Clipboard*, Frame*, bool linkDrag = false); - }; - -} // namespace WebCore - diff --git a/Source/WebKit/haiku/WebCoreSupport/EditorClientHaiku.cpp b/Source/WebKit/haiku/WebCoreSupport/EditorClientHaiku.cpp deleted file mode 100644 index 82fbfa7..0000000 --- a/Source/WebKit/haiku/WebCoreSupport/EditorClientHaiku.cpp +++ /dev/null @@ -1,488 +0,0 @@ -/* - * Copyright (C) 2006 Nikolas Zimmermann - * Copyright (C) 2006 Zack Rusin - * Copyright (C) 2006 Apple Computer, Inc. - * Copyright (C) 2007 Ryan Leavengood - * Copyright (C) 2007 Andrea Anzani - * - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "EditorClientHaiku.h" - -#include "Document.h" -#include "Editor.h" -#include "FocusController.h" -#include "Frame.h" -#include "KeyboardEvent.h" -#include "NotImplemented.h" -#include "Page.h" -#include "PlatformKeyboardEvent.h" -#include "WindowsKeyboardCodes.h" - - -namespace WebCore { - -EditorClientHaiku::EditorClientHaiku() - : m_editing(false) - , m_inUndoRedo(false) -{ -} - -void EditorClientHaiku::setPage(Page* page) -{ - m_page = page; -} - -void EditorClientHaiku::pageDestroyed() -{ - notImplemented(); -} - -bool EditorClientHaiku::shouldDeleteRange(Range*) -{ - notImplemented(); - return true; -} - -bool EditorClientHaiku::shouldShowDeleteInterface(HTMLElement*) -{ - notImplemented(); - return false; -} - -bool EditorClientHaiku::smartInsertDeleteEnabled() -{ - notImplemented(); - return false; -} - -bool EditorClientHaiku::isSelectTrailingWhitespaceEnabled() -{ - notImplemented(); - return false; -} - -bool EditorClientHaiku::isContinuousSpellCheckingEnabled() -{ - notImplemented(); - return false; -} - -void EditorClientHaiku::toggleContinuousSpellChecking() -{ - notImplemented(); -} - -bool EditorClientHaiku::isGrammarCheckingEnabled() -{ - notImplemented(); - return false; -} - -void EditorClientHaiku::toggleGrammarChecking() -{ - notImplemented(); -} - -int EditorClientHaiku::spellCheckerDocumentTag() -{ - notImplemented(); - return 0; -} - -bool EditorClientHaiku::shouldBeginEditing(WebCore::Range*) -{ - notImplemented(); - return true; -} - -bool EditorClientHaiku::shouldEndEditing(WebCore::Range*) -{ - notImplemented(); - return true; -} - -bool EditorClientHaiku::shouldInsertNode(Node*, Range*, EditorInsertAction) -{ - notImplemented(); - return true; -} - -bool EditorClientHaiku::shouldInsertText(const String&, Range*, EditorInsertAction) -{ - notImplemented(); - return true; -} - -bool EditorClientHaiku::shouldChangeSelectedRange(Range* fromRange, Range* toRange, - EAffinity, bool stillSelecting) -{ - notImplemented(); - return true; -} - -bool EditorClientHaiku::shouldApplyStyle(WebCore::CSSStyleDeclaration*, - WebCore::Range*) -{ - notImplemented(); - return true; -} - -bool EditorClientHaiku::shouldMoveRangeAfterDelete(Range*, Range*) -{ - notImplemented(); - return true; -} - -void EditorClientHaiku::didBeginEditing() -{ - notImplemented(); - m_editing = true; -} - -void EditorClientHaiku::respondToChangedContents() -{ - notImplemented(); -} - -void EditorClientHaiku::respondToChangedSelection() -{ - notImplemented(); -} - -void EditorClientHaiku::didEndEditing() -{ - notImplemented(); - m_editing = false; -} - -void EditorClientHaiku::didWriteSelectionToPasteboard() -{ - notImplemented(); -} - -void EditorClientHaiku::didSetSelectionTypesForPasteboard() -{ - notImplemented(); -} - -void EditorClientHaiku::registerCommandForUndo(WTF::PassRefPtr cmd) -{ - notImplemented(); -} - -void EditorClientHaiku::registerCommandForRedo(WTF::PassRefPtr) -{ - notImplemented(); -} - -void EditorClientHaiku::clearUndoRedoOperations() -{ - notImplemented(); -} - -bool EditorClientHaiku::canCopyCut(WebCore::Frame*, bool defaultValue) const -{ - return defaultValue; -} - -bool EditorClientHaiku::canPaste(WebCore::Frame*, bool defaultValue) const -{ - return defaultValue; -} - -bool EditorClientHaiku::canUndo() const -{ - notImplemented(); - return false; -} - -bool EditorClientHaiku::canRedo() const -{ - notImplemented(); - return false; -} - -void EditorClientHaiku::undo() -{ - notImplemented(); - m_inUndoRedo = true; - m_inUndoRedo = false; -} - -void EditorClientHaiku::redo() -{ - notImplemented(); - m_inUndoRedo = true; - m_inUndoRedo = false; -} - -void EditorClientHaiku::handleKeyboardEvent(KeyboardEvent* event) -{ - Frame* frame = m_page->focusController()->focusedOrMainFrame(); - if (!frame || !frame->document()->focusedNode()) - return; - - const PlatformKeyboardEvent* kevent = event->keyEvent(); - if (!kevent || kevent->type() == PlatformKeyboardEvent::KeyUp) - return; - - Node* start = frame->selection()->start().containerNode(); - if (!start) - return; - - if (start->isContentEditable()) { - switch (kevent->windowsVirtualKeyCode()) { - case VK_BACK: - frame->editor()->deleteWithDirection(DirectionBackward, - kevent->ctrlKey() ? WordGranularity : CharacterGranularity, - false, true); - break; - case VK_DELETE: - frame->editor()->deleteWithDirection(DirectionForward, - kevent->ctrlKey() ? WordGranularity : CharacterGranularity, - false, true); - break; - case VK_LEFT: - frame->selection()->modify(kevent->shiftKey() ? FrameSelection::AlterationExtend : FrameSelection::AlterationMove, - DirectionLeft, - kevent->ctrlKey() ? WordGranularity : CharacterGranularity, - true); - break; - case VK_RIGHT: - frame->selection()->modify(kevent->shiftKey() ? FrameSelection::AlterationExtend : FrameSelection::AlterationMove, - DirectionRight, - kevent->ctrlKey() ? WordGranularity : CharacterGranularity, - true); - break; - case VK_UP: - frame->selection()->modify(kevent->shiftKey() ? FrameSelection::AlterationExtend : FrameSelection::AlterationMove, - DirectionBackward, - kevent->ctrlKey() ? ParagraphGranularity : LineGranularity, - true); - break; - case VK_DOWN: - frame->selection()->modify(kevent->shiftKey() ? FrameSelection::AlterationExtend : FrameSelection::AlterationMove, - DirectionForward, - kevent->ctrlKey() ? ParagraphGranularity : LineGranularity, - true); - break; - case VK_PRIOR: // PageUp - frame->editor()->command("MoveUpByPageAndModifyCaret"); - break; - case VK_NEXT: // PageDown - frame->editor()->command("MoveDownByPageAndModifyCaret"); - break; - case VK_RETURN: - frame->editor()->command("InsertLineBreak"); - break; - case VK_TAB: - return; - default: - if (!kevent->ctrlKey() && !kevent->altKey() && !kevent->text().isEmpty()) { - if (kevent->text().length() == 1) { - UChar ch = kevent->text()[0]; - // Don't insert null or control characters as they can result in unexpected behaviour - if (ch < ' ') - break; - } - frame->editor()->insertText(kevent->text(), event); - } else if (kevent->ctrlKey()) { - switch (kevent->windowsVirtualKeyCode()) { - case VK_A: - frame->editor()->command("SelectAll"); - break; - case VK_B: - frame->editor()->command("ToggleBold"); - break; - case VK_C: - frame->editor()->command("Copy"); - break; - case VK_I: - frame->editor()->command("ToggleItalic"); - break; - case VK_V: - frame->editor()->command("Paste"); - break; - case VK_X: - frame->editor()->command("Cut"); - break; - case VK_Y: - frame->editor()->command("Redo"); - break; - case VK_Z: - frame->editor()->command("Undo"); - break; - default: - return; - } - } else - return; - } - } else { - switch (kevent->windowsVirtualKeyCode()) { - case VK_UP: - frame->editor()->command("MoveUp"); - break; - case VK_DOWN: - frame->editor()->command("MoveDown"); - break; - case VK_PRIOR: // PageUp - frame->editor()->command("MoveUpByPageAndModifyCaret"); - break; - case VK_NEXT: // PageDown - frame->editor()->command("MoveDownByPageAndModifyCaret"); - break; - case VK_HOME: - if (kevent->ctrlKey()) - frame->editor()->command("MoveToBeginningOfDocument"); - break; - case VK_END: - if (kevent->ctrlKey()) - frame->editor()->command("MoveToEndOfDocument"); - break; - default: - if (kevent->ctrlKey()) { - switch (kevent->windowsVirtualKeyCode()) { - case VK_A: - frame->editor()->command("SelectAll"); - break; - case VK_C: case VK_X: - frame->editor()->command("Copy"); - break; - default: - return; - } - } else - return; - } - } - event->setDefaultHandled(); -} - -void EditorClientHaiku::handleInputMethodKeydown(KeyboardEvent*) -{ - notImplemented(); -} - -void EditorClientHaiku::textFieldDidBeginEditing(Element*) -{ - m_editing = true; -} - -void EditorClientHaiku::textFieldDidEndEditing(Element*) -{ - m_editing = false; -} - -void EditorClientHaiku::textDidChangeInTextField(Element*) -{ - notImplemented(); -} - -bool EditorClientHaiku::doTextFieldCommandFromEvent(Element*, KeyboardEvent*) -{ - return false; -} - -void EditorClientHaiku::textWillBeDeletedInTextField(Element*) -{ - notImplemented(); -} - -void EditorClientHaiku::textDidChangeInTextArea(Element*) -{ - notImplemented(); -} - -void EditorClientHaiku::ignoreWordInSpellDocument(const String&) -{ - notImplemented(); -} - -void EditorClientHaiku::learnWord(const String&) -{ - notImplemented(); -} - -void EditorClientHaiku::checkSpellingOfString(const UChar*, int, int*, int*) -{ - notImplemented(); -} - -String EditorClientHaiku::getAutoCorrectSuggestionForMisspelledWord(const String& misspelledWord) -{ - notImplemented(); - return String(); -} - -void EditorClientHaiku::checkGrammarOfString(const UChar*, int, Vector&, int*, int*) -{ - notImplemented(); -} - -void EditorClientHaiku::updateSpellingUIWithGrammarString(const String&, const GrammarDetail&) -{ - notImplemented(); -} - -void EditorClientHaiku::updateSpellingUIWithMisspelledWord(const String&) -{ - notImplemented(); -} - -void EditorClientHaiku::showSpellingUI(bool) -{ - notImplemented(); -} - -bool EditorClientHaiku::spellingUIIsShowing() -{ - notImplemented(); - return false; -} - -void EditorClientHaiku::getGuessesForWord(const String& word, const String& context, Vector& guesses) -{ - notImplemented(); -} - -void EditorClientHaiku::willSetInputMethodState() -{ - notImplemented(); -} - -void EditorClientHaiku::setInputMethodState(bool enabled) -{ - notImplemented(); -} - -bool EditorClientHaiku::isEditing() const -{ - return m_editing; -} - -} // namespace WebCore diff --git a/Source/WebKit/haiku/WebCoreSupport/EditorClientHaiku.h b/Source/WebKit/haiku/WebCoreSupport/EditorClientHaiku.h deleted file mode 100644 index b2f3831..0000000 --- a/Source/WebKit/haiku/WebCoreSupport/EditorClientHaiku.h +++ /dev/null @@ -1,127 +0,0 @@ -/* - * Copyright (C) 2006 Nikolas Zimmermann - * Copyright (C) 2006 Zack Rusin - * Copyright (C) 2006 Apple Computer, Inc. - * Copyright (C) 2007 Ryan Leavengood - * - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef EditorClientHaiku_H -#define EditorClientHaiku_H - -#include "EditorClient.h" -#include "TextCheckerClient.h" -#include "RefCounted.h" -#include "Page.h" - -#include - - -namespace WebCore { - -class EditorClientHaiku : public EditorClient, public TextCheckerClient { - public: - EditorClientHaiku(); - void setPage( Page* page ); - - virtual void pageDestroyed(); - - virtual bool shouldDeleteRange(Range*); - virtual bool shouldShowDeleteInterface(HTMLElement*); - virtual bool smartInsertDeleteEnabled(); - virtual bool isSelectTrailingWhitespaceEnabled(); - virtual bool isContinuousSpellCheckingEnabled(); - virtual void toggleContinuousSpellChecking(); - virtual bool isGrammarCheckingEnabled(); - virtual void toggleGrammarChecking(); - virtual int spellCheckerDocumentTag(); - - virtual bool shouldBeginEditing(Range*); - virtual bool shouldEndEditing(Range*); - virtual bool shouldInsertNode(Node*, Range*, EditorInsertAction); - virtual bool shouldInsertText(const String&, Range*, EditorInsertAction); - virtual bool shouldChangeSelectedRange(Range* fromRange, Range* toRange, - EAffinity, bool stillSelecting); - - virtual bool shouldApplyStyle(CSSStyleDeclaration*, Range*); - virtual bool shouldMoveRangeAfterDelete(Range*, Range*); - - virtual void didBeginEditing(); - virtual void respondToChangedContents(); - virtual void respondToChangedSelection(); - virtual void didEndEditing(); - virtual void didWriteSelectionToPasteboard(); - virtual void didSetSelectionTypesForPasteboard(); - - virtual void registerCommandForUndo(PassRefPtr); - virtual void registerCommandForRedo(PassRefPtr); - virtual void clearUndoRedoOperations(); - - virtual bool canCopyCut(Frame*, bool defaultValue) const; - virtual bool canPaste(Frame*, bool defaultValue) const; - virtual bool canUndo() const; - virtual bool canRedo() const; - - virtual void undo(); - virtual void redo(); - - virtual void handleKeyboardEvent(KeyboardEvent*); - virtual void handleInputMethodKeydown(KeyboardEvent*); - - virtual void textFieldDidBeginEditing(Element*); - virtual void textFieldDidEndEditing(Element*); - virtual void textDidChangeInTextField(Element*); - virtual bool doTextFieldCommandFromEvent(Element*, KeyboardEvent*); - virtual void textWillBeDeletedInTextField(Element*); - virtual void textDidChangeInTextArea(Element*); - - virtual void ignoreWordInSpellDocument(const String&); - virtual void learnWord(const String&); - virtual void checkSpellingOfString(const UChar*, int length, int* misspellingLocation, - int* misspellingLength); - virtual String getAutoCorrectSuggestionForMisspelledWord(const String& misspelledWord); - virtual void checkGrammarOfString(const UChar*, int length, Vector&, - int* badGrammarLocation, int* badGrammarLength); - virtual void updateSpellingUIWithGrammarString(const String&, const GrammarDetail&); - virtual void updateSpellingUIWithMisspelledWord(const String&); - virtual void showSpellingUI(bool show); - virtual bool spellingUIIsShowing(); - virtual void getGuessesForWord(const String& word, const String& context, Vector& guesses); - virtual void willSetInputMethodState(); - virtual void setInputMethodState(bool enabled); - virtual void requestCheckingOfString(SpellChecker*, int, WebCore::TextCheckingTypeMask, const String&) {} - virtual TextCheckerClient* textChecker() { return this; } - - bool isEditing() const; - - private: - Page* m_page; - bool m_editing; - bool m_inUndoRedo; // our undo stack works differently - don't re-enter! - }; - -} // namespace WebCore - -#endif // EditorClientHaiku_h diff --git a/Source/WebKit/haiku/WebCoreSupport/FrameLoaderClientHaiku.cpp b/Source/WebKit/haiku/WebCoreSupport/FrameLoaderClientHaiku.cpp deleted file mode 100644 index dcc8173..0000000 --- a/Source/WebKit/haiku/WebCoreSupport/FrameLoaderClientHaiku.cpp +++ /dev/null @@ -1,865 +0,0 @@ -/* - * Copyright (C) 2006 Don Gibson - * Copyright (C) 2006 Zack Rusin - * Copyright (C) 2006, 2011 Apple Inc. All rights reserved. - * Copyright (C) 2007 Trolltech ASA - * Copyright (C) 2007 Ryan Leavengood All rights reserved. - * Copyright (C) 2009 Maxime Simon All rights reserved. - * - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "FrameLoaderClientHaiku.h" - -#include "DocumentLoader.h" -#include "Frame.h" -#include "FrameLoader.h" -#include "FrameTree.h" -#include "FrameView.h" -#include "HTMLFrameOwnerElement.h" -#include "NotImplemented.h" -#include "Page.h" -#include "PlatformString.h" -#include "ResourceRequest.h" -#include "ScriptController.h" -#include "WebView.h" - -#include -#include - -#include - - -namespace WebCore { - -FrameLoaderClientHaiku::FrameLoaderClientHaiku() - : m_frame(0) -{ -} - -void FrameLoaderClientHaiku::setFrame(Frame* frame) -{ - m_frame = frame; -} - -void FrameLoaderClientHaiku::setWebView(WebView* webview) -{ - m_webView = webview; - m_messenger = new BMessenger(m_webView); - ASSERT(m_messenger->IsValid()); -} - -void FrameLoaderClientHaiku::detachFrameLoader() -{ - m_frame = 0; -} - -bool FrameLoaderClientHaiku::hasWebView() const -{ - return m_webView; -} - -bool FrameLoaderClientHaiku::hasBackForwardList() const -{ - notImplemented(); - return true; -} - -void FrameLoaderClientHaiku::resetBackForwardList() -{ - notImplemented(); -} - -bool FrameLoaderClientHaiku::provisionalItemIsTarget() const -{ - notImplemented(); - return false; -} - -void FrameLoaderClientHaiku::makeRepresentation(DocumentLoader*) -{ - notImplemented(); -} - -void FrameLoaderClientHaiku::forceLayout() -{ - notImplemented(); -} - -void FrameLoaderClientHaiku::forceLayoutForNonHTML() -{ - notImplemented(); -} - -void FrameLoaderClientHaiku::updateHistoryForCommit() -{ - notImplemented(); -} - -void FrameLoaderClientHaiku::updateHistoryForBackForwardNavigation() -{ - notImplemented(); -} - -void FrameLoaderClientHaiku::updateHistoryForReload() -{ - notImplemented(); -} - -void FrameLoaderClientHaiku::updateHistoryForStandardLoad() -{ - notImplemented(); -} - -void FrameLoaderClientHaiku::updateHistoryForInternalLoad() -{ - notImplemented(); -} - -void FrameLoaderClientHaiku::updateHistoryAfterClientRedirect() -{ - notImplemented(); -} - -void FrameLoaderClientHaiku::setCopiesOnScroll() -{ - // apparently mac specific - notImplemented(); -} - -LoadErrorResetToken* FrameLoaderClientHaiku::tokenForLoadErrorReset() -{ - notImplemented(); - return 0; -} - -void FrameLoaderClientHaiku::resetAfterLoadError(LoadErrorResetToken*) -{ - notImplemented(); -} - -void FrameLoaderClientHaiku::doNotResetAfterLoadError(LoadErrorResetToken*) -{ - notImplemented(); -} - -void FrameLoaderClientHaiku::willCloseDocument() -{ - notImplemented(); -} - -void FrameLoaderClientHaiku::detachedFromParent2() -{ - notImplemented(); -} - -void FrameLoaderClientHaiku::detachedFromParent3() -{ - notImplemented(); -} - -void FrameLoaderClientHaiku::dispatchDidHandleOnloadEvents() -{ - if (m_webView) { - BMessage message(LOAD_ONLOAD_HANDLE); - message.AddString("url", m_frame->loader()->documentLoader()->request().url().string()); - m_messenger->SendMessage(&message); - } -} - -void FrameLoaderClientHaiku::dispatchDidReceiveServerRedirectForProvisionalLoad() -{ - notImplemented(); -} - -void FrameLoaderClientHaiku::dispatchDidCancelClientRedirect() -{ - notImplemented(); -} - -void FrameLoaderClientHaiku::dispatchWillPerformClientRedirect(const KURL&, double interval, double fireDate) -{ - notImplemented(); -} - -void FrameLoaderClientHaiku::dispatchDidChangeLocationWithinPage() -{ - notImplemented(); -} - -void FrameLoaderClientHaiku::dispatchDidPushStateWithinPage() -{ - notImplemented(); -} - -void FrameLoaderClientHaiku::dispatchDidReplaceStateWithinPage() -{ - notImplemented(); -} - -void FrameLoaderClientHaiku::dispatchDidPopStateWithinPage() -{ - notImplemented(); -} - -void FrameLoaderClientHaiku::dispatchWillClose() -{ - notImplemented(); -} - -void FrameLoaderClientHaiku::dispatchDidStartProvisionalLoad() -{ - if (m_webView) { - BMessage message(LOAD_NEGOCIATING); - message.AddString("url", m_frame->loader()->provisionalDocumentLoader()->request().url().string()); - m_messenger->SendMessage(&message); - } -} - -void FrameLoaderClientHaiku::dispatchDidReceiveTitle(const StringWithTitle& title) -{ - if (m_webView) { - // FIXME: use direction of title. - m_webView->SetPageTitle(title.m_string()); - BMessage message(TITLE_CHANGED); - message.AddString("title", title.string()); - m_messenger->SendMessage(&message); - } -} - -void FrameLoaderClientHaiku::dispatchDidCommitLoad() -{ - if (m_webView) { - BMessage message(LOAD_TRANSFERRING); - message.AddString("url", m_frame->loader()->documentLoader()->request().url().string()); - m_messenger->SendMessage(&message); - } -} - -void FrameLoaderClientHaiku::dispatchDidFinishDocumentLoad() -{ - if (m_webView) { - BMessage message(LOAD_DOC_COMPLETED); - message.AddString("url", m_frame->document()->url().string()); - m_messenger->SendMessage(&message); - } -} - -void FrameLoaderClientHaiku::dispatchDidFinishLoad() -{ - notImplemented(); -} - -void FrameLoaderClientHaiku::dispatchDidFirstLayout() -{ - notImplemented(); -} - -void FrameLoaderClientHaiku::dispatchDidFirstVisuallyNonEmptyLayout() -{ - notImplemented(); -} - -void FrameLoaderClientHaiku::dispatchShow() -{ - notImplemented(); -} - -void FrameLoaderClientHaiku::cancelPolicyCheck() -{ - notImplemented(); -} - -void FrameLoaderClientHaiku::dispatchWillSubmitForm(FramePolicyFunction function, PassRefPtr) -{ - // FIXME: Send an event to allow for alerts and cancellation. - if (!m_frame) - return; - (m_frame->loader()->policyChecker()->*function)(PolicyUse); -} - -void FrameLoaderClientHaiku::dispatchDidLoadMainResource(DocumentLoader*) -{ - notImplemented(); -} - -void FrameLoaderClientHaiku::revertToProvisionalState(DocumentLoader*) -{ - notImplemented(); -} - -void FrameLoaderClientHaiku::postProgressStartedNotification() -{ - notImplemented(); -} - -void FrameLoaderClientHaiku::postProgressEstimateChangedNotification() -{ - notImplemented(); -} - -void FrameLoaderClientHaiku::postProgressFinishedNotification() -{ - if (m_webView) { - BMessage message(LOAD_DL_COMPLETED); - message.AddString("url", m_frame->document()->url().string()); - m_messenger->SendMessage(&message); - } -} - -void FrameLoaderClientHaiku::progressStarted() -{ - notImplemented(); -} - - -void FrameLoaderClientHaiku::progressCompleted() -{ - notImplemented(); -} - - -void FrameLoaderClientHaiku::setMainFrameDocumentReady(bool) -{ - notImplemented(); - // this is only interesting once we provide an external API for the DOM -} - -void FrameLoaderClientHaiku::willChangeTitle(DocumentLoader*) -{ - notImplemented(); -} - -void FrameLoaderClientHaiku::didChangeTitle(DocumentLoader* docLoader) -{ - setTitle(docLoader->title(), docLoader->url()); -} - -void FrameLoaderClientHaiku::finishedLoading(DocumentLoader*) -{ - notImplemented(); -} - -bool FrameLoaderClientHaiku::canShowMIMETypeAsHTML(const String& MIMEType) const -{ - notImplemented(); - return false; -} - -bool FrameLoaderClientHaiku::canShowMIMEType(const String& MIMEType) const -{ - notImplemented(); - return true; -} - -bool FrameLoaderClientHaiku::representationExistsForURLScheme(const String& URLScheme) const -{ - notImplemented(); - return false; -} - -String FrameLoaderClientHaiku::generatedMIMETypeForURLScheme(const String& URLScheme) const -{ - notImplemented(); - return String(); -} - -void FrameLoaderClientHaiku::frameLoadCompleted() -{ - if (m_webView->LockLooper()) { - m_webView->Draw(m_webView->Bounds()); - m_webView->UnlockLooper(); - } -} - -void FrameLoaderClientHaiku::saveViewStateToItem(HistoryItem*) -{ - notImplemented(); -} - -void FrameLoaderClientHaiku::restoreViewState() -{ - notImplemented(); -} - -void FrameLoaderClientHaiku::restoreScrollPositionAndViewState() -{ - notImplemented(); -} - -void FrameLoaderClientHaiku::provisionalLoadStarted() -{ - notImplemented(); -} - -bool FrameLoaderClientHaiku::shouldTreatURLAsSameAsCurrent(const KURL&) const -{ - notImplemented(); - return false; -} - -void FrameLoaderClientHaiku::addHistoryItemForFragmentScroll() -{ - notImplemented(); -} - -void FrameLoaderClientHaiku::didFinishLoad() -{ - notImplemented(); -} - -void FrameLoaderClientHaiku::prepareForDataSourceReplacement() -{ - notImplemented(); -} - -void FrameLoaderClientHaiku::setTitle(const String& title, const KURL&) -{ - notImplemented(); -} - -String FrameLoaderClientHaiku::userAgent(const KURL&) -{ - return String("Mozilla/5.0 (compatible; U; InfiNet 0.1; Haiku) AppleWebKit/420+ (KHTML, like Gecko)"); -} - -void FrameLoaderClientHaiku::dispatchDidReceiveIcon() -{ - notImplemented(); -} - -void FrameLoaderClientHaiku::frameLoaderDestroyed() -{ - m_frame = 0; - m_messenger = 0; - delete this; -} - -bool FrameLoaderClientHaiku::canHandleRequest(const WebCore::ResourceRequest&) const -{ - notImplemented(); - return true; -} - -void FrameLoaderClientHaiku::partClearedInBegin() -{ - notImplemented(); -} - -void FrameLoaderClientHaiku::updateGlobalHistory() -{ - notImplemented(); -} - -void FrameLoaderClientHaiku::updateGlobalHistoryRedirectLinks() -{ - notImplemented(); -} - -bool FrameLoaderClientHaiku::shouldGoToHistoryItem(WebCore::HistoryItem*) const -{ - notImplemented(); - return true; -} - -bool FrameLoaderClientHaiku::shouldStopLoadingForHistoryItem(WebCore::HistoryItem*) const -{ - return true; -} - -void FrameLoaderClientHaiku::saveScrollPositionAndViewStateToItem(WebCore::HistoryItem*) -{ - notImplemented(); -} - -bool FrameLoaderClientHaiku::canCachePage() const -{ - return false; -} - -void FrameLoaderClientHaiku::setMainDocumentError(WebCore::DocumentLoader*, const WebCore::ResourceError&) -{ - notImplemented(); -} - -void FrameLoaderClientHaiku::committedLoad(WebCore::DocumentLoader* loader, const char* data, int length) -{ - loader->commitData(data, length); -} - -WebCore::ResourceError FrameLoaderClientHaiku::cancelledError(const WebCore::ResourceRequest& request) -{ - notImplemented(); - return ResourceError(String(), WebKitErrorCannotShowURL, request.url().string(), String()); -} - -WebCore::ResourceError FrameLoaderClientHaiku::blockedError(const ResourceRequest& request) -{ - notImplemented(); - return ResourceError(String(), WebKitErrorCannotShowURL, request.url().string(), String()); -} - -WebCore::ResourceError FrameLoaderClientHaiku::cannotShowURLError(const WebCore::ResourceRequest& request) -{ - return ResourceError(String(), WebKitErrorCannotShowURL, request.url().string(), String()); -} - -WebCore::ResourceError FrameLoaderClientHaiku::interruptedForPolicyChangeError(const WebCore::ResourceRequest& request) -{ - notImplemented(); - return ResourceError(String(), WebKitErrorFrameLoadInterruptedByPolicyChange, request.url().string(), String()); -} - -WebCore::ResourceError FrameLoaderClientHaiku::cannotShowMIMETypeError(const WebCore::ResourceResponse& response) -{ - notImplemented(); - return ResourceError(String(), WebKitErrorCannotShowMIMEType, response.url().string(), String()); -} - -WebCore::ResourceError FrameLoaderClientHaiku::fileDoesNotExistError(const WebCore::ResourceResponse& response) -{ - notImplemented(); - return ResourceError(String(), WebKitErrorCannotShowURL, response.url().string(), String()); -} - -bool FrameLoaderClientHaiku::shouldFallBack(const WebCore::ResourceError& error) -{ - notImplemented(); - return false; -} - -WTF::PassRefPtr FrameLoaderClientHaiku::createDocumentLoader(const ResourceRequest& request, - const SubstituteData& substituteData) -{ - return DocumentLoader::create(request, substituteData); -} - -void FrameLoaderClientHaiku::download(ResourceHandle*, const ResourceRequest&, - const ResourceRequest&, const ResourceResponse&) -{ - notImplemented(); -} - -void FrameLoaderClientHaiku::assignIdentifierToInitialRequest(unsigned long identifier, DocumentLoader*, - const ResourceRequest&) -{ - notImplemented(); -} - -void FrameLoaderClientHaiku::dispatchWillSendRequest(DocumentLoader*, unsigned long, ResourceRequest& request, - const ResourceResponse& response) -{ - notImplemented(); -} - -bool FrameLoaderClientHaiku::shouldUseCredentialStorage(DocumentLoader*, unsigned long) -{ - notImplemented(); - return false; -} - -void FrameLoaderClientHaiku::dispatchDidReceiveAuthenticationChallenge(DocumentLoader*, - unsigned long, const AuthenticationChallenge&) -{ - notImplemented(); -} - -void FrameLoaderClientHaiku::dispatchDidCancelAuthenticationChallenge(DocumentLoader*, - unsigned long, const AuthenticationChallenge&) -{ - notImplemented(); -} - -void FrameLoaderClientHaiku::dispatchDidReceiveResponse(DocumentLoader* loader, unsigned long id, - const ResourceResponse& response) -{ - notImplemented(); - m_response = response; - m_firstData = true; -} - -void FrameLoaderClientHaiku::dispatchDidReceiveContentLength(DocumentLoader* loader, - unsigned long id, int length) -{ - notImplemented(); -} - -void FrameLoaderClientHaiku::dispatchDidFinishLoading(DocumentLoader*, unsigned long) -{ - notImplemented(); -} - -void FrameLoaderClientHaiku::dispatchDidFailLoading(DocumentLoader* loader, - unsigned long, const ResourceError&) -{ - if (m_webView) { - BMessage message(LOAD_FAILED); - message.AddString("url", m_frame->loader()->documentLoader()->request().url().string()); - m_messenger->SendMessage(&message); - } -} - -bool FrameLoaderClientHaiku::dispatchDidLoadResourceFromMemoryCache(DocumentLoader*, - const ResourceRequest&, - const ResourceResponse&, int) -{ - notImplemented(); - return false; -} - -void FrameLoaderClientHaiku::dispatchDidFailProvisionalLoad(const ResourceError&) -{ - notImplemented(); -} - -void FrameLoaderClientHaiku::dispatchDidFailLoad(const ResourceError&) -{ - notImplemented(); -} - -Frame* FrameLoaderClientHaiku::dispatchCreatePage(const WebCore::NavigationAction&) -{ - notImplemented(); - return false; -} - -void FrameLoaderClientHaiku::dispatchDecidePolicyForResponse(FramePolicyFunction function, - const ResourceResponse& response, - const ResourceRequest& request) -{ - if (!m_frame) - return; - - notImplemented(); - (m_frame->loader()->policyChecker()->*function)(PolicyUse); -} - -void FrameLoaderClientHaiku::dispatchDecidePolicyForNewWindowAction(FramePolicyFunction function, - const NavigationAction&, - const ResourceRequest& request, - PassRefPtr, const String& targetName) -{ - if (!m_frame) - return; - - if (m_webView) { - BMessage message(NEW_WINDOW_REQUESTED); - message.AddString("url", request.url().string()); - if (m_messenger->SendMessage(&message)) { - (m_frame->loader()->policyChecker()->*function)(PolicyIgnore); - return; - } - } - - (m_frame->loader()->policyChecker()->*function)(PolicyUse); -} - -void FrameLoaderClientHaiku::dispatchDecidePolicyForNavigationAction(FramePolicyFunction function, - const NavigationAction& action, - const ResourceRequest& request, - PassRefPtr) -{ - if (!m_frame || !function) - return; - - if (m_webView) { - BMessage message(NAVIGATION_REQUESTED); - message.AddString("url", request.url().string()); - m_messenger->SendMessage(&message); - - (m_frame->loader()->policyChecker()->*function)(PolicyUse); - } -} - -void FrameLoaderClientHaiku::dispatchUnableToImplementPolicy(const ResourceError&) -{ - notImplemented(); -} - -void FrameLoaderClientHaiku::startDownload(const ResourceRequest&, const String& /* suggestedName */) -{ - notImplemented(); -} - -PassRefPtr FrameLoaderClientHaiku::createFrame(const KURL& url, const String& name, - HTMLFrameOwnerElement* ownerElement, - const String& referrer, bool allowsScrolling, - int marginWidth, int marginHeight) -{ - // FIXME: We should apply the right property to the frameView. (scrollbar,margins) - - RefPtr childFrame = Frame::create(m_frame->page(), ownerElement, this); - setFrame(childFrame.get()); - - RefPtr frameView = FrameView::create(childFrame.get()); - - frameView->setAllowsScrolling(allowsScrolling); - frameView->deref(); - childFrame->setView(frameView.get()); - childFrame->init(); - - childFrame->tree()->setName(name); - m_frame->tree()->appendChild(childFrame); - - m_frame->loader()->loadURLIntoChildFrame(url, referrer, childFrame.get()); - - // The frame's onload handler may have removed it from the document. - if (!childFrame->tree()->parent()) - return 0; - - return childFrame.release(); - - notImplemented(); - return 0; -} - -void FrameLoaderClientHaiku::didTransferChildFrameToNewDocument(Page*) -{ -} - -void FrameLoaderClientHaiku::transferLoadingResourceFromPage(ResourceLoader*, const ResourceRequest&, Page*) -{ -} - -ObjectContentType FrameLoaderClientHaiku::objectContentType(const KURL& url, const String& mimeType, bool shouldPreferPlugInsForImages) -{ - notImplemented(); - return ObjectContentType(); -} - -PassRefPtr FrameLoaderClientHaiku::createPlugin(const IntSize&, HTMLPlugInElement*, - const KURL&, const Vector&, - const Vector&, const String&, - bool loadManually) -{ - notImplemented(); - return 0; -} - -void FrameLoaderClientHaiku::redirectDataToPlugin(Widget* pluginWidget) -{ - notImplemented(); - return; -} - -ResourceError FrameLoaderClientHaiku::pluginWillHandleLoadError(const ResourceResponse& response) -{ - notImplemented(); - return ResourceError(String(), WebKitErrorCannotLoadPlugIn, response.url().string(), String()); -} - -PassRefPtr FrameLoaderClientHaiku::createJavaAppletWidget(const IntSize&, HTMLAppletElement*, - const KURL& baseURL, - const Vector& paramNames, - const Vector& paramValues) -{ - notImplemented(); - return 0; -} - -String FrameLoaderClientHaiku::overrideMediaType() const -{ - notImplemented(); - return String(); -} - -void FrameLoaderClientHaiku::dispatchDidClearWindowObjectInWorld(DOMWrapperWorld* world) -{ - if (world != mainThreadNormalWorld()) - return; - - if (m_webView) { - BMessage message(JAVASCRIPT_WINDOW_OBJECT_CLEARED); - m_messenger->SendMessage(&message); - } -} - -void FrameLoaderClientHaiku::documentElementAvailable() -{ -} - -void FrameLoaderClientHaiku::didPerformFirstNavigation() const -{ - notImplemented(); -} - -void FrameLoaderClientHaiku::registerForIconNotification(bool listen) -{ - notImplemented(); -} - -void FrameLoaderClientHaiku::savePlatformDataToCachedFrame(CachedFrame*) -{ - notImplemented(); -} - -void FrameLoaderClientHaiku::transitionToCommittedFromCachedFrame(CachedFrame*) -{ - notImplemented(); -} - -void FrameLoaderClientHaiku::transitionToCommittedForNewPage() -{ - ASSERT(m_frame); - ASSERT(m_webView); - - Page* page = m_frame->page(); - ASSERT(page); - - bool isMainFrame = m_frame == page->mainFrame(); - - m_frame->setView(0); - - RefPtr frameView; - if (isMainFrame) { - if (m_webView->LockLooper()) { - // We lock the looper in order to get the bounds of the WebView. - frameView = FrameView::create(m_frame, IntRect(m_webView->Bounds()).size()); - m_webView->UnlockLooper(); - } - } else - frameView = FrameView::create(m_frame); - - ASSERT(frameView); - m_frame->setView(frameView); - - frameView->setPlatformWidget(m_webView); - - if (HTMLFrameOwnerElement* owner = m_frame->ownerElement()) - m_frame->view()->setScrollbarModes(owner->scrollingMode(), owner->scrollingMode()); -} - -void FrameLoaderClientHaiku::didSaveToPageCache() -{ -} - -void FrameLoaderClientHaiku::didRestoreFromPageCache() -{ -} - -void FrameLoaderClientHaiku::dispatchDidBecomeFrameset(bool) -{ -} - -} // namespace WebCore diff --git a/Source/WebKit/haiku/WebCoreSupport/FrameLoaderClientHaiku.h b/Source/WebKit/haiku/WebCoreSupport/FrameLoaderClientHaiku.h deleted file mode 100644 index 673750d..0000000 --- a/Source/WebKit/haiku/WebCoreSupport/FrameLoaderClientHaiku.h +++ /dev/null @@ -1,258 +0,0 @@ -/* - * Copyright (C) 2006 Zack Rusin - * Copyright (C) 2006, 2011 Apple Inc. All rights reserved. - * Copyright (C) 2007 Ryan Leavengood All rights reserved. - * - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef FrameLoaderClientHaiku_h -#define FrameLoaderClientHaiku_h - -#include "FrameLoader.h" -#include "FrameLoaderClient.h" -#include "KURL.h" -#include "ResourceResponse.h" -#include - -class BMessenger; -class WebView; - -namespace WebCore { - class AuthenticationChallenge; - class DocumentLoader; - class Element; - class FormState; - class NavigationAction; - class ResourceLoader; - - struct LoadErrorResetToken; - - class FrameLoaderClientHaiku : public FrameLoaderClient { - public: - FrameLoaderClientHaiku(); - ~FrameLoaderClientHaiku() { } - void setFrame(Frame*); - void setWebView(WebView*); - virtual void detachFrameLoader(); - - virtual bool hasWebView() const; - - virtual bool hasBackForwardList() const; - virtual void resetBackForwardList(); - - virtual bool provisionalItemIsTarget() const; - - virtual void makeRepresentation(DocumentLoader*); - virtual void forceLayout(); - virtual void forceLayoutForNonHTML(); - - virtual void updateHistoryForCommit(); - - virtual void updateHistoryForBackForwardNavigation(); - virtual void updateHistoryForReload(); - virtual void updateHistoryForStandardLoad(); - virtual void updateHistoryForInternalLoad(); - - virtual void updateHistoryAfterClientRedirect(); - - virtual void setCopiesOnScroll(); - - virtual LoadErrorResetToken* tokenForLoadErrorReset(); - virtual void resetAfterLoadError(LoadErrorResetToken*); - virtual void doNotResetAfterLoadError(LoadErrorResetToken*); - - virtual void willCloseDocument(); - - virtual void detachedFromParent2(); - virtual void detachedFromParent3(); - - virtual void frameLoaderDestroyed(); - - virtual bool canHandleRequest(const ResourceRequest&) const; - - virtual void dispatchDidHandleOnloadEvents(); - virtual void dispatchDidReceiveServerRedirectForProvisionalLoad(); - virtual void dispatchDidCancelClientRedirect(); - virtual void dispatchWillPerformClientRedirect(const KURL&, double interval, double fireDate); - virtual void dispatchDidChangeLocationWithinPage(); - virtual void dispatchDidPushStateWithinPage(); - virtual void dispatchDidReplaceStateWithinPage(); - virtual void dispatchDidPopStateWithinPage(); - virtual void dispatchWillClose(); - virtual void dispatchDidReceiveIcon(); - virtual void dispatchDidStartProvisionalLoad(); - virtual void dispatchDidReceiveTitle(const StringWithDirection& title); - virtual void dispatchDidCommitLoad(); - virtual void dispatchDidFinishDocumentLoad(); - virtual void dispatchDidFinishLoad(); - virtual void dispatchDidFirstLayout(); - virtual void dispatchDidFirstVisuallyNonEmptyLayout(); - - virtual void dispatchShow(); - virtual void cancelPolicyCheck(); - - virtual void dispatchWillSendSubmitEvent(HTMLFormElement*) { } - virtual void dispatchWillSubmitForm(FramePolicyFunction, PassRefPtr); - - virtual void dispatchDidLoadMainResource(DocumentLoader*); - virtual void revertToProvisionalState(DocumentLoader*); - - virtual void postProgressStartedNotification(); - virtual void postProgressEstimateChangedNotification(); - virtual void postProgressFinishedNotification(); - - virtual void progressStarted(); - virtual void progressCompleted(); - virtual void setMainFrameDocumentReady(bool); - virtual void willChangeTitle(DocumentLoader*); - virtual void didChangeTitle(DocumentLoader*); - virtual void finishedLoading(DocumentLoader*); - - virtual bool canShowMIMEType(const String& MIMEType) const; - virtual bool canShowMIMETypeAsHTML(const String& MIMEType) const; - virtual bool representationExistsForURLScheme(const String& URLScheme) const; - virtual String generatedMIMETypeForURLScheme(const String& URLScheme) const; - - virtual void frameLoadCompleted(); - virtual void saveViewStateToItem(HistoryItem*); - virtual void restoreViewState(); - virtual void restoreScrollPositionAndViewState(); - virtual void provisionalLoadStarted(); - virtual bool shouldTreatURLAsSameAsCurrent(const KURL&) const; - virtual void addHistoryItemForFragmentScroll(); - virtual void didFinishLoad(); - virtual void prepareForDataSourceReplacement(); - virtual void setTitle(const StringWithDirection&, const KURL&); - - virtual String userAgent(const KURL&); - - virtual void savePlatformDataToCachedFrame(WebCore::CachedFrame*); - virtual void transitionToCommittedFromCachedFrame(WebCore::CachedFrame*); - virtual void transitionToCommittedForNewPage(); - - virtual void didSaveToPageCache(); - virtual void didRestoreFromPageCache(); - - virtual void dispatchDidBecomeFrameset(bool); - - virtual void updateGlobalHistory(); - virtual void updateGlobalHistoryRedirectLinks(); - virtual bool shouldGoToHistoryItem(HistoryItem*) const; - virtual bool shouldStopLoadingForHistoryItem(HistoryItem*) const; - virtual void saveScrollPositionAndViewStateToItem(HistoryItem*); - virtual bool canCachePage() const; - - virtual void setMainDocumentError(DocumentLoader*, const ResourceError&); - virtual void committedLoad(DocumentLoader*, const char*, int); - virtual ResourceError cancelledError(const ResourceRequest&); - virtual ResourceError blockedError(const ResourceRequest&); - virtual ResourceError cannotShowURLError(const ResourceRequest&); - virtual ResourceError interruptedForPolicyChangeError(const ResourceRequest&); - virtual ResourceError cannotShowMIMETypeError(const ResourceResponse&); - virtual ResourceError fileDoesNotExistError(const ResourceResponse&); - virtual bool shouldFallBack(const ResourceError&); - virtual WTF::PassRefPtr createDocumentLoader(const ResourceRequest&, - const SubstituteData&); - virtual void download(ResourceHandle*, const ResourceRequest&, const ResourceRequest&, - const ResourceResponse&); - - virtual void assignIdentifierToInitialRequest(unsigned long identifier, - DocumentLoader*, - const ResourceRequest&); - - virtual void dispatchWillSendRequest(DocumentLoader*, unsigned long, ResourceRequest&, - const ResourceResponse&); - virtual bool shouldUseCredentialStorage(DocumentLoader*, unsigned long identifier); - virtual void dispatchDidReceiveAuthenticationChallenge(DocumentLoader*, - unsigned long identifier, - const AuthenticationChallenge&); - virtual void dispatchDidCancelAuthenticationChallenge(DocumentLoader*, - unsigned long identifier, - const AuthenticationChallenge&); - virtual void dispatchDidReceiveResponse(DocumentLoader*, unsigned long, - const ResourceResponse&); - virtual void dispatchDidReceiveContentLength(DocumentLoader*, unsigned long, int); - virtual void dispatchDidFinishLoading(DocumentLoader*, unsigned long); - virtual void dispatchDidFailLoading(DocumentLoader*, unsigned long, - const ResourceError&); - virtual bool dispatchDidLoadResourceFromMemoryCache(DocumentLoader*, - const ResourceRequest&, - const ResourceResponse&, int); - - virtual void dispatchDidFailProvisionalLoad(const ResourceError&); - virtual void dispatchDidFailLoad(const ResourceError&); - virtual Frame* dispatchCreatePage(const NavigationAction&); - virtual void dispatchDecidePolicyForResponse(FramePolicyFunction, - const ResourceResponse&, - const ResourceRequest&); - virtual void dispatchDecidePolicyForNewWindowAction(FramePolicyFunction, - const NavigationAction&, - const ResourceRequest&, - PassRefPtr, const String&); - virtual void dispatchDecidePolicyForNavigationAction(FramePolicyFunction, - const NavigationAction&, - const ResourceRequest&, - PassRefPtr); - virtual void dispatchUnableToImplementPolicy(const ResourceError&); - - virtual void startDownload(const ResourceRequest&, const String& suggestedName = String()); - - // FIXME: This should probably not be here, but it's needed for the tests currently. - virtual void partClearedInBegin(); - - virtual PassRefPtr createFrame(const KURL& url, const String& name, - HTMLFrameOwnerElement*, const String& referrer, - bool allowsScrolling, int marginWidth, int marginHeight); - virtual void didTransferChildFrameToNewDocument(WebCore::Page*); - virtual void transferLoadingResourceFromPage(WebCore::ResourceLoader*, const ResourceRequest&, WebCore::Page*); - virtual PassRefPtr createPlugin(const IntSize&, HTMLPlugInElement*, const KURL&, - const Vector&, const Vector&, const String&, - bool loadManually); - virtual void redirectDataToPlugin(Widget* pluginWidget); - virtual ResourceError pluginWillHandleLoadError(const ResourceResponse&); - - virtual PassRefPtr createJavaAppletWidget(const IntSize&, HTMLAppletElement*, - const KURL& baseURL, const Vector& paramNames, - const Vector& paramValues); - - virtual ObjectContentType objectContentType(const KURL&, const String& mimeType, bool shouldPreferPlugInsForImages); - virtual String overrideMediaType() const; - - virtual void dispatchDidClearWindowObjectInWorld(DOMWrapperWorld*); - virtual void documentElementAvailable(); - - virtual void didPerformFirstNavigation() const; - - virtual void registerForIconNotification(bool listen = true); - - private: - Frame* m_frame; - WebView* m_webView; - BMessenger* m_messenger; - ResourceResponse m_response; - bool m_firstData; - }; -} // namespace WebCore - -#endif // FrameLoaderClientHaiku_h diff --git a/Source/WebKit/haiku/WebCoreSupport/InspectorClientHaiku.cpp b/Source/WebKit/haiku/WebCoreSupport/InspectorClientHaiku.cpp deleted file mode 100644 index 50b8f49..0000000 --- a/Source/WebKit/haiku/WebCoreSupport/InspectorClientHaiku.cpp +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright (C) 2007 Apple Inc. All rights reserved. - * Copyright (C) 2007 Ryan Leavengood - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of - * its contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "InspectorClientHaiku.h" - -#include "PlatformString.h" - -#include "NotImplemented.h" - - -namespace WebCore { - -void InspectorClientHaiku::inspectorDestroyed() -{ - notImplemented(); -} - -void InspectorClientHaiku::openInspectorFrontend(WebCore::InspectorController*) -{ - notImplemented(); -} - -void InspectorClientHaiku::highlight() -{ - notImplemented(); -} - -void InspectorClientHaiku::hideHighlight() -{ - notImplemented(); -} - -void InspectorClientHaiku::populateSetting(const String& key, String* value) -{ - notImplemented(); -} - -void InspectorClientHaiku::storeSetting(const String& key, const String& value) -{ - notImplemented(); -} - -bool InspectorClientHaiku::sendMessageToFrontend(const String&) -{ - notImplemented(); - return false; -} - -} // namespace WebCore - diff --git a/Source/WebKit/haiku/WebCoreSupport/InspectorClientHaiku.h b/Source/WebKit/haiku/WebCoreSupport/InspectorClientHaiku.h deleted file mode 100644 index 0e6e4de..0000000 --- a/Source/WebKit/haiku/WebCoreSupport/InspectorClientHaiku.h +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (C) 2007 Apple Inc. All rights reserved. - * Copyright (C) 2007 Ryan Leavengood - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of - * its contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef InspectorClientHaiku_h -#define InspectorClientHaiku_h - -#include "InspectorClient.h" -#include - -namespace WebCore { - class Node; - class Page; - - class InspectorClientHaiku : public InspectorClient { - public: - virtual void inspectorDestroyed(); - - virtual void openInspectorFrontend(WebCore::InspectorController*); - - virtual void highlight(); - virtual void hideHighlight(); - - virtual void populateSetting(const WTF::String& key, WTF::String* value); - virtual void storeSetting(const WTF::String& key, const WTF::String& value); - - virtual bool sendMessageToFrontend(const WTF::String&); - }; -} // namespace WebCore - -#endif // InspectorClientHaiku_h - diff --git a/Source/WebKit2/ChangeLog b/Source/WebKit2/ChangeLog index 6a021dd..7371150 100644 --- a/Source/WebKit2/ChangeLog +++ b/Source/WebKit2/ChangeLog @@ -1,3 +1,12 @@ +2011-09-25 Adam Barth + + Remove PLATFORM(HAIKU) and associated code + https://bugs.webkit.org/show_bug.cgi?id=68774 + + Reviewed by Sam Weinig. + + * Scripts/generate-forwarding-headers.pl: + 2011-09-24 Adam Barth Always enable ENABLE(OFFLINE_WEB_APPLICATIONS) diff --git a/Source/WebKit2/Scripts/generate-forwarding-headers.pl b/Source/WebKit2/Scripts/generate-forwarding-headers.pl index cbdfc99..cccd317 100755 --- a/Source/WebKit2/Scripts/generate-forwarding-headers.pl +++ b/Source/WebKit2/Scripts/generate-forwarding-headers.pl @@ -35,7 +35,7 @@ use File::Spec::Functions; my $srcRoot = realpath(File::Spec->catfile(dirname(abs_path($0)), "../..")); my $incFromRoot = abs_path($ARGV[0]); -my @platformPrefixes = ("brew", "cf", "chromium", "curl", "efl", "gtk", "haiku", "mac", "qt", "soup", "v8", "win", "wx"); +my @platformPrefixes = ("brew", "cf", "chromium", "curl", "efl", "gtk", "mac", "qt", "soup", "v8", "win", "wx"); my @frameworks = ( "JavaScriptCore", "WebCore", "WebKit2"); my @skippedPrefixes; my @frameworkHeaders; diff --git a/Source/cmake/WebKitPackaging.cmake b/Source/cmake/WebKitPackaging.cmake index d0a092f..81d2fb4 100644 --- a/Source/cmake/WebKitPackaging.cmake +++ b/Source/cmake/WebKitPackaging.cmake @@ -118,7 +118,6 @@ IF(NOT DEFINED CPACK_SOURCE_IGNORE_FILES) "/curl/" "/Curl/" "curl\\\\." "Curl\\\\." "/gstreamer/" "/Gstreamer/" "gstreamer\\\\." "Gstreamer\\\\." "/gtk/" "/Gtk/" "gtk\\\\." "Gtk\\\\." - "/haiku/" "/Haiku/" "haiku\\\\." "Haiku\\\\." "/iphone/" "/Iphone/" "iphone\\\\." "Iphone\\\\." "/mac/" "/Mac/" "mac\\\\." "Mac\\\\." "/opentype/" "/Opentype/" "opentype\\\\." "Opentype\\\\." diff --git a/Tools/ChangeLog b/Tools/ChangeLog index 5802e58..b41940c 100644 --- a/Tools/ChangeLog +++ b/Tools/ChangeLog @@ -1,3 +1,13 @@ +2011-09-25 Adam Barth + + Remove PLATFORM(HAIKU) and associated code + https://bugs.webkit.org/show_bug.cgi?id=68774 + + Reviewed by Sam Weinig. + + * Scripts/webkitpy/common/config/build.py: + * waf/build/settings.py: + 2011-09-24 Adam Barth Always enable ENABLE(OFFLINE_WEB_APPLICATIONS) diff --git a/Tools/Scripts/webkitpy/common/config/build.py b/Tools/Scripts/webkitpy/common/config/build.py index 5023d2b..75daad5 100644 --- a/Tools/Scripts/webkitpy/common/config/build.py +++ b/Tools/Scripts/webkitpy/common/config/build.py @@ -48,7 +48,6 @@ def _should_file_trigger_build(target_platform, file): ("Websites", []), ("brew", []), ("efl", []), - ("haiku", []), ("iphone", []), ("opengl", []), ("opentype", []), diff --git a/Tools/waf/build/settings.py b/Tools/waf/build/settings.py index e07e53a..fda6920 100644 --- a/Tools/waf/build/settings.py +++ b/Tools/waf/build/settings.py @@ -64,7 +64,6 @@ ports = [ 'Brew', 'Chromium', 'Gtk', - 'Haiku', 'Mac', 'None', 'Qt', diff --git a/wscript b/wscript index 1855ca8..3369fe5 100644 --- a/wscript +++ b/wscript @@ -215,7 +215,7 @@ def build(bld): features = [Options.options.port.lower()] exclude_patterns = ['*AllInOne.cpp', '*Brew.cpp', '*CFNet.cpp', '*Chromium*.cpp', - '*Efl.cpp', '*Gtk.cpp', '*Haiku.cpp', '*Mac.cpp', '*None.cpp', '*Qt.cpp', '*Safari.cpp', + '*Efl.cpp', '*Gtk.cpp', '*Mac.cpp', '*None.cpp', '*Qt.cpp', '*Safari.cpp', 'test*bindings.*', '*WinCE.cpp', "WebDOMCanvas*.cpp", "WebDOMSVG*.cpp"] if Options.options.port == 'wx': features.append('curl') -- 2.7.4