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

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

Issue 2782893002: WebMouseEvent coordinates are now fractional & private (Closed)
Patch Set: Rebased, fixed a comment in web_input_event_builders_mac.mm Created 3 years, 8 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 525 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/WebMouseEvent.cpp ('k') | third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698