| 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 | 113 |
| 113 float deviceScaleFactor = m_localFrame->host()->deviceScaleFactor(); | |
| 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 475 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 599 if (child->isLocalFrame()) | 599 if (child->isLocalFrame()) |
| 600 toLocalFrame(child)->deviceScaleFactorChanged(); | 600 toLocalFrame(child)->deviceScaleFactorChanged(); |
| 601 } | 601 } |
| 602 } | 602 } |
| 603 | 603 |
| 604 double LocalFrame::devicePixelRatio() const | 604 double LocalFrame::devicePixelRatio() const |
| 605 { | 605 { |
| 606 if (!m_host) | 606 if (!m_host) |
| 607 return 0; | 607 return 0; |
| 608 | 608 |
| 609 double ratio = m_host->deviceScaleFactor(); | 609 double ratio = m_host->deviceScaleFactorDeprecated(); |
| 610 ratio *= pageZoomFactor(); | 610 ratio *= pageZoomFactor(); |
| 611 return ratio; | 611 return ratio; |
| 612 } | 612 } |
| 613 | 613 |
| 614 PassOwnPtr<DragImage> LocalFrame::nodeImage(Node& node) | 614 PassOwnPtr<DragImage> LocalFrame::nodeImage(Node& node) |
| 615 { | 615 { |
| 616 m_view->updateAllLifecyclePhasesExceptPaint(); | 616 m_view->updateAllLifecyclePhasesExceptPaint(); |
| 617 LayoutObject* layoutObject = node.layoutObject(); | 617 LayoutObject* layoutObject = node.layoutObject(); |
| 618 if (!layoutObject) | 618 if (!layoutObject) |
| 619 return nullptr; | 619 return nullptr; |
| (...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 820 { | 820 { |
| 821 m_frame->disableNavigation(); | 821 m_frame->disableNavigation(); |
| 822 } | 822 } |
| 823 | 823 |
| 824 FrameNavigationDisabler::~FrameNavigationDisabler() | 824 FrameNavigationDisabler::~FrameNavigationDisabler() |
| 825 { | 825 { |
| 826 m_frame->enableNavigation(); | 826 m_frame->enableNavigation(); |
| 827 } | 827 } |
| 828 | 828 |
| 829 } // namespace blink | 829 } // namespace blink |
| OLD | NEW |