| 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@web.de> | 9 * Christian Biesinger <cbiesinger@web.de> |
| 10 * Randall Jesup <rjesup@wgate.com> | 10 * Randall Jesup <rjesup@wgate.com> |
| (...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 306 // in this case, there is no need to dirty our ancestors further. | 306 // in this case, there is no need to dirty our ancestors further. |
| 307 if (layer->isSelfPaintingLayer()) { | 307 if (layer->isSelfPaintingLayer()) { |
| 308 ASSERT(!parent() || parent()->m_hasSelfPaintingLayerDescendantDirty
|| parent()->m_hasSelfPaintingLayerDescendant); | 308 ASSERT(!parent() || parent()->m_hasSelfPaintingLayerDescendantDirty
|| parent()->m_hasSelfPaintingLayerDescendant); |
| 309 break; | 309 break; |
| 310 } | 310 } |
| 311 } | 311 } |
| 312 } | 312 } |
| 313 | 313 |
| 314 bool DeprecatedPaintLayer::scrollsWithViewport() const | 314 bool DeprecatedPaintLayer::scrollsWithViewport() const |
| 315 { | 315 { |
| 316 return layoutObject()->style()->position() == FixedPosition && layoutObject(
)->containerForFixedPosition() == layoutObject()->view(); | 316 return (layoutObject()->style()->position() == FixedPosition && layoutObject
()->containerForFixedPosition() == layoutObject()->view()) |
| 317 || (layoutObject()->style()->position() == StickyPosition && !ancestorSc
rollingLayer()); |
| 317 } | 318 } |
| 318 | 319 |
| 319 bool DeprecatedPaintLayer::scrollsWithRespectTo(const DeprecatedPaintLayer* othe
r) const | 320 bool DeprecatedPaintLayer::scrollsWithRespectTo(const DeprecatedPaintLayer* othe
r) const |
| 320 { | 321 { |
| 321 if (scrollsWithViewport() != other->scrollsWithViewport()) | 322 if (scrollsWithViewport() != other->scrollsWithViewport()) |
| 322 return true; | 323 return true; |
| 323 return ancestorScrollingLayer() != other->ancestorScrollingLayer(); | 324 return ancestorScrollingLayer() != other->ancestorScrollingLayer(); |
| 324 } | 325 } |
| 325 | 326 |
| 326 void DeprecatedPaintLayer::updateLayerPositionsAfterOverflowScroll(const DoubleS
ize& scrollDelta) | 327 void DeprecatedPaintLayer::updateLayerPositionsAfterOverflowScroll(const DoubleS
ize& scrollDelta) |
| (...skipping 2409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2736 | 2737 |
| 2737 void showLayerTree(const blink::LayoutObject* layoutObject) | 2738 void showLayerTree(const blink::LayoutObject* layoutObject) |
| 2738 { | 2739 { |
| 2739 if (!layoutObject) { | 2740 if (!layoutObject) { |
| 2740 fprintf(stderr, "Cannot showLayerTree. Root is (nil)\n"); | 2741 fprintf(stderr, "Cannot showLayerTree. Root is (nil)\n"); |
| 2741 return; | 2742 return; |
| 2742 } | 2743 } |
| 2743 showLayerTree(layoutObject->enclosingLayer()); | 2744 showLayerTree(layoutObject->enclosingLayer()); |
| 2744 } | 2745 } |
| 2745 #endif | 2746 #endif |
| OLD | NEW |