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

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

Issue 2048733002: Selecting with shift+drag results in unexpected drag-n-drop (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Selecting with shift+drag results in unexpected drag-n-drop Created 4 years, 5 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 reserv ed. 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv ed.
3 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org) 3 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org)
4 * Copyright (C) 2012 Digia Plc. and/or its subsidiary(-ies) 4 * Copyright (C) 2012 Digia Plc. and/or its subsidiary(-ies)
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 322
323 m_frame->document()->updateStyleAndLayoutIgnorePendingStylesheets(); 323 m_frame->document()->updateStyleAndLayoutIgnorePendingStylesheets();
324 324
325 if (FrameView* frameView = m_frame->view()) { 325 if (FrameView* frameView = m_frame->view()) {
326 if (frameView->isPointInScrollbarCorner(event.event().position())) 326 if (frameView->isPointInScrollbarCorner(event.event().position()))
327 return WebInputEventResult::NotHandled; 327 return WebInputEventResult::NotHandled;
328 } 328 }
329 329
330 bool singleClick = event.event().clickCount() <= 1; 330 bool singleClick = event.event().clickCount() <= 1;
331 331
332 m_mouseDownMayStartDrag = singleClick && !isLinkSelection(event); 332 m_mouseDownMayStartDrag = singleClick && !isLinkSelection(event) && !isExten dingSelection(event);
333 333
334 selectionController().handleMousePressEvent(event); 334 selectionController().handleMousePressEvent(event);
335 335
336 m_mouseDown = event.event(); 336 m_mouseDown = event.event();
337 337
338 if (m_frame->document()->isSVGDocument() && m_frame->document()->accessSVGEx tensions().zoomAndPanEnabled()) { 338 if (m_frame->document()->isSVGDocument() && m_frame->document()->accessSVGEx tensions().zoomAndPanEnabled()) {
339 if (event.event().shiftKey() && singleClick) { 339 if (event.event().shiftKey() && singleClick) {
340 m_svgPan = true; 340 m_svgPan = true;
341 m_frame->document()->accessSVGExtensions().startPan(m_frame->view()- >rootFrameToContents(event.event().position())); 341 m_frame->document()->accessSVGExtensions().startPan(m_frame->view()- >rootFrameToContents(event.event().position()));
342 return WebInputEventResult::HandledSystem; 342 return WebInputEventResult::HandledSystem;
(...skipping 2507 matching lines...) Expand 10 before | Expand all | Expand 10 after
2850 2850
2851 FrameHost* EventHandler::frameHost() const 2851 FrameHost* EventHandler::frameHost() const
2852 { 2852 {
2853 if (!m_frame->page()) 2853 if (!m_frame->page())
2854 return nullptr; 2854 return nullptr;
2855 2855
2856 return &m_frame->page()->frameHost(); 2856 return &m_frame->page()->frameHost();
2857 } 2857 }
2858 2858
2859 } // namespace blink 2859 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698