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

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: Patch for landing 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
« no previous file with comments | « third_party/WebKit/Source/core/editing/SelectionController.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 379 matching lines...) Expand 10 before | Expand all | Expand 10 after
390 390
391 m_frame->document()->updateStyleAndLayoutIgnorePendingStylesheets(); 391 m_frame->document()->updateStyleAndLayoutIgnorePendingStylesheets();
392 392
393 if (FrameView* frameView = m_frame->view()) { 393 if (FrameView* frameView = m_frame->view()) {
394 if (frameView->isPointInScrollbarCorner(event.event().position())) 394 if (frameView->isPointInScrollbarCorner(event.event().position()))
395 return WebInputEventResult::NotHandled; 395 return WebInputEventResult::NotHandled;
396 } 396 }
397 397
398 bool singleClick = event.event().clickCount() <= 1; 398 bool singleClick = event.event().clickCount() <= 1;
399 399
400 m_mouseDownMayStartDrag = singleClick && !isLinkSelection(event); 400 m_mouseDownMayStartDrag = singleClick && !isLinkSelection(event) && !isExten dingSelection(event);
401 401
402 selectionController().handleMousePressEvent(event); 402 selectionController().handleMousePressEvent(event);
403 403
404 m_mouseDown = event.event(); 404 m_mouseDown = event.event();
405 405
406 if (m_frame->document()->isSVGDocument() && m_frame->document()->accessSVGEx tensions().zoomAndPanEnabled()) { 406 if (m_frame->document()->isSVGDocument() && m_frame->document()->accessSVGEx tensions().zoomAndPanEnabled()) {
407 if (event.event().shiftKey() && singleClick) { 407 if (event.event().shiftKey() && singleClick) {
408 m_svgPan = true; 408 m_svgPan = true;
409 m_frame->document()->accessSVGExtensions().startPan(m_frame->view()- >rootFrameToContents(event.event().position())); 409 m_frame->document()->accessSVGExtensions().startPan(m_frame->view()- >rootFrameToContents(event.event().position()));
410 return WebInputEventResult::HandledSystem; 410 return WebInputEventResult::HandledSystem;
(...skipping 3296 matching lines...) Expand 10 before | Expand all | Expand 10 after
3707 3707
3708 FrameHost* EventHandler::frameHost() const 3708 FrameHost* EventHandler::frameHost() const
3709 { 3709 {
3710 if (!m_frame->page()) 3710 if (!m_frame->page())
3711 return nullptr; 3711 return nullptr;
3712 3712
3713 return &m_frame->page()->frameHost(); 3713 return &m_frame->page()->frameHost();
3714 } 3714 }
3715 3715
3716 } // namespace blink 3716 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/editing/SelectionController.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698