| 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 | 8 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All |
| 9 * rights reserved. | 9 * rights reserved. |
| 10 * Copyright (C) 2005 Alexey Proskuryakov <ap@nypop.com> | 10 * Copyright (C) 2005 Alexey Proskuryakov <ap@nypop.com> |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 class DragImageBuilder { | 114 class DragImageBuilder { |
| 115 STACK_ALLOCATED(); | 115 STACK_ALLOCATED(); |
| 116 | 116 |
| 117 public: | 117 public: |
| 118 DragImageBuilder(const LocalFrame& localFrame, const FloatRect& bounds) | 118 DragImageBuilder(const LocalFrame& localFrame, const FloatRect& bounds) |
| 119 : m_localFrame(&localFrame), m_bounds(bounds) { | 119 : m_localFrame(&localFrame), m_bounds(bounds) { |
| 120 // TODO(oshima): Remove this when all platforms are migrated to | 120 // TODO(oshima): Remove this when all platforms are migrated to |
| 121 // use-zoom-for-dsf. | 121 // use-zoom-for-dsf. |
| 122 float deviceScaleFactor = | 122 float deviceScaleFactor = |
| 123 m_localFrame->page()->deviceScaleFactorDeprecated(); | 123 m_localFrame->page()->deviceScaleFactorDeprecated(); |
| 124 float pageScaleFactor = m_localFrame->host()->visualViewport().scale(); | 124 float pageScaleFactor = m_localFrame->page()->visualViewport().scale(); |
| 125 m_bounds.setWidth(m_bounds.width() * deviceScaleFactor * pageScaleFactor); | 125 m_bounds.setWidth(m_bounds.width() * deviceScaleFactor * pageScaleFactor); |
| 126 m_bounds.setHeight(m_bounds.height() * deviceScaleFactor * pageScaleFactor); | 126 m_bounds.setHeight(m_bounds.height() * deviceScaleFactor * pageScaleFactor); |
| 127 m_builder = WTF::wrapUnique(new PaintRecordBuilder( | 127 m_builder = WTF::wrapUnique(new PaintRecordBuilder( |
| 128 SkRect::MakeIWH(m_bounds.width(), m_bounds.height()))); | 128 SkRect::MakeIWH(m_bounds.width(), m_bounds.height()))); |
| 129 | 129 |
| 130 AffineTransform transform; | 130 AffineTransform transform; |
| 131 transform.scale(deviceScaleFactor * pageScaleFactor, | 131 transform.scale(deviceScaleFactor * pageScaleFactor, |
| 132 deviceScaleFactor * pageScaleFactor); | 132 deviceScaleFactor * pageScaleFactor); |
| 133 transform.translate(-m_bounds.x(), -m_bounds.y()); | 133 transform.translate(-m_bounds.x(), -m_bounds.y()); |
| 134 context().getPaintController().createAndAppend<BeginTransformDisplayItem>( | 134 context().getPaintController().createAndAppend<BeginTransformDisplayItem>( |
| (...skipping 783 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 918 if (m_frame && m_frame->client() && m_frame->client()->frameBlameContext()) | 918 if (m_frame && m_frame->client() && m_frame->client()->frameBlameContext()) |
| 919 m_frame->client()->frameBlameContext()->Enter(); | 919 m_frame->client()->frameBlameContext()->Enter(); |
| 920 } | 920 } |
| 921 | 921 |
| 922 ScopedFrameBlamer::~ScopedFrameBlamer() { | 922 ScopedFrameBlamer::~ScopedFrameBlamer() { |
| 923 if (m_frame && m_frame->client() && m_frame->client()->frameBlameContext()) | 923 if (m_frame && m_frame->client() && m_frame->client()->frameBlameContext()) |
| 924 m_frame->client()->frameBlameContext()->Leave(); | 924 m_frame->client()->frameBlameContext()->Leave(); |
| 925 } | 925 } |
| 926 | 926 |
| 927 } // namespace blink | 927 } // namespace blink |
| OLD | NEW |