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

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

Issue 1033943002: Rename LayoutStyle to papayawhip (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: ensureComputedStyle Created 5 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/page/ChromeClient.h ('k') | Source/core/page/EventHandler.h » ('j') | 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 786 matching lines...) Expand 10 before | Expand all | Expand 10 after
797 static const IntSize maxDragImageSize(200, 200); 797 static const IntSize maxDragImageSize(200, 200);
798 #endif 798 #endif
799 return maxDragImageSize; 799 return maxDragImageSize;
800 } 800 }
801 801
802 static PassOwnPtr<DragImage> dragImageForImage(Element* element, Image* image, c onst IntPoint& dragOrigin, const IntRect& imageRect, IntPoint& dragLocation) 802 static PassOwnPtr<DragImage> dragImageForImage(Element* element, Image* image, c onst IntPoint& dragOrigin, const IntRect& imageRect, IntPoint& dragLocation)
803 { 803 {
804 OwnPtr<DragImage> dragImage; 804 OwnPtr<DragImage> dragImage;
805 IntPoint origin; 805 IntPoint origin;
806 806
807 InterpolationQuality interpolationQuality = element->computedStyle()->imageR endering() == ImageRenderingPixelated ? InterpolationNone : InterpolationHigh; 807 InterpolationQuality interpolationQuality = element->ensureComputedStyle()-> imageRendering() == ImageRenderingPixelated ? InterpolationNone : InterpolationH igh;
808 if (image->size().height() * image->size().width() <= MaxOriginalImageArea 808 if (image->size().height() * image->size().width() <= MaxOriginalImageArea
809 && (dragImage = DragImage::create(image, element->layoutObject() ? eleme nt->layoutObject()->shouldRespectImageOrientation() : DoNotRespectImageOrientati on, 1 /* deviceScaleFactor */, interpolationQuality))) { 809 && (dragImage = DragImage::create(image, element->layoutObject() ? eleme nt->layoutObject()->shouldRespectImageOrientation() : DoNotRespectImageOrientati on, 1 /* deviceScaleFactor */, interpolationQuality))) {
810 IntSize originalSize = imageRect.size(); 810 IntSize originalSize = imageRect.size();
811 origin = imageRect.location(); 811 origin = imageRect.location();
812 812
813 dragImage->fitToMaxSize(imageRect.size(), maxDragImageSize()); 813 dragImage->fitToMaxSize(imageRect.size(), maxDragImageSize());
814 dragImage->dissolveToFraction(DragImageAlpha); 814 dragImage->dissolveToFraction(DragImageAlpha);
815 IntSize newSize = dragImage->size(); 815 IntSize newSize = dragImage->size();
816 816
817 // Properly orient the drag image and orient it differently if it's smal ler than the original 817 // Properly orient the drag image and orient it differently if it's smal ler than the original
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
965 965
966 DEFINE_TRACE(DragController) 966 DEFINE_TRACE(DragController)
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 blink 974 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/page/ChromeClient.h ('k') | Source/core/page/EventHandler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698