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

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

Issue 2680943004: Make FrameSelection to hold non-canonicalized positions (Closed)
Patch Set: 2014-02-14T23:34:22 Update TestExpectation to include extend-{0,2,4}0.html and selectAllChildren.html 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 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 1961 matching lines...) Expand 10 before | Expand all | Expand 10 after
1972 if (!layoutViewItem.isNull()) 1972 if (!layoutViewItem.isNull())
1973 layoutViewItem.layer()->setNeedsCompositingInputsUpdate(); 1973 layoutViewItem.layer()->setNeedsCompositingInputsUpdate();
1974 } 1974 }
1975 } 1975 }
1976 1976
1977 bool FrameView::computeCompositedSelection(LocalFrame& frame, 1977 bool FrameView::computeCompositedSelection(LocalFrame& frame,
1978 CompositedSelection& selection) { 1978 CompositedSelection& selection) {
1979 if (!frame.view() || frame.view()->shouldThrottleRendering()) 1979 if (!frame.view() || frame.view()->shouldThrottleRendering())
1980 return false; 1980 return false;
1981 1981
1982 const VisibleSelection& visibleSelection = frame.selection().selection(); 1982 const VisibleSelection& visibleSelection =
1983 frame.selection().computeVisibleSelectionInDOMTree();
1983 if (visibleSelection.isNone() || !frame.selection().isHandleVisible()) 1984 if (visibleSelection.isNone() || !frame.selection().isHandleVisible())
1984 return false; 1985 return false;
1985 1986
1986 // Non-editable caret selections lack any kind of UI affordance, and 1987 // Non-editable caret selections lack any kind of UI affordance, and
1987 // needn't be tracked by the client. 1988 // needn't be tracked by the client.
1988 if (visibleSelection.isCaret() && !visibleSelection.isContentEditable()) 1989 if (visibleSelection.isCaret() && !visibleSelection.isContentEditable())
1989 return false; 1990 return false;
1990 1991
1991 VisiblePosition visibleStart(visibleSelection.visibleStart()); 1992 VisiblePosition visibleStart(visibleSelection.visibleStart());
1992 RenderedPosition renderedStart(visibleStart); 1993 RenderedPosition renderedStart(visibleStart);
(...skipping 3179 matching lines...) Expand 10 before | Expand all | Expand 10 after
5172 void FrameView::setAnimationHost( 5173 void FrameView::setAnimationHost(
5173 std::unique_ptr<CompositorAnimationHost> host) { 5174 std::unique_ptr<CompositorAnimationHost> host) {
5174 m_animationHost = std::move(host); 5175 m_animationHost = std::move(host);
5175 } 5176 }
5176 5177
5177 LayoutUnit FrameView::caretWidth() const { 5178 LayoutUnit FrameView::caretWidth() const {
5178 return LayoutUnit(getHostWindow()->windowToViewportScalar(1)); 5179 return LayoutUnit(getHostWindow()->windowToViewportScalar(1));
5179 } 5180 }
5180 5181
5181 } // namespace blink 5182 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/editing/VisibleSelection.cpp ('k') | third_party/WebKit/Source/core/page/FocusController.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698