| 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 1609 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1620 if (ScrollingCoordinator* scrollingCoordinator = | 1620 if (ScrollingCoordinator* scrollingCoordinator = |
| 1621 this->scrollingCoordinator()) | 1621 this->scrollingCoordinator()) |
| 1622 scrollingCoordinator->frameViewFixedObjectsDidChange(this); | 1622 scrollingCoordinator->frameViewFixedObjectsDidChange(this); |
| 1623 } | 1623 } |
| 1624 } | 1624 } |
| 1625 | 1625 |
| 1626 void FrameView::viewportSizeChanged(bool widthChanged, bool heightChanged) { | 1626 void FrameView::viewportSizeChanged(bool widthChanged, bool heightChanged) { |
| 1627 DCHECK(widthChanged || heightChanged); | 1627 DCHECK(widthChanged || heightChanged); |
| 1628 DCHECK(m_frame->page()); | 1628 DCHECK(m_frame->page()); |
| 1629 | 1629 |
| 1630 bool rootLayerScrollingEnabled = |
| 1631 RuntimeEnabledFeatures::rootLayerScrollingEnabled(); |
| 1632 |
| 1630 if (LayoutViewItem layoutView = this->layoutViewItem()) { | 1633 if (LayoutViewItem layoutView = this->layoutViewItem()) { |
| 1631 if (layoutView.usesCompositing()) | 1634 if (layoutView.usesCompositing()) { |
| 1632 layoutView.compositor()->frameViewDidChangeSize(); | 1635 if (rootLayerScrollingEnabled) { |
| 1636 layoutView.layer()->setNeedsCompositingInputsUpdate(); |
| 1637 if (RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled()) |
| 1638 setNeedsPaintPropertyUpdate(); |
| 1639 } else { |
| 1640 layoutView.compositor()->frameViewDidChangeSize(); |
| 1641 } |
| 1642 } |
| 1633 } | 1643 } |
| 1634 | 1644 |
| 1635 // Ensure the root scroller compositing layers update geometry in response to | |
| 1636 // the URL bar resizing. | |
| 1637 if (m_frame->isMainFrame()) | |
| 1638 m_frame->page()->globalRootScrollerController().mainFrameViewResized(); | |
| 1639 | |
| 1640 showOverlayScrollbars(); | 1645 showOverlayScrollbars(); |
| 1641 | 1646 |
| 1642 bool rootLayerScrollingEnabled = | |
| 1643 RuntimeEnabledFeatures::rootLayerScrollingEnabled(); | |
| 1644 if (rootLayerScrollingEnabled) { | 1647 if (rootLayerScrollingEnabled) { |
| 1645 // The background must be repainted when the FrameView is resized, even if | 1648 // The background must be repainted when the FrameView is resized, even if |
| 1646 // the initial containing block does not change (so we can't rely on layout | 1649 // the initial containing block does not change (so we can't rely on layout |
| 1647 // to issue the invalidation). This is because the background fills the | 1650 // to issue the invalidation). This is because the background fills the |
| 1648 // main GraphicsLayer, which takes the size of the layout viewport. | 1651 // main GraphicsLayer, which takes the size of the layout viewport. |
| 1649 // TODO(skobes): Paint non-fixed backgrounds into the scrolling contents | 1652 // TODO(skobes): Paint non-fixed backgrounds into the scrolling contents |
| 1650 // layer and avoid this invalidation (http://crbug.com/568847). | 1653 // layer and avoid this invalidation (http://crbug.com/568847). |
| 1651 LayoutViewItem lvi = layoutViewItem(); | 1654 LayoutViewItem lvi = layoutViewItem(); |
| 1652 if (!lvi.isNull()) | 1655 if (!lvi.isNull()) |
| 1653 lvi.setShouldDoFullPaintInvalidation(); | 1656 lvi.setShouldDoFullPaintInvalidation(); |
| (...skipping 3603 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5257 void FrameView::setAnimationHost( | 5260 void FrameView::setAnimationHost( |
| 5258 std::unique_ptr<CompositorAnimationHost> host) { | 5261 std::unique_ptr<CompositorAnimationHost> host) { |
| 5259 m_animationHost = std::move(host); | 5262 m_animationHost = std::move(host); |
| 5260 } | 5263 } |
| 5261 | 5264 |
| 5262 LayoutUnit FrameView::caretWidth() const { | 5265 LayoutUnit FrameView::caretWidth() const { |
| 5263 return LayoutUnit(getHostWindow()->windowToViewportScalar(1)); | 5266 return LayoutUnit(getHostWindow()->windowToViewportScalar(1)); |
| 5264 } | 5267 } |
| 5265 | 5268 |
| 5266 } // namespace blink | 5269 } // namespace blink |
| OLD | NEW |