diff options
author | Simon Hausmann <simon.hausmann@nokia.com> | 2012-05-11 09:43:24 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@nokia.com> | 2012-05-11 09:43:24 +0200 |
commit | 1b914638db989aaa98631a1c1e02c7b2d44805d8 (patch) | |
tree | 87f4fd2c7b38db320079a5de8877890d2ca3c485 /Source/WebKit/chromium/src/WebViewImpl.cpp | |
parent | 2cf6c8816a73e0132bd8fa3b509d62d7c51b6e47 (diff) | |
download | qtwebkit-1b914638db989aaa98631a1c1e02c7b2d44805d8.tar.gz |
Imported WebKit commit 9a52e27980f47e8b0d8f8b7cc0fd7b5741bceb92 (http://svn.webkit.org/repository/webkit/trunk@116736)
New snapshot to include QDeclarative* -> QQml* build fixes
Diffstat (limited to 'Source/WebKit/chromium/src/WebViewImpl.cpp')
-rw-r--r-- | Source/WebKit/chromium/src/WebViewImpl.cpp | 44 |
1 files changed, 38 insertions, 6 deletions
diff --git a/Source/WebKit/chromium/src/WebViewImpl.cpp b/Source/WebKit/chromium/src/WebViewImpl.cpp index 4318dc79d..626da8a21 100644 --- a/Source/WebKit/chromium/src/WebViewImpl.cpp +++ b/Source/WebKit/chromium/src/WebViewImpl.cpp @@ -143,14 +143,14 @@ #include "WheelEvent.h" #include "cc/CCProxy.h" #include "painting/GraphicsContextBuilder.h" -#include "platform/WebDragData.h" -#include "platform/WebImage.h" #include "platform/WebKitPlatformSupport.h" #include "platform/WebString.h" #include "platform/WebVector.h" #include <public/Platform.h> +#include <public/WebDragData.h> #include <public/WebFloatPoint.h> #include <public/WebGraphicsContext3D.h> +#include <public/WebImage.h> #include <public/WebLayer.h> #include <public/WebLayerTreeView.h> #include <public/WebPoint.h> @@ -658,12 +658,22 @@ bool WebViewImpl::handleGestureEvent(const WebGestureEvent& event) } return gestureHandled; } + case WebInputEvent::GestureLongPress: { + if (!mainFrameImpl() || !mainFrameImpl()->frameView()) + return false; + + m_page->contextMenuController()->clearContextMenu(); + m_contextMenuAllowed = true; + PlatformGestureEventBuilder platformEvent(mainFrameImpl()->frameView(), event); + bool handled = mainFrameImpl()->frame()->eventHandler()->sendContextMenuEventForGesture(platformEvent); + m_contextMenuAllowed = false; + return handled; + } case WebInputEvent::GestureScrollBegin: case WebInputEvent::GestureScrollEnd: case WebInputEvent::GestureScrollUpdate: case WebInputEvent::GestureTapDown: case WebInputEvent::GestureDoubleTap: - case WebInputEvent::GestureLongPress: case WebInputEvent::GesturePinchBegin: case WebInputEvent::GesturePinchEnd: case WebInputEvent::GesturePinchUpdate: { @@ -1251,6 +1261,11 @@ WebViewImpl* WebViewImpl::fromPage(Page* page) return static_cast<WebViewImpl*>(chromeClient->webView()); } +PageGroup* WebViewImpl::defaultPageGroup() +{ + return PageGroup::pageGroup(pageGroupName); +} + // WebWidget ------------------------------------------------------------------ void WebViewImpl::close() @@ -1432,6 +1447,13 @@ void WebViewImpl::updateAnimations(double monotonicFrameBeginTime) #if ENABLE(REQUEST_ANIMATION_FRAME) TRACE_EVENT("WebViewImpl::updateAnimations", this, 0); + WebFrameImpl* webframe = mainFrameImpl(); + if (!webframe) + return; + FrameView* view = webframe->frameView(); + if (!view) + return; + // Create synthetic wheel events as necessary for fling. if (m_gestureAnimation) { if (m_gestureAnimation->animate(monotonicFrameBeginTime)) @@ -1440,9 +1462,6 @@ void WebViewImpl::updateAnimations(double monotonicFrameBeginTime) m_gestureAnimation.clear(); } - if (!m_page) - return; - PageWidgetDelegate::animate(m_page.get(), monotonicFrameBeginTime); #endif } @@ -1872,8 +1891,21 @@ WebTextInputType WebViewImpl::textInputType() return WebTextInputTypeTelephone; if (input->isURLField()) return WebTextInputTypeURL; + if (input->isDateField()) + return WebTextInputTypeDate; + if (input->isDateTimeField()) + return WebTextInputTypeDateTime; + if (input->isDateTimeLocalField()) + return WebTextInputTypeDateTimeLocal; + if (input->isMonthField()) + return WebTextInputTypeMonth; + if (input->isTimeField()) + return WebTextInputTypeTime; + if (input->isWeekField()) + return WebTextInputTypeWeek; if (input->isTextField()) return WebTextInputTypeText; + return WebTextInputTypeNone; } |