| 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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 public: | 113 public: |
| 114 DragImageBuilder(const LocalFrame& localFrame, const FloatRect& bounds) | 114 DragImageBuilder(const LocalFrame& localFrame, const FloatRect& bounds) |
| 115 : m_localFrame(&localFrame), m_bounds(bounds) { | 115 : m_localFrame(&localFrame), m_bounds(bounds) { |
| 116 // TODO(oshima): Remove this when all platforms are migrated to | 116 // TODO(oshima): Remove this when all platforms are migrated to |
| 117 // use-zoom-for-dsf. | 117 // use-zoom-for-dsf. |
| 118 float deviceScaleFactor = | 118 float deviceScaleFactor = |
| 119 m_localFrame->host()->deviceScaleFactorDeprecated(); | 119 m_localFrame->host()->deviceScaleFactorDeprecated(); |
| 120 float pageScaleFactor = m_localFrame->host()->visualViewport().scale(); | 120 float pageScaleFactor = m_localFrame->host()->visualViewport().scale(); |
| 121 m_bounds.setWidth(m_bounds.width() * deviceScaleFactor * pageScaleFactor); | 121 m_bounds.setWidth(m_bounds.width() * deviceScaleFactor * pageScaleFactor); |
| 122 m_bounds.setHeight(m_bounds.height() * deviceScaleFactor * pageScaleFactor); | 122 m_bounds.setHeight(m_bounds.height() * deviceScaleFactor * pageScaleFactor); |
| 123 m_pictureBuilder = wrapUnique(new SkPictureBuilder( | 123 m_pictureBuilder = WTF::wrapUnique(new SkPictureBuilder( |
| 124 SkRect::MakeIWH(m_bounds.width(), m_bounds.height()))); | 124 SkRect::MakeIWH(m_bounds.width(), m_bounds.height()))); |
| 125 | 125 |
| 126 AffineTransform transform; | 126 AffineTransform transform; |
| 127 transform.scale(deviceScaleFactor * pageScaleFactor, | 127 transform.scale(deviceScaleFactor * pageScaleFactor, |
| 128 deviceScaleFactor * pageScaleFactor); | 128 deviceScaleFactor * pageScaleFactor); |
| 129 transform.translate(-m_bounds.x(), -m_bounds.y()); | 129 transform.translate(-m_bounds.x(), -m_bounds.y()); |
| 130 context().getPaintController().createAndAppend<BeginTransformDisplayItem>( | 130 context().getPaintController().createAndAppend<BeginTransformDisplayItem>( |
| 131 *m_pictureBuilder, transform); | 131 *m_pictureBuilder, transform); |
| 132 } | 132 } |
| 133 | 133 |
| (...skipping 795 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 929 if (m_frame && m_frame->client() && m_frame->client()->frameBlameContext()) | 929 if (m_frame && m_frame->client() && m_frame->client()->frameBlameContext()) |
| 930 m_frame->client()->frameBlameContext()->Enter(); | 930 m_frame->client()->frameBlameContext()->Enter(); |
| 931 } | 931 } |
| 932 | 932 |
| 933 ScopedFrameBlamer::~ScopedFrameBlamer() { | 933 ScopedFrameBlamer::~ScopedFrameBlamer() { |
| 934 if (m_frame && m_frame->client() && m_frame->client()->frameBlameContext()) | 934 if (m_frame && m_frame->client() && m_frame->client()->frameBlameContext()) |
| 935 m_frame->client()->frameBlameContext()->Leave(); | 935 m_frame->client()->frameBlameContext()->Leave(); |
| 936 } | 936 } |
| 937 | 937 |
| 938 } // namespace blink | 938 } // namespace blink |
| OLD | NEW |