| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org> | 2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org> |
| 3 * 1999 Lars Knoll <knoll@kde.org> | 3 * 1999 Lars Knoll <knoll@kde.org> |
| 4 * 1999 Antti Koivisto <koivisto@kde.org> | 4 * 1999 Antti Koivisto <koivisto@kde.org> |
| 5 * 2000 Dirk Mueller <mueller@kde.org> | 5 * 2000 Dirk Mueller <mueller@kde.org> |
| 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. |
| 7 * (C) 2006 Graham Dennis (graham.dennis@gmail.com) | 7 * (C) 2006 Graham Dennis (graham.dennis@gmail.com) |
| 8 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) | 8 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) |
| 9 * Copyright (C) 2009 Google Inc. All rights reserved. | 9 * Copyright (C) 2009 Google Inc. All rights reserved. |
| 10 * | 10 * |
| (...skipping 4992 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5003 | 5003 |
| 5004 for (const LayoutObject* layoutObject : *viewportConstrainedObjects()) { | 5004 for (const LayoutObject* layoutObject : *viewportConstrainedObjects()) { |
| 5005 DCHECK(layoutObject->isBoxModelObject() && layoutObject->hasLayer()); | 5005 DCHECK(layoutObject->isBoxModelObject() && layoutObject->hasLayer()); |
| 5006 DCHECK(layoutObject->style()->position() == EPosition::kFixed || | 5006 DCHECK(layoutObject->style()->position() == EPosition::kFixed || |
| 5007 layoutObject->style()->position() == EPosition::kSticky); | 5007 layoutObject->style()->position() == EPosition::kSticky); |
| 5008 PaintLayer* layer = toLayoutBoxModelObject(layoutObject)->layer(); | 5008 PaintLayer* layer = toLayoutBoxModelObject(layoutObject)->layer(); |
| 5009 | 5009 |
| 5010 // Whether the Layer sticks to the viewport is a tree-depenent | 5010 // Whether the Layer sticks to the viewport is a tree-depenent |
| 5011 // property and our viewportConstrainedObjects collection is maintained | 5011 // property and our viewportConstrainedObjects collection is maintained |
| 5012 // with only LayoutObject-level information. | 5012 // with only LayoutObject-level information. |
| 5013 if (!layer->sticksToViewport()) | 5013 if (!layer->fixedToViewport() && !layer->sticksToScroller()) |
| 5014 continue; | 5014 continue; |
| 5015 | 5015 |
| 5016 // If the whole subtree is invisible, there's no reason to scroll on | 5016 // If the whole subtree is invisible, there's no reason to scroll on |
| 5017 // the main thread because we don't need to generate invalidations | 5017 // the main thread because we don't need to generate invalidations |
| 5018 // for invisible content. | 5018 // for invisible content. |
| 5019 if (layer->subtreeIsInvisible()) | 5019 if (layer->subtreeIsInvisible()) |
| 5020 continue; | 5020 continue; |
| 5021 | 5021 |
| 5022 // We're only smart enough to scroll viewport-constrainted objects | 5022 // We're only smart enough to scroll viewport-constrainted objects |
| 5023 // in the compositor if they have their own backing or they paint | 5023 // in the compositor if they have their own backing or they paint |
| (...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5251 void FrameView::setAnimationHost( | 5251 void FrameView::setAnimationHost( |
| 5252 std::unique_ptr<CompositorAnimationHost> host) { | 5252 std::unique_ptr<CompositorAnimationHost> host) { |
| 5253 m_animationHost = std::move(host); | 5253 m_animationHost = std::move(host); |
| 5254 } | 5254 } |
| 5255 | 5255 |
| 5256 LayoutUnit FrameView::caretWidth() const { | 5256 LayoutUnit FrameView::caretWidth() const { |
| 5257 return LayoutUnit(getHostWindow()->windowToViewportScalar(1)); | 5257 return LayoutUnit(getHostWindow()->windowToViewportScalar(1)); |
| 5258 } | 5258 } |
| 5259 | 5259 |
| 5260 } // namespace blink | 5260 } // namespace blink |
| OLD | NEW |