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 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 , m_inSynchronousPostLayout(false) | 124 , m_inSynchronousPostLayout(false) |
125 , m_postLayoutTasksTimer(this, &FrameView::postLayoutTimerFired) | 125 , m_postLayoutTasksTimer(this, &FrameView::postLayoutTimerFired) |
126 , m_updateWidgetsTimer(this, &FrameView::updateWidgetsTimerFired) | 126 , m_updateWidgetsTimer(this, &FrameView::updateWidgetsTimerFired) |
127 , m_renderThrottlingObserverNotificationFactory(CancellableTaskFactory::crea
te(this, &FrameView::notifyRenderThrottlingObservers)) | 127 , m_renderThrottlingObserverNotificationFactory(CancellableTaskFactory::crea
te(this, &FrameView::notifyRenderThrottlingObservers)) |
128 , m_isTransparent(false) | 128 , m_isTransparent(false) |
129 , m_baseBackgroundColor(Color::white) | 129 , m_baseBackgroundColor(Color::white) |
130 , m_mediaType(MediaTypeNames::screen) | 130 , m_mediaType(MediaTypeNames::screen) |
131 , m_safeToPropagateScrollToParent(true) | 131 , m_safeToPropagateScrollToParent(true) |
132 , m_isTrackingPaintInvalidations(false) | 132 , m_isTrackingPaintInvalidations(false) |
133 , m_scrollCorner(nullptr) | 133 , m_scrollCorner(nullptr) |
| 134 , m_stickyPositionObjectCount(0) |
134 , m_inputEventsScaleFactorForEmulation(1) | 135 , m_inputEventsScaleFactorForEmulation(1) |
135 , m_layoutSizeFixedToFrameSize(true) | 136 , m_layoutSizeFixedToFrameSize(true) |
136 , m_didScrollTimer(this, &FrameView::didScrollTimerFired) | 137 , m_didScrollTimer(this, &FrameView::didScrollTimerFired) |
137 , m_topControlsViewportAdjustment(0) | 138 , m_topControlsViewportAdjustment(0) |
138 , m_needsUpdateWidgetGeometries(false) | 139 , m_needsUpdateWidgetGeometries(false) |
139 , m_needsUpdateViewportIntersection(true) | 140 , m_needsUpdateViewportIntersection(true) |
140 , m_needsUpdateViewportIntersectionInSubtree(true) | 141 , m_needsUpdateViewportIntersectionInSubtree(true) |
141 #if ENABLE(ASSERT) | 142 #if ENABLE(ASSERT) |
142 , m_hasBeenDisposed(false) | 143 , m_hasBeenDisposed(false) |
143 #endif | 144 #endif |
(...skipping 1471 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1615 } | 1616 } |
1616 | 1617 |
1617 void FrameView::updateLayersAndCompositingAfterScrollIfNeeded() | 1618 void FrameView::updateLayersAndCompositingAfterScrollIfNeeded() |
1618 { | 1619 { |
1619 // Nothing to do after scrolling if there are no fixed position elements. | 1620 // Nothing to do after scrolling if there are no fixed position elements. |
1620 if (!hasViewportConstrainedObjects()) | 1621 if (!hasViewportConstrainedObjects()) |
1621 return; | 1622 return; |
1622 | 1623 |
1623 RefPtrWillBeRawPtr<FrameView> protect(this); | 1624 RefPtrWillBeRawPtr<FrameView> protect(this); |
1624 | 1625 |
| 1626 // Update sticky position objects which are stuck to the viewport. |
| 1627 for (const auto& viewportConstrainedObject : *m_viewportConstrainedObjects)
{ |
| 1628 LayoutObject* layoutObject = viewportConstrainedObject; |
| 1629 PaintLayer* layer = toLayoutBoxModelObject(layoutObject)->layer(); |
| 1630 if (layoutObject->style()->position() == StickyPosition) |
| 1631 layer->updateLayerPosition(); |
| 1632 } |
| 1633 |
1625 // If there fixed position elements, scrolling may cause compositing layers
to change. | 1634 // If there fixed position elements, scrolling may cause compositing layers
to change. |
1626 // Update widget and layer positions after scrolling, but only if we're not
inside of | 1635 // Update widget and layer positions after scrolling, but only if we're not
inside of |
1627 // layout. | 1636 // layout. |
1628 if (!m_nestedLayoutCount) { | 1637 if (!m_nestedLayoutCount) { |
1629 updateWidgetGeometries(); | 1638 updateWidgetGeometries(); |
1630 if (LayoutView* layoutView = this->layoutView()) | 1639 if (LayoutView* layoutView = this->layoutView()) |
1631 layoutView->layer()->setNeedsCompositingInputsUpdate(); | 1640 layoutView->layer()->setNeedsCompositingInputsUpdate(); |
1632 } | 1641 } |
1633 } | 1642 } |
1634 | 1643 |
(...skipping 2461 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4096 return m_hiddenForThrottling && m_crossOriginForThrottling; | 4105 return m_hiddenForThrottling && m_crossOriginForThrottling; |
4097 } | 4106 } |
4098 | 4107 |
4099 LayoutBox& FrameView::boxForScrollControlPaintInvalidation() const | 4108 LayoutBox& FrameView::boxForScrollControlPaintInvalidation() const |
4100 { | 4109 { |
4101 ASSERT(layoutView()); | 4110 ASSERT(layoutView()); |
4102 return *layoutView(); | 4111 return *layoutView(); |
4103 } | 4112 } |
4104 | 4113 |
4105 } // namespace blink | 4114 } // namespace blink |
OLD | NEW |