Changeset 51880 in webkit
- Timestamp:
- Dec 8, 2009 4:52:19 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/ChangeLog
r51875 r51880 1 2009-12-08 Kevin Watters <kevinwatters@gmail.com> 2 3 Reviewed by Kevin Ollivier. 4 5 [wx] Mac plugins support. 6 7 https://bugs.webkit.org/show_bug.cgi?id=32236 8 9 * wtf/Platform.h: 10 1 11 2009-12-08 Dmitry Titov <dimich@chromium.org> 2 12 … … 20 30 * wtf/ThreadVerifier.h: Removed. 21 31 32 >>>>>>> .r51879 22 33 2009-12-08 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk> 23 34 -
trunk/JavaScriptCore/wtf/Platform.h
r51871 r51880 555 555 #if PLATFORM(WX) 556 556 #define ENABLE_ASSEMBLER 1 557 #if PLATFORM(DARWIN) 558 #define WTF_PLATFORM_CF 1 559 #endif 557 560 #endif 558 561 -
trunk/WebCore/ChangeLog
r51877 r51880 1 2009-12-08 Kevin Watters <kevinwatters@gmail.com> 2 3 Reviewed by Kevin Ollivier. 4 5 [wx] Mac plugins support. 6 7 https://bugs.webkit.org/show_bug.cgi?id=32236 8 9 * platform/FileSystem.h: 10 * platform/cf/BinaryPropertyList.h: 11 * platform/network/curl/ResourceHandleManager.cpp: 12 * platform/wx/FileSystemWx.cpp: 13 (WebCore::fileExists): 14 (WebCore::unloadModule): 15 (WebCore::wxDirTraverserNonRecursive::wxDirTraverserNonRecursive): 16 (WebCore::wxDirTraverserNonRecursive::OnFile): 17 (WebCore::wxDirTraverserNonRecursive::OnDir): 18 (WebCore::listDirectory): 19 * plugins/mac/PluginViewMac.cpp: 20 (WebCore::nativeWindowFor): 21 (WebCore::cgHandleFor): 22 (WebCore::topLevelOffsetFor): 23 (WebCore::PluginView::platformStart): 24 (WebCore::PluginView::setFocus): 25 (WebCore::PluginView::invalidateRect): 26 (WebCore::PluginView::handleKeyboardEvent): 27 (WebCore::PluginView::globalMousePosForPlugin): 28 * plugins/wx/PluginDataWx.cpp: Added. 29 (WebCore::PluginData::initPlugins): 30 (WebCore::PluginData::refresh): 31 * wscript: 32 1 33 2009-12-08 Brady Eidson <beidson@apple.com> 2 34 -
trunk/WebCore/platform/FileSystem.h
r50138 r51880 40 40 #include <windows.h> 41 41 #endif 42 #if defined(Q_WS_MAC) 42 #endif 43 44 #if PLATFORM(CF) || (PLATFORM(QT) && defined(Q_WS_MAC)) 43 45 #include <CoreFoundation/CFBundle.h> 44 #endif45 46 #endif 46 47 … … 77 78 #elif PLATFORM(GTK) 78 79 typedef GModule* PlatformModule; 80 #elif PLATFORM(CF) 81 typedef CFBundleRef PlatformModule; 79 82 #else 80 83 typedef void* PlatformModule; -
trunk/WebCore/platform/cf/BinaryPropertyList.h
r42468 r51880 26 26 #ifndef BinaryPropertyList_h 27 27 #define BinaryPropertyList_h 28 29 #include <CoreFoundation/CoreFoundation.h> 28 30 29 31 #include <wtf/Vector.h> -
trunk/WebCore/platform/network/curl/ResourceHandleManager.cpp
r49752 r51880 50 50 #include <wtf/Vector.h> 51 51 52 #if !PLATFORM(WIN_OS) 53 #include <sys/param.h> 54 #define MAX_PATH MAXPATHLEN 55 #endif 56 52 57 namespace WebCore { 53 58 -
trunk/WebCore/platform/wx/FileSystemWx.cpp
r51143 r51880 36 36 37 37 #include <wx/wx.h> 38 #include <wx/datetime.h> 39 #include <wx/dir.h> 40 #include <wx/dynlib.h> 41 #include <wx/file.h> 42 #include <wx/filefn.h> 38 43 #include <wx/filename.h> 39 #include <wx/dir.h> 40 #i nclude <wx/file.h>41 #include < wx/datetime.h>42 # include <wx/filefn.h>44 45 #if PLATFORM(DARWIN) 46 #include <CoreFoundation/CoreFoundation.h> 47 #endif 43 48 44 49 namespace WebCore { … … 46 51 bool fileExists(const String& path) 47 52 { 48 return wxFileName::FileExists(path); 53 // NOTE: This is called for directory paths too so we need to check both. 54 return wxFileName::FileExists(path) || wxFileName::DirExists(path); 49 55 } 50 56 … … 124 130 #if PLATFORM(WIN_OS) 125 131 return ::FreeLibrary(mod); 132 #elif PLATFORM(DARWIN) 133 CFRelease(mod); 134 return true; 126 135 #else 127 notImplemented(); 128 return false; 136 wxASSERT(mod); 137 delete mod; 138 return true; 129 139 #endif 130 140 } 141 142 143 class wxDirTraverserNonRecursive : public wxDirTraverser { 144 public: 145 wxDirTraverserNonRecursive(wxString basePath, wxArrayString& files) : m_basePath(basePath), m_files(files) { } 146 147 virtual wxDirTraverseResult OnFile(const wxString& filename) 148 { 149 wxFileName afile(filename); 150 afile.MakeRelativeTo(m_basePath); 151 if (afile.GetFullPath().Find(afile.GetPathSeparator()) == wxNOT_FOUND) 152 m_files.push_back(filename); 153 154 return wxDIR_CONTINUE; 155 } 156 157 virtual wxDirTraverseResult OnDir(const wxString& dirname) 158 { 159 wxFileName dirfile(dirname); 160 dirfile.MakeRelativeTo(m_basePath); 161 if (dirfile.GetFullPath().Find(dirfile.GetPathSeparator()) == wxNOT_FOUND) 162 m_files.push_back(dirname); 163 164 return wxDIR_CONTINUE; 165 } 166 167 private: 168 wxString m_basePath; 169 wxArrayString& m_files; 170 171 DECLARE_NO_COPY_CLASS(wxDirTraverserNonRecursive) 172 }; 131 173 132 174 Vector<String> listDirectory(const String& path, const String& filter) 133 175 { 134 176 wxArrayString file_paths; 177 // wxDir::GetAllFiles recurses and for platforms like Mac where 178 // a .plugin or .bundle can be a dir wx will recurse into the bundle 179 // and list the files rather than just returning the plugin name, so 180 // we write a special traverser that works around that issue. 181 wxDirTraverserNonRecursive traverser(path, file_paths); 135 182 136 int n_files = wxDir::GetAllFiles(path, &file_paths, _T(""), wxDIR_FILES); 183 wxDir dir(path); 184 dir.Traverse(traverser, _T(""), wxDIR_FILES | wxDIR_DIRS); 137 185 138 186 Vector<String> entries; 139 187 140 for (int i = 0; i < n_files; i++)188 for (int i = 0; i < file_paths.GetCount(); i++) 141 189 { 142 190 entries.append(file_paths[i]); -
trunk/WebCore/plugins/mac/PluginViewMac.cpp
r51490 r51880 88 88 #endif 89 89 90 #if PLATFORM(WX) 91 #include <wx/defs.h> 92 #include <wx/wx.h> 93 #endif 94 90 95 using std::min; 91 96 … … 104 109 return static_cast<WindowRef>(qt_mac_window_for(widget)); 105 110 #endif 111 #if PLATFORM(WX) 112 if (widget) 113 return (WindowRef)widget->MacGetTopLevelWindowRef(); 114 #endif 106 115 return 0; 107 116 } … … 112 121 if (widget) 113 122 return (CGContextRef)widget->macCGHandle(); 123 #endif 124 #if PLATFORM(WX) 125 if (widget) 126 return (CGContextRef)widget->MacGetCGContextRef(); 114 127 #endif 115 128 return 0; … … 122 135 PlatformWidget topLevel = widget->window(); 123 136 return widget->mapTo(topLevel, QPoint(0, 0)) + topLevel->geometry().topLeft() - topLevel->pos(); 137 } 138 #endif 139 #if PLATFORM(WX) 140 if (widget) { 141 PlatformWidget toplevel = wxGetTopLevelParent(widget); 142 return toplevel->ScreenToClient(widget->GetScreenPosition()); 124 143 } 125 144 #endif … … 183 202 } 184 203 #endif 204 #if PLATFORM(WX) 205 if (wxWindow* widget = m_parentFrame->view()->hostWindow()->platformPageClient()) 206 setPlatformPluginWidget(widget); 207 #endif 185 208 186 209 // Create a fake window relative to which all events will be sent when using offscreen rendering … … 337 360 338 361 if (platformPluginWidget()) 362 #if PLATFORM(QT) 339 363 platformPluginWidget()->setFocus(Qt::OtherFocusReason); 364 #else 365 platformPluginWidget()->SetFocus(); 366 #endif 340 367 else 341 368 Widget::setFocus(); … … 514 541 { 515 542 if (platformPluginWidget()) 543 #if PLATFORM(QT) 516 544 platformPluginWidget()->update(convertToContainingWindow(rect)); 545 #else 546 platformPluginWidget()->RefreshRect(convertToContainingWindow(rect)); 547 #endif 517 548 else 518 549 invalidateWindowlessPluginRect(rect); … … 658 689 LOG(Plugins, "PV::hKE(): record.modifiers: %d", record.modifiers); 659 690 691 #if PLATFORM(QT) 660 692 LOG(Plugins, "PV::hKE(): PKE.qtEvent()->nativeVirtualKey: 0x%02X, charCode: %d", 661 693 keyCode, int(uchar(charCodes[0]))); 694 #endif 662 695 663 696 if (!dispatchNPEvent(record)) … … 708 741 pos.v = short(pos.v * scaleFactor); 709 742 743 #if PLATFORM(WX) 744 // make sure the titlebar/toolbar size is included 745 WindowRef windowRef = nativeWindowFor(platformPluginWidget()); 746 ::Rect content, structure; 747 748 GetWindowBounds(windowRef, kWindowStructureRgn, &structure); 749 GetWindowBounds(windowRef, kWindowContentRgn, &content); 750 751 int top = content.top - structure.top; 752 pos.v -= top; 753 #endif 754 710 755 return pos; 711 756 } -
trunk/WebCore/wscript
r51143 r51880 31 31 32 32 if build_port == "wx": 33 no_plugins = [ 'plugins/PluginDataNone.cpp',34 'plugins/PluginViewNone.cpp',35 'plugins/PluginPackageNone.cpp'36 ]37 38 33 if building_on_win32: 39 34 webcore_dirs.extend(['platform/wx/wxcode/win', 'plugins/win']) … … 52 47 ] 53 48 elif sys.platform.startswith('darwin'): 49 webcore_dirs.append('plugins/mac') 54 50 webcore_dirs.append('platform/wx/wxcode/mac/carbon') 51 webcore_dirs.append('platform/mac') 55 52 webcore_sources['wx-mac'] = [ 53 'platform/mac/WebCoreNSStringExtras.mm', 56 54 'platform/mac/PurgeableBufferMac.cpp', 55 'plugins/wx/PluginDataWx.cpp', 56 'plugins/mac/PluginPackageMac.cpp', 57 'plugins/mac/PluginViewMac.cpp' 57 58 ] 58 webcore_sources['plugins'] = no_plugins59 59 else: 60 webcore_sources['wx-gtk'] = [ 61 'plugins/PluginDataNone.cpp', 62 'plugins/PluginViewNone.cpp', 63 'plugins/PluginPackageNone.cpp' 64 ] 60 65 webcore_dirs.append('platform/wx/wxcode/gtk') 61 webcore_sources['plugins'] = no_plugins62 66 67 import TaskGen 63 68 from TaskGen import taskgen, feature, after 64 69 import Task, ccroot … … 88 93 def build(bld): 89 94 import Options 90 95 if sys.platform.startswith('darwin'): 96 TaskGen.task_gen.mappings['.mm'] = TaskGen.task_gen.mappings['.cxx'] 97 91 98 wk_includes = ['.', '..', 'DerivedSources', 92 99 wk_root, … … 99 106 100 107 features = [build_port] 108 exclude_patterns = ['*None.cpp', '*CFNet.cpp', '*Qt.cpp', '*Win.cpp', '*Wince.cpp', '*Gtk.cpp', '*Mac.cpp', '*Safari.cpp', '*Chromium*.cpp','*SVG*.cpp', '*AllInOne.cpp', 'test*bindings.*'] 101 109 if build_port == 'wx': 102 110 features.append('curl') 111 112 if sys.platform.startswith('darwin'): 113 features.append('cf') 114 else: 115 exclude_patterns.append('*CF.cpp') 103 116 104 117 full_dirs = get_dirs_for_features(webcore_dir, features=features, dirs=webcore_dirs) … … 130 143 131 144 excludes = [] 145 132 146 if build_port == 'wx': 133 excludes = get_excludes(webcore_dir, ['*None.cpp', '*CF.cpp', '*Qt.cpp', '*Win.cpp', '*Wince.cpp', '*Gtk.cpp', '*Mac.cpp', '*Safari.cpp', '*Chromium*.cpp','*SVG*.cpp', '*AllInOne.cpp', 'test*bindings.*'])147 excludes = get_excludes(webcore_dir, exclude_patterns) 134 148 excludes.extend(['UserStyleSheetLoader.cpp', 'RenderMediaControls.cpp']) 135 149 … … 152 166 if building_on_win32: 153 167 excludes.append('SharedTimerWx.cpp') 168 169 excludes.append('AuthenticationCF.cpp') 170 excludes.append('LoaderRunLoopCF.cpp') 154 171 155 172 webcore.find_sources_in_dirs(full_dirs, excludes = excludes, exts=['.c', '.cpp']) -
trunk/WebKit/wx/ChangeLog
r51644 r51880 1 2009-12-08 Kevin Watters <kevinwatters@gmail.com> 2 3 Reviewed by Kevin Ollivier. 4 5 [wx] Mac plugins support. 6 7 https://bugs.webkit.org/show_bug.cgi?id=32236 8 9 * WebKitSupport/FrameLoaderClientWx.cpp: 10 (WebCore::FrameLoaderClientWx::createPlugin): 11 (WebCore::FrameLoaderClientWx::redirectDataToPlugin): 12 * WebView.cpp: 13 (wxWebView::Create): 14 1 15 2009-12-03 Brady Eidson <beidson@apple.com> 2 16 -
trunk/WebKit/wx/WebKitSupport/FrameLoaderClientWx.cpp
r51644 r51880 38 38 #include "FrameView.h" 39 39 #include "FrameTree.h" 40 #include "PluginView.h" 40 41 #include "HTMLFormElement.h" 41 42 #include "HTMLFrameOwnerElement.h" 42 #include "HTMLPluginElement.h"43 43 #include "NotImplemented.h" 44 44 #include "Page.h" … … 854 854 PassRefPtr<Widget> FrameLoaderClientWx::createPlugin(const IntSize& size, HTMLPlugInElement* element, const KURL& url, const Vector<String>& paramNames, const Vector<String>& paramValues, const String& mimeType, bool loadManually) 855 855 { 856 #if PLATFORM(WIN_OS)856 #if __WXMSW__ || __WXMAC__ 857 857 RefPtr<PluginView> pv = PluginView::create(m_frame, size, element, url, paramNames, paramValues, mimeType, loadManually); 858 858 if (pv->status() == PluginStatusLoadedSuccessfully) … … 864 864 void FrameLoaderClientWx::redirectDataToPlugin(Widget* pluginWidget) 865 865 { 866 867 868 866 ASSERT(!m_pluginView); 867 m_pluginView = static_cast<PluginView*>(pluginWidget); 868 m_hasSentResponseToPlugin = false; 869 869 } 870 870 -
trunk/WebKit/wx/WebView.cpp
r51143 r51880 339 339 #endif 340 340 341 #if __WXMSW__ 341 #if __WXMSW__ || __WXMAC__ 342 342 settings->setPluginsEnabled(true); 343 343 #endif -
trunk/WebKitTools/ChangeLog
r51876 r51880 1 2009-12-08 Kevin Watters <kevinwatters@gmail.com> 2 3 Reviewed by Kevin Ollivier. 4 5 [wx] Mac plugins support. 6 7 https://bugs.webkit.org/show_bug.cgi?id=32236 8 9 * wx/browser/wscript: 10 1 11 2009-12-08 David Levin <levin@chromium.org> 2 12 -
trunk/WebKitTools/wx/browser/wscript
r49910 r51880 46 46 source = 'browser.cpp', 47 47 target = 'wxBrowser', 48 uselib = 'WX WEBKIT WX' + get_config(),48 uselib = 'WX CURL ICU XSLT XML WXWEBKIT ' + get_config(), 49 49 libpath = [output_dir], 50 50 uselib_local = '',
Note: See TracChangeset
for help on using the changeset viewer.