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

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

Issue 2569273002: Add constructors to WebInputEvents and setters so we can work at cleaning up these public structs. (Closed)
Patch Set: Fix mouse up event sender not modifying modifiers Created 4 years 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 577 matching lines...) Expand 10 before | Expand all | Expand 10 after
588 } 588 }
589 589
590 void WebDevToolsAgentImpl::inspectElementAt(int sessionId, 590 void WebDevToolsAgentImpl::inspectElementAt(int sessionId,
591 const WebPoint& pointInRootFrame) { 591 const WebPoint& pointInRootFrame) {
592 if (!m_domAgent || !m_session || m_session->sessionId() != sessionId) 592 if (!m_domAgent || !m_session || m_session->sessionId() != sessionId)
593 return; 593 return;
594 HitTestRequest::HitTestRequestType hitType = 594 HitTestRequest::HitTestRequestType hitType =
595 HitTestRequest::Move | HitTestRequest::ReadOnly | 595 HitTestRequest::Move | HitTestRequest::ReadOnly |
596 HitTestRequest::AllowChildFrameContent; 596 HitTestRequest::AllowChildFrameContent;
597 HitTestRequest request(hitType); 597 HitTestRequest request(hitType);
598 WebMouseEvent dummyEvent; 598 WebMouseEvent dummyEvent(WebInputEvent::MouseDown, WebInputEvent::NoModifiers,
599 dummyEvent.type = WebInputEvent::MouseDown; 599 WTF::monotonicallyIncreasingTimeMS());
600 dummyEvent.x = pointInRootFrame.x; 600 dummyEvent.x = pointInRootFrame.x;
601 dummyEvent.y = pointInRootFrame.y; 601 dummyEvent.y = pointInRootFrame.y;
602 IntPoint transformedPoint = 602 IntPoint transformedPoint =
603 PlatformMouseEventBuilder(m_webLocalFrameImpl->frameView(), dummyEvent) 603 PlatformMouseEventBuilder(m_webLocalFrameImpl->frameView(), dummyEvent)
604 .position(); 604 .position();
605 HitTestResult result( 605 HitTestResult result(
606 request, 606 request,
607 m_webLocalFrameImpl->frameView()->rootFrameToContents(transformedPoint)); 607 m_webLocalFrameImpl->frameView()->rootFrameToContents(transformedPoint));
608 m_webLocalFrameImpl->frame()->contentLayoutItem().hitTest(result); 608 m_webLocalFrameImpl->frame()->contentLayoutItem().hitTest(result);
609 Node* node = result.innerNode(); 609 Node* node = result.innerNode();
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
699 } 699 }
700 700
701 bool WebDevToolsAgent::shouldInterruptForMethod(const WebString& method) { 701 bool WebDevToolsAgent::shouldInterruptForMethod(const WebString& method) {
702 return method == "Debugger.pause" || method == "Debugger.setBreakpoint" || 702 return method == "Debugger.pause" || method == "Debugger.setBreakpoint" ||
703 method == "Debugger.setBreakpointByUrl" || 703 method == "Debugger.setBreakpointByUrl" ||
704 method == "Debugger.removeBreakpoint" || 704 method == "Debugger.removeBreakpoint" ||
705 method == "Debugger.setBreakpointsActive"; 705 method == "Debugger.setBreakpointsActive";
706 } 706 }
707 707
708 } // namespace blink 708 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698