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

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: fixing clear handles Created 4 years, 1 month 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 1720 matching lines...) Expand 10 before | Expand all | Expand 10 after
1731 layoutViewItem.layer()->setNeedsCompositingInputsUpdate(); 1731 layoutViewItem.layer()->setNeedsCompositingInputsUpdate();
1732 } 1732 }
1733 } 1733 }
1734 1734
1735 bool FrameView::computeCompositedSelection(LocalFrame& frame, 1735 bool FrameView::computeCompositedSelection(LocalFrame& frame,
1736 CompositedSelection& selection) { 1736 CompositedSelection& selection) {
1737 if (!frame.view() || frame.view()->shouldThrottleRendering()) 1737 if (!frame.view() || frame.view()->shouldThrottleRendering())
1738 return false; 1738 return false;
1739 1739
1740 const VisibleSelection& visibleSelection = frame.selection().selection(); 1740 const VisibleSelection& visibleSelection = frame.selection().selection();
1741 if (visibleSelection.isNone()) 1741 if (visibleSelection.isNone() || !frame.selection().isHandleVisible())
1742 return false; 1742 return false;
1743 1743
1744 // Non-editable caret selections lack any kind of UI affordance, and 1744 // Non-editable caret selections lack any kind of UI affordance, and
1745 // needn't be tracked by the client. 1745 // needn't be tracked by the client.
1746 if (visibleSelection.isCaret() && !visibleSelection.isContentEditable()) 1746 if (visibleSelection.isCaret() && !visibleSelection.isContentEditable())
1747 return false; 1747 return false;
1748 1748
1749 VisiblePosition visibleStart(visibleSelection.visibleStart()); 1749 VisiblePosition visibleStart(visibleSelection.visibleStart());
1750 RenderedPosition renderedStart(visibleStart); 1750 RenderedPosition renderedStart(visibleStart);
1751 renderedStart.positionInGraphicsLayerBacking(selection.start, true); 1751 renderedStart.positionInGraphicsLayerBacking(selection.start, true);
(...skipping 2755 matching lines...) Expand 10 before | Expand all | Expand 10 after
4507 DCHECK(m_frame->isMainFrame()); 4507 DCHECK(m_frame->isMainFrame());
4508 return m_initialViewportSize.width(); 4508 return m_initialViewportSize.width();
4509 } 4509 }
4510 4510
4511 int FrameView::initialViewportHeight() const { 4511 int FrameView::initialViewportHeight() const {
4512 DCHECK(m_frame->isMainFrame()); 4512 DCHECK(m_frame->isMainFrame());
4513 return m_initialViewportSize.height(); 4513 return m_initialViewportSize.height();
4514 } 4514 }
4515 4515
4516 } // namespace blink 4516 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698