| 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 608 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 619 return DragImage::create(image.get(), shouldRespectImageOrientation, deviceS
caleFactor); | 619 return DragImage::create(image.get(), shouldRespectImageOrientation, deviceS
caleFactor); |
| 620 } | 620 } |
| 621 | 621 |
| 622 PassOwnPtr<DragImage> LocalFrame::nodeImage(Node& node) | 622 PassOwnPtr<DragImage> LocalFrame::nodeImage(Node& node) |
| 623 { | 623 { |
| 624 if (!node.layoutObject()) | 624 if (!node.layoutObject()) |
| 625 return nullptr; | 625 return nullptr; |
| 626 | 626 |
| 627 const ScopedFramePaintingState state(this, &node); | 627 const ScopedFramePaintingState state(this, &node); |
| 628 | 628 |
| 629 m_view->updateLayoutAndStyleForPainting(); | 629 m_view->updateAllLifecyclePhases(); |
| 630 | 630 |
| 631 m_view->setPaintBehavior(state.paintBehavior | PaintBehaviorFlattenCompositi
ngLayers); | 631 m_view->setPaintBehavior(state.paintBehavior | PaintBehaviorFlattenCompositi
ngLayers); |
| 632 | 632 |
| 633 m_view->setNodeToDraw(&node); // Enable special sub-tree drawing mode. | 633 m_view->setNodeToDraw(&node); // Enable special sub-tree drawing mode. |
| 634 | 634 |
| 635 // Document::updateLayout may have blown away the original LayoutObject. | 635 // Document::updateLayout may have blown away the original LayoutObject. |
| 636 LayoutObject* layoutObject = node.layoutObject(); | 636 LayoutObject* layoutObject = node.layoutObject(); |
| 637 if (!layoutObject) | 637 if (!layoutObject) |
| 638 return nullptr; | 638 return nullptr; |
| 639 | 639 |
| 640 IntRect rect; | 640 IntRect rect; |
| 641 | 641 |
| 642 return paintIntoDragImage(*layoutObject, DisplayItem::ClipNodeImage, layoutO
bject->shouldRespectImageOrientation(), | 642 return paintIntoDragImage(*layoutObject, DisplayItem::ClipNodeImage, layoutO
bject->shouldRespectImageOrientation(), |
| 643 layoutObject->paintingRootRect(rect)); | 643 layoutObject->paintingRootRect(rect)); |
| 644 } | 644 } |
| 645 | 645 |
| 646 PassOwnPtr<DragImage> LocalFrame::dragImageForSelection() | 646 PassOwnPtr<DragImage> LocalFrame::dragImageForSelection() |
| 647 { | 647 { |
| 648 if (!selection().isRange()) | 648 if (!selection().isRange()) |
| 649 return nullptr; | 649 return nullptr; |
| 650 | 650 |
| 651 const ScopedFramePaintingState state(this, 0); | 651 const ScopedFramePaintingState state(this, 0); |
| 652 m_view->setPaintBehavior(PaintBehaviorSelectionOnly | PaintBehaviorFlattenCo
mpositingLayers); | 652 m_view->setPaintBehavior(PaintBehaviorSelectionOnly | PaintBehaviorFlattenCo
mpositingLayers); |
| 653 m_view->updateLayoutAndStyleForPainting(); | 653 m_view->updateAllLifecyclePhases(); |
| 654 | 654 |
| 655 return paintIntoDragImage(*this, DisplayItem::ClipSelectionImage, DoNotRespe
ctImageOrientation, enclosingIntRect(selection().bounds())); | 655 return paintIntoDragImage(*this, DisplayItem::ClipSelectionImage, DoNotRespe
ctImageOrientation, enclosingIntRect(selection().bounds())); |
| 656 } | 656 } |
| 657 | 657 |
| 658 String LocalFrame::selectedText() const | 658 String LocalFrame::selectedText() const |
| 659 { | 659 { |
| 660 return selection().selectedText(); | 660 return selection().selectedText(); |
| 661 } | 661 } |
| 662 | 662 |
| 663 String LocalFrame::selectedTextForClipboard() const | 663 String LocalFrame::selectedTextForClipboard() const |
| (...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 844 { | 844 { |
| 845 if (isLocalRoot()) | 845 if (isLocalRoot()) |
| 846 m_instrumentingAgents = InstrumentingAgents::create(); | 846 m_instrumentingAgents = InstrumentingAgents::create(); |
| 847 else | 847 else |
| 848 m_instrumentingAgents = localFrameRoot()->m_instrumentingAgents; | 848 m_instrumentingAgents = localFrameRoot()->m_instrumentingAgents; |
| 849 } | 849 } |
| 850 | 850 |
| 851 DEFINE_INSPECTOR_IDENTIFIERS(LocalFrame); | 851 DEFINE_INSPECTOR_IDENTIFIERS(LocalFrame); |
| 852 | 852 |
| 853 } // namespace blink | 853 } // namespace blink |
| OLD | NEW |