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 520 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
531 if (!m_domAgent || !m_session || m_session->sessionId() != sessionId) | 531 if (!m_domAgent || !m_session || m_session->sessionId() != sessionId) |
532 return; | 532 return; |
533 HitTestRequest::HitTestRequestType hitType = | 533 HitTestRequest::HitTestRequestType hitType = |
534 HitTestRequest::Move | HitTestRequest::ReadOnly | | 534 HitTestRequest::Move | HitTestRequest::ReadOnly | |
535 HitTestRequest::AllowChildFrameContent; | 535 HitTestRequest::AllowChildFrameContent; |
536 HitTestRequest request(hitType); | 536 HitTestRequest request(hitType); |
537 WebMouseEvent dummyEvent(WebInputEvent::MouseDown, WebInputEvent::NoModifiers, | 537 WebMouseEvent dummyEvent(WebInputEvent::MouseDown, WebInputEvent::NoModifiers, |
538 WTF::monotonicallyIncreasingTimeMS()); | 538 WTF::monotonicallyIncreasingTimeMS()); |
539 dummyEvent.x = pointInRootFrame.x; | 539 dummyEvent.x = pointInRootFrame.x; |
540 dummyEvent.y = pointInRootFrame.y; | 540 dummyEvent.y = pointInRootFrame.y; |
541 IntPoint transformedPoint = | 541 IntPoint transformedPoint = flooredIntPoint( |
542 PlatformMouseEventBuilder(m_webLocalFrameImpl->frameView(), dummyEvent) | 542 TransformWebMouseEvent(m_webLocalFrameImpl->frameView(), dummyEvent) |
543 .position(); | 543 .positionInRootFrame()); |
544 HitTestResult result( | 544 HitTestResult result( |
545 request, | 545 request, |
546 m_webLocalFrameImpl->frameView()->rootFrameToContents(transformedPoint)); | 546 m_webLocalFrameImpl->frameView()->rootFrameToContents(transformedPoint)); |
547 m_webLocalFrameImpl->frame()->contentLayoutItem().hitTest(result); | 547 m_webLocalFrameImpl->frame()->contentLayoutItem().hitTest(result); |
548 Node* node = result.innerNode(); | 548 Node* node = result.innerNode(); |
549 if (!node && m_webLocalFrameImpl->frame()->document()) | 549 if (!node && m_webLocalFrameImpl->frame()->document()) |
550 node = m_webLocalFrameImpl->frame()->document()->documentElement(); | 550 node = m_webLocalFrameImpl->frame()->document()->documentElement(); |
551 m_domAgent->inspect(node); | 551 m_domAgent->inspect(node); |
552 } | 552 } |
553 | 553 |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
644 } | 644 } |
645 | 645 |
646 bool WebDevToolsAgent::shouldInterruptForMethod(const WebString& method) { | 646 bool WebDevToolsAgent::shouldInterruptForMethod(const WebString& method) { |
647 return method == "Debugger.pause" || method == "Debugger.setBreakpoint" || | 647 return method == "Debugger.pause" || method == "Debugger.setBreakpoint" || |
648 method == "Debugger.setBreakpointByUrl" || | 648 method == "Debugger.setBreakpointByUrl" || |
649 method == "Debugger.removeBreakpoint" || | 649 method == "Debugger.removeBreakpoint" || |
650 method == "Debugger.setBreakpointsActive"; | 650 method == "Debugger.setBreakpointsActive"; |
651 } | 651 } |
652 | 652 |
653 } // namespace blink | 653 } // namespace blink |
OLD | NEW |