Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(204)

Side by Side Diff: third_party/WebKit/Source/core/frame/LocalFrame.cpp

Issue 2708703003: Expand FrameSeleciton::isRange() to increase chances of hoisting update layout (Closed)
Patch Set: 2017-02-21T23:48:22 rebase Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 8 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All
9 * rights reserved. 9 * rights reserved.
10 * Copyright (C) 2005 Alexey Proskuryakov <ap@nypop.com> 10 * Copyright (C) 2005 Alexey Proskuryakov <ap@nypop.com>
(...skipping 707 matching lines...) Expand 10 before | Expand all | Expand 10 after
718 ratio *= pageZoomFactor(); 718 ratio *= pageZoomFactor();
719 return ratio; 719 return ratio;
720 } 720 }
721 721
722 std::unique_ptr<DragImage> LocalFrame::nodeImage(Node& node) { 722 std::unique_ptr<DragImage> LocalFrame::nodeImage(Node& node) {
723 DraggedNodeImageBuilder imageNode(*this, node); 723 DraggedNodeImageBuilder imageNode(*this, node);
724 return imageNode.createImage(); 724 return imageNode.createImage();
725 } 725 }
726 726
727 std::unique_ptr<DragImage> LocalFrame::dragImageForSelection(float opacity) { 727 std::unique_ptr<DragImage> LocalFrame::dragImageForSelection(float opacity) {
728 if (!selection().isRange()) 728 if (!selection().computeVisibleSelectionInDOMTreeDeprecated().isRange())
729 return nullptr; 729 return nullptr;
730 730
731 m_view->updateAllLifecyclePhasesExceptPaint(); 731 m_view->updateAllLifecyclePhasesExceptPaint();
732 ASSERT(document()->isActive()); 732 ASSERT(document()->isActive());
733 733
734 FloatRect paintingRect = FloatRect(selection().bounds()); 734 FloatRect paintingRect = FloatRect(selection().bounds());
735 DragImageBuilder dragImageBuilder(*this, paintingRect); 735 DragImageBuilder dragImageBuilder(*this, paintingRect);
736 GlobalPaintFlags paintFlags = 736 GlobalPaintFlags paintFlags =
737 GlobalPaintSelectionOnly | GlobalPaintFlattenCompositingLayers; 737 GlobalPaintSelectionOnly | GlobalPaintFlattenCompositingLayers;
738 m_view->paintContents(dragImageBuilder.context(), paintFlags, 738 m_view->paintContents(dragImageBuilder.context(), paintFlags,
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
917 if (m_frame && m_frame->client() && m_frame->client()->frameBlameContext()) 917 if (m_frame && m_frame->client() && m_frame->client()->frameBlameContext())
918 m_frame->client()->frameBlameContext()->Enter(); 918 m_frame->client()->frameBlameContext()->Enter();
919 } 919 }
920 920
921 ScopedFrameBlamer::~ScopedFrameBlamer() { 921 ScopedFrameBlamer::~ScopedFrameBlamer() {
922 if (m_frame && m_frame->client() && m_frame->client()->frameBlameContext()) 922 if (m_frame && m_frame->client() && m_frame->client()->frameBlameContext())
923 m_frame->client()->frameBlameContext()->Leave(); 923 m_frame->client()->frameBlameContext()->Leave();
924 } 924 }
925 925
926 } // namespace blink 926 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698