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

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

Issue 2750463005: Remove top controls clipping adjustment for document.rootScroller (Closed)
Patch Set: Fix for root layer scrolling tests Created 3 years, 9 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 | « no previous file | third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp » ('j') | 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 1610 matching lines...) Expand 10 before | Expand all | Expand 10 after
1621 if (ScrollingCoordinator* scrollingCoordinator = 1621 if (ScrollingCoordinator* scrollingCoordinator =
1622 this->scrollingCoordinator()) 1622 this->scrollingCoordinator())
1623 scrollingCoordinator->frameViewFixedObjectsDidChange(this); 1623 scrollingCoordinator->frameViewFixedObjectsDidChange(this);
1624 } 1624 }
1625 } 1625 }
1626 1626
1627 void FrameView::viewportSizeChanged(bool widthChanged, bool heightChanged) { 1627 void FrameView::viewportSizeChanged(bool widthChanged, bool heightChanged) {
1628 DCHECK(widthChanged || heightChanged); 1628 DCHECK(widthChanged || heightChanged);
1629 DCHECK(m_frame->page()); 1629 DCHECK(m_frame->page());
1630 1630
1631 bool rootLayerScrollingEnabled =
1632 RuntimeEnabledFeatures::rootLayerScrollingEnabled();
1633
1631 if (LayoutViewItem layoutView = this->layoutViewItem()) { 1634 if (LayoutViewItem layoutView = this->layoutViewItem()) {
1632 if (layoutView.usesCompositing()) 1635 if (layoutView.usesCompositing()) {
1633 layoutView.compositor()->frameViewDidChangeSize(); 1636 if (rootLayerScrollingEnabled)
1637 layoutView.layer()->setNeedsCompositingInputsUpdate();
chrishtr 2017/03/16 18:46:57 This is new since last time you landed - a new dep
bokan 2017/03/16 18:59:48 So I'm hitting a DCHECK in RLS tests without this:
Xianzhu 2017/03/16 19:16:54 I'm trying to understand the error, and have some
bokan 2017/03/16 20:11:09 It shouldn't affect a regular LayoutBlockFlow at a
Xianzhu 2017/03/21 16:59:56 Did these tests all fail with error messages simil
Xianzhu 2017/03/21 17:26:41 I just tried the patch and found that all the fail
bokan 2017/03/23 15:09:57 Yeah, sorry, I think I may have pasted that DCHECK
Xianzhu 2017/03/23 15:39:16 It's better to be guarded to be consistent with ot
bokan 2017/03/23 16:01:03 Done.
1638 else
1639 layoutView.compositor()->frameViewDidChangeSize();
1640 }
1634 } 1641 }
1635 1642
1636 // Ensure the root scroller compositing layers update geometry in response to
1637 // the URL bar resizing.
1638 if (m_frame->isMainFrame())
1639 m_frame->page()->globalRootScrollerController().mainFrameViewResized();
1640
1641 showOverlayScrollbars(); 1643 showOverlayScrollbars();
1642 1644
1643 bool rootLayerScrollingEnabled =
1644 RuntimeEnabledFeatures::rootLayerScrollingEnabled();
1645 if (rootLayerScrollingEnabled) { 1645 if (rootLayerScrollingEnabled) {
1646 // The background must be repainted when the FrameView is resized, even if 1646 // The background must be repainted when the FrameView is resized, even if
1647 // the initial containing block does not change (so we can't rely on layout 1647 // the initial containing block does not change (so we can't rely on layout
1648 // to issue the invalidation). This is because the background fills the 1648 // to issue the invalidation). This is because the background fills the
1649 // main GraphicsLayer, which takes the size of the layout viewport. 1649 // main GraphicsLayer, which takes the size of the layout viewport.
1650 // TODO(skobes): Paint non-fixed backgrounds into the scrolling contents 1650 // TODO(skobes): Paint non-fixed backgrounds into the scrolling contents
1651 // layer and avoid this invalidation (http://crbug.com/568847). 1651 // layer and avoid this invalidation (http://crbug.com/568847).
1652 LayoutViewItem lvi = layoutViewItem(); 1652 LayoutViewItem lvi = layoutViewItem();
1653 if (!lvi.isNull()) 1653 if (!lvi.isNull())
1654 lvi.setShouldDoFullPaintInvalidation(); 1654 lvi.setShouldDoFullPaintInvalidation();
(...skipping 3607 matching lines...) Expand 10 before | Expand all | Expand 10 after
5262 void FrameView::setAnimationHost( 5262 void FrameView::setAnimationHost(
5263 std::unique_ptr<CompositorAnimationHost> host) { 5263 std::unique_ptr<CompositorAnimationHost> host) {
5264 m_animationHost = std::move(host); 5264 m_animationHost = std::move(host);
5265 } 5265 }
5266 5266
5267 LayoutUnit FrameView::caretWidth() const { 5267 LayoutUnit FrameView::caretWidth() const {
5268 return LayoutUnit(getHostWindow()->windowToViewportScalar(1)); 5268 return LayoutUnit(getHostWindow()->windowToViewportScalar(1));
5269 } 5269 }
5270 5270
5271 } // namespace blink 5271 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698