| 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 598 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 609 return DragImage::create(image.get(), renderer->shouldRespectImageOrientatio
n(), deviceScaleFactor); | 609 return DragImage::create(image.get(), renderer->shouldRespectImageOrientatio
n(), deviceScaleFactor); |
| 610 } | 610 } |
| 611 | 611 |
| 612 PassOwnPtr<DragImage> LocalFrame::dragImageForSelection() | 612 PassOwnPtr<DragImage> LocalFrame::dragImageForSelection() |
| 613 { | 613 { |
| 614 if (!selection().isRange()) | 614 if (!selection().isRange()) |
| 615 return nullptr; | 615 return nullptr; |
| 616 | 616 |
| 617 const ScopedFramePaintingState state(this, 0); | 617 const ScopedFramePaintingState state(this, 0); |
| 618 m_view->setPaintBehavior(PaintBehaviorSelectionOnly | PaintBehaviorFlattenCo
mpositingLayers); | 618 m_view->setPaintBehavior(PaintBehaviorSelectionOnly | PaintBehaviorFlattenCo
mpositingLayers); |
| 619 document()->updateLayout(); | 619 m_view->updateLayoutAndStyleForPainting(); |
| 620 | 620 |
| 621 IntRect paintingRect = enclosingIntRect(selection().bounds()); | 621 IntRect paintingRect = enclosingIntRect(selection().bounds()); |
| 622 | 622 |
| 623 ASSERT(document()->isActive()); | 623 ASSERT(document()->isActive()); |
| 624 float deviceScaleFactor = m_host->deviceScaleFactor(); | 624 float deviceScaleFactor = m_host->deviceScaleFactor(); |
| 625 paintingRect.setWidth(paintingRect.width() * deviceScaleFactor); | 625 paintingRect.setWidth(paintingRect.width() * deviceScaleFactor); |
| 626 paintingRect.setHeight(paintingRect.height() * deviceScaleFactor); | 626 paintingRect.setHeight(paintingRect.height() * deviceScaleFactor); |
| 627 | 627 |
| 628 OwnPtr<ImageBuffer> buffer = ImageBuffer::create(paintingRect.size()); | 628 OwnPtr<ImageBuffer> buffer = ImageBuffer::create(paintingRect.size()); |
| 629 if (!buffer) | 629 if (!buffer) |
| (...skipping 30 matching lines...) Expand all Loading... |
| 660 LocalFrame* LocalFrame::localFrameRoot() | 660 LocalFrame* LocalFrame::localFrameRoot() |
| 661 { | 661 { |
| 662 LocalFrame* curFrame = this; | 662 LocalFrame* curFrame = this; |
| 663 while (curFrame && curFrame->tree().parent() && curFrame->tree().parent()->i
sLocalFrame()) | 663 while (curFrame && curFrame->tree().parent() && curFrame->tree().parent()->i
sLocalFrame()) |
| 664 curFrame = toLocalFrame(curFrame->tree().parent()); | 664 curFrame = toLocalFrame(curFrame->tree().parent()); |
| 665 | 665 |
| 666 return curFrame; | 666 return curFrame; |
| 667 } | 667 } |
| 668 | 668 |
| 669 } // namespace blink | 669 } // namespace blink |
| OLD | NEW |