| 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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 STACK_ALLOCATED(); | 102 STACK_ALLOCATED(); |
| 103 public: | 103 public: |
| 104 DragImageBuilder(const LocalFrame* localFrame, const FloatRect& bounds, Node
* draggedNode, float opacity = 1) | 104 DragImageBuilder(const LocalFrame* localFrame, const FloatRect& bounds, Node
* draggedNode, float opacity = 1) |
| 105 : m_localFrame(localFrame) | 105 : m_localFrame(localFrame) |
| 106 , m_draggedNode(draggedNode) | 106 , m_draggedNode(draggedNode) |
| 107 , m_bounds(bounds) | 107 , m_bounds(bounds) |
| 108 , m_opacity(opacity) | 108 , m_opacity(opacity) |
| 109 { | 109 { |
| 110 if (m_draggedNode && m_draggedNode->layoutObject()) | 110 if (m_draggedNode && m_draggedNode->layoutObject()) |
| 111 m_draggedNode->layoutObject()->updateDragState(true); | 111 m_draggedNode->layoutObject()->updateDragState(true); |
| 112 float deviceScaleFactor = m_localFrame->host()->chromeClient().screenInf
o().deviceScaleFactor; | 112 // TODO(oshima): Remove this when all platforms are migrated to use-zoom
-for-dsf. |
| 113 | 113 float deviceScaleFactor = m_localFrame->host()->deviceScaleFactorDepreca
ted(); |
| 114 m_bounds.setWidth(m_bounds.width() * deviceScaleFactor); | 114 m_bounds.setWidth(m_bounds.width() * deviceScaleFactor); |
| 115 m_bounds.setHeight(m_bounds.height() * deviceScaleFactor); | 115 m_bounds.setHeight(m_bounds.height() * deviceScaleFactor); |
| 116 m_pictureBuilder = adoptPtr(new SkPictureBuilder(SkRect::MakeIWH(m_bound
s.width(), m_bounds.height()))); | 116 m_pictureBuilder = adoptPtr(new SkPictureBuilder(SkRect::MakeIWH(m_bound
s.width(), m_bounds.height()))); |
| 117 | 117 |
| 118 AffineTransform transform; | 118 AffineTransform transform; |
| 119 transform.scale(deviceScaleFactor, deviceScaleFactor); | 119 transform.scale(deviceScaleFactor, deviceScaleFactor); |
| 120 transform.translate(-m_bounds.x(), -m_bounds.y()); | 120 transform.translate(-m_bounds.x(), -m_bounds.y()); |
| 121 context().getPaintController().createAndAppend<BeginTransformDisplayItem
>(*m_pictureBuilder, transform); | 121 context().getPaintController().createAndAppend<BeginTransformDisplayItem
>(*m_pictureBuilder, transform); |
| 122 } | 122 } |
| 123 | 123 |
| (...skipping 693 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 817 m_frame->client()->frameBlameContext()->Enter(); | 817 m_frame->client()->frameBlameContext()->Enter(); |
| 818 } | 818 } |
| 819 | 819 |
| 820 ScopedFrameBlamer::~ScopedFrameBlamer() | 820 ScopedFrameBlamer::~ScopedFrameBlamer() |
| 821 { | 821 { |
| 822 if (m_frame && m_frame->client() && m_frame->client()->frameBlameContext()) | 822 if (m_frame && m_frame->client() && m_frame->client()->frameBlameContext()) |
| 823 m_frame->client()->frameBlameContext()->Leave(); | 823 m_frame->client()->frameBlameContext()->Leave(); |
| 824 } | 824 } |
| 825 | 825 |
| 826 } // namespace blink | 826 } // namespace blink |
| OLD | NEW |