| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
| 4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) | 4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) |
| 5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) | 5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) |
| 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. | 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. |
| 7 * Copyright (C) 2010 Google Inc. All rights reserved. | 7 * Copyright (C) 2010 Google Inc. All rights reserved. |
| 8 * | 8 * |
| 9 * This library is free software; you can redistribute it and/or | 9 * This library is free software; you can redistribute it and/or |
| 10 * modify it under the terms of the GNU Library General Public | 10 * modify it under the terms of the GNU Library General Public |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 return; | 97 return; |
| 98 | 98 |
| 99 layer()->contentChanged(changeType); | 99 layer()->contentChanged(changeType); |
| 100 } | 100 } |
| 101 | 101 |
| 102 bool LayoutBoxModelObject::hasAcceleratedCompositing() const { | 102 bool LayoutBoxModelObject::hasAcceleratedCompositing() const { |
| 103 return view()->compositor()->hasAcceleratedCompositing(); | 103 return view()->compositor()->hasAcceleratedCompositing(); |
| 104 } | 104 } |
| 105 | 105 |
| 106 LayoutBoxModelObject::LayoutBoxModelObject(ContainerNode* node) | 106 LayoutBoxModelObject::LayoutBoxModelObject(ContainerNode* node) |
| 107 : LayoutObject(node) {} | 107 : LayoutObject(node), m_isInStickySubtree(false) {} |
| 108 | 108 |
| 109 bool LayoutBoxModelObject::usesCompositedScrolling() const { | 109 bool LayoutBoxModelObject::usesCompositedScrolling() const { |
| 110 return hasOverflowClip() && hasLayer() && | 110 return hasOverflowClip() && hasLayer() && |
| 111 layer()->getScrollableArea()->usesCompositedScrolling(); | 111 layer()->getScrollableArea()->usesCompositedScrolling(); |
| 112 } | 112 } |
| 113 | 113 |
| 114 BackgroundPaintLocation LayoutBoxModelObject::backgroundPaintLocation() const { | 114 BackgroundPaintLocation LayoutBoxModelObject::backgroundPaintLocation() const { |
| 115 bool hasCustomScrollbars = false; | 115 bool hasCustomScrollbars = false; |
| 116 // TODO(flackr): Detect opaque custom scrollbars which would cover up a | 116 // TODO(flackr): Detect opaque custom scrollbars which would cover up a |
| 117 // border-box background. | 117 // border-box background. |
| (...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 414 } | 414 } |
| 415 } | 415 } |
| 416 | 416 |
| 417 if (newStyleIsViewportConstained != oldStyleIsViewportConstrained) { | 417 if (newStyleIsViewportConstained != oldStyleIsViewportConstrained) { |
| 418 if (newStyleIsViewportConstained && layer()) | 418 if (newStyleIsViewportConstained && layer()) |
| 419 frameView->addViewportConstrainedObject(this); | 419 frameView->addViewportConstrainedObject(this); |
| 420 else | 420 else |
| 421 frameView->removeViewportConstrainedObject(this); | 421 frameView->removeViewportConstrainedObject(this); |
| 422 } | 422 } |
| 423 } | 423 } |
| 424 |
| 425 m_isInStickySubtree = |
| 426 style()->position() == StickyPosition || |
| 427 (parent() && parent()->enclosingBoxModelObject() && |
| 428 parent()->enclosingBoxModelObject()->isInStickySubtree()); |
| 424 } | 429 } |
| 425 | 430 |
| 426 void LayoutBoxModelObject::invalidateStickyConstraints() { | 431 void LayoutBoxModelObject::invalidateStickyConstraints() { |
| 427 if (!layer()) | 432 if (!layer()) |
| 428 return; | 433 return; |
| 429 | 434 |
| 430 // This intentionally uses the stale ancestor overflow layer compositing input | 435 // This intentionally uses the stale ancestor overflow layer compositing input |
| 431 // as if we have saved constraints for this layer they were saved in the | 436 // as if we have saved constraints for this layer they were saved in the |
| 432 // previous frame. | 437 // previous frame. |
| 433 DisableCompositingQueryAsserts disabler; | 438 DisableCompositingQueryAsserts disabler; |
| (...skipping 906 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1340 if (rootElementStyle->hasBackground()) | 1345 if (rootElementStyle->hasBackground()) |
| 1341 return false; | 1346 return false; |
| 1342 | 1347 |
| 1343 if (node() != document().firstBodyElement()) | 1348 if (node() != document().firstBodyElement()) |
| 1344 return false; | 1349 return false; |
| 1345 | 1350 |
| 1346 return true; | 1351 return true; |
| 1347 } | 1352 } |
| 1348 | 1353 |
| 1349 } // namespace blink | 1354 } // namespace blink |
| OLD | NEW |