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

Side by Side Diff: third_party/WebKit/Source/core/page/DragController.cpp

Issue 1908573003: [Layout API] Convert DragController to use Document::layoutViewItem() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
« no previous file with comments | « no previous file | 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) 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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 #include "core/frame/Settings.h" 52 #include "core/frame/Settings.h"
53 #include "core/html/HTMLAnchorElement.h" 53 #include "core/html/HTMLAnchorElement.h"
54 #include "core/html/HTMLFormElement.h" 54 #include "core/html/HTMLFormElement.h"
55 #include "core/html/HTMLInputElement.h" 55 #include "core/html/HTMLInputElement.h"
56 #include "core/html/HTMLPlugInElement.h" 56 #include "core/html/HTMLPlugInElement.h"
57 #include "core/input/EventHandler.h" 57 #include "core/input/EventHandler.h"
58 #include "core/layout/HitTestRequest.h" 58 #include "core/layout/HitTestRequest.h"
59 #include "core/layout/HitTestResult.h" 59 #include "core/layout/HitTestResult.h"
60 #include "core/layout/LayoutImage.h" 60 #include "core/layout/LayoutImage.h"
61 #include "core/layout/LayoutTheme.h" 61 #include "core/layout/LayoutTheme.h"
62 #include "core/layout/LayoutView.h" 62 #include "core/layout/api/LayoutViewItem.h"
63 #include "core/loader/FrameLoadRequest.h" 63 #include "core/loader/FrameLoadRequest.h"
64 #include "core/loader/FrameLoader.h" 64 #include "core/loader/FrameLoader.h"
65 #include "core/page/ChromeClient.h" 65 #include "core/page/ChromeClient.h"
66 #include "core/page/DragData.h" 66 #include "core/page/DragData.h"
67 #include "core/page/DragSession.h" 67 #include "core/page/DragSession.h"
68 #include "core/page/DragState.h" 68 #include "core/page/DragState.h"
69 #include "core/page/Page.h" 69 #include "core/page/Page.h"
70 #include "platform/DragImage.h" 70 #include "platform/DragImage.h"
71 #include "platform/geometry/IntRect.h" 71 #include "platform/geometry/IntRect.h"
72 #include "platform/geometry/IntSize.h" 72 #include "platform/geometry/IntSize.h"
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
321 return toHTMLInputElement(node); 321 return toHTMLInputElement(node);
322 } 322 }
323 return nullptr; 323 return nullptr;
324 } 324 }
325 325
326 // This can return null if an empty document is loaded. 326 // This can return null if an empty document is loaded.
327 static Element* elementUnderMouse(Document* documentUnderMouse, const IntPoint& point) 327 static Element* elementUnderMouse(Document* documentUnderMouse, const IntPoint& point)
328 { 328 {
329 HitTestRequest request(HitTestRequest::ReadOnly | HitTestRequest::Active); 329 HitTestRequest request(HitTestRequest::ReadOnly | HitTestRequest::Active);
330 HitTestResult result(request, point); 330 HitTestResult result(request, point);
331 documentUnderMouse->layoutView()->hitTest(result); 331 documentUnderMouse->layoutViewItem().hitTest(result);
332 332
333 Node* n = result.innerNode(); 333 Node* n = result.innerNode();
334 while (n && !n->isElementNode()) 334 while (n && !n->isElementNode())
335 n = n->parentOrShadowHostNode(); 335 n = n->parentOrShadowHostNode();
336 if (n && n->isInShadowTree()) 336 if (n && n->isInShadowTree())
337 n = n->shadowHost(); 337 n = n->shadowHost();
338 338
339 return toElement(n); 339 return toElement(n);
340 } 340 }
341 341
(...skipping 654 matching lines...) Expand 10 before | Expand all | Expand 10 after
996 996
997 DEFINE_TRACE(DragController) 997 DEFINE_TRACE(DragController)
998 { 998 {
999 visitor->trace(m_page); 999 visitor->trace(m_page);
1000 visitor->trace(m_documentUnderMouse); 1000 visitor->trace(m_documentUnderMouse);
1001 visitor->trace(m_dragInitiator); 1001 visitor->trace(m_dragInitiator);
1002 visitor->trace(m_fileInputElementUnderMouse); 1002 visitor->trace(m_fileInputElementUnderMouse);
1003 } 1003 }
1004 1004
1005 } // namespace blink 1005 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698