OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010-2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2010-2011 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 644 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
655 | 655 |
656 void WebDevToolsAgentImpl::inspectElementAt(const WebPoint& pointInRootFrame) | 656 void WebDevToolsAgentImpl::inspectElementAt(const WebPoint& pointInRootFrame) |
657 { | 657 { |
658 HitTestRequest::HitTestRequestType hitType = HitTestRequest::Move | HitTestR
equest::ReadOnly | HitTestRequest::AllowChildFrameContent; | 658 HitTestRequest::HitTestRequestType hitType = HitTestRequest::Move | HitTestR
equest::ReadOnly | HitTestRequest::AllowChildFrameContent; |
659 HitTestRequest request(hitType); | 659 HitTestRequest request(hitType); |
660 WebMouseEvent dummyEvent; | 660 WebMouseEvent dummyEvent; |
661 dummyEvent.type = WebInputEvent::MouseDown; | 661 dummyEvent.type = WebInputEvent::MouseDown; |
662 dummyEvent.x = pointInRootFrame.x; | 662 dummyEvent.x = pointInRootFrame.x; |
663 dummyEvent.y = pointInRootFrame.y; | 663 dummyEvent.y = pointInRootFrame.y; |
664 IntPoint transformedPoint = PlatformMouseEventBuilder(m_webLocalFrameImpl->f
rameView(), dummyEvent).position(); | 664 IntPoint transformedPoint = PlatformMouseEventBuilder(m_webLocalFrameImpl->f
rameView(), dummyEvent).position(); |
665 HitTestResult result(m_webLocalFrameImpl->frameView()->rootFrameToContents(t
ransformedPoint)); | 665 HitTestResult result(request, m_webLocalFrameImpl->frameView()->rootFrameToC
ontents(transformedPoint)); |
666 m_webLocalFrameImpl->frame()->contentRenderer()->hitTest(request, result); | 666 m_webLocalFrameImpl->frame()->contentRenderer()->hitTest(result); |
667 Node* node = result.innerNode(); | 667 Node* node = result.innerNode(); |
668 if (!node && m_webLocalFrameImpl->frame()->document()) | 668 if (!node && m_webLocalFrameImpl->frame()->document()) |
669 node = m_webLocalFrameImpl->frame()->document()->documentElement(); | 669 node = m_webLocalFrameImpl->frame()->document()->documentElement(); |
670 m_domAgent->inspect(node); | 670 m_domAgent->inspect(node); |
671 } | 671 } |
672 | 672 |
673 void WebDevToolsAgentImpl::sendProtocolResponse(int callId, PassRefPtr<JSONObjec
t> message) | 673 void WebDevToolsAgentImpl::sendProtocolResponse(int callId, PassRefPtr<JSONObjec
t> message) |
674 { | 674 { |
675 if (!m_attached) | 675 if (!m_attached) |
676 return; | 676 return; |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
758 if (!InspectorBackendDispatcher::getCommandName(message, &commandName)) | 758 if (!InspectorBackendDispatcher::getCommandName(message, &commandName)) |
759 return false; | 759 return false; |
760 return commandName == InspectorBackendDispatcher::commandName(InspectorBacke
ndDispatcher::kDebugger_pauseCmd) | 760 return commandName == InspectorBackendDispatcher::commandName(InspectorBacke
ndDispatcher::kDebugger_pauseCmd) |
761 || commandName == InspectorBackendDispatcher::commandName(InspectorBacke
ndDispatcher::kDebugger_setBreakpointCmd) | 761 || commandName == InspectorBackendDispatcher::commandName(InspectorBacke
ndDispatcher::kDebugger_setBreakpointCmd) |
762 || commandName == InspectorBackendDispatcher::commandName(InspectorBacke
ndDispatcher::kDebugger_setBreakpointByUrlCmd) | 762 || commandName == InspectorBackendDispatcher::commandName(InspectorBacke
ndDispatcher::kDebugger_setBreakpointByUrlCmd) |
763 || commandName == InspectorBackendDispatcher::commandName(InspectorBacke
ndDispatcher::kDebugger_removeBreakpointCmd) | 763 || commandName == InspectorBackendDispatcher::commandName(InspectorBacke
ndDispatcher::kDebugger_removeBreakpointCmd) |
764 || commandName == InspectorBackendDispatcher::commandName(InspectorBacke
ndDispatcher::kDebugger_setBreakpointsActiveCmd); | 764 || commandName == InspectorBackendDispatcher::commandName(InspectorBacke
ndDispatcher::kDebugger_setBreakpointsActiveCmd); |
765 } | 765 } |
766 | 766 |
767 } // namespace blink | 767 } // namespace blink |
OLD | NEW |