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

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

Issue 2685883004: Explicitly invalidate LayoutView when overflow is recalculated. (Closed)
Patch Set: Conditionally invalidate based on visualViewportSuppliesScrollbars 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
« no previous file with comments | « no previous file | no next file » | 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 812 matching lines...) Expand 10 before | Expand all | Expand 10 after
823 scrollingCoordinator->notifyOverflowUpdated(); 823 scrollingCoordinator->notifyOverflowUpdated();
824 824
825 IntRect documentRect = layoutViewItem.documentRect(); 825 IntRect documentRect = layoutViewItem.documentRect();
826 if (scrollOrigin() == -documentRect.location() && 826 if (scrollOrigin() == -documentRect.location() &&
827 contentsSize() == documentRect.size()) 827 contentsSize() == documentRect.size())
828 return; 828 return;
829 829
830 if (needsLayout()) 830 if (needsLayout())
831 return; 831 return;
832 832
833 // If the visualViewport supplies scrollbars, we won't get a paint
834 // invalidation from computeScrollbarExistence so we need to force one
835 // TODO(bokan): We should avoid computeScrollbarExistence otherwise.
836 if (visualViewportSuppliesScrollbars())
837 layoutViewItem.setMayNeedPaintInvalidation();
838
833 // TODO(pdr): This should be refactored to just block scrollbar updates as 839 // TODO(pdr): This should be refactored to just block scrollbar updates as
834 // we are not in a scrollbar update here and m_inUpdateScrollbars has other 840 // we are not in a scrollbar update here and m_inUpdateScrollbars has other
835 // side effects. This scope is only for preventing a synchronous layout from 841 // side effects. This scope is only for preventing a synchronous layout from
836 // scroll origin changes which would not be allowed during style recalc. 842 // scroll origin changes which would not be allowed during style recalc.
837 InUpdateScrollbarsScope inUpdateScrollbarsScope(this); 843 InUpdateScrollbarsScope inUpdateScrollbarsScope(this);
838 844
839 bool shouldHaveHorizontalScrollbar = false; 845 bool shouldHaveHorizontalScrollbar = false;
840 bool shouldHaveVerticalScrollbar = false; 846 bool shouldHaveVerticalScrollbar = false;
841 computeScrollbarExistence(shouldHaveHorizontalScrollbar, 847 computeScrollbarExistence(shouldHaveHorizontalScrollbar,
842 shouldHaveVerticalScrollbar, documentRect.size()); 848 shouldHaveVerticalScrollbar, documentRect.size());
(...skipping 4342 matching lines...) Expand 10 before | Expand all | Expand 10 after
5185 void FrameView::setAnimationHost( 5191 void FrameView::setAnimationHost(
5186 std::unique_ptr<CompositorAnimationHost> host) { 5192 std::unique_ptr<CompositorAnimationHost> host) {
5187 m_animationHost = std::move(host); 5193 m_animationHost = std::move(host);
5188 } 5194 }
5189 5195
5190 LayoutUnit FrameView::caretWidth() const { 5196 LayoutUnit FrameView::caretWidth() const {
5191 return LayoutUnit(getHostWindow()->windowToViewportScalar(1)); 5197 return LayoutUnit(getHostWindow()->windowToViewportScalar(1));
5192 } 5198 }
5193 5199
5194 } // namespace blink 5200 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698