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 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
307 // in this case, there is no need to dirty our ancestors further. | 307 // in this case, there is no need to dirty our ancestors further. |
308 if (layer->isSelfPaintingLayer()) { | 308 if (layer->isSelfPaintingLayer()) { |
309 ASSERT(!parent() || parent()->m_hasSelfPaintingLayerDescendantDirty
|| parent()->m_hasSelfPaintingLayerDescendant); | 309 ASSERT(!parent() || parent()->m_hasSelfPaintingLayerDescendantDirty
|| parent()->m_hasSelfPaintingLayerDescendant); |
310 break; | 310 break; |
311 } | 311 } |
312 } | 312 } |
313 } | 313 } |
314 | 314 |
315 bool PaintLayer::scrollsWithViewport() const | 315 bool PaintLayer::scrollsWithViewport() const |
316 { | 316 { |
317 return layoutObject()->style()->position() == FixedPosition && layoutObject(
)->containerForFixedPosition() == layoutObject()->view(); | 317 return (layoutObject()->style()->position() == FixedPosition && layoutObject
()->containerForFixedPosition() == layoutObject()->view()) |
| 318 || (layoutObject()->style()->position() == StickyPosition && !ancestorSc
rollingLayer()); |
318 } | 319 } |
319 | 320 |
320 bool PaintLayer::scrollsWithRespectTo(const PaintLayer* other) const | 321 bool PaintLayer::scrollsWithRespectTo(const PaintLayer* other) const |
321 { | 322 { |
322 if (scrollsWithViewport() != other->scrollsWithViewport()) | 323 if (scrollsWithViewport() != other->scrollsWithViewport()) |
323 return true; | 324 return true; |
324 return ancestorScrollingLayer() != other->ancestorScrollingLayer(); | 325 return ancestorScrollingLayer() != other->ancestorScrollingLayer(); |
325 } | 326 } |
326 | 327 |
327 void PaintLayer::updateLayerPositionsAfterOverflowScroll(const DoubleSize& scrol
lDelta) | 328 void PaintLayer::updateLayerPositionsAfterOverflowScroll(const DoubleSize& scrol
lDelta) |
(...skipping 2452 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2780 | 2781 |
2781 void showLayerTree(const blink::LayoutObject* layoutObject) | 2782 void showLayerTree(const blink::LayoutObject* layoutObject) |
2782 { | 2783 { |
2783 if (!layoutObject) { | 2784 if (!layoutObject) { |
2784 fprintf(stderr, "Cannot showLayerTree. Root is (nil)\n"); | 2785 fprintf(stderr, "Cannot showLayerTree. Root is (nil)\n"); |
2785 return; | 2786 return; |
2786 } | 2787 } |
2787 showLayerTree(layoutObject->enclosingLayer()); | 2788 showLayerTree(layoutObject->enclosingLayer()); |
2788 } | 2789 } |
2789 #endif | 2790 #endif |
OLD | NEW |