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 322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
333 layoutObject()->style()->position() != StickyPosition) | 333 layoutObject()->style()->position() != StickyPosition) |
334 return false; | 334 return false; |
335 | 335 |
336 if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) { | 336 if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) { |
337 const ScrollPaintPropertyNode* ancestorTargetScrollNode; | 337 const ScrollPaintPropertyNode* ancestorTargetScrollNode; |
338 if (layoutObject()->style()->position() == FixedPosition) { | 338 if (layoutObject()->style()->position() == FixedPosition) { |
339 ancestorTargetScrollNode = layoutObject() | 339 ancestorTargetScrollNode = layoutObject() |
340 ->view() | 340 ->view() |
341 ->paintProperties() | 341 ->paintProperties() |
342 ->localBorderBoxProperties() | 342 ->localBorderBoxProperties() |
343 ->propertyTreeState.scroll(); | 343 ->scroll(); |
344 } else { | 344 } else { |
345 ancestorTargetScrollNode = layoutObject() | 345 ancestorTargetScrollNode = layoutObject() |
346 ->view() | 346 ->view() |
347 ->paintProperties() | 347 ->paintProperties() |
348 ->contentsProperties() | 348 ->contentsProperties() |
349 .propertyTreeState.scroll(); | 349 .scroll(); |
350 } | 350 } |
351 | 351 |
352 return layoutObject() | 352 return layoutObject() |
353 ->paintProperties() | 353 ->paintProperties() |
354 ->localBorderBoxProperties() | 354 ->localBorderBoxProperties() |
355 ->propertyTreeState.scroll() == ancestorTargetScrollNode; | 355 ->scroll() == ancestorTargetScrollNode; |
356 } | 356 } |
357 | 357 |
358 return (layoutObject()->style()->position() == FixedPosition && | 358 return (layoutObject()->style()->position() == FixedPosition && |
359 layoutObject()->containerForFixedPosition() == | 359 layoutObject()->containerForFixedPosition() == |
360 layoutObject()->view()) || | 360 layoutObject()->view()) || |
361 (layoutObject()->style()->position() == StickyPosition && | 361 (layoutObject()->style()->position() == StickyPosition && |
362 (!ancestorScrollingLayer() || ancestorScrollingLayer() == root())); | 362 (!ancestorScrollingLayer() || ancestorScrollingLayer() == root())); |
363 } | 363 } |
364 | 364 |
365 bool PaintLayer::scrollsWithRespectTo(const PaintLayer* other) const { | 365 bool PaintLayer::scrollsWithRespectTo(const PaintLayer* other) const { |
(...skipping 2857 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3223 } | 3223 } |
3224 | 3224 |
3225 void showLayerTree(const blink::LayoutObject* layoutObject) { | 3225 void showLayerTree(const blink::LayoutObject* layoutObject) { |
3226 if (!layoutObject) { | 3226 if (!layoutObject) { |
3227 LOG(INFO) << "Cannot showLayerTree. Root is (nil)"; | 3227 LOG(INFO) << "Cannot showLayerTree. Root is (nil)"; |
3228 return; | 3228 return; |
3229 } | 3229 } |
3230 showLayerTree(layoutObject->enclosingLayer()); | 3230 showLayerTree(layoutObject->enclosingLayer()); |
3231 } | 3231 } |
3232 #endif | 3232 #endif |
OLD | NEW |