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

Side by Side Diff: Source/core/inspector/InspectorDOMAgent.cpp

Issue 14677012: Made Blink tooltip ShadowDOM-aware (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 7 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2009 Apple Inc. All rights reserved.
3 * Copyright (C) 2011 Google Inc. All rights reserved. 3 * Copyright (C) 2011 Google Inc. All rights reserved.
4 * Copyright (C) 2009 Joseph Pecoraro 4 * Copyright (C) 2009 Joseph Pecoraro
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 9 *
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 } 172 }
173 173
174 static Node* hoveredNodeForPoint(Frame* frame, const IntPoint& point, bool ignor ePointerEventsNone) 174 static Node* hoveredNodeForPoint(Frame* frame, const IntPoint& point, bool ignor ePointerEventsNone)
175 { 175 {
176 HitTestRequest::HitTestRequestType hitType = HitTestRequest::Move | HitTestR equest::ReadOnly | HitTestRequest::AllowChildFrameContent; 176 HitTestRequest::HitTestRequestType hitType = HitTestRequest::Move | HitTestR equest::ReadOnly | HitTestRequest::AllowChildFrameContent;
177 if (ignorePointerEventsNone) 177 if (ignorePointerEventsNone)
178 hitType |= HitTestRequest::IgnorePointerEventsNone; 178 hitType |= HitTestRequest::IgnorePointerEventsNone;
179 HitTestRequest request(hitType); 179 HitTestRequest request(hitType);
180 HitTestResult result(frame->view()->windowToContents(point)); 180 HitTestResult result(frame->view()->windowToContents(point));
181 frame->contentRenderer()->hitTest(request, result); 181 frame->contentRenderer()->hitTest(request, result);
182 result.setToNonShadowAncestor(); 182 result.setToShadowHostIfInUserAgentShadowRoot();
183 Node* node = result.innerNode(); 183 Node* node = result.innerNode();
184 while (node && node->nodeType() == Node::TEXT_NODE) 184 while (node && node->nodeType() == Node::TEXT_NODE)
185 node = node->parentNode(); 185 node = node->parentNode();
186 return node; 186 return node;
187 } 187 }
188 188
189 static Node* hoveredNodeForEvent(Frame* frame, const PlatformMouseEvent& event, bool ignorePointerEventsNone) 189 static Node* hoveredNodeForEvent(Frame* frame, const PlatformMouseEvent& event, bool ignorePointerEventsNone)
190 { 190 {
191 return hoveredNodeForPoint(frame, event.position(), ignorePointerEventsNone) ; 191 return hoveredNodeForPoint(frame, event.position(), ignorePointerEventsNone) ;
192 } 192 }
(...skipping 1637 matching lines...) Expand 10 before | Expand all | Expand 10 after
1830 1830
1831 InjectedScript injectedScript = m_injectedScriptManager->injectedScriptFor(m ainWorldScriptState(frame)); 1831 InjectedScript injectedScript = m_injectedScriptManager->injectedScriptFor(m ainWorldScriptState(frame));
1832 if (injectedScript.hasNoValue()) 1832 if (injectedScript.hasNoValue())
1833 return 0; 1833 return 0;
1834 1834
1835 return injectedScript.wrapNode(node, objectGroup); 1835 return injectedScript.wrapNode(node, objectGroup);
1836 } 1836 }
1837 1837
1838 } // namespace WebCore 1838 } // namespace WebCore
1839 1839
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698