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

Side by Side Diff: third_party/WebKit/Source/core/page/ContextMenuController.cpp

Issue 2406263003: Make PointerEvent coordinates fractional for touch (Closed)
Patch Set: Rebased. Created 4 years, 1 month 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 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007 Apple Inc. All rights reserved.
3 * Copyright (C) 2010 Igalia S.L 3 * Copyright (C) 2010 Igalia S.L
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 147
148 std::unique_ptr<ContextMenu> ContextMenuController::createContextMenu( 148 std::unique_ptr<ContextMenu> ContextMenuController::createContextMenu(
149 Event* event) { 149 Event* event) {
150 ASSERT(event); 150 ASSERT(event);
151 151
152 if (!event->isMouseEvent()) 152 if (!event->isMouseEvent())
153 return nullptr; 153 return nullptr;
154 154
155 MouseEvent* mouseEvent = toMouseEvent(event); 155 MouseEvent* mouseEvent = toMouseEvent(event);
156 return createContextMenu(event->target()->toNode()->document().frame(), 156 return createContextMenu(event->target()->toNode()->document().frame(),
157 mouseEvent->absoluteLocation()); 157 LayoutPoint(mouseEvent->absoluteLocation()));
158 } 158 }
159 159
160 std::unique_ptr<ContextMenu> ContextMenuController::createContextMenu( 160 std::unique_ptr<ContextMenu> ContextMenuController::createContextMenu(
161 LocalFrame* frame, 161 LocalFrame* frame,
162 const LayoutPoint& location) { 162 const LayoutPoint& location) {
163 HitTestRequest::HitTestRequestType type = 163 HitTestRequest::HitTestRequestType type =
164 HitTestRequest::ReadOnly | HitTestRequest::Active; 164 HitTestRequest::ReadOnly | HitTestRequest::Active;
165 HitTestResult result(type, location); 165 HitTestResult result(type, location);
166 166
167 if (frame) 167 if (frame)
(...skipping 24 matching lines...) Expand all
192 192
193 if (item->action() < ContextMenuItemBaseCustomTag || 193 if (item->action() < ContextMenuItemBaseCustomTag ||
194 item->action() > ContextMenuItemLastCustomTag) 194 item->action() > ContextMenuItemLastCustomTag)
195 return; 195 return;
196 196
197 ASSERT(m_menuProvider); 197 ASSERT(m_menuProvider);
198 m_menuProvider->contextMenuItemSelected(item); 198 m_menuProvider->contextMenuItemSelected(item);
199 } 199 }
200 200
201 } // namespace blink 201 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698