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