Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(613)

Side by Side Diff: third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp

Issue 2752763002: Change the type of a SVG <use> element's shadow tree from "user agent" to "closed" (Closed)
Patch Set: Rebased and resolve a conflict in HitTestResult Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2014 Google Inc. All rights reserved. 2 * Copyright (C) 2014 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 726 matching lines...) Expand 10 before | Expand all | Expand 10 after
737 void WebFrameWidgetImpl::handleMouseDown(LocalFrame& mainFrame, 737 void WebFrameWidgetImpl::handleMouseDown(LocalFrame& mainFrame,
738 const WebMouseEvent& event) { 738 const WebMouseEvent& event) {
739 // Take capture on a mouse down on a plugin so we can send it mouse events. 739 // Take capture on a mouse down on a plugin so we can send it mouse events.
740 // If the hit node is a plugin but a scrollbar is over it don't start mouse 740 // If the hit node is a plugin but a scrollbar is over it don't start mouse
741 // capture because it will interfere with the scrollbar receiving events. 741 // capture because it will interfere with the scrollbar receiving events.
742 IntPoint point(event.x, event.y); 742 IntPoint point(event.x, event.y);
743 if (event.button == WebMouseEvent::Button::Left) { 743 if (event.button == WebMouseEvent::Button::Left) {
744 point = m_localRoot->frameView()->rootFrameToContents(point); 744 point = m_localRoot->frameView()->rootFrameToContents(point);
745 HitTestResult result( 745 HitTestResult result(
746 m_localRoot->frame()->eventHandler().hitTestResultAtPoint(point)); 746 m_localRoot->frame()->eventHandler().hitTestResultAtPoint(point));
747 result.setToShadowHostIfInUserAgentShadowRoot(); 747 result.setToShadowHostIfInRestrictedShadowRoot();
748 Node* hitNode = result.innerNode(); 748 Node* hitNode = result.innerNode();
749 749
750 if (!result.scrollbar() && hitNode && hitNode->layoutObject() && 750 if (!result.scrollbar() && hitNode && hitNode->layoutObject() &&
751 hitNode->layoutObject()->isEmbeddedObject()) { 751 hitNode->layoutObject()->isEmbeddedObject()) {
752 m_mouseCaptureNode = hitNode; 752 m_mouseCaptureNode = hitNode;
753 TRACE_EVENT_ASYNC_BEGIN0("input", "capturing mouse", this); 753 TRACE_EVENT_ASYNC_BEGIN0("input", "capturing mouse", this);
754 } 754 }
755 } 755 }
756 756
757 PageWidgetEventHandler::handleMouseDown(mainFrame, event); 757 PageWidgetEventHandler::handleMouseDown(mainFrame, event);
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after
1108 WebPageVisibilityStateVisible); 1108 WebPageVisibilityStateVisible);
1109 } 1109 }
1110 1110
1111 HitTestResult WebFrameWidgetImpl::hitTestResultForRootFramePos( 1111 HitTestResult WebFrameWidgetImpl::hitTestResultForRootFramePos(
1112 const IntPoint& posInRootFrame) { 1112 const IntPoint& posInRootFrame) {
1113 IntPoint docPoint( 1113 IntPoint docPoint(
1114 m_localRoot->frame()->view()->rootFrameToContents(posInRootFrame)); 1114 m_localRoot->frame()->view()->rootFrameToContents(posInRootFrame));
1115 HitTestResult result = 1115 HitTestResult result =
1116 m_localRoot->frame()->eventHandler().hitTestResultAtPoint( 1116 m_localRoot->frame()->eventHandler().hitTestResultAtPoint(
1117 docPoint, HitTestRequest::ReadOnly | HitTestRequest::Active); 1117 docPoint, HitTestRequest::ReadOnly | HitTestRequest::Active);
1118 result.setToShadowHostIfInUserAgentShadowRoot(); 1118 result.setToShadowHostIfInRestrictedShadowRoot();
1119 return result; 1119 return result;
1120 } 1120 }
1121 1121
1122 InspectorOverlay* WebFrameWidgetImpl::inspectorOverlay() { 1122 InspectorOverlay* WebFrameWidgetImpl::inspectorOverlay() {
1123 if (!m_localRoot) 1123 if (!m_localRoot)
1124 return nullptr; 1124 return nullptr;
1125 if (WebDevToolsAgentImpl* devtools = m_localRoot->devToolsAgentImpl()) 1125 if (WebDevToolsAgentImpl* devtools = m_localRoot->devToolsAgentImpl())
1126 return devtools->overlay(); 1126 return devtools->overlay();
1127 return nullptr; 1127 return nullptr;
1128 } 1128 }
(...skipping 13 matching lines...) Expand all
1142 return nullptr; 1142 return nullptr;
1143 } 1143 }
1144 1144
1145 LocalFrame* WebFrameWidgetImpl::focusedLocalFrameAvailableForIme() const { 1145 LocalFrame* WebFrameWidgetImpl::focusedLocalFrameAvailableForIme() const {
1146 if (!m_imeAcceptEvents) 1146 if (!m_imeAcceptEvents)
1147 return nullptr; 1147 return nullptr;
1148 return focusedLocalFrameInWidget(); 1148 return focusedLocalFrameInWidget();
1149 } 1149 }
1150 1150
1151 } // namespace blink 1151 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/PageWidgetDelegate.cpp ('k') | third_party/WebKit/Source/web/WebLocalFrameImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698