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

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

Issue 2599043003: Add transform and background not opaque as main thread scrolling reasons (Closed)
Patch Set: Make styleRelatedMainThreadScrollingReasonTest a class Created 3 years, 11 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 1735 matching lines...) Expand 10 before | Expand all | Expand 10 after
1746 toLayoutBox(layer->layoutObject())->paddingBoxRect()) && 1746 toLayoutBox(layer->layoutObject())->paddingBoxRect()) &&
1747 !layer->compositesWithTransform() && !layer->compositesWithOpacity(); 1747 !layer->compositesWithTransform() && !layer->compositesWithOpacity();
1748 1748
1749 if (mode == PaintLayerScrollableArea::ConsiderLCDText && 1749 if (mode == PaintLayerScrollableArea::ConsiderLCDText &&
1750 !layer->compositor()->preferCompositingToLCDTextEnabled() && 1750 !layer->compositor()->preferCompositingToLCDTextEnabled() &&
1751 !backgroundSupportsLCDText) { 1751 !backgroundSupportsLCDText) {
1752 if (layer->compositesWithOpacity()) { 1752 if (layer->compositesWithOpacity()) {
1753 addStyleRelatedMainThreadScrollingReasons( 1753 addStyleRelatedMainThreadScrollingReasons(
1754 MainThreadScrollingReason::kHasOpacity); 1754 MainThreadScrollingReason::kHasOpacity);
1755 } 1755 }
1756 if (layer->compositesWithTransform()) {
1757 addStyleRelatedMainThreadScrollingReasons(
1758 MainThreadScrollingReason::kHasTransform);
1759 }
1760 if (!layer->backgroundIsKnownToBeOpaqueInRect(
1761 toLayoutBox(layer->layoutObject())->paddingBoxRect())) {
1762 addStyleRelatedMainThreadScrollingReasons(
1763 MainThreadScrollingReason::kBackgroundNotOpaqueInRect);
1764 }
1756 return false; 1765 return false;
1757 } 1766 }
1758 1767
1759 // TODO(schenney) Tests fail if we do not also exclude 1768 // TODO(schenney) Tests fail if we do not also exclude
1760 // layer->layoutObject()->style()->hasBorderDecoration() (missing background 1769 // layer->layoutObject()->style()->hasBorderDecoration() (missing background
1761 // behind dashed borders). Resolve this case, or not, and update this check 1770 // behind dashed borders). Resolve this case, or not, and update this check
1762 // with the results. 1771 // with the results.
1763 return !(layer->size().isEmpty() || layer->hasDescendantWithClipPath() || 1772 return !(layer->size().isEmpty() || layer->hasDescendantWithClipPath() ||
1764 layer->hasAncestorWithClipPath() || 1773 layer->hasAncestorWithClipPath() ||
1765 layer->layoutObject()->style()->hasBorderRadius() || 1774 layer->layoutObject()->style()->hasBorderRadius() ||
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after
2072 2081
2073 void PaintLayerScrollableArea::DelayScrollOffsetClampScope:: 2082 void PaintLayerScrollableArea::DelayScrollOffsetClampScope::
2074 clampScrollableAreas() { 2083 clampScrollableAreas() {
2075 for (auto& scrollableArea : *s_needsClamp) 2084 for (auto& scrollableArea : *s_needsClamp)
2076 scrollableArea->clampScrollOffsetAfterOverflowChange(); 2085 scrollableArea->clampScrollOffsetAfterOverflowChange();
2077 delete s_needsClamp; 2086 delete s_needsClamp;
2078 s_needsClamp = nullptr; 2087 s_needsClamp = nullptr;
2079 } 2088 }
2080 2089
2081 } // namespace blink 2090 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698