| 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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 #include "core/loader/FrameLoader.h" | 59 #include "core/loader/FrameLoader.h" |
| 60 #include "core/page/DragClient.h" | 60 #include "core/page/DragClient.h" |
| 61 #include "core/page/DragData.h" | 61 #include "core/page/DragData.h" |
| 62 #include "core/page/DragSession.h" | 62 #include "core/page/DragSession.h" |
| 63 #include "core/page/DragState.h" | 63 #include "core/page/DragState.h" |
| 64 #include "core/page/EventHandler.h" | 64 #include "core/page/EventHandler.h" |
| 65 #include "core/page/Page.h" | 65 #include "core/page/Page.h" |
| 66 #include "core/frame/Settings.h" | 66 #include "core/frame/Settings.h" |
| 67 #include "core/layout/HitTestRequest.h" | 67 #include "core/layout/HitTestRequest.h" |
| 68 #include "core/layout/HitTestResult.h" | 68 #include "core/layout/HitTestResult.h" |
| 69 #include "core/rendering/RenderImage.h" | 69 #include "core/layout/LayoutImage.h" |
| 70 #include "core/rendering/RenderView.h" | 70 #include "core/rendering/RenderView.h" |
| 71 #include "platform/DragImage.h" | 71 #include "platform/DragImage.h" |
| 72 #include "platform/geometry/IntRect.h" | 72 #include "platform/geometry/IntRect.h" |
| 73 #include "platform/graphics/Image.h" | 73 #include "platform/graphics/Image.h" |
| 74 #include "platform/graphics/ImageOrientation.h" | 74 #include "platform/graphics/ImageOrientation.h" |
| 75 #include "platform/network/ResourceRequest.h" | 75 #include "platform/network/ResourceRequest.h" |
| 76 #include "platform/weborigin/SecurityOrigin.h" | 76 #include "platform/weborigin/SecurityOrigin.h" |
| 77 #include "wtf/CurrentTime.h" | 77 #include "wtf/CurrentTime.h" |
| 78 #include "wtf/OwnPtr.h" | 78 #include "wtf/OwnPtr.h" |
| 79 #include "wtf/PassOwnPtr.h" | 79 #include "wtf/PassOwnPtr.h" |
| (...skipping 613 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 693 } | 693 } |
| 694 return node; | 694 return node; |
| 695 } | 695 } |
| 696 | 696 |
| 697 static ImageResource* getImageResource(Element* element) | 697 static ImageResource* getImageResource(Element* element) |
| 698 { | 698 { |
| 699 ASSERT(element); | 699 ASSERT(element); |
| 700 LayoutObject* renderer = element->renderer(); | 700 LayoutObject* renderer = element->renderer(); |
| 701 if (!renderer || !renderer->isImage()) | 701 if (!renderer || !renderer->isImage()) |
| 702 return nullptr; | 702 return nullptr; |
| 703 RenderImage* image = toRenderImage(renderer); | 703 LayoutImage* image = toLayoutImage(renderer); |
| 704 return image->cachedImage(); | 704 return image->cachedImage(); |
| 705 } | 705 } |
| 706 | 706 |
| 707 static Image* getImage(Element* element) | 707 static Image* getImage(Element* element) |
| 708 { | 708 { |
| 709 ASSERT(element); | 709 ASSERT(element); |
| 710 ImageResource* cachedImage = getImageResource(element); | 710 ImageResource* cachedImage = getImageResource(element); |
| 711 // Don't use cachedImage->imageForRenderer() here as that may return BitmapI
mages for cached SVG Images. | 711 // Don't use cachedImage->imageForRenderer() here as that may return BitmapI
mages for cached SVG Images. |
| 712 // Users of getImage() want access to the SVGImage, in order to figure out t
he filename extensions, | 712 // Users of getImage() want access to the SVGImage, in order to figure out t
he filename extensions, |
| 713 // which would be empty when asking the cached BitmapImages. | 713 // which would be empty when asking the cached BitmapImages. |
| (...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 970 | 970 |
| 971 void DragController::trace(Visitor* visitor) | 971 void DragController::trace(Visitor* visitor) |
| 972 { | 972 { |
| 973 visitor->trace(m_page); | 973 visitor->trace(m_page); |
| 974 visitor->trace(m_documentUnderMouse); | 974 visitor->trace(m_documentUnderMouse); |
| 975 visitor->trace(m_dragInitiator); | 975 visitor->trace(m_dragInitiator); |
| 976 visitor->trace(m_fileInputElementUnderMouse); | 976 visitor->trace(m_fileInputElementUnderMouse); |
| 977 } | 977 } |
| 978 | 978 |
| 979 } // namespace blink | 979 } // namespace blink |
| OLD | NEW |