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

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

Issue 2847663002: Don't show touch handles when selection hidden (Closed)
Patch Set: Incorporated hugoh's CL Created 3 years, 7 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
« no previous file with comments | « content/public/android/javatests/src/org/chromium/content/browser/input/ImeTest.java ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 2051 matching lines...) Expand 10 before | Expand all | Expand 10 after
2062 } 2062 }
2063 } 2063 }
2064 2064
2065 bool FrameView::ComputeCompositedSelection(LocalFrame& frame, 2065 bool FrameView::ComputeCompositedSelection(LocalFrame& frame,
2066 CompositedSelection& selection) { 2066 CompositedSelection& selection) {
2067 if (!frame.View() || frame.View()->ShouldThrottleRendering()) 2067 if (!frame.View() || frame.View()->ShouldThrottleRendering())
2068 return false; 2068 return false;
2069 2069
2070 const VisibleSelection& visible_selection = 2070 const VisibleSelection& visible_selection =
2071 frame.Selection().ComputeVisibleSelectionInDOMTree(); 2071 frame.Selection().ComputeVisibleSelectionInDOMTree();
2072 if (visible_selection.IsNone() || !frame.Selection().IsHandleVisible()) 2072 if (!frame.Selection().IsHandleVisible() || frame.Selection().IsHidden())
yosin_UTC9 2017/05/16 01:13:09 Thanks for changing order. |FS::IsHidden()| is not
2073 return false; 2073 return false;
2074 2074
2075 // Non-editable caret selections lack any kind of UI affordance, and 2075 // Non-editable caret selections lack any kind of UI affordance, and
2076 // needn't be tracked by the client. 2076 // needn't be tracked by the client.
2077 if (visible_selection.IsCaret() && !visible_selection.IsContentEditable()) 2077 if (visible_selection.IsCaret() && !visible_selection.IsContentEditable())
2078 return false; 2078 return false;
2079 2079
2080 VisiblePosition visible_start(visible_selection.VisibleStart()); 2080 VisiblePosition visible_start(visible_selection.VisibleStart());
2081 RenderedPosition rendered_start(visible_start); 2081 RenderedPosition rendered_start(visible_start);
2082 rendered_start.PositionInGraphicsLayerBacking(selection.start, true); 2082 rendered_start.PositionInGraphicsLayerBacking(selection.start, true);
(...skipping 3316 matching lines...) Expand 10 before | Expand all | Expand 10 after
5399 void FrameView::SetAnimationHost( 5399 void FrameView::SetAnimationHost(
5400 std::unique_ptr<CompositorAnimationHost> host) { 5400 std::unique_ptr<CompositorAnimationHost> host) {
5401 animation_host_ = std::move(host); 5401 animation_host_ = std::move(host);
5402 } 5402 }
5403 5403
5404 LayoutUnit FrameView::CaretWidth() const { 5404 LayoutUnit FrameView::CaretWidth() const {
5405 return LayoutUnit(GetChromeClient()->WindowToViewportScalar(1)); 5405 return LayoutUnit(GetChromeClient()->WindowToViewportScalar(1));
5406 } 5406 }
5407 5407
5408 } // namespace blink 5408 } // namespace blink
OLDNEW
« no previous file with comments | « content/public/android/javatests/src/org/chromium/content/browser/input/ImeTest.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698