OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2007, 2009, 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007, 2009, 2010 Apple Inc. All rights reserved. |
3 * Copyright (C) 2008 Google Inc. | 3 * Copyright (C) 2008 Google Inc. |
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 355 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
366 if (drag_initiator_ && !document_under_mouse_->GetSecurityOrigin()->CanAccess( | 366 if (drag_initiator_ && !document_under_mouse_->GetSecurityOrigin()->CanAccess( |
367 drag_initiator_->GetSecurityOrigin())) | 367 drag_initiator_->GetSecurityOrigin())) |
368 return false; | 368 return false; |
369 | 369 |
370 bool is_handling_drag = false; | 370 bool is_handling_drag = false; |
371 if (action_mask & kDragDestinationActionDHTML) { | 371 if (action_mask & kDragDestinationActionDHTML) { |
372 is_handling_drag = | 372 is_handling_drag = |
373 TryDHTMLDrag(drag_data, drag_session.operation, local_root); | 373 TryDHTMLDrag(drag_data, drag_session.operation, local_root); |
374 // Do not continue if m_documentUnderMouse has been reset by tryDHTMLDrag. | 374 // Do not continue if m_documentUnderMouse has been reset by tryDHTMLDrag. |
375 // tryDHTMLDrag fires dragenter event. The event listener that listens | 375 // tryDHTMLDrag fires dragenter event. The event listener that listens |
376 // to this event may create a nested message loop (open a modal dialog), | 376 // to this event may create a nested run loop (open a modal dialog), |
377 // which could process dragleave event and reset m_documentUnderMouse in | 377 // which could process dragleave event and reset m_documentUnderMouse in |
378 // dragExited. | 378 // dragExited. |
379 if (!document_under_mouse_) | 379 if (!document_under_mouse_) |
380 return false; | 380 return false; |
381 } | 381 } |
382 | 382 |
383 // It's unclear why this check is after tryDHTMLDrag. | 383 // It's unclear why this check is after tryDHTMLDrag. |
384 // We send drag events in tryDHTMLDrag and that may be the reason. | 384 // We send drag events in tryDHTMLDrag and that may be the reason. |
385 FrameView* frame_view = document_under_mouse_->View(); | 385 FrameView* frame_view = document_under_mouse_->View(); |
386 if (!frame_view) | 386 if (!frame_view) |
(...skipping 881 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1268 | 1268 |
1269 DEFINE_TRACE(DragController) { | 1269 DEFINE_TRACE(DragController) { |
1270 visitor->Trace(page_); | 1270 visitor->Trace(page_); |
1271 visitor->Trace(document_under_mouse_); | 1271 visitor->Trace(document_under_mouse_); |
1272 visitor->Trace(drag_initiator_); | 1272 visitor->Trace(drag_initiator_); |
1273 visitor->Trace(drag_state_); | 1273 visitor->Trace(drag_state_); |
1274 visitor->Trace(file_input_element_under_mouse_); | 1274 visitor->Trace(file_input_element_under_mouse_); |
1275 } | 1275 } |
1276 | 1276 |
1277 } // namespace blink | 1277 } // namespace blink |
OLD | NEW |