diff options
author | Jocelyn Turcotte <jocelyn.turcotte@digia.com> | 2013-06-03 13:13:26 +0000 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-01-03 14:23:17 +0100 |
commit | d92f0c4f34bed79d8296126016330c9df138c54b (patch) | |
tree | b0ae83ee30557f630cc883596a059c4afc9b8f81 /Source/WebCore/plugins | |
parent | 3fdcf783fda9f16175a62082e9cb6a6fdf85cbfc (diff) | |
download | qtwebkit-d92f0c4f34bed79d8296126016330c9df138c54b.tar.gz |
[Qt] Re-enable plugins on Mac.
https://bugs.webkit.org/show_bug.cgi?id=116622
Reviewed by Tor Arne Vestbø.
Source/WebCore:
* platform/FileSystem.h:
* platform/qt/FileSystemQt.cpp:
(WebCore::unloadModule):
- Q_WS_* aren't defined since Qt5, use Q_OS_MACX instead.
* plugins/mac/PluginPackageMac.cpp:
(WebCore::PluginPackage::fetchInfo):
(WebCore::PluginPackage::load):
- createCFString now does the adoption itself.
* plugins/mac/PluginViewMac.mm:
- Add missing include.
Source/WebKit/qt:
* WebCoreSupport/ChromeClientQt.cpp:
(WebCore::ChromeClientQt::windowResizerRect):
- Add missing parenthese.
Tools:
Plugins on Mac were only enabled if !embedded but the later was set if
QPA is enabled, which is the default since Qt 5.0.
Remove references to 'embedded' and fix various build issues,
PluginViewMac.mm and PluginPackageMac.cpp haven't been compiled since a few
months.
* DumpRenderTree/qt/TestNetscapePlugin/TestNetscapePlugin.pro:
* qmake/mkspecs/features/features.prf:
* qmake/mkspecs/features/unix/default_pre.prf:
Task-number: QTBUG-35899
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151109 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Change-Id: I49692a234a66c205099c5dde8eb24ffb6eadba0f
Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
Diffstat (limited to 'Source/WebCore/plugins')
-rw-r--r-- | Source/WebCore/plugins/mac/PluginPackageMac.cpp | 8 | ||||
-rw-r--r-- | Source/WebCore/plugins/mac/PluginViewMac.mm | 3 |
2 files changed, 7 insertions, 4 deletions
diff --git a/Source/WebCore/plugins/mac/PluginPackageMac.cpp b/Source/WebCore/plugins/mac/PluginPackageMac.cpp index 6b6c41775..6c138e8c3 100644 --- a/Source/WebCore/plugins/mac/PluginPackageMac.cpp +++ b/Source/WebCore/plugins/mac/PluginPackageMac.cpp @@ -138,8 +138,8 @@ bool PluginPackage::fetchInfo() if (mimeTypesFileName && CFGetTypeID(mimeTypesFileName.get()) == CFStringGetTypeID()) { WTF::RetainPtr<CFStringRef> fileName = (CFStringRef)mimeTypesFileName.get(); - WTF::RetainPtr<CFStringRef> homeDir = adoptCF(homeDirectoryPath().createCFString()); - WTF::RetainPtr<CFStringRef> path = adoptCF(CFStringCreateWithFormat(0, 0, CFSTR("%@/Library/Preferences/%@"), homeDir.get(), fileName.get())); + WTF::RetainPtr<CFStringRef> homeDir = homeDirectoryPath().createCFString(); + WTF::RetainPtr<CFStringRef> path(AdoptCF, CFStringCreateWithFormat(0, 0, CFSTR("%@/Library/Preferences/%@"), homeDir.get(), fileName.get())); WTF::RetainPtr<CFDictionaryRef> plist = readPListFile(path.get(), /*createFile*/ false, m_module); if (plist) { @@ -255,8 +255,8 @@ bool PluginPackage::load() return true; } - WTF::RetainPtr<CFStringRef> path = adoptCF(m_path.createCFString()); - WTF::RetainPtr<CFURLRef> url = adoptCF(CFURLCreateWithFileSystemPath(kCFAllocatorDefault, path.get(), + WTF::RetainPtr<CFStringRef> path = m_path.createCFString(); + WTF::RetainPtr<CFURLRef> url(AdoptCF, CFURLCreateWithFileSystemPath(kCFAllocatorDefault, path.get(), kCFURLPOSIXPathStyle, false)); m_module = CFBundleCreate(NULL, url.get()); if (!m_module || !CFBundleLoadExecutable(m_module)) { diff --git a/Source/WebCore/plugins/mac/PluginViewMac.mm b/Source/WebCore/plugins/mac/PluginViewMac.mm index 0a7650f34..f8f2bc634 100644 --- a/Source/WebCore/plugins/mac/PluginViewMac.mm +++ b/Source/WebCore/plugins/mac/PluginViewMac.mm @@ -61,6 +61,9 @@ #include "WheelEvent.h" #include "npruntime_impl.h" #include "runtime_root.h" +#include <AppKit/NSEvent.h> +#include <AppKit/NSMenu.h> +#include <AppKit/NSWindow.h> #include <runtime/JSLock.h> #include <runtime/JSCJSValue.h> #include <wtf/RetainPtr.h> |