summaryrefslogtreecommitdiff
path: root/Source/WebKit2/WebProcess/WebPage/WebPage.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebKit2/WebProcess/WebPage/WebPage.cpp')
-rw-r--r--Source/WebKit2/WebProcess/WebPage/WebPage.cpp25
1 files changed, 17 insertions, 8 deletions
diff --git a/Source/WebKit2/WebProcess/WebPage/WebPage.cpp b/Source/WebKit2/WebProcess/WebPage/WebPage.cpp
index ecac12cf6..8e151818a 100644
--- a/Source/WebKit2/WebProcess/WebPage/WebPage.cpp
+++ b/Source/WebKit2/WebProcess/WebPage/WebPage.cpp
@@ -515,7 +515,7 @@ EditorState WebPage::editorState() const
}
if (selectionRoot)
- result.editorRect = frame->view()->contentsToWindow(selectionRoot->getPixelSnappedRect());
+ result.editorRect = frame->view()->contentsToWindow(selectionRoot->pixelSnappedBoundingBox());
RefPtr<Range> range;
if (result.hasComposition && (range = frame->editor()->compositionRange())) {
@@ -1310,7 +1310,7 @@ static bool isContextClick(const PlatformMouseEvent& event)
static bool handleContextMenuEvent(const PlatformMouseEvent& platformMouseEvent, WebPage* page)
{
IntPoint point = page->corePage()->mainFrame()->view()->windowToContents(platformMouseEvent.position());
- HitTestResult result = page->corePage()->mainFrame()->eventHandler()->hitTestResultAtPoint(point, false);
+ HitTestResult result = page->corePage()->mainFrame()->eventHandler()->hitTestResultAtPoint(point);
Frame* frame = page->corePage()->mainFrame();
if (result.innerNonSharedNode())
@@ -1351,8 +1351,14 @@ static bool handleMouseEvent(const WebMouseEvent& mouseEvent, WebPage* page, boo
return handled;
}
- case PlatformEvent::MouseReleased:
- return frame->eventHandler()->handleMouseReleaseEvent(platformMouseEvent);
+ case PlatformEvent::MouseReleased: {
+ bool handled = frame->eventHandler()->handleMouseReleaseEvent(platformMouseEvent);
+#if PLATFORM(QT)
+ if (!handled)
+ handled = page->handleMouseReleaseEvent(platformMouseEvent);
+#endif
+ return handled;
+ }
case PlatformEvent::MouseMoved:
if (onlyUpdateScrollbars)
return frame->eventHandler()->passMouseMovedEventToScrollbars(platformMouseEvent);
@@ -1555,14 +1561,16 @@ void WebPage::highlightPotentialActivation(const IntPoint& point, const IntSize&
return;
#else
- HitTestResult result = mainframe->eventHandler()->hitTestResultAtPoint(mainframe->view()->windowToContents(point), /*allowShadowContent*/ false, /*ignoreClipping*/ true);
+ HitTestResult result = mainframe->eventHandler()->hitTestResultAtPoint(mainframe->view()->windowToContents(point), HitTestRequest::ReadOnly | HitTestRequest::Active | HitTestRequest::AllowShadowContent);
adjustedNode = result.innerNode();
#endif
// Find the node to highlight. This is not the same as the node responding the tap gesture, because many
// pages has a global click handler and we do not want to highlight the body.
// Instead find the enclosing link or focusable element, or the last enclosing inline element.
for (Node* node = adjustedNode; node; node = node->parentOrHostNode()) {
- if (node->isMouseFocusable() || node->isLink()) {
+ if (node->isDocumentNode() || node->isFrameOwnerElement())
+ break;
+ if (node->isMouseFocusable() || node->willRespondToMouseClickEvents()) {
activationNode = node;
break;
}
@@ -2066,6 +2074,7 @@ void WebPage::updatePreferences(const WebPreferencesStore& store)
#if ENABLE(SMOOTH_SCROLLING)
settings->setEnableScrollAnimator(store.getBoolValueForKey(WebPreferencesKey::scrollAnimatorEnabledKey()));
#endif
+ settings->setInteractiveFormValidationEnabled(store.getBoolValueForKey(WebPreferencesKey::interactiveFormValidationEnabledKey()));
// <rdar://problem/10697417>: It is necessary to force compositing when accelerate drawing
// is enabled on Mac so that scrollbars are always in their own layers.
@@ -2111,7 +2120,7 @@ void WebPage::updatePreferences(const WebPreferencesStore& store)
#endif
settings->setShouldRespectImageOrientation(store.getBoolValueForKey(WebPreferencesKey::shouldRespectImageOrientationKey()));
- settings->setThirdPartyStorageBlockingEnabled(store.getBoolValueForKey(WebPreferencesKey::thirdPartyStorageBlockingEnabledKey()));
+ settings->setStorageBlockingPolicy(static_cast<SecurityOrigin::StorageBlockingPolicy>(store.getUInt32ValueForKey(WebPreferencesKey::storageBlockingPolicyKey())));
settings->setDiagnosticLoggingEnabled(store.getBoolValueForKey(WebPreferencesKey::diagnosticLoggingEnabledKey()));
@@ -2722,7 +2731,7 @@ void WebPage::findZoomableAreaForPoint(const WebCore::IntPoint& point, const Web
{
UNUSED_PARAM(area);
Frame* mainframe = m_mainFrame->coreFrame();
- HitTestResult result = mainframe->eventHandler()->hitTestResultAtPoint(mainframe->view()->windowToContents(point), /*allowShadowContent*/ false, /*ignoreClipping*/ true);
+ HitTestResult result = mainframe->eventHandler()->hitTestResultAtPoint(mainframe->view()->windowToContents(point), HitTestRequest::ReadOnly | HitTestRequest::Active | HitTestRequest::IgnoreClipping);
Node* node = result.innerNode();