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

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

Issue 2201853002: Blink handle selection handle visibility (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixed contextual search test function Created 4 years, 2 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 Dirk Mueller <mueller@kde.org> 5 * 2000 Dirk Mueller <mueller@kde.org>
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
7 * (C) 2006 Graham Dennis (graham.dennis@gmail.com) 7 * (C) 2006 Graham Dennis (graham.dennis@gmail.com)
8 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) 8 * (C) 2006 Alexey Proskuryakov (ap@nypop.com)
9 * Copyright (C) 2009 Google Inc. All rights reserved. 9 * Copyright (C) 2009 Google Inc. All rights reserved.
10 * 10 *
(...skipping 1718 matching lines...) Expand 10 before | Expand all | Expand 10 after
1729 layoutViewItem.layer()->setNeedsCompositingInputsUpdate(); 1729 layoutViewItem.layer()->setNeedsCompositingInputsUpdate();
1730 } 1730 }
1731 } 1731 }
1732 1732
1733 bool FrameView::computeCompositedSelection(LocalFrame& frame, 1733 bool FrameView::computeCompositedSelection(LocalFrame& frame,
1734 CompositedSelection& selection) { 1734 CompositedSelection& selection) {
1735 if (!frame.view() || frame.view()->shouldThrottleRendering()) 1735 if (!frame.view() || frame.view()->shouldThrottleRendering())
1736 return false; 1736 return false;
1737 1737
1738 const VisibleSelection& visibleSelection = frame.selection().selection(); 1738 const VisibleSelection& visibleSelection = frame.selection().selection();
1739 if (visibleSelection.isNone()) 1739 if (visibleSelection.isNone() || !frame.selection().isHandleVisible())
1740 return false; 1740 return false;
1741 1741
1742 // Non-editable caret selections lack any kind of UI affordance, and 1742 // Non-editable caret selections lack any kind of UI affordance, and
1743 // needn't be tracked by the client. 1743 // needn't be tracked by the client.
1744 if (visibleSelection.isCaret() && !visibleSelection.isContentEditable()) 1744 if (visibleSelection.isCaret() && !visibleSelection.isContentEditable())
1745 return false; 1745 return false;
1746 1746
1747 VisiblePosition visibleStart(visibleSelection.visibleStart()); 1747 VisiblePosition visibleStart(visibleSelection.visibleStart());
1748 RenderedPosition renderedStart(visibleStart); 1748 RenderedPosition renderedStart(visibleStart);
1749 renderedStart.positionInGraphicsLayerBacking(selection.start, true); 1749 renderedStart.positionInGraphicsLayerBacking(selection.start, true);
(...skipping 2723 matching lines...) Expand 10 before | Expand all | Expand 10 after
4473 } 4473 }
4474 4474
4475 bool FrameView::canThrottleRendering() const { 4475 bool FrameView::canThrottleRendering() const {
4476 if (!RuntimeEnabledFeatures::renderingPipelineThrottlingEnabled()) 4476 if (!RuntimeEnabledFeatures::renderingPipelineThrottlingEnabled())
4477 return false; 4477 return false;
4478 return m_subtreeThrottled || 4478 return m_subtreeThrottled ||
4479 (m_hiddenForThrottling && m_crossOriginForThrottling); 4479 (m_hiddenForThrottling && m_crossOriginForThrottling);
4480 } 4480 }
4481 4481
4482 } // namespace blink 4482 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698