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@web.de> | 10 * Christian Biesinger <cbiesinger@web.de> |
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
332 // ancestors further. | 332 // ancestors further. |
333 if (layer->isSelfPaintingLayer()) { | 333 if (layer->isSelfPaintingLayer()) { |
334 DCHECK(!parent() || parent()->m_hasSelfPaintingLayerDescendantDirty || | 334 DCHECK(!parent() || parent()->m_hasSelfPaintingLayerDescendantDirty || |
335 parent()->m_hasSelfPaintingLayerDescendant); | 335 parent()->m_hasSelfPaintingLayerDescendant); |
336 break; | 336 break; |
337 } | 337 } |
338 } | 338 } |
339 } | 339 } |
340 | 340 |
341 bool PaintLayer::scrollsWithViewport() const { | 341 bool PaintLayer::scrollsWithViewport() const { |
342 return (layoutObject()->style()->position() == FixedPosition && | 342 if (layoutObject()->style()->position() == FixedPosition && |
pdr.
2016/12/06 04:38:51
Can you move the spv2 codepath outside like so?
if
chrishtr
2016/12/06 23:56:06
This isn't quite right, because the method should
| |
343 layoutObject()->containerForFixedPosition() == | 343 layoutObject()->containerForFixedPosition() == layoutObject()->view()) |
344 layoutObject()->view()) || | 344 return true; |
345 (layoutObject()->style()->position() == StickyPosition && | 345 if (layoutObject()->style()->position() == StickyPosition) { |
346 !ancestorScrollingLayer()); | 346 if (RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled()) { |
347 DCHECK(layoutObject()->paintProperties()); | |
348 return layoutObject() | |
349 ->paintProperties() | |
350 ->localBorderBoxProperties() | |
351 ->propertyTreeState.scroll() == | |
352 layoutObject() | |
353 ->view() | |
354 ->paintProperties() | |
355 ->contentsProperties() | |
356 .propertyTreeState.scroll(); | |
357 } else { | |
358 return !ancestorScrollingLayer(); | |
359 } | |
360 } | |
361 return false; | |
347 } | 362 } |
348 | 363 |
349 bool PaintLayer::scrollsWithRespectTo(const PaintLayer* other) const { | 364 bool PaintLayer::scrollsWithRespectTo(const PaintLayer* other) const { |
350 if (scrollsWithViewport() != other->scrollsWithViewport()) | 365 if (scrollsWithViewport() != other->scrollsWithViewport()) |
351 return true; | 366 return true; |
352 return ancestorScrollingLayer() != other->ancestorScrollingLayer(); | 367 return ancestorScrollingLayer() != other->ancestorScrollingLayer(); |
353 } | 368 } |
354 | 369 |
355 void PaintLayer::updateLayerPositionsAfterOverflowScroll( | 370 void PaintLayer::updateLayerPositionsAfterOverflowScroll( |
356 const DoubleSize& scrollDelta) { | 371 const DoubleSize& scrollDelta) { |
(...skipping 2894 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3251 } | 3266 } |
3252 | 3267 |
3253 void showLayerTree(const blink::LayoutObject* layoutObject) { | 3268 void showLayerTree(const blink::LayoutObject* layoutObject) { |
3254 if (!layoutObject) { | 3269 if (!layoutObject) { |
3255 LOG(INFO) << "Cannot showLayerTree. Root is (nil)"; | 3270 LOG(INFO) << "Cannot showLayerTree. Root is (nil)"; |
3256 return; | 3271 return; |
3257 } | 3272 } |
3258 showLayerTree(layoutObject->enclosingLayer()); | 3273 showLayerTree(layoutObject->enclosingLayer()); |
3259 } | 3274 } |
3260 #endif | 3275 #endif |
OLD | NEW |