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

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

Issue 2650403006: Remove PlatformMouseEvent and use WebMouseEvent instead (Closed)
Patch Set: Fix nits Created 3 years, 10 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) 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 522 matching lines...) Expand 10 before | Expand all | Expand 10 after
533 if (!m_domAgent || !m_session || m_session->sessionId() != sessionId) 533 if (!m_domAgent || !m_session || m_session->sessionId() != sessionId)
534 return; 534 return;
535 HitTestRequest::HitTestRequestType hitType = 535 HitTestRequest::HitTestRequestType hitType =
536 HitTestRequest::Move | HitTestRequest::ReadOnly | 536 HitTestRequest::Move | HitTestRequest::ReadOnly |
537 HitTestRequest::AllowChildFrameContent; 537 HitTestRequest::AllowChildFrameContent;
538 HitTestRequest request(hitType); 538 HitTestRequest request(hitType);
539 WebMouseEvent dummyEvent(WebInputEvent::MouseDown, WebInputEvent::NoModifiers, 539 WebMouseEvent dummyEvent(WebInputEvent::MouseDown, WebInputEvent::NoModifiers,
540 WTF::monotonicallyIncreasingTimeMS()); 540 WTF::monotonicallyIncreasingTimeMS());
541 dummyEvent.x = pointInRootFrame.x; 541 dummyEvent.x = pointInRootFrame.x;
542 dummyEvent.y = pointInRootFrame.y; 542 dummyEvent.y = pointInRootFrame.y;
543 IntPoint transformedPoint = 543 IntPoint transformedPoint = flooredIntPoint(
544 PlatformMouseEventBuilder(m_webLocalFrameImpl->frameView(), dummyEvent) 544 TransformWebMouseEvent(m_webLocalFrameImpl->frameView(), dummyEvent)
545 .position(); 545 .positionInRootFrame());
546 HitTestResult result( 546 HitTestResult result(
547 request, 547 request,
548 m_webLocalFrameImpl->frameView()->rootFrameToContents(transformedPoint)); 548 m_webLocalFrameImpl->frameView()->rootFrameToContents(transformedPoint));
549 m_webLocalFrameImpl->frame()->contentLayoutItem().hitTest(result); 549 m_webLocalFrameImpl->frame()->contentLayoutItem().hitTest(result);
550 Node* node = result.innerNode(); 550 Node* node = result.innerNode();
551 if (!node && m_webLocalFrameImpl->frame()->document()) 551 if (!node && m_webLocalFrameImpl->frame()->document())
552 node = m_webLocalFrameImpl->frame()->document()->documentElement(); 552 node = m_webLocalFrameImpl->frame()->document()->documentElement();
553 m_domAgent->inspect(node); 553 m_domAgent->inspect(node);
554 } 554 }
555 555
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
646 } 646 }
647 647
648 bool WebDevToolsAgent::shouldInterruptForMethod(const WebString& method) { 648 bool WebDevToolsAgent::shouldInterruptForMethod(const WebString& method) {
649 return method == "Debugger.pause" || method == "Debugger.setBreakpoint" || 649 return method == "Debugger.pause" || method == "Debugger.setBreakpoint" ||
650 method == "Debugger.setBreakpointByUrl" || 650 method == "Debugger.setBreakpointByUrl" ||
651 method == "Debugger.removeBreakpoint" || 651 method == "Debugger.removeBreakpoint" ||
652 method == "Debugger.setBreakpointsActive"; 652 method == "Debugger.setBreakpointsActive";
653 } 653 }
654 654
655 } // namespace blink 655 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/PopupMenuImpl.cpp ('k') | third_party/WebKit/Source/web/WebFrameWidgetBase.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698