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

Unified Diff: third_party/WebKit/Source/core/input/MouseEventManager.cpp

Issue 2734793002: Expand FrameSelection::isInPasswordFiled() into call sites (Closed)
Patch Set: 2017-03-07T11:24:31 Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/core/editing/FrameSelection.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/input/MouseEventManager.cpp
diff --git a/third_party/WebKit/Source/core/input/MouseEventManager.cpp b/third_party/WebKit/Source/core/input/MouseEventManager.cpp
index d33f5a8dc33fe7f4338ccb60dc166e21f75a4317..3672b0fa43f8f76190a6cdaffc828cdb4de6aa81 100644
--- a/third_party/WebKit/Source/core/input/MouseEventManager.cpp
+++ b/third_party/WebKit/Source/core/input/MouseEventManager.cpp
@@ -9,6 +9,7 @@
#include "core/dom/Element.h"
#include "core/dom/ElementTraversal.h"
#include "core/dom/TaskRunnerHelper.h"
+#include "core/editing/EditingUtilities.h"
#include "core/editing/FrameSelection.h"
#include "core/editing/SelectionController.h"
#include "core/events/DragEvent.h"
@@ -847,10 +848,17 @@ bool MouseEventManager::tryStartDrag(
// reset. Hence, need to check if this particular drag operation can
// continue even if dispatchEvent() indicates no (direct) cancellation.
// Do that by checking if m_dragSrc is still set.
- m_mouseDownMayStartDrag =
- dispatchDragSrcEvent(EventTypeNames::dragstart, m_mouseDown) ==
+ m_mouseDownMayStartDrag = false;
+ if (dispatchDragSrcEvent(EventTypeNames::dragstart, m_mouseDown) ==
WebInputEventResult::NotHandled &&
- !m_frame->selection().isInPasswordField() && dragState().m_dragSrc;
+ dragState().m_dragSrc) {
+ // TODO(editing-dev): The use of
+ // updateStyleAndLayoutIgnorePendingStylesheets needs to be audited. See
+ // http://crbug.com/590369 for more details.
+ m_frame->document()->updateStyleAndLayoutIgnorePendingStylesheets();
+ m_mouseDownMayStartDrag = !isInPasswordField(
+ m_frame->selection().computeVisibleSelectionInDOMTree().start());
+ }
// Invalidate clipboard here against anymore pasteboard writing for security.
// The drag image can still be changed as we drag, but not the pasteboard
« no previous file with comments | « third_party/WebKit/Source/core/editing/FrameSelection.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698