| 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 1700 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1711 return; | 1711 return; |
| 1712 | 1712 |
| 1713 TRACE_EVENT0("blink", "FrameView::updateCompositedSelectionIfNeeded"); | 1713 TRACE_EVENT0("blink", "FrameView::updateCompositedSelectionIfNeeded"); |
| 1714 | 1714 |
| 1715 Page* page = frame().page(); | 1715 Page* page = frame().page(); |
| 1716 ASSERT(page); | 1716 ASSERT(page); |
| 1717 | 1717 |
| 1718 CompositedSelection selection; | 1718 CompositedSelection selection; |
| 1719 LocalFrame* focusedFrame = page->focusController().focusedFrame(); | 1719 LocalFrame* focusedFrame = page->focusController().focusedFrame(); |
| 1720 LocalFrame* localFrame = (focusedFrame && (focusedFrame->localFrameRoot() ==
m_frame->localFrameRoot())) ? focusedFrame : nullptr; | 1720 LocalFrame* localFrame = (focusedFrame && (focusedFrame->localFrameRoot() ==
m_frame->localFrameRoot())) ? focusedFrame : nullptr; |
| 1721 if (!localFrame || !computeCompositedSelection(*localFrame, selection)) { | 1721 |
| 1722 page->chromeClient().clearCompositedSelection(); | 1722 if (localFrame && computeCompositedSelection(*localFrame, selection)) { |
| 1723 return; | 1723 page->chromeClient().updateCompositedSelection(localFrame, selection); |
| 1724 } else { |
| 1725 if (!localFrame) { |
| 1726 // Clearing the mainframe when there is no focused frame (and hence |
| 1727 // no localFrame) is legacy behaviour, and implemented here to |
| 1728 // satisfy ParameterizedWebFrameTest.CompositedSelectionBoundsCleare
d's |
| 1729 // first check that the composited selection has been cleared even |
| 1730 // though no frame has focus yet. If this is not desired, then the |
| 1731 // expectation needs to be removed from the test. |
| 1732 localFrame = m_frame->localFrameRoot(); |
| 1733 } |
| 1734 |
| 1735 if (localFrame) |
| 1736 page->chromeClient().clearCompositedSelection(localFrame); |
| 1724 } | 1737 } |
| 1725 | |
| 1726 page->chromeClient().updateCompositedSelection(selection); | |
| 1727 } | 1738 } |
| 1728 | 1739 |
| 1729 HostWindow* FrameView::getHostWindow() const | 1740 HostWindow* FrameView::getHostWindow() const |
| 1730 { | 1741 { |
| 1731 Page* page = frame().page(); | 1742 Page* page = frame().page(); |
| 1732 if (!page) | 1743 if (!page) |
| 1733 return nullptr; | 1744 return nullptr; |
| 1734 return &page->chromeClient(); | 1745 return &page->chromeClient(); |
| 1735 } | 1746 } |
| 1736 | 1747 |
| (...skipping 2511 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4248 } | 4259 } |
| 4249 | 4260 |
| 4250 bool FrameView::canThrottleRendering() const | 4261 bool FrameView::canThrottleRendering() const |
| 4251 { | 4262 { |
| 4252 if (!RuntimeEnabledFeatures::renderingPipelineThrottlingEnabled()) | 4263 if (!RuntimeEnabledFeatures::renderingPipelineThrottlingEnabled()) |
| 4253 return false; | 4264 return false; |
| 4254 return m_subtreeThrottled || (m_hiddenForThrottling && m_crossOriginForThrot
tling); | 4265 return m_subtreeThrottled || (m_hiddenForThrottling && m_crossOriginForThrot
tling); |
| 4255 } | 4266 } |
| 4256 | 4267 |
| 4257 } // namespace blink | 4268 } // namespace blink |
| OLD | NEW |