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

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

Issue 2495893002: Implement incremental paint property tree rebuilding (Closed)
Patch Set: Suppress main thread scrolling invalidation failures Created 4 years, 1 month 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
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 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 m_horizontalScrollbarMode(ScrollbarAuto), 175 m_horizontalScrollbarMode(ScrollbarAuto),
176 m_verticalScrollbarMode(ScrollbarAuto), 176 m_verticalScrollbarMode(ScrollbarAuto),
177 m_horizontalScrollbarLock(false), 177 m_horizontalScrollbarLock(false),
178 m_verticalScrollbarLock(false), 178 m_verticalScrollbarLock(false),
179 m_scrollbarsSuppressed(false), 179 m_scrollbarsSuppressed(false),
180 m_inUpdateScrollbars(false), 180 m_inUpdateScrollbars(false),
181 m_frameTimingRequestsDirty(true), 181 m_frameTimingRequestsDirty(true),
182 m_hiddenForThrottling(false), 182 m_hiddenForThrottling(false),
183 m_subtreeThrottled(false), 183 m_subtreeThrottled(false),
184 m_lifecycleUpdatesThrottled(false), 184 m_lifecycleUpdatesThrottled(false),
185 m_needsPaintPropertyUpdate(true),
185 m_currentUpdateLifecyclePhasesTargetState( 186 m_currentUpdateLifecyclePhasesTargetState(
186 DocumentLifecycle::Uninitialized), 187 DocumentLifecycle::Uninitialized),
187 m_scrollAnchor(this), 188 m_scrollAnchor(this),
188 m_scrollbarManager(*this), 189 m_scrollbarManager(*this),
189 m_needsScrollbarsUpdate(false), 190 m_needsScrollbarsUpdate(false),
190 m_suppressAdjustViewSize(false), 191 m_suppressAdjustViewSize(false),
191 m_allowsLayoutInvalidationAfterLayoutClean(true) { 192 m_allowsLayoutInvalidationAfterLayoutClean(true) {
192 ASSERT(m_frame); 193 ASSERT(m_frame);
193 init(); 194 init();
194 } 195 }
(...skipping 444 matching lines...) Expand 10 before | Expand all | Expand 10 after
639 ScrollableArea::contentsResized(); 640 ScrollableArea::contentsResized();
640 641
641 Page* page = frame().page(); 642 Page* page = frame().page();
642 if (!page) 643 if (!page)
643 return; 644 return;
644 645
645 updateParentScrollableAreaSet(); 646 updateParentScrollableAreaSet();
646 647
647 page->chromeClient().contentsSizeChanged(m_frame.get(), size); 648 page->chromeClient().contentsSizeChanged(m_frame.get(), size);
648 frame().loader().restoreScrollPositionAndViewState(); 649 frame().loader().restoreScrollPositionAndViewState();
650
651 if (!RuntimeEnabledFeatures::rootLayerScrollingEnabled()) {
652 // The presence of overflow depends on the contents size. The scroll
653 // properties can change depending on whether overflow scrolling occurs.
654 setNeedsPaintPropertyUpdate();
655 }
649 } 656 }
650 657
651 void FrameView::adjustViewSize() { 658 void FrameView::adjustViewSize() {
652 if (m_suppressAdjustViewSize) 659 if (m_suppressAdjustViewSize)
653 return; 660 return;
654 661
655 LayoutViewItem layoutViewItem = this->layoutViewItem(); 662 LayoutViewItem layoutViewItem = this->layoutViewItem();
656 if (layoutViewItem.isNull()) 663 if (layoutViewItem.isNull())
657 return; 664 return;
658 665
(...skipping 3040 matching lines...) Expand 10 before | Expand all | Expand 10 after
3699 } 3706 }
3700 3707
3701 if (scrollType != AnchoringScroll && scrollType != ClampingScroll) 3708 if (scrollType != AnchoringScroll && scrollType != ClampingScroll)
3702 clearScrollAnchor(); 3709 clearScrollAnchor();
3703 } 3710 }
3704 3711
3705 void FrameView::didChangeScrollOffset() { 3712 void FrameView::didChangeScrollOffset() {
3706 frame().loader().client()->didChangeScrollOffset(); 3713 frame().loader().client()->didChangeScrollOffset();
3707 if (frame().isMainFrame()) 3714 if (frame().isMainFrame())
3708 frame().host()->chromeClient().mainFrameScrollOffsetChanged(); 3715 frame().host()->chromeClient().mainFrameScrollOffsetChanged();
3716
3717 if (!RuntimeEnabledFeatures::rootLayerScrollingEnabled()) {
3718 // The scroll translation paint property depends on scroll offset.
3719 setNeedsPaintPropertyUpdate();
3720 }
3709 } 3721 }
3710 3722
3711 void FrameView::clearScrollAnchor() { 3723 void FrameView::clearScrollAnchor() {
3712 if (!RuntimeEnabledFeatures::scrollAnchoringEnabled()) 3724 if (!RuntimeEnabledFeatures::scrollAnchoringEnabled())
3713 return; 3725 return;
3714 m_scrollAnchor.clear(); 3726 m_scrollAnchor.clear();
3715 } 3727 }
3716 3728
3717 bool FrameView::hasOverlayScrollbars() const { 3729 bool FrameView::hasOverlayScrollbars() const {
3718 return (horizontalScrollbar() && 3730 return (horizontalScrollbar() &&
(...skipping 843 matching lines...) Expand 10 before | Expand all | Expand 10 after
4562 DCHECK(m_frame->isMainFrame()); 4574 DCHECK(m_frame->isMainFrame());
4563 return m_initialViewportSize.width(); 4575 return m_initialViewportSize.width();
4564 } 4576 }
4565 4577
4566 int FrameView::initialViewportHeight() const { 4578 int FrameView::initialViewportHeight() const {
4567 DCHECK(m_frame->isMainFrame()); 4579 DCHECK(m_frame->isMainFrame());
4568 return m_initialViewportSize.height(); 4580 return m_initialViewportSize.height();
4569 } 4581 }
4570 4582
4571 } // namespace blink 4583 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/frame/FrameView.h ('k') | third_party/WebKit/Source/core/layout/LayoutObject.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698