| 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 525 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 536 void WebDevToolsAgentImpl::inspectElementAt(int sessionId, | 536 void WebDevToolsAgentImpl::inspectElementAt(int sessionId, |
| 537 const WebPoint& pointInRootFrame) { | 537 const WebPoint& pointInRootFrame) { |
| 538 if (!m_domAgent || !m_session || m_session->sessionId() != sessionId) | 538 if (!m_domAgent || !m_session || m_session->sessionId() != sessionId) |
| 539 return; | 539 return; |
| 540 HitTestRequest::HitTestRequestType hitType = | 540 HitTestRequest::HitTestRequestType hitType = |
| 541 HitTestRequest::Move | HitTestRequest::ReadOnly | | 541 HitTestRequest::Move | HitTestRequest::ReadOnly | |
| 542 HitTestRequest::AllowChildFrameContent; | 542 HitTestRequest::AllowChildFrameContent; |
| 543 HitTestRequest request(hitType); | 543 HitTestRequest request(hitType); |
| 544 WebMouseEvent dummyEvent(WebInputEvent::MouseDown, WebInputEvent::NoModifiers, | 544 WebMouseEvent dummyEvent(WebInputEvent::MouseDown, WebInputEvent::NoModifiers, |
| 545 WTF::monotonicallyIncreasingTimeMS()); | 545 WTF::monotonicallyIncreasingTimeMS()); |
| 546 dummyEvent.x = pointInRootFrame.x; | 546 dummyEvent.setPositionInWidget(pointInRootFrame.x, pointInRootFrame.y); |
| 547 dummyEvent.y = pointInRootFrame.y; | |
| 548 IntPoint transformedPoint = flooredIntPoint( | 547 IntPoint transformedPoint = flooredIntPoint( |
| 549 TransformWebMouseEvent(m_webLocalFrameImpl->frameView(), dummyEvent) | 548 TransformWebMouseEvent(m_webLocalFrameImpl->frameView(), dummyEvent) |
| 550 .positionInRootFrame()); | 549 .positionInRootFrame()); |
| 551 HitTestResult result( | 550 HitTestResult result( |
| 552 request, | 551 request, |
| 553 m_webLocalFrameImpl->frameView()->rootFrameToContents(transformedPoint)); | 552 m_webLocalFrameImpl->frameView()->rootFrameToContents(transformedPoint)); |
| 554 m_webLocalFrameImpl->frame()->contentLayoutItem().hitTest(result); | 553 m_webLocalFrameImpl->frame()->contentLayoutItem().hitTest(result); |
| 555 Node* node = result.innerNode(); | 554 Node* node = result.innerNode(); |
| 556 if (!node && m_webLocalFrameImpl->frame()->document()) | 555 if (!node && m_webLocalFrameImpl->frame()->document()) |
| 557 node = m_webLocalFrameImpl->frame()->document()->documentElement(); | 556 node = m_webLocalFrameImpl->frame()->document()->documentElement(); |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 651 } | 650 } |
| 652 | 651 |
| 653 bool WebDevToolsAgent::shouldInterruptForMethod(const WebString& method) { | 652 bool WebDevToolsAgent::shouldInterruptForMethod(const WebString& method) { |
| 654 return method == "Debugger.pause" || method == "Debugger.setBreakpoint" || | 653 return method == "Debugger.pause" || method == "Debugger.setBreakpoint" || |
| 655 method == "Debugger.setBreakpointByUrl" || | 654 method == "Debugger.setBreakpointByUrl" || |
| 656 method == "Debugger.removeBreakpoint" || | 655 method == "Debugger.removeBreakpoint" || |
| 657 method == "Debugger.setBreakpointsActive"; | 656 method == "Debugger.setBreakpointsActive"; |
| 658 } | 657 } |
| 659 | 658 |
| 660 } // namespace blink | 659 } // namespace blink |
| OLD | NEW |