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

Side by Side Diff: third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp

Issue 2841603003: Record non-stacking-context as main thread scrolling reasons (Closed)
Patch Set: Update reason name Created 3 years, 7 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights
3 * reserved. 3 * reserved.
4 * 4 *
5 * Portions are Copyright (C) 1998 Netscape Communications Corporation. 5 * Portions are Copyright (C) 1998 Netscape Communications Corporation.
6 * 6 *
7 * Other contributors: 7 * Other contributors:
8 * Robert O'Callahan <roc+@cs.cmu.edu> 8 * Robert O'Callahan <roc+@cs.cmu.edu>
9 * David Baron <dbaron@fas.harvard.edu> 9 * David Baron <dbaron@fas.harvard.edu>
10 * Christian Biesinger <cbiesinger@gmail.com> 10 * Christian Biesinger <cbiesinger@gmail.com>
(...skipping 1830 matching lines...) Expand 10 before | Expand all | Expand 10 after
1841 !background_supports_lcd_text) { 1841 !background_supports_lcd_text) {
1842 if (layer->CompositesWithOpacity()) { 1842 if (layer->CompositesWithOpacity()) {
1843 non_composited_main_thread_scrolling_reasons_ |= 1843 non_composited_main_thread_scrolling_reasons_ |=
1844 MainThreadScrollingReason::kHasOpacityAndLCDText; 1844 MainThreadScrollingReason::kHasOpacityAndLCDText;
1845 } 1845 }
1846 if (layer->CompositesWithTransform()) { 1846 if (layer->CompositesWithTransform()) {
1847 non_composited_main_thread_scrolling_reasons_ |= 1847 non_composited_main_thread_scrolling_reasons_ |=
1848 MainThreadScrollingReason::kHasTransformAndLCDText; 1848 MainThreadScrollingReason::kHasTransformAndLCDText;
1849 } 1849 }
1850 if (!layer->BackgroundIsKnownToBeOpaqueInRect( 1850 if (!layer->BackgroundIsKnownToBeOpaqueInRect(
1851 ToLayoutBox(layer->GetLayoutObject()).PaddingBoxRect())) { 1851 ToLayoutBox(layer->GetLayoutObject()).PaddingBoxRect(),
1852 &non_composited_main_thread_scrolling_reasons_)) {
1852 non_composited_main_thread_scrolling_reasons_ |= 1853 non_composited_main_thread_scrolling_reasons_ |=
1853 MainThreadScrollingReason::kBackgroundNotOpaqueInRectAndLCDText; 1854 MainThreadScrollingReason::kBackgroundNotOpaqueInRectAndLCDText;
1854 } 1855 }
1856 if (!layer->GetLayoutObject().Style()->IsStackingContext()) {
1857 non_composited_main_thread_scrolling_reasons_ |=
1858 MainThreadScrollingReason::kIsNotStackingContextAndLCDText;
1859 }
1855 1860
1856 needs_composited_scrolling = false; 1861 needs_composited_scrolling = false;
1857 } 1862 }
1858 1863
1859 // TODO(schenney) Tests fail if we do not also exclude 1864 // TODO(schenney) Tests fail if we do not also exclude
1860 // layer->layoutObject().style()->hasBorderDecoration() (missing background 1865 // layer->layoutObject().style()->hasBorderDecoration() (missing background
1861 // behind dashed borders). Resolve this case, or not, and update this check 1866 // behind dashed borders). Resolve this case, or not, and update this check
1862 // with the results. 1867 // with the results.
1863 if (layer->GetLayoutObject().Style()->HasBorderRadius()) { 1868 if (layer->GetLayoutObject().Style()->HasBorderRadius()) {
1864 non_composited_main_thread_scrolling_reasons_ |= 1869 non_composited_main_thread_scrolling_reasons_ |=
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after
2149 2154
2150 void PaintLayerScrollableArea::DelayScrollOffsetClampScope:: 2155 void PaintLayerScrollableArea::DelayScrollOffsetClampScope::
2151 ClampScrollableAreas() { 2156 ClampScrollableAreas() {
2152 for (auto& scrollable_area : *needs_clamp_) 2157 for (auto& scrollable_area : *needs_clamp_)
2153 scrollable_area->ClampScrollOffsetAfterOverflowChange(); 2158 scrollable_area->ClampScrollOffsetAfterOverflowChange();
2154 delete needs_clamp_; 2159 delete needs_clamp_;
2155 needs_clamp_ = nullptr; 2160 needs_clamp_ = nullptr;
2156 } 2161 }
2157 2162
2158 } // namespace blink 2163 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698