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

Side by Side Diff: third_party/WebKit/Source/core/frame/LocalFrame.cpp

Issue 1605143003: [UseZoomForDSF] Support drag&drop (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: guest view support Created 4 years, 10 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org> 2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org>
3 * 1999 Lars Knoll <knoll@kde.org> 3 * 1999 Lars Knoll <knoll@kde.org>
4 * 1999 Antti Koivisto <koivisto@kde.org> 4 * 1999 Antti Koivisto <koivisto@kde.org>
5 * 2000 Simon Hausmann <hausmann@kde.org> 5 * 2000 Simon Hausmann <hausmann@kde.org>
6 * 2000 Stefan Schimanski <1Stein@gmx.de> 6 * 2000 Stefan Schimanski <1Stein@gmx.de>
7 * 2001 George Staikos <staikos@kde.org> 7 * 2001 George Staikos <staikos@kde.org>
8 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved. 8 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved.
9 * Copyright (C) 2005 Alexey Proskuryakov <ap@nypop.com> 9 * Copyright (C) 2005 Alexey Proskuryakov <ap@nypop.com>
10 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) 10 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 #include "core/input/EventHandler.h" 50 #include "core/input/EventHandler.h"
51 #include "core/inspector/ConsoleMessageStorage.h" 51 #include "core/inspector/ConsoleMessageStorage.h"
52 #include "core/inspector/InspectorInstrumentation.h" 52 #include "core/inspector/InspectorInstrumentation.h"
53 #include "core/inspector/InstrumentingAgents.h" 53 #include "core/inspector/InstrumentingAgents.h"
54 #include "core/layout/HitTestResult.h" 54 #include "core/layout/HitTestResult.h"
55 #include "core/layout/LayoutView.h" 55 #include "core/layout/LayoutView.h"
56 #include "core/layout/compositing/PaintLayerCompositor.h" 56 #include "core/layout/compositing/PaintLayerCompositor.h"
57 #include "core/loader/FrameLoadRequest.h" 57 #include "core/loader/FrameLoadRequest.h"
58 #include "core/loader/FrameLoaderClient.h" 58 #include "core/loader/FrameLoaderClient.h"
59 #include "core/loader/NavigationScheduler.h" 59 #include "core/loader/NavigationScheduler.h"
60 #include "core/page/ChromeClient.h"
60 #include "core/page/FocusController.h" 61 #include "core/page/FocusController.h"
61 #include "core/page/Page.h" 62 #include "core/page/Page.h"
62 #include "core/page/scrolling/ScrollingCoordinator.h" 63 #include "core/page/scrolling/ScrollingCoordinator.h"
63 #include "core/paint/ObjectPainter.h" 64 #include "core/paint/ObjectPainter.h"
64 #include "core/paint/PaintInfo.h" 65 #include "core/paint/PaintInfo.h"
65 #include "core/paint/PaintLayer.h" 66 #include "core/paint/PaintLayer.h"
66 #include "core/paint/TransformRecorder.h" 67 #include "core/paint/TransformRecorder.h"
67 #include "core/svg/SVGDocumentExtensions.h" 68 #include "core/svg/SVGDocumentExtensions.h"
68 #include "platform/DragImage.h" 69 #include "platform/DragImage.h"
69 #include "platform/PluginScriptForbiddenScope.h" 70 #include "platform/PluginScriptForbiddenScope.h"
70 #include "platform/RuntimeEnabledFeatures.h" 71 #include "platform/RuntimeEnabledFeatures.h"
71 #include "platform/ScriptForbiddenScope.h" 72 #include "platform/ScriptForbiddenScope.h"
72 #include "platform/graphics/GraphicsContext.h" 73 #include "platform/graphics/GraphicsContext.h"
73 #include "platform/graphics/StaticBitmapImage.h" 74 #include "platform/graphics/StaticBitmapImage.h"
74 #include "platform/graphics/paint/ClipRecorder.h" 75 #include "platform/graphics/paint/ClipRecorder.h"
75 #include "platform/graphics/paint/SkPictureBuilder.h" 76 #include "platform/graphics/paint/SkPictureBuilder.h"
76 #include "platform/graphics/paint/TransformDisplayItem.h" 77 #include "platform/graphics/paint/TransformDisplayItem.h"
77 #include "platform/text/TextStream.h" 78 #include "platform/text/TextStream.h"
78 #include "public/platform/WebFrameScheduler.h" 79 #include "public/platform/WebFrameScheduler.h"
80 #include "public/platform/WebScreenInfo.h"
79 #include "public/platform/WebSecurityOrigin.h" 81 #include "public/platform/WebSecurityOrigin.h"
80 #include "public/platform/WebViewScheduler.h" 82 #include "public/platform/WebViewScheduler.h"
81 #include "third_party/skia/include/core/SkImage.h" 83 #include "third_party/skia/include/core/SkImage.h"
82 #include "wtf/PassOwnPtr.h" 84 #include "wtf/PassOwnPtr.h"
83 #include "wtf/StdLibExtras.h" 85 #include "wtf/StdLibExtras.h"
84 86
85 namespace blink { 87 namespace blink {
86 88
87 using namespace HTMLNames; 89 using namespace HTMLNames;
88 90
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 if (m_draggedNode && m_draggedNode->layoutObject()) 124 if (m_draggedNode && m_draggedNode->layoutObject())
123 m_draggedNode->layoutObject()->updateDragState(false); 125 m_draggedNode->layoutObject()->updateDragState(false);
124 context().paintController().endItem<EndTransformDisplayItem>(*m_localFra me); 126 context().paintController().endItem<EndTransformDisplayItem>(*m_localFra me);
125 RefPtr<const SkPicture> recording = m_pictureBuilder->endRecording(); 127 RefPtr<const SkPicture> recording = m_pictureBuilder->endRecording();
126 RefPtr<SkImage> skImage = adoptRef(SkImage::NewFromPicture(recording.get (), 128 RefPtr<SkImage> skImage = adoptRef(SkImage::NewFromPicture(recording.get (),
127 SkISize::Make(m_bounds.width(), m_bounds.height()), nullptr, nullptr )); 129 SkISize::Make(m_bounds.width(), m_bounds.height()), nullptr, nullptr ));
128 RefPtr<Image> image = StaticBitmapImage::create(skImage.release()); 130 RefPtr<Image> image = StaticBitmapImage::create(skImage.release());
129 RespectImageOrientationEnum imageOrientation = DoNotRespectImageOrientat ion; 131 RespectImageOrientationEnum imageOrientation = DoNotRespectImageOrientat ion;
130 if (m_draggedNode && m_draggedNode->layoutObject()) 132 if (m_draggedNode && m_draggedNode->layoutObject())
131 imageOrientation = LayoutObject::shouldRespectImageOrientation(m_dra ggedNode->layoutObject()); 133 imageOrientation = LayoutObject::shouldRespectImageOrientation(m_dra ggedNode->layoutObject());
132 return DragImage::create(image.get(), imageOrientation, 134
133 m_localFrame->host()->deviceScaleFactor(), InterpolationHigh, m_opac ity); 135 float screenDeviceScaleFactor = m_localFrame->page()->chromeClient().scr eenInfo().deviceScaleFactor;
136
137 return DragImage::create(image.get(), imageOrientation, screenDeviceScal eFactor, InterpolationHigh, m_opacity);
134 } 138 }
135 139
136 private: 140 private:
137 RawPtrWillBeMember<const LocalFrame> m_localFrame; 141 RawPtrWillBeMember<const LocalFrame> m_localFrame;
138 RawPtrWillBeMember<Node> m_draggedNode; 142 RawPtrWillBeMember<Node> m_draggedNode;
139 IntRect m_bounds; 143 IntRect m_bounds;
140 float m_opacity; 144 float m_opacity;
141 OwnPtr<SkPictureBuilder> m_pictureBuilder; 145 OwnPtr<SkPictureBuilder> m_pictureBuilder;
142 }; 146 };
143 147
(...skipping 755 matching lines...) Expand 10 before | Expand all | Expand 10 after
899 { 903 {
900 m_frame->disableNavigation(); 904 m_frame->disableNavigation();
901 } 905 }
902 906
903 FrameNavigationDisabler::~FrameNavigationDisabler() 907 FrameNavigationDisabler::~FrameNavigationDisabler()
904 { 908 {
905 m_frame->enableNavigation(); 909 m_frame->enableNavigation();
906 } 910 }
907 911
908 } // namespace blink 912 } // namespace blink
OLDNEW
« no previous file with comments | « content/renderer/render_view_impl.cc ('k') | third_party/WebKit/Source/core/page/DragController.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698