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

Side by Side Diff: third_party/WebKit/Source/core/input/EventHandler.cpp

Issue 2868173002: Add PlatformLocalFrame class. (Closed)
Patch Set: this time with new file included Created 3 years, 7 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) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights
3 * reserved. 3 * reserved.
4 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org) 4 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org)
5 * Copyright (C) 2012 Digia Plc. and/or its subsidiary(-ies) 5 * Copyright (C) 2012 Digia Plc. and/or its subsidiary(-ies)
6 * 6 *
7 * Redistribution and use in source and binary forms, with or without 7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions 8 * modification, are permitted provided that the following conditions
9 * are met: 9 * are met:
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
(...skipping 1842 matching lines...) Expand 10 before | Expand all | Expand 10 after
1853 ? visual_viewport.VisibleRect().MaxX() - kContextMenuMargin 1853 ? visual_viewport.VisibleRect().MaxX() - kContextMenuMargin
1854 : visual_viewport.GetScrollOffset().Width() + kContextMenuMargin, 1854 : visual_viewport.GetScrollOffset().Width() + kContextMenuMargin,
1855 visual_viewport.GetScrollOffset().Height() + kContextMenuMargin); 1855 visual_viewport.GetScrollOffset().Height() + kContextMenuMargin);
1856 } 1856 }
1857 1857
1858 frame_->View()->SetCursor(PointerCursor()); 1858 frame_->View()->SetCursor(PointerCursor());
1859 IntPoint location_in_viewport = 1859 IntPoint location_in_viewport =
1860 visual_viewport.RootFrameToViewport(location_in_root_frame); 1860 visual_viewport.RootFrameToViewport(location_in_root_frame);
1861 IntPoint global_position = 1861 IntPoint global_position =
1862 view->GetChromeClient() 1862 view->GetChromeClient()
1863 ->ViewportToScreen(IntRect(location_in_viewport, IntSize()), 1863 ->ViewportToScreen(IntRect(location_in_viewport, IntSize()), frame_)
1864 frame_->View())
1865 .Location(); 1864 .Location();
1866 1865
1867 Node* target_node = 1866 Node* target_node =
1868 override_target_element ? override_target_element : doc->FocusedElement(); 1867 override_target_element ? override_target_element : doc->FocusedElement();
1869 if (!target_node) 1868 if (!target_node)
1870 target_node = doc; 1869 target_node = doc;
1871 1870
1872 // Use the focused node as the target for hover and active. 1871 // Use the focused node as the target for hover and active.
1873 HitTestRequest request(HitTestRequest::kActive); 1872 HitTestRequest request(HitTestRequest::kActive);
1874 HitTestResult result(request, location_in_root_frame); 1873 HitTestResult result(request, location_in_root_frame);
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
2117 MouseEventWithHitTestResults& mev, 2116 MouseEventWithHitTestResults& mev,
2118 LocalFrame* subframe) { 2117 LocalFrame* subframe) {
2119 WebInputEventResult result = 2118 WebInputEventResult result =
2120 subframe->GetEventHandler().HandleMouseReleaseEvent(mev.Event()); 2119 subframe->GetEventHandler().HandleMouseReleaseEvent(mev.Event());
2121 if (result != WebInputEventResult::kNotHandled) 2120 if (result != WebInputEventResult::kNotHandled)
2122 return result; 2121 return result;
2123 return WebInputEventResult::kHandledSystem; 2122 return WebInputEventResult::kHandledSystem;
2124 } 2123 }
2125 2124
2126 } // namespace blink 2125 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/frame/LocalFrame.h ('k') | third_party/WebKit/Source/core/inspector/InspectorInputAgent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698