Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 1955 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1966 layoutViewItem.layer()->setNeedsCompositingInputsUpdate(); | 1966 layoutViewItem.layer()->setNeedsCompositingInputsUpdate(); |
| 1967 } | 1967 } |
| 1968 } | 1968 } |
| 1969 | 1969 |
| 1970 bool FrameView::computeCompositedSelection(LocalFrame& frame, | 1970 bool FrameView::computeCompositedSelection(LocalFrame& frame, |
| 1971 CompositedSelection& selection) { | 1971 CompositedSelection& selection) { |
| 1972 if (!frame.view() || frame.view()->shouldThrottleRendering()) | 1972 if (!frame.view() || frame.view()->shouldThrottleRendering()) |
| 1973 return false; | 1973 return false; |
| 1974 | 1974 |
| 1975 const VisibleSelection& visibleSelection = frame.selection().selection(); | 1975 const VisibleSelection& visibleSelection = frame.selection().selection(); |
| 1976 if (visibleSelection.isNone() || !frame.selection().isHandleVisible()) | 1976 if (visibleSelection.isNone()) |
|
rlanday
2017/01/31 19:50:22
I'm going to undo the changes to this file, I was
| |
| 1977 return false; | 1977 return false; |
| 1978 | 1978 |
| 1979 // Non-editable caret selections lack any kind of UI affordance, and | 1979 // Non-editable caret selections lack any kind of UI affordance, and |
| 1980 // needn't be tracked by the client. | 1980 // needn't be tracked by the client. |
| 1981 if (visibleSelection.isCaret() && !visibleSelection.isContentEditable()) | 1981 if (visibleSelection.isCaret() && !visibleSelection.isContentEditable()) |
| 1982 return false; | 1982 return false; |
| 1983 | 1983 |
| 1984 VisiblePosition visibleStart(visibleSelection.visibleStart()); | 1984 VisiblePosition visibleStart(visibleSelection.visibleStart()); |
| 1985 RenderedPosition renderedStart(visibleStart); | 1985 RenderedPosition renderedStart(visibleStart); |
| 1986 renderedStart.positionInGraphicsLayerBacking(selection.start, true); | 1986 renderedStart.positionInGraphicsLayerBacking(selection.start, true); |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2034 if (!localFrame) { | 2034 if (!localFrame) { |
| 2035 // Clearing the mainframe when there is no focused frame (and hence | 2035 // Clearing the mainframe when there is no focused frame (and hence |
| 2036 // no localFrame) is legacy behaviour, and implemented here to | 2036 // no localFrame) is legacy behaviour, and implemented here to |
| 2037 // satisfy ParameterizedWebFrameTest.CompositedSelectionBoundsCleared's | 2037 // satisfy ParameterizedWebFrameTest.CompositedSelectionBoundsCleared's |
| 2038 // first check that the composited selection has been cleared even | 2038 // first check that the composited selection has been cleared even |
| 2039 // though no frame has focus yet. If this is not desired, then the | 2039 // though no frame has focus yet. If this is not desired, then the |
| 2040 // expectation needs to be removed from the test. | 2040 // expectation needs to be removed from the test. |
| 2041 localFrame = m_frame->localFrameRoot(); | 2041 localFrame = m_frame->localFrameRoot(); |
| 2042 } | 2042 } |
| 2043 | 2043 |
| 2044 if (localFrame) | 2044 if (localFrame) { |
| 2045 page->chromeClient().clearCompositedSelection(localFrame); | 2045 page->chromeClient().clearCompositedSelection(localFrame); |
| 2046 } | |
| 2046 } | 2047 } |
| 2047 } | 2048 } |
| 2048 | 2049 |
| 2049 HostWindow* FrameView::getHostWindow() const { | 2050 HostWindow* FrameView::getHostWindow() const { |
| 2050 Page* page = frame().page(); | 2051 Page* page = frame().page(); |
| 2051 if (!page) | 2052 if (!page) |
| 2052 return nullptr; | 2053 return nullptr; |
| 2053 return &page->chromeClient(); | 2054 return &page->chromeClient(); |
| 2054 } | 2055 } |
| 2055 | 2056 |
| (...skipping 3028 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 5084 std::unique_ptr<CompositorAnimationTimeline> timeline) { | 5085 std::unique_ptr<CompositorAnimationTimeline> timeline) { |
| 5085 m_animationTimeline = std::move(timeline); | 5086 m_animationTimeline = std::move(timeline); |
| 5086 } | 5087 } |
| 5087 | 5088 |
| 5088 void FrameView::setAnimationHost( | 5089 void FrameView::setAnimationHost( |
| 5089 std::unique_ptr<CompositorAnimationHost> host) { | 5090 std::unique_ptr<CompositorAnimationHost> host) { |
| 5090 m_animationHost = std::move(host); | 5091 m_animationHost = std::move(host); |
| 5091 } | 5092 } |
| 5092 | 5093 |
| 5093 } // namespace blink | 5094 } // namespace blink |
| OLD | NEW |