diff options
| author | Simon Hausmann <simon.hausmann@digia.com> | 2012-11-22 09:09:45 +0100 |
|---|---|---|
| committer | Simon Hausmann <simon.hausmann@digia.com> | 2012-11-22 09:10:13 +0100 |
| commit | 470286ecfe79d59df14944e5b5d34630fc739391 (patch) | |
| tree | 43983212872e06cebefd2ae474418fa2908ca54c /Tools/WebKitTestRunner/qt/PlatformWebViewQt.cpp | |
| parent | 23037105e948c2065da5a937d3a2396b0ff45c1e (diff) | |
| download | qtwebkit-470286ecfe79d59df14944e5b5d34630fc739391.tar.gz | |
Imported WebKit commit e89504fa9195b2063b2530961d4b73dd08de3242 (http://svn.webkit.org/repository/webkit/trunk@135485)
Change-Id: I03774e5ac79721c13ffa30d152537a74d0b12e66
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'Tools/WebKitTestRunner/qt/PlatformWebViewQt.cpp')
| -rw-r--r-- | Tools/WebKitTestRunner/qt/PlatformWebViewQt.cpp | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/Tools/WebKitTestRunner/qt/PlatformWebViewQt.cpp b/Tools/WebKitTestRunner/qt/PlatformWebViewQt.cpp index e1cce48a5..47d407e50 100644 --- a/Tools/WebKitTestRunner/qt/PlatformWebViewQt.cpp +++ b/Tools/WebKitTestRunner/qt/PlatformWebViewQt.cpp @@ -77,14 +77,19 @@ private: QQuickWebView* m_view; }; -PlatformWebView::PlatformWebView(WKContextRef contextRef, WKPageGroupRef pageGroupRef, WKDictionaryRef /*options*/) - : m_view(new QQuickWebView(contextRef, pageGroupRef)) - , m_window(new WrapperWindow(m_view)) - , m_windowIsKey(true) +PlatformWebView::PlatformWebView(WKContextRef contextRef, WKPageGroupRef pageGroupRef, WKDictionaryRef options) + : m_windowIsKey(true) , m_modalEventLoop(0) { + WKRetainPtr<WKStringRef> useFixedLayoutKey(AdoptWK, WKStringCreateWithUTF8CString("UseFixedLayout")); + m_usingFixedLayout = options ? WKBooleanGetValue(static_cast<WKBooleanRef>(WKDictionaryGetItemForKey(options, useFixedLayoutKey.get()))) : false; + QQuickWebViewExperimental::setFlickableViewportEnabled(m_usingFixedLayout); + + m_view = new QQuickWebView(contextRef, pageGroupRef); m_view->setAllowAnyHTTPSCertificateForLocalHost(true); m_view->componentComplete(); + + m_window = new WrapperWindow(m_view); } PlatformWebView::~PlatformWebView() @@ -172,6 +177,13 @@ bool PlatformWebView::windowShapshotEnabled() return result; } +bool PlatformWebView::viewSupportsOptions(WKDictionaryRef options) const +{ + WKRetainPtr<WKStringRef> useFixedLayoutKey(AdoptWK, WKStringCreateWithUTF8CString("UseFixedLayout")); + + return m_usingFixedLayout == (options ? WKBooleanGetValue(static_cast<WKBooleanRef>(WKDictionaryGetItemForKey(options, useFixedLayoutKey.get()))) : false); +} + } // namespace WTR #include "PlatformWebViewQt.moc" |
