| OLD | NEW |
| 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 30 matching lines...) Expand all Loading... |
| 41 #include "core/editing/serializers/Serialization.h" | 41 #include "core/editing/serializers/Serialization.h" |
| 42 #include "core/editing/spellcheck/SpellChecker.h" | 42 #include "core/editing/spellcheck/SpellChecker.h" |
| 43 #include "core/events/Event.h" | 43 #include "core/events/Event.h" |
| 44 #include "core/fetch/ResourceFetcher.h" | 44 #include "core/fetch/ResourceFetcher.h" |
| 45 #include "core/frame/EventHandlerRegistry.h" | 45 #include "core/frame/EventHandlerRegistry.h" |
| 46 #include "core/frame/FrameConsole.h" | 46 #include "core/frame/FrameConsole.h" |
| 47 #include "core/frame/FrameHost.h" | 47 #include "core/frame/FrameHost.h" |
| 48 #include "core/frame/FrameView.h" | 48 #include "core/frame/FrameView.h" |
| 49 #include "core/frame/LocalDOMWindow.h" | 49 #include "core/frame/LocalDOMWindow.h" |
| 50 #include "core/frame/Settings.h" | 50 #include "core/frame/Settings.h" |
| 51 #include "core/frame/VisualViewport.h" |
| 51 #include "core/html/HTMLFrameElementBase.h" | 52 #include "core/html/HTMLFrameElementBase.h" |
| 52 #include "core/html/HTMLPlugInElement.h" | 53 #include "core/html/HTMLPlugInElement.h" |
| 53 #include "core/input/EventHandler.h" | 54 #include "core/input/EventHandler.h" |
| 54 #include "core/inspector/InspectorInstrumentation.h" | 55 #include "core/inspector/InspectorInstrumentation.h" |
| 55 #include "core/layout/HitTestResult.h" | 56 #include "core/layout/HitTestResult.h" |
| 56 #include "core/layout/LayoutView.h" | 57 #include "core/layout/LayoutView.h" |
| 57 #include "core/layout/api/LayoutViewItem.h" | 58 #include "core/layout/api/LayoutViewItem.h" |
| 58 #include "core/layout/compositing/PaintLayerCompositor.h" | 59 #include "core/layout/compositing/PaintLayerCompositor.h" |
| 59 #include "core/loader/FrameLoadRequest.h" | 60 #include "core/loader/FrameLoadRequest.h" |
| 60 #include "core/loader/FrameLoaderClient.h" | 61 #include "core/loader/FrameLoaderClient.h" |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 // factor included. | 103 // factor included. |
| 103 class DragImageBuilder { | 104 class DragImageBuilder { |
| 104 STACK_ALLOCATED(); | 105 STACK_ALLOCATED(); |
| 105 public: | 106 public: |
| 106 DragImageBuilder(const LocalFrame& localFrame, const FloatRect& bounds) | 107 DragImageBuilder(const LocalFrame& localFrame, const FloatRect& bounds) |
| 107 : m_localFrame(&localFrame) | 108 : m_localFrame(&localFrame) |
| 108 , m_bounds(bounds) | 109 , m_bounds(bounds) |
| 109 { | 110 { |
| 110 // TODO(oshima): Remove this when all platforms are migrated to use-zoom
-for-dsf. | 111 // TODO(oshima): Remove this when all platforms are migrated to use-zoom
-for-dsf. |
| 111 float deviceScaleFactor = m_localFrame->host()->deviceScaleFactorDepreca
ted(); | 112 float deviceScaleFactor = m_localFrame->host()->deviceScaleFactorDepreca
ted(); |
| 112 m_bounds.setWidth(m_bounds.width() * deviceScaleFactor); | 113 float pageScaleFactor = m_localFrame->host()->visualViewport().scale(); |
| 113 m_bounds.setHeight(m_bounds.height() * deviceScaleFactor); | 114 m_bounds.setWidth(m_bounds.width() * deviceScaleFactor * pageScaleFactor
); |
| 115 m_bounds.setHeight(m_bounds.height() * deviceScaleFactor * pageScaleFact
or); |
| 114 m_pictureBuilder = wrapUnique(new SkPictureBuilder(SkRect::MakeIWH(m_bou
nds.width(), m_bounds.height()))); | 116 m_pictureBuilder = wrapUnique(new SkPictureBuilder(SkRect::MakeIWH(m_bou
nds.width(), m_bounds.height()))); |
| 115 | 117 |
| 116 AffineTransform transform; | 118 AffineTransform transform; |
| 117 transform.scale(deviceScaleFactor, deviceScaleFactor); | 119 transform.scale(deviceScaleFactor * pageScaleFactor, deviceScaleFactor *
pageScaleFactor); |
| 118 transform.translate(-m_bounds.x(), -m_bounds.y()); | 120 transform.translate(-m_bounds.x(), -m_bounds.y()); |
| 119 context().getPaintController().createAndAppend<BeginTransformDisplayItem
>(*m_pictureBuilder, transform); | 121 context().getPaintController().createAndAppend<BeginTransformDisplayItem
>(*m_pictureBuilder, transform); |
| 120 } | 122 } |
| 121 | 123 |
| 122 GraphicsContext& context() { return m_pictureBuilder->context(); } | 124 GraphicsContext& context() { return m_pictureBuilder->context(); } |
| 123 | 125 |
| 124 std::unique_ptr<DragImage> createImage( | 126 std::unique_ptr<DragImage> createImage( |
| 125 float opacity, | 127 float opacity, |
| 126 RespectImageOrientationEnum imageOrientation = DoNotRespectImageOrientat
ion) | 128 RespectImageOrientationEnum imageOrientation = DoNotRespectImageOrientat
ion) |
| 127 { | 129 { |
| (...skipping 730 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 858 m_frame->client()->frameBlameContext()->Enter(); | 860 m_frame->client()->frameBlameContext()->Enter(); |
| 859 } | 861 } |
| 860 | 862 |
| 861 ScopedFrameBlamer::~ScopedFrameBlamer() | 863 ScopedFrameBlamer::~ScopedFrameBlamer() |
| 862 { | 864 { |
| 863 if (m_frame && m_frame->client() && m_frame->client()->frameBlameContext()) | 865 if (m_frame && m_frame->client() && m_frame->client()->frameBlameContext()) |
| 864 m_frame->client()->frameBlameContext()->Leave(); | 866 m_frame->client()->frameBlameContext()->Leave(); |
| 865 } | 867 } |
| 866 | 868 |
| 867 } // namespace blink | 869 } // namespace blink |
| OLD | NEW |