Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Portions are Copyright (C) 1998 Netscape Communications Corporation. | 4 * Portions are Copyright (C) 1998 Netscape Communications Corporation. |
| 5 * | 5 * |
| 6 * Other contributors: | 6 * Other contributors: |
| 7 * Robert O'Callahan <roc+@cs.cmu.edu> | 7 * Robert O'Callahan <roc+@cs.cmu.edu> |
| 8 * David Baron <dbaron@fas.harvard.edu> | 8 * David Baron <dbaron@fas.harvard.edu> |
| 9 * Christian Biesinger <cbiesinger@gmail.com> | 9 * Christian Biesinger <cbiesinger@gmail.com> |
| 10 * Randall Jesup <rjesup@wgate.com> | 10 * Randall Jesup <rjesup@wgate.com> |
| (...skipping 1482 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1493 if (!layer->scrollsOverflow()) | 1493 if (!layer->scrollsOverflow()) |
| 1494 return false; | 1494 return false; |
| 1495 | 1495 |
| 1496 Node* node = layer->enclosingNode(); | 1496 Node* node = layer->enclosingNode(); |
| 1497 if (node && node->isElementNode() && (toElement(node)->compositorMutableProp erties() & (CompositorMutableProperty::kScrollTop | CompositorMutableProperty::k ScrollLeft))) | 1497 if (node && node->isElementNode() && (toElement(node)->compositorMutableProp erties() & (CompositorMutableProperty::kScrollTop | CompositorMutableProperty::k ScrollLeft))) |
| 1498 return true; | 1498 return true; |
| 1499 | 1499 |
| 1500 // TODO(schenney) The color test alone is inadequate. When https://coderevie w.chromium.org/2196583002 lands | 1500 // TODO(schenney) The color test alone is inadequate. When https://coderevie w.chromium.org/2196583002 lands |
| 1501 // we should use PaintLayer::shouldPaintBackgroundOntoForeground() because w e will not still get | 1501 // we should use PaintLayer::shouldPaintBackgroundOntoForeground() because w e will not still get |
| 1502 // LCD text unless the conditions there are met. It also unifies logic for s crolling compositing decisions. | 1502 // LCD text unless the conditions there are met. It also unifies logic for s crolling compositing decisions. |
| 1503 bool backgroundSupportsLCDText = RuntimeEnabledFeatures::compositeOpaqueScro llersEnabled() | 1503 bool backgroundSupportsLCDText = RuntimeEnabledFeatures::compositeOpaqueScro llersEnabled() |
|
flackr
2016/08/19 17:36:53
Can we remove the flag now?
| |
| 1504 && !layer->layoutObject()->style()->visitedDependentColor(CSSPropertyBac kgroundColor).hasAlpha(); | 1504 && layer->shouldPaintBackgroundOntoScrollingContentsLayer() |
| 1505 && layer->backgroundIsKnownToBeOpaqueInRect(toLayoutBox(layer->layoutObj ect())->paddingBoxRect()); | |
| 1505 if (mode == PaintLayerScrollableArea::ConsiderLCDText | 1506 if (mode == PaintLayerScrollableArea::ConsiderLCDText |
| 1506 && !layer->compositor()->preferCompositingToLCDTextEnabled() | 1507 && !layer->compositor()->preferCompositingToLCDTextEnabled() |
| 1507 && !backgroundSupportsLCDText) | 1508 && !backgroundSupportsLCDText) |
| 1508 return false; | 1509 return false; |
| 1509 | 1510 |
| 1510 // TODO(schenney) Tests fail if we do not also exclude layer->layoutObject() ->style()->hasBorderDecoration() | 1511 // TODO(schenney) Tests fail if we do not also exclude layer->layoutObject() ->style()->hasBorderDecoration() |
| 1511 // (missing background behind dashed borders). Resolve this case, or not, an d update this check with | 1512 // (missing background behind dashed borders). Resolve this case, or not, an d update this check with |
| 1512 // the results. | 1513 // the results. |
| 1513 return !(layer->size().isEmpty() | 1514 return !(layer->size().isEmpty() |
| 1514 || layer->hasDescendantWithClipPath() | 1515 || layer->hasDescendantWithClipPath() |
| (...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1771 | 1772 |
| 1772 void PaintLayerScrollableArea::DelayScrollPositionClampScope::clampScrollableAre as() | 1773 void PaintLayerScrollableArea::DelayScrollPositionClampScope::clampScrollableAre as() |
| 1773 { | 1774 { |
| 1774 for (auto& scrollableArea : *s_needsClamp) | 1775 for (auto& scrollableArea : *s_needsClamp) |
| 1775 scrollableArea->clampScrollPositionsAfterLayout(); | 1776 scrollableArea->clampScrollPositionsAfterLayout(); |
| 1776 delete s_needsClamp; | 1777 delete s_needsClamp; |
| 1777 s_needsClamp = nullptr; | 1778 s_needsClamp = nullptr; |
| 1778 } | 1779 } |
| 1779 | 1780 |
| 1780 } // namespace blink | 1781 } // namespace blink |
| OLD | NEW |