diff options
author | Michael BrĂ¼ning <michael.bruning@digia.com> | 2013-12-10 17:18:28 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-12-11 12:07:36 +0100 |
commit | 7122e75c83776f9e2fb67919971c883ebea000ae (patch) | |
tree | b4ba95fba87fcc4ab8a4fb1850d27fd9dd184694 | |
parent | 4ef1b438ba70b629655fe8e0eec0554968503f34 (diff) |
Handle PlatformPageClient not being set in Windows PluginView.
The helper contentsToNativeWindow assumed that the PlatformPageClient
would always be set, which caused problems with plugin content in head-
less client applications such as CutyCapt.
Task-number: QTBUG-35224
Change-Id: Iadce5fb62bd45dd0d1b15e0d7918cfbbff1b3fae
Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
-rw-r--r-- | Source/WebCore/plugins/win/PluginViewWin.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/Source/WebCore/plugins/win/PluginViewWin.cpp b/Source/WebCore/plugins/win/PluginViewWin.cpp index fae3c4415..d1f99bed7 100644 --- a/Source/WebCore/plugins/win/PluginViewWin.cpp +++ b/Source/WebCore/plugins/win/PluginViewWin.cpp @@ -350,11 +350,10 @@ static inline IntPoint contentsToNativeWindow(FrameView* view, const IntPoint& p #if PLATFORM(QT) // Our web view's QWidget isn't necessarily a native window itself. Map the position // all the way up to the QWidget associated with the HWND returned as NPNVnetscapeWindow. - PlatformPageClient client = view->hostWindow()->platformPageClient(); - return client->mapToOwnerWindow(view->contentsToWindow(point)); -#else - return view->contentsToWindow(point); + if (PlatformPageClient client = view->hostWindow()->platformPageClient()) + return client->mapToOwnerWindow(view->contentsToWindow(point)); #endif + return view->contentsToWindow(point); } static inline IntRect contentsToNativeWindow(FrameView* view, const IntRect& rect) |