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