diff options
author | Michael BrĂ¼ning <michael.bruning@digia.com> | 2014-09-17 12:08:57 +0200 |
---|---|---|
committer | Michael Bruning <michael.bruning@digia.com> | 2014-09-17 12:42:58 +0200 |
commit | 5ef0ef71b06b0d7949c88db6719fd43907f342fd (patch) | |
tree | 4ade62290a7f578baf6d0735d754284742842104 /Source/WebCore/plugins | |
parent | 7a0c9f3d2828b7b9bbae9e1358f34332d3bdf943 (diff) | |
download | qtwebkit-5ef0ef71b06b0d7949c88db6719fd43907f342fd.tar.gz |
[Win] Call set window twice for the Acrobat reader plugin.
Works around a quirk of the Acrobat reader that displayed the
window with incorrect dimensions before.
Task-number: QTBUG-36425
Change-Id: Ic5b7544a74c8e8613251850aa21537fab420b9c4
Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
Diffstat (limited to 'Source/WebCore/plugins')
-rw-r--r-- | Source/WebCore/plugins/PluginQuirkSet.h | 3 | ||||
-rw-r--r-- | Source/WebCore/plugins/win/PluginPackageWin.cpp | 6 | ||||
-rw-r--r-- | Source/WebCore/plugins/win/PluginViewWin.cpp | 2 |
3 files changed, 10 insertions, 1 deletions
diff --git a/Source/WebCore/plugins/PluginQuirkSet.h b/Source/WebCore/plugins/PluginQuirkSet.h index 7e296dc25..37068c9c1 100644 --- a/Source/WebCore/plugins/PluginQuirkSet.h +++ b/Source/WebCore/plugins/PluginQuirkSet.h @@ -49,7 +49,8 @@ namespace WebCore { PluginQuirkRequiresDefaultScreenDepth = 1 << 13, PluginQuirkDontCallSetWindowMoreThanOnce = 1 << 14, PluginQuirkIgnoreRightClickInWindowlessMode = 1 << 15, - PluginQuirkWantsChromeUserAgent = 1 << 16 + PluginQuirkWantsChromeUserAgent = 1 << 16, + PluginQuirkNeedsSetWindowTwice = 1 << 17 }; class PluginQuirkSet { diff --git a/Source/WebCore/plugins/win/PluginPackageWin.cpp b/Source/WebCore/plugins/win/PluginPackageWin.cpp index ab8459f75..988fbfeef 100644 --- a/Source/WebCore/plugins/win/PluginPackageWin.cpp +++ b/Source/WebCore/plugins/win/PluginPackageWin.cpp @@ -162,6 +162,12 @@ void PluginPackage::determineQuirks(const String& mimeType) if (compareFileVersion(lastKnownUnloadableRealPlayerVersion) > 0) m_quirks.add(PluginQuirkDontUnloadPlugin); } + + // The Adobe Acrobat plugin only displays the pdf correctly on the first load if set window is + // called on it twice in a row. + if (name() == "Adobe Acrobat") + m_quirks.add(PluginQuirkNeedsSetWindowTwice); + } bool PluginPackage::fetchInfo() diff --git a/Source/WebCore/plugins/win/PluginViewWin.cpp b/Source/WebCore/plugins/win/PluginViewWin.cpp index fd03ac7fa..3fa897db8 100644 --- a/Source/WebCore/plugins/win/PluginViewWin.cpp +++ b/Source/WebCore/plugins/win/PluginViewWin.cpp @@ -865,6 +865,8 @@ void PluginView::setNPWindowRect(const IntRect& rect) JSC::JSLock::DropAllLocks dropAllLocks(JSDOMWindowBase::commonVM()); setCallingPlugin(true); m_plugin->pluginFuncs()->setwindow(m_instance, &m_npWindow); + if (m_plugin->quirks().contains(PluginQuirkNeedsSetWindowTwice)) + m_plugin->pluginFuncs()->setwindow(m_instance, &m_npWindow); setCallingPlugin(false); m_haveCalledSetWindow = true; |