Index: Source/web/WebViewImpl.cpp |
diff --git a/Source/web/WebViewImpl.cpp b/Source/web/WebViewImpl.cpp |
index 7123e7c77aacf34921d947c0b24af59ae91a6b88..3b0866ae3dd1ee4476e9a638c7b399a7f69b6d00 100644 |
--- a/Source/web/WebViewImpl.cpp |
+++ b/Source/web/WebViewImpl.cpp |
@@ -494,6 +494,7 @@ void WebViewImpl::handleMouseDown(LocalFrame& mainFrame, const WebMouseEvent& ev |
if (event.button == WebMouseEvent::ButtonLeft && m_page->mainFrame()->isLocalFrame() && !m_page->deprecatedLocalMainFrame()->view()->scrollbarAtPoint(point)) { |
point = m_page->deprecatedLocalMainFrame()->view()->windowToContents(point); |
HitTestResult result(m_page->deprecatedLocalMainFrame()->eventHandler().hitTestResultAtPoint(point)); |
+ result.setToShadowHostIfInUserAgentShadowRoot(); |
Node* hitNode = result.innerNonSharedNode(); |
if (!result.scrollbar() && hitNode && hitNode->renderer() && hitNode->renderer()->isEmbeddedObject()) { |
@@ -1044,12 +1045,14 @@ WebRect WebViewImpl::computeBlockBounds(const WebRect& rect, bool ignoreClipping |
IntPoint point = mainFrameImpl()->frameView()->windowToContents(IntPoint(rect.x, rect.y)); |
HitTestRequest::HitTestRequestType hitType = HitTestRequest::ReadOnly | HitTestRequest::Active | (ignoreClipping ? HitTestRequest::IgnoreClipping : 0); |
HitTestResult result = mainFrameImpl()->frame()->eventHandler().hitTestResultAtPoint(point, hitType, IntSize(rect.width, rect.height)); |
+ result.setToShadowHostIfInUserAgentShadowRoot(); |
Node* node = result.innerNonSharedNode(); |
if (!node) |
return WebRect(); |
// Find the block type node based on the hit node. |
+ // FIXME: This wants to walk composed tree with NodeRenderingTraversal::parent(). |
while (node && (!node->renderer() || node->renderer()->isInline())) |
node = node->parentNode(); |
@@ -1175,6 +1178,7 @@ static Node* findCursorDefiningAncestor(Node* node, LocalFrame* frame) |
if (cursor != CURSOR_AUTO || frame->eventHandler().useHandCursor(node, node->isLink())) |
break; |
} |
+ // FIXME: This wants to walk composed tree with NodeRenderingTraversal::parent(). |
Rick Byers
2014/08/15 18:10:57
Sorry about this - I just asked for it to be fixed
Rick Byers
2014/08/27 20:35:10
You'll need to merge with trunk and remove this co
|
node = node->parentNode(); |
} |
@@ -1205,6 +1209,7 @@ Node* WebViewImpl::bestTapNode(const PlatformGestureEvent& tapEvent) |
// We might hit something like an image map that has no renderer on it |
// Walk up the tree until we have a node with an attached renderer |
+ // FIXME: This wants to walk composed tree with NodeRenderingTraversal::parent(). |
Rick Byers
2014/08/27 20:35:10
ditto
|
while (bestTouchNode && !bestTouchNode->renderer()) |
bestTouchNode = bestTouchNode->parentNode(); |
@@ -1221,6 +1226,7 @@ Node* WebViewImpl::bestTapNode(const PlatformGestureEvent& tapEvent) |
// has hand cursor set. |
do { |
bestTouchNode = cursorDefiningAncestor; |
+ // FIXME: This wants to walk composed tree with NodeRenderingTraversal::parent(). |
Rick Byers
2014/08/27 20:35:10
ditto
|
cursorDefiningAncestor = findCursorDefiningAncestor(bestTouchNode->parentNode(), m_page->deprecatedLocalMainFrame()); |
} while (cursorDefiningAncestor && showsHandCursor(cursorDefiningAncestor, m_page->deprecatedLocalMainFrame())); |
@@ -3867,7 +3873,9 @@ HitTestResult WebViewImpl::hitTestResultForWindowPos(const IntPoint& pos) |
if (!m_page->mainFrame()->isLocalFrame()) |
return HitTestResult(); |
IntPoint docPoint(m_page->deprecatedLocalMainFrame()->view()->windowToContents(pos)); |
- return m_page->deprecatedLocalMainFrame()->eventHandler().hitTestResultAtPoint(docPoint, HitTestRequest::ReadOnly | HitTestRequest::Active); |
+ HitTestResult result = m_page->deprecatedLocalMainFrame()->eventHandler().hitTestResultAtPoint(docPoint, HitTestRequest::ReadOnly | HitTestRequest::Active); |
+ result.setToShadowHostIfInUserAgentShadowRoot(); |
Rick Byers
2014/08/15 18:10:57
Are you sure we want this for all callers of this
esprehn
2014/08/16 04:14:58
Looking at the callers of this method, and their t
|
+ return result; |
} |
void WebViewImpl::setTabsToLinks(bool enable) |