| 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 1956 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1967 | 1967 |
| 1968 // Update sticky position objects which are stuck to the viewport. In order to | 1968 // Update sticky position objects which are stuck to the viewport. In order to |
| 1969 // correctly compute the sticky position offsets the layers must be visited | 1969 // correctly compute the sticky position offsets the layers must be visited |
| 1970 // top-down, so start at the 'root' sticky elements and recurse downwards. | 1970 // top-down, so start at the 'root' sticky elements and recurse downwards. |
| 1971 for (const auto& viewportConstrainedObject : *m_viewportConstrainedObjects) { | 1971 for (const auto& viewportConstrainedObject : *m_viewportConstrainedObjects) { |
| 1972 LayoutObject* layoutObject = viewportConstrainedObject; | 1972 LayoutObject* layoutObject = viewportConstrainedObject; |
| 1973 if (layoutObject->style()->position() != EPosition::kSticky) | 1973 if (layoutObject->style()->position() != EPosition::kSticky) |
| 1974 continue; | 1974 continue; |
| 1975 | 1975 |
| 1976 PaintLayer* layer = toLayoutBoxModelObject(layoutObject)->layer(); | 1976 PaintLayer* layer = toLayoutBoxModelObject(layoutObject)->layer(); |
| 1977 |
| 1978 // This method can be called during layout at which point the ancestor |
| 1979 // overflow layer may not be set yet. We can safely skip such cases as we |
| 1980 // will revisit this method during compositing inputs update. |
| 1981 if (!layer->ancestorOverflowLayer()) |
| 1982 continue; |
| 1983 |
| 1977 StickyConstraintsMap constraintsMap = layer->ancestorOverflowLayer() | 1984 StickyConstraintsMap constraintsMap = layer->ancestorOverflowLayer() |
| 1978 ->getScrollableArea() | 1985 ->getScrollableArea() |
| 1979 ->stickyConstraintsMap(); | 1986 ->stickyConstraintsMap(); |
| 1980 if (constraintsMap.contains(layer) && | 1987 if (constraintsMap.contains(layer) && |
| 1981 !constraintsMap.at(layer).hasAncestorStickyElement()) { | 1988 !constraintsMap.at(layer).hasAncestorStickyElement()) { |
| 1982 // TODO(skobes): Resolve circular dependency between scroll offset and | 1989 // TODO(skobes): Resolve circular dependency between scroll offset and |
| 1983 // compositing state, and remove this disabler. https://crbug.com/420741 | 1990 // compositing state, and remove this disabler. https://crbug.com/420741 |
| 1984 DisableCompositingQueryAsserts disabler; | 1991 DisableCompositingQueryAsserts disabler; |
| 1985 layer->updateLayerPositionsAfterOverflowScroll(); | 1992 layer->updateLayerPositionsAfterOverflowScroll(); |
| 1986 layoutObject->setMayNeedPaintInvalidationSubtree(); | 1993 layoutObject->setMayNeedPaintInvalidationSubtree(); |
| (...skipping 3225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5212 void FrameView::setAnimationHost( | 5219 void FrameView::setAnimationHost( |
| 5213 std::unique_ptr<CompositorAnimationHost> host) { | 5220 std::unique_ptr<CompositorAnimationHost> host) { |
| 5214 m_animationHost = std::move(host); | 5221 m_animationHost = std::move(host); |
| 5215 } | 5222 } |
| 5216 | 5223 |
| 5217 LayoutUnit FrameView::caretWidth() const { | 5224 LayoutUnit FrameView::caretWidth() const { |
| 5218 return LayoutUnit(getHostWindow()->windowToViewportScalar(1)); | 5225 return LayoutUnit(getHostWindow()->windowToViewportScalar(1)); |
| 5219 } | 5226 } |
| 5220 | 5227 |
| 5221 } // namespace blink | 5228 } // namespace blink |
| OLD | NEW |