| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 254 void DataTransfer::SetDragImageElement(Node* node, const IntPoint& loc) { | 254 void DataTransfer::SetDragImageElement(Node* node, const IntPoint& loc) { |
| 255 setDragImage(0, node, loc); | 255 setDragImage(0, node, loc); |
| 256 } | 256 } |
| 257 | 257 |
| 258 std::unique_ptr<DragImage> DataTransfer::CreateDragImage( | 258 std::unique_ptr<DragImage> DataTransfer::CreateDragImage( |
| 259 IntPoint& loc, | 259 IntPoint& loc, |
| 260 LocalFrame* frame) const { | 260 LocalFrame* frame) const { |
| 261 if (drag_image_element_) { | 261 if (drag_image_element_) { |
| 262 loc = drag_loc_; | 262 loc = drag_loc_; |
| 263 | 263 |
| 264 return frame->NodeImage(*drag_image_element_); | 264 return frame->NodeImage(*frame, *drag_image_element_); |
| 265 } | 265 } |
| 266 if (drag_image_) { | 266 if (drag_image_) { |
| 267 loc = drag_loc_; | 267 loc = drag_loc_; |
| 268 return DragImage::Create(drag_image_->GetImage()); | 268 return DragImage::Create(drag_image_->GetImage()); |
| 269 } | 269 } |
| 270 return nullptr; | 270 return nullptr; |
| 271 } | 271 } |
| 272 | 272 |
| 273 static ImageResourceContent* GetImageResourceContent(Element* element) { | 273 static ImageResourceContent* GetImageResourceContent(Element* element) { |
| 274 // Attempt to pull ImageResourceContent from element | 274 // Attempt to pull ImageResourceContent from element |
| (...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 498 } | 498 } |
| 499 } | 499 } |
| 500 | 500 |
| 501 DEFINE_TRACE(DataTransfer) { | 501 DEFINE_TRACE(DataTransfer) { |
| 502 visitor->Trace(data_object_); | 502 visitor->Trace(data_object_); |
| 503 visitor->Trace(drag_image_); | 503 visitor->Trace(drag_image_); |
| 504 visitor->Trace(drag_image_element_); | 504 visitor->Trace(drag_image_element_); |
| 505 } | 505 } |
| 506 | 506 |
| 507 } // namespace blink | 507 } // namespace blink |
| OLD | NEW |