| 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 600 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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; |
| 620 | 620 |
| 621 // Paint starting at the nearest self painting layer, clipped to the object
itself. | 621 // Paint starting at the nearest stacking context, clipped to the object its
elf. |
| 622 // TODO(pdr): This will also paint the content behind the object if the obje
ct contains | 622 // This will also paint the contents behind the object if the object contain
s transparency |
| 623 // transparency but the layer is opaque. We could directly call layoutObject
->paint(...) | 623 // and there are other elements in the same stacking context which stacked b
elow. |
| 624 // (see ObjectPainter::paintAllPhasesAtomically) but this would skip self-pa
inting children. | 624 PaintLayer* layer = layoutObject->enclosingLayer(); |
| 625 PaintLayer* layer = layoutObject->enclosingLayer()->enclosingSelfPaintingLay
er(); | 625 if (!layer->stackingNode()->isStackingContext()) |
| 626 layer = layer->stackingNode()->ancestorStackingContextNode()->layer(); |
| 626 IntRect absoluteBoundingBox = layoutObject->absoluteBoundingBoxRectIncluding
Descendants(); | 627 IntRect absoluteBoundingBox = layoutObject->absoluteBoundingBoxRectIncluding
Descendants(); |
| 627 FloatRect boundingBox = layer->layoutObject()->absoluteToLocalQuad(FloatQuad
(absoluteBoundingBox), UseTransforms).boundingBox(); | 628 FloatRect boundingBox = layer->layoutObject()->absoluteToLocalQuad(FloatQuad
(absoluteBoundingBox), UseTransforms).boundingBox(); |
| 628 DragImageBuilder dragImageBuilder(this, boundingBox, &node); | 629 DragImageBuilder dragImageBuilder(this, boundingBox, &node); |
| 629 { | 630 { |
| 630 PaintLayerPaintingInfo paintingInfo(layer, LayoutRect(boundingBox), Glob
alPaintFlattenCompositingLayers, LayoutSize(), 0); | 631 PaintLayerPaintingInfo paintingInfo(layer, LayoutRect(boundingBox), Glob
alPaintFlattenCompositingLayers, LayoutSize()); |
| 631 PaintLayerFlags flags = PaintLayerHaveTransparency | PaintLayerAppliedTr
ansform | PaintLayerUncachedClipRects; | 632 PaintLayerFlags flags = PaintLayerHaveTransparency | PaintLayerAppliedTr
ansform | PaintLayerUncachedClipRects; |
| 632 PaintLayerPainter(*layer).paintLayer(dragImageBuilder.context(), paintin
gInfo, flags); | 633 PaintLayerPainter(*layer).paintLayer(dragImageBuilder.context(), paintin
gInfo, flags); |
| 633 } | 634 } |
| 634 return dragImageBuilder.createImage(); | 635 return dragImageBuilder.createImage(); |
| 635 } | 636 } |
| 636 | 637 |
| 637 PassOwnPtr<DragImage> LocalFrame::dragImageForSelection(float opacity) | 638 PassOwnPtr<DragImage> LocalFrame::dragImageForSelection(float opacity) |
| 638 { | 639 { |
| 639 if (!selection().isRange()) | 640 if (!selection().isRange()) |
| 640 return nullptr; | 641 return nullptr; |
| (...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 820 { | 821 { |
| 821 m_frame->disableNavigation(); | 822 m_frame->disableNavigation(); |
| 822 } | 823 } |
| 823 | 824 |
| 824 FrameNavigationDisabler::~FrameNavigationDisabler() | 825 FrameNavigationDisabler::~FrameNavigationDisabler() |
| 825 { | 826 { |
| 826 m_frame->enableNavigation(); | 827 m_frame->enableNavigation(); |
| 827 } | 828 } |
| 828 | 829 |
| 829 } // namespace blink | 830 } // namespace blink |
| OLD | NEW |