Chromium Code Reviews| 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 1591 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1602 if (m_frame->document() && !m_frame->document()->layoutViewItem().isNull()) | 1602 if (m_frame->document() && !m_frame->document()->layoutViewItem().isNull()) |
| 1603 m_frame->document()->fetcher()->updateAllImageResourcePriorities(); | 1603 m_frame->document()->fetcher()->updateAllImageResourcePriorities(); |
| 1604 } | 1604 } |
| 1605 | 1605 |
| 1606 void FrameView::updateLayersAndCompositingAfterScrollIfNeeded() | 1606 void FrameView::updateLayersAndCompositingAfterScrollIfNeeded() |
| 1607 { | 1607 { |
| 1608 // Nothing to do after scrolling if there are no fixed position elements. | 1608 // Nothing to do after scrolling if there are no fixed position elements. |
| 1609 if (!hasViewportConstrainedObjects()) | 1609 if (!hasViewportConstrainedObjects()) |
| 1610 return; | 1610 return; |
| 1611 | 1611 |
| 1612 // Update sticky position objects which are stuck to the viewport. | 1612 // Mark sticky position objects which are stuck to the viewport for position ed movement. |
| 1613 for (const auto& viewportConstrainedObject : *m_viewportConstrainedObjects) { | 1613 for (const auto& viewportConstrainedObject : *m_viewportConstrainedObjects) { |
| 1614 LayoutObject* layoutObject = viewportConstrainedObject; | 1614 LayoutObject* layoutObject = viewportConstrainedObject; |
| 1615 PaintLayer* layer = toLayoutBoxModelObject(layoutObject)->layer(); | |
| 1616 if (layoutObject->style()->position() == StickyPosition) | 1615 if (layoutObject->style()->position() == StickyPosition) |
| 1617 layer->updateLayerPosition(); | 1616 layoutObject->setNeedsPositionedMovementLayout(); |
|
chrishtr
2016/05/31 20:19:53
What about sticky objects that are not stuck to th
flackr
2016/05/31 20:38:52
This is already handled by PaintLayerScrollableAre
| |
| 1618 } | 1617 } |
| 1619 | 1618 |
| 1620 // If there fixed position elements, scrolling may cause compositing layers to change. | 1619 // If there fixed position elements, scrolling may cause compositing layers to change. |
| 1621 // Update widget and layer positions after scrolling, but only if we're not inside of | 1620 // Update widget and layer positions after scrolling, but only if we're not inside of |
| 1622 // layout. | 1621 // layout. |
| 1623 if (!m_nestedLayoutCount) { | 1622 if (!m_nestedLayoutCount) { |
| 1624 updateWidgetGeometries(); | 1623 updateWidgetGeometries(); |
| 1625 LayoutViewItem layoutViewItem = this->layoutViewItem(); | 1624 LayoutViewItem layoutViewItem = this->layoutViewItem(); |
| 1626 if (!layoutViewItem.isNull()) | 1625 if (!layoutViewItem.isNull()) |
| 1627 layoutViewItem.layer()->setNeedsCompositingInputsUpdate(); | 1626 layoutViewItem.layer()->setNeedsCompositingInputsUpdate(); |
| (...skipping 2487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 4115 return m_subtreeThrottled || (m_hiddenForThrottling && m_crossOriginForThrot tling); | 4114 return m_subtreeThrottled || (m_hiddenForThrottling && m_crossOriginForThrot tling); |
| 4116 } | 4115 } |
| 4117 | 4116 |
| 4118 LayoutBox& FrameView::boxForScrollControlPaintInvalidation() const | 4117 LayoutBox& FrameView::boxForScrollControlPaintInvalidation() const |
| 4119 { | 4118 { |
| 4120 ASSERT(!layoutViewItem().isNull()); | 4119 ASSERT(!layoutViewItem().isNull()); |
| 4121 return *layoutView(); | 4120 return *layoutView(); |
| 4122 } | 4121 } |
| 4123 | 4122 |
| 4124 } // namespace blink | 4123 } // namespace blink |
| OLD | NEW |