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

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

Issue 1996223003: Mark FrameHost::deviceScaleFactor as deprecated. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 | « third_party/WebKit/Source/core/layout/svg/SVGLayoutSupport.cpp ('k') | 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 881 matching lines...) Expand 10 before | Expand all | Expand 10 after
892 if (!image || image->isNull()) 892 if (!image || image->isNull())
893 return false; 893 return false;
894 // We shouldn't be starting a drag for an image that can't provide an ex tension. 894 // We shouldn't be starting a drag for an image that can't provide an ex tension.
895 // This is an early detection for problems encountered later upon drop. 895 // This is an early detection for problems encountered later upon drop.
896 ASSERT(!image->filenameExtension().isEmpty()); 896 ASSERT(!image->filenameExtension().isEmpty());
897 if (!dragImage) { 897 if (!dragImage) {
898 const IntRect& imageRect = hitTestResult.imageRect(); 898 const IntRect& imageRect = hitTestResult.imageRect();
899 IntSize imageSizeInPixels = imageRect.size(); 899 IntSize imageSizeInPixels = imageRect.size();
900 // TODO(oshima): Remove this scaling and simply pass imageRect to dr agImageForImage 900 // TODO(oshima): Remove this scaling and simply pass imageRect to dr agImageForImage
901 // once all platforms are migrated to use zoom for dsf. 901 // once all platforms are migrated to use zoom for dsf.
902 imageSizeInPixels.scale(src->host()->deviceScaleFactor()); 902 imageSizeInPixels.scale(src->host()->deviceScaleFactorDeprecated());
903 903
904 float screenDeviceScaleFactor = src->page()->chromeClient().screenIn fo().deviceScaleFactor; 904 float screenDeviceScaleFactor = src->page()->chromeClient().screenIn fo().deviceScaleFactor;
905 // Pass the selected image size in DIP becasue dragImageForImage cli ps the image in DIP. 905 // Pass the selected image size in DIP becasue dragImageForImage cli ps the image in DIP.
906 // The coordinates of the locations are in Viewport coordinates, and they're converted in the Blink client. 906 // The coordinates of the locations are in Viewport coordinates, and they're converted in the Blink client.
907 // TODO(oshima): Currently, the dragged image on high DPI is scaled and can be blurry because of this. 907 // TODO(oshima): Currently, the dragged image on high DPI is scaled and can be blurry because of this.
908 // Consider to clip in the screen coordinates to use high resolution image on high DPI screens. 908 // Consider to clip in the screen coordinates to use high resolution image on high DPI screens.
909 dragImage = dragImageForImage(element, image, screenDeviceScaleFacto r, dragOrigin, imageRect.location(), imageSizeInPixels, dragLocation); 909 dragImage = dragImageForImage(element, image, screenDeviceScaleFacto r, dragOrigin, imageRect.location(), imageSizeInPixels, dragLocation);
910 } 910 }
911 doSystemDrag(dragImage.get(), dragLocation, dragOrigin, dataTransfer, sr c, false); 911 doSystemDrag(dragImage.get(), dragLocation, dragOrigin, dataTransfer, sr c, false);
912 } else if (state.m_dragType == DragSourceActionLink) { 912 } else if (state.m_dragType == DragSourceActionLink) {
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
992 992
993 DEFINE_TRACE(DragController) 993 DEFINE_TRACE(DragController)
994 { 994 {
995 visitor->trace(m_page); 995 visitor->trace(m_page);
996 visitor->trace(m_documentUnderMouse); 996 visitor->trace(m_documentUnderMouse);
997 visitor->trace(m_dragInitiator); 997 visitor->trace(m_dragInitiator);
998 visitor->trace(m_fileInputElementUnderMouse); 998 visitor->trace(m_fileInputElementUnderMouse);
999 } 999 }
1000 1000
1001 } // namespace blink 1001 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/svg/SVGLayoutSupport.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698