| 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/LayoutPartItem.h" | 58 #include "core/layout/api/LayoutPartItem.h" |
| 58 #include "core/layout/api/LayoutViewItem.h" | 59 #include "core/layout/api/LayoutViewItem.h" |
| 59 #include "core/layout/compositing/PaintLayerCompositor.h" | 60 #include "core/layout/compositing/PaintLayerCompositor.h" |
| 60 #include "core/loader/FrameLoadRequest.h" | 61 #include "core/loader/FrameLoadRequest.h" |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 // factor included. | 104 // factor included. |
| 104 class DragImageBuilder { | 105 class DragImageBuilder { |
| 105 STACK_ALLOCATED(); | 106 STACK_ALLOCATED(); |
| 106 public: | 107 public: |
| 107 DragImageBuilder(const LocalFrame& localFrame, const FloatRect& bounds) | 108 DragImageBuilder(const LocalFrame& localFrame, const FloatRect& bounds) |
| 108 : m_localFrame(&localFrame) | 109 : m_localFrame(&localFrame) |
| 109 , m_bounds(bounds) | 110 , m_bounds(bounds) |
| 110 { | 111 { |
| 111 // TODO(oshima): Remove this when all platforms are migrated to use-zoom
-for-dsf. | 112 // TODO(oshima): Remove this when all platforms are migrated to use-zoom
-for-dsf. |
| 112 float deviceScaleFactor = m_localFrame->host()->deviceScaleFactorDepreca
ted(); | 113 float deviceScaleFactor = m_localFrame->host()->deviceScaleFactorDepreca
ted(); |
| 113 m_bounds.setWidth(m_bounds.width() * deviceScaleFactor); | 114 float pageScaleFactor = m_localFrame->host()->visualViewport().scale(); |
| 114 m_bounds.setHeight(m_bounds.height() * deviceScaleFactor); | 115 m_bounds.setWidth(m_bounds.width() * deviceScaleFactor * pageScaleFactor
); |
| 116 m_bounds.setHeight(m_bounds.height() * deviceScaleFactor * pageScaleFact
or); |
| 115 m_pictureBuilder = wrapUnique(new SkPictureBuilder(SkRect::MakeIWH(m_bou
nds.width(), m_bounds.height()))); | 117 m_pictureBuilder = wrapUnique(new SkPictureBuilder(SkRect::MakeIWH(m_bou
nds.width(), m_bounds.height()))); |
| 116 | 118 |
| 117 AffineTransform transform; | 119 AffineTransform transform; |
| 118 transform.scale(deviceScaleFactor, deviceScaleFactor); | 120 transform.scale(deviceScaleFactor * pageScaleFactor, deviceScaleFactor *
pageScaleFactor); |
| 119 transform.translate(-m_bounds.x(), -m_bounds.y()); | 121 transform.translate(-m_bounds.x(), -m_bounds.y()); |
| 120 context().getPaintController().createAndAppend<BeginTransformDisplayItem
>(*m_pictureBuilder, transform); | 122 context().getPaintController().createAndAppend<BeginTransformDisplayItem
>(*m_pictureBuilder, transform); |
| 121 } | 123 } |
| 122 | 124 |
| 123 GraphicsContext& context() { return m_pictureBuilder->context(); } | 125 GraphicsContext& context() { return m_pictureBuilder->context(); } |
| 124 | 126 |
| 125 std::unique_ptr<DragImage> createImage( | 127 std::unique_ptr<DragImage> createImage( |
| 126 float opacity, | 128 float opacity, |
| 127 RespectImageOrientationEnum imageOrientation = DoNotRespectImageOrientat
ion) | 129 RespectImageOrientationEnum imageOrientation = DoNotRespectImageOrientat
ion) |
| 128 { | 130 { |
| (...skipping 734 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 863 m_frame->client()->frameBlameContext()->Enter(); | 865 m_frame->client()->frameBlameContext()->Enter(); |
| 864 } | 866 } |
| 865 | 867 |
| 866 ScopedFrameBlamer::~ScopedFrameBlamer() | 868 ScopedFrameBlamer::~ScopedFrameBlamer() |
| 867 { | 869 { |
| 868 if (m_frame && m_frame->client() && m_frame->client()->frameBlameContext()) | 870 if (m_frame && m_frame->client() && m_frame->client()->frameBlameContext()) |
| 869 m_frame->client()->frameBlameContext()->Leave(); | 871 m_frame->client()->frameBlameContext()->Leave(); |
| 870 } | 872 } |
| 871 | 873 |
| 872 } // namespace blink | 874 } // namespace blink |
| OLD | NEW |