OLD | NEW |
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 1699 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1710 if (node && node->isElementNode() && | 1710 if (node && node->isElementNode() && |
1711 (toElement(node)->compositorMutableProperties() & | 1711 (toElement(node)->compositorMutableProperties() & |
1712 (CompositorMutableProperty::kScrollTop | | 1712 (CompositorMutableProperty::kScrollTop | |
1713 CompositorMutableProperty::kScrollLeft))) | 1713 CompositorMutableProperty::kScrollLeft))) |
1714 return true; | 1714 return true; |
1715 | 1715 |
1716 // TODO(flackr): Allow integer transforms as long as all of the ancestor | 1716 // TODO(flackr): Allow integer transforms as long as all of the ancestor |
1717 // transforms are also integer. | 1717 // transforms are also integer. |
1718 bool backgroundSupportsLCDText = | 1718 bool backgroundSupportsLCDText = |
1719 RuntimeEnabledFeatures::compositeOpaqueScrollersEnabled() && | 1719 RuntimeEnabledFeatures::compositeOpaqueScrollersEnabled() && |
| 1720 layer->layoutObject()->style()->isStackingContext() && |
1720 layer->canPaintBackgroundOntoScrollingContentsLayer() && | 1721 layer->canPaintBackgroundOntoScrollingContentsLayer() && |
1721 layer->backgroundIsKnownToBeOpaqueInRect( | 1722 layer->backgroundIsKnownToBeOpaqueInRect( |
1722 toLayoutBox(layer->layoutObject())->paddingBoxRect()) && | 1723 toLayoutBox(layer->layoutObject())->paddingBoxRect()) && |
1723 !layer->compositesWithTransform() && !layer->compositesWithOpacity(); | 1724 !layer->compositesWithTransform() && !layer->compositesWithOpacity(); |
1724 if (mode == PaintLayerScrollableArea::ConsiderLCDText && | 1725 if (mode == PaintLayerScrollableArea::ConsiderLCDText && |
1725 !layer->compositor()->preferCompositingToLCDTextEnabled() && | 1726 !layer->compositor()->preferCompositingToLCDTextEnabled() && |
1726 !backgroundSupportsLCDText) | 1727 !backgroundSupportsLCDText) |
1727 return false; | 1728 return false; |
1728 | 1729 |
1729 // TODO(schenney) Tests fail if we do not also exclude | 1730 // TODO(schenney) Tests fail if we do not also exclude |
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2002 | 2003 |
2003 void PaintLayerScrollableArea::DelayScrollOffsetClampScope:: | 2004 void PaintLayerScrollableArea::DelayScrollOffsetClampScope:: |
2004 clampScrollableAreas() { | 2005 clampScrollableAreas() { |
2005 for (auto& scrollableArea : *s_needsClamp) | 2006 for (auto& scrollableArea : *s_needsClamp) |
2006 scrollableArea->clampScrollOffsetsAfterLayout(); | 2007 scrollableArea->clampScrollOffsetsAfterLayout(); |
2007 delete s_needsClamp; | 2008 delete s_needsClamp; |
2008 s_needsClamp = nullptr; | 2009 s_needsClamp = nullptr; |
2009 } | 2010 } |
2010 | 2011 |
2011 } // namespace blink | 2012 } // namespace blink |
OLD | NEW |