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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 m_draggedNode->layoutObject()->updateDragState(true); | 110 m_draggedNode->layoutObject()->updateDragState(true); |
111 | 111 |
112 float deviceScaleFactor = m_localFrame->host()->deviceScaleFactor(); | 112 float deviceScaleFactor = m_localFrame->host()->deviceScaleFactor(); |
113 m_bounds.setWidth(m_bounds.width() * deviceScaleFactor); | 113 m_bounds.setWidth(m_bounds.width() * deviceScaleFactor); |
114 m_bounds.setHeight(m_bounds.height() * deviceScaleFactor); | 114 m_bounds.setHeight(m_bounds.height() * deviceScaleFactor); |
115 m_pictureBuilder = adoptPtr(new SkPictureBuilder(SkRect::MakeIWH(m_bound
s.width(), m_bounds.height()))); | 115 m_pictureBuilder = adoptPtr(new SkPictureBuilder(SkRect::MakeIWH(m_bound
s.width(), m_bounds.height()))); |
116 | 116 |
117 AffineTransform transform; | 117 AffineTransform transform; |
118 transform.scale(deviceScaleFactor, deviceScaleFactor); | 118 transform.scale(deviceScaleFactor, deviceScaleFactor); |
119 transform.translate(-m_bounds.x(), -m_bounds.y()); | 119 transform.translate(-m_bounds.x(), -m_bounds.y()); |
120 context().getPaintController().createAndAppend<BeginTransformDisplayItem
>(*m_localFrame, transform); | 120 context().getPaintController().createAndAppend<BeginTransformDisplayItem
>(*m_pictureBuilder, transform); |
121 } | 121 } |
122 | 122 |
123 GraphicsContext& context() { return m_pictureBuilder->context(); } | 123 GraphicsContext& context() { return m_pictureBuilder->context(); } |
124 | 124 |
125 PassOwnPtr<DragImage> createImage() | 125 PassOwnPtr<DragImage> createImage() |
126 { | 126 { |
127 if (m_draggedNode && m_draggedNode->layoutObject()) | 127 if (m_draggedNode && m_draggedNode->layoutObject()) |
128 m_draggedNode->layoutObject()->updateDragState(false); | 128 m_draggedNode->layoutObject()->updateDragState(false); |
129 context().getPaintController().endItem<EndTransformDisplayItem>(*m_local
Frame); | 129 context().getPaintController().endItem<EndTransformDisplayItem>(*m_pictu
reBuilder); |
130 RefPtr<const SkPicture> recording = m_pictureBuilder->endRecording(); | 130 RefPtr<const SkPicture> recording = m_pictureBuilder->endRecording(); |
131 RefPtr<SkImage> skImage = adoptRef(SkImage::NewFromPicture(recording.get
(), | 131 RefPtr<SkImage> skImage = adoptRef(SkImage::NewFromPicture(recording.get
(), |
132 SkISize::Make(m_bounds.width(), m_bounds.height()), nullptr, nullptr
)); | 132 SkISize::Make(m_bounds.width(), m_bounds.height()), nullptr, nullptr
)); |
133 RefPtr<Image> image = StaticBitmapImage::create(skImage.release()); | 133 RefPtr<Image> image = StaticBitmapImage::create(skImage.release()); |
134 RespectImageOrientationEnum imageOrientation = DoNotRespectImageOrientat
ion; | 134 RespectImageOrientationEnum imageOrientation = DoNotRespectImageOrientat
ion; |
135 if (m_draggedNode && m_draggedNode->layoutObject()) | 135 if (m_draggedNode && m_draggedNode->layoutObject()) |
136 imageOrientation = LayoutObject::shouldRespectImageOrientation(m_dra
ggedNode->layoutObject()); | 136 imageOrientation = LayoutObject::shouldRespectImageOrientation(m_dra
ggedNode->layoutObject()); |
137 | 137 |
138 float screenDeviceScaleFactor = m_localFrame->page()->chromeClient().scr
eenInfo().deviceScaleFactor; | 138 float screenDeviceScaleFactor = m_localFrame->page()->chromeClient().scr
eenInfo().deviceScaleFactor; |
139 | 139 |
(...skipping 674 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
814 { | 814 { |
815 m_frame->disableNavigation(); | 815 m_frame->disableNavigation(); |
816 } | 816 } |
817 | 817 |
818 FrameNavigationDisabler::~FrameNavigationDisabler() | 818 FrameNavigationDisabler::~FrameNavigationDisabler() |
819 { | 819 { |
820 m_frame->enableNavigation(); | 820 m_frame->enableNavigation(); |
821 } | 821 } |
822 | 822 |
823 } // namespace blink | 823 } // namespace blink |
OLD | NEW |