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 304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
315 float zoomFactor = frame ? frame->pageZoomFactor() : 1; | 315 float zoomFactor = frame ? frame->pageZoomFactor() : 1; |
316 LayoutPoint point = roundedLayoutPoint(FloatPoint(p.x() * zoomFactor, p.y()
* zoomFactor)); | 316 LayoutPoint point = roundedLayoutPoint(FloatPoint(p.x() * zoomFactor, p.y()
* zoomFactor)); |
317 | 317 |
318 HitTestRequest request(HitTestRequest::ReadOnly | HitTestRequest::Active); | 318 HitTestRequest request(HitTestRequest::ReadOnly | HitTestRequest::Active); |
319 HitTestResult result(point); | 319 HitTestResult result(point); |
320 documentUnderMouse->renderView()->hitTest(request, result); | 320 documentUnderMouse->renderView()->hitTest(request, result); |
321 | 321 |
322 Node* n = result.innerNode(); | 322 Node* n = result.innerNode(); |
323 while (n && !n->isElementNode()) | 323 while (n && !n->isElementNode()) |
324 n = n->parentOrShadowHostNode(); | 324 n = n->parentOrShadowHostNode(); |
325 if (n) | 325 if (n && n->isInShadowTree()) |
326 n = n->deprecatedShadowAncestorNode(); | 326 n = n->shadowHost(); |
327 | 327 |
328 return toElement(n); | 328 return toElement(n); |
329 } | 329 } |
330 | 330 |
331 bool DragController::tryDocumentDrag(DragData* dragData, DragDestinationAction a
ctionMask, DragSession& dragSession) | 331 bool DragController::tryDocumentDrag(DragData* dragData, DragDestinationAction a
ctionMask, DragSession& dragSession) |
332 { | 332 { |
333 ASSERT(dragData); | 333 ASSERT(dragData); |
334 | 334 |
335 if (!m_documentUnderMouse) | 335 if (!m_documentUnderMouse) |
336 return false; | 336 return false; |
(...skipping 628 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
965 | 965 |
966 void DragController::trace(Visitor* visitor) | 966 void DragController::trace(Visitor* visitor) |
967 { | 967 { |
968 visitor->trace(m_page); | 968 visitor->trace(m_page); |
969 visitor->trace(m_documentUnderMouse); | 969 visitor->trace(m_documentUnderMouse); |
970 visitor->trace(m_dragInitiator); | 970 visitor->trace(m_dragInitiator); |
971 visitor->trace(m_fileInputElementUnderMouse); | 971 visitor->trace(m_fileInputElementUnderMouse); |
972 } | 972 } |
973 | 973 |
974 } // namespace WebCore | 974 } // namespace WebCore |
OLD | NEW |