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

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

Issue 2536443002: Reland "Only promote opaque scrollers which are stacking contexts." (Closed)
Patch Set: Created 4 years 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 1690 matching lines...) Expand 10 before | Expand all | Expand 10 after
1701 if (node && node->isElementNode() && 1701 if (node && node->isElementNode() &&
1702 (toElement(node)->compositorMutableProperties() & 1702 (toElement(node)->compositorMutableProperties() &
1703 (CompositorMutableProperty::kScrollTop | 1703 (CompositorMutableProperty::kScrollTop |
1704 CompositorMutableProperty::kScrollLeft))) 1704 CompositorMutableProperty::kScrollLeft)))
1705 return true; 1705 return true;
1706 1706
1707 // TODO(flackr): Allow integer transforms as long as all of the ancestor 1707 // TODO(flackr): Allow integer transforms as long as all of the ancestor
1708 // transforms are also integer. 1708 // transforms are also integer.
1709 bool backgroundSupportsLCDText = 1709 bool backgroundSupportsLCDText =
1710 RuntimeEnabledFeatures::compositeOpaqueScrollersEnabled() && 1710 RuntimeEnabledFeatures::compositeOpaqueScrollersEnabled() &&
1711 layer->layoutObject()->style()->isStackingContext() &&
1711 layer->canPaintBackgroundOntoScrollingContentsLayer() && 1712 layer->canPaintBackgroundOntoScrollingContentsLayer() &&
1712 layer->backgroundIsKnownToBeOpaqueInRect( 1713 layer->backgroundIsKnownToBeOpaqueInRect(
1713 toLayoutBox(layer->layoutObject())->paddingBoxRect()) && 1714 toLayoutBox(layer->layoutObject())->paddingBoxRect()) &&
1714 !layer->compositesWithTransform() && !layer->compositesWithOpacity(); 1715 !layer->compositesWithTransform() && !layer->compositesWithOpacity();
1715 if (mode == PaintLayerScrollableArea::ConsiderLCDText && 1716 if (mode == PaintLayerScrollableArea::ConsiderLCDText &&
1716 !layer->compositor()->preferCompositingToLCDTextEnabled() && 1717 !layer->compositor()->preferCompositingToLCDTextEnabled() &&
1717 !backgroundSupportsLCDText) 1718 !backgroundSupportsLCDText)
1718 return false; 1719 return false;
1719 1720
1720 // TODO(schenney) Tests fail if we do not also exclude 1721 // TODO(schenney) Tests fail if we do not also exclude
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
1993 1994
1994 void PaintLayerScrollableArea::DelayScrollOffsetClampScope:: 1995 void PaintLayerScrollableArea::DelayScrollOffsetClampScope::
1995 clampScrollableAreas() { 1996 clampScrollableAreas() {
1996 for (auto& scrollableArea : *s_needsClamp) 1997 for (auto& scrollableArea : *s_needsClamp)
1997 scrollableArea->clampScrollOffsetsAfterLayout(); 1998 scrollableArea->clampScrollOffsetsAfterLayout();
1998 delete s_needsClamp; 1999 delete s_needsClamp;
1999 s_needsClamp = nullptr; 2000 s_needsClamp = nullptr;
2000 } 2001 }
2001 2002
2002 } // namespace blink 2003 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698