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

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

Issue 1858163002: Rename inDocument() to inShadowIncludingDocument() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 8 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 3270 matching lines...) Expand 10 before | Expand all | Expand 10 after
3281 clearDragDataTransfer(); 3281 clearDragDataTransfer();
3282 dragState().m_dragSrc = nullptr; 3282 dragState().m_dragSrc = nullptr;
3283 // In case the drag was ended due to an escape key press we need to ensure 3283 // In case the drag was ended due to an escape key press we need to ensure
3284 // that consecutive mousemove events don't reinitiate the drag and drop. 3284 // that consecutive mousemove events don't reinitiate the drag and drop.
3285 m_mouseDownMayStartDrag = false; 3285 m_mouseDownMayStartDrag = false;
3286 } 3286 }
3287 3287
3288 void EventHandler::updateDragStateAfterEditDragIfNeeded(Element* rootEditableEle ment) 3288 void EventHandler::updateDragStateAfterEditDragIfNeeded(Element* rootEditableEle ment)
3289 { 3289 {
3290 // If inserting the dragged contents removed the drag source, we still want to fire dragend at the root editble element. 3290 // If inserting the dragged contents removed the drag source, we still want to fire dragend at the root editble element.
3291 if (dragState().m_dragSrc && !dragState().m_dragSrc->inDocument()) 3291 if (dragState().m_dragSrc && !dragState().m_dragSrc->inShadowIncludingDocume nt())
3292 dragState().m_dragSrc = rootEditableElement; 3292 dragState().m_dragSrc = rootEditableElement;
3293 } 3293 }
3294 3294
3295 // returns if we should continue "default processing", i.e., whether eventhandle r canceled 3295 // returns if we should continue "default processing", i.e., whether eventhandle r canceled
3296 WebInputEventResult EventHandler::dispatchDragSrcEvent(const AtomicString& event Type, const PlatformMouseEvent& event) 3296 WebInputEventResult EventHandler::dispatchDragSrcEvent(const AtomicString& event Type, const PlatformMouseEvent& event)
3297 { 3297 {
3298 return dispatchDragEvent(eventType, dragState().m_dragSrc.get(), event, drag State().m_dragDataTransfer.get()); 3298 return dispatchDragEvent(eventType, dragState().m_dragSrc.get(), event, drag State().m_dragDataTransfer.get());
3299 } 3299 }
3300 3300
3301 bool EventHandler::handleDrag(const MouseEventWithHitTestResults& event, DragIni tiator initiator) 3301 bool EventHandler::handleDrag(const MouseEventWithHitTestResults& event, DragIni tiator initiator)
(...skipping 704 matching lines...) Expand 10 before | Expand all | Expand 10 after
4006 PlatformEvent::Modifiers EventHandler::accessKeyModifiers() 4006 PlatformEvent::Modifiers EventHandler::accessKeyModifiers()
4007 { 4007 {
4008 #if OS(MACOSX) 4008 #if OS(MACOSX)
4009 return static_cast<PlatformEvent::Modifiers>(PlatformEvent::CtrlKey | Platfo rmEvent::AltKey); 4009 return static_cast<PlatformEvent::Modifiers>(PlatformEvent::CtrlKey | Platfo rmEvent::AltKey);
4010 #else 4010 #else
4011 return PlatformEvent::AltKey; 4011 return PlatformEvent::AltKey;
4012 #endif 4012 #endif
4013 } 4013 }
4014 4014
4015 } // namespace blink 4015 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698