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 1465 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1476 // the initial containing block does not change (so we can't rely on layout | 1476 // the initial containing block does not change (so we can't rely on layout |
1477 // to issue the invalidation). This is because the background fills the | 1477 // to issue the invalidation). This is because the background fills the |
1478 // main GraphicsLayer, which takes the size of the layout viewport. | 1478 // main GraphicsLayer, which takes the size of the layout viewport. |
1479 // TODO(skobes): Paint non-fixed backgrounds into the scrolling contents | 1479 // TODO(skobes): Paint non-fixed backgrounds into the scrolling contents |
1480 // layer and avoid this invalidation (http://crbug.com/568847). | 1480 // layer and avoid this invalidation (http://crbug.com/568847). |
1481 LayoutViewItem lvi = layoutViewItem(); | 1481 LayoutViewItem lvi = layoutViewItem(); |
1482 if (!lvi.isNull()) | 1482 if (!lvi.isNull()) |
1483 lvi.setShouldDoFullPaintInvalidation(); | 1483 lvi.setShouldDoFullPaintInvalidation(); |
1484 } | 1484 } |
1485 | 1485 |
| 1486 if (RuntimeEnabledFeatures::inertTopControlsEnabled() && layoutView() && |
| 1487 layoutView()->style()->hasFixedBackgroundImage()) { |
| 1488 // In the case where we don't change layout size from top control resizes, |
| 1489 // we wont perform a layout. If we have a fixed background image however, |
| 1490 // the background layer needs to get resized so we should request a layout |
| 1491 // explicitly. |
| 1492 PaintLayer* layer = layoutView()->layer(); |
| 1493 if (layoutView()->compositor()->needsFixedRootBackgroundLayer(layer)) { |
| 1494 setNeedsLayout(); |
| 1495 } else if (!RuntimeEnabledFeatures::rootLayerScrollingEnabled()) { |
| 1496 // If root layer scrolls is on, we've already issued a full invalidation |
| 1497 // above. |
| 1498 layoutView()->setShouldDoFullPaintInvalidationOnResizeIfNeeded( |
| 1499 widthChanged, heightChanged); |
| 1500 } |
| 1501 } |
| 1502 |
1486 if (!hasViewportConstrainedObjects()) | 1503 if (!hasViewportConstrainedObjects()) |
1487 return; | 1504 return; |
1488 | 1505 |
1489 for (const auto& viewportConstrainedObject : *m_viewportConstrainedObjects) { | 1506 for (const auto& viewportConstrainedObject : *m_viewportConstrainedObjects) { |
1490 LayoutObject* layoutObject = viewportConstrainedObject; | 1507 LayoutObject* layoutObject = viewportConstrainedObject; |
1491 const ComputedStyle& style = layoutObject->styleRef(); | 1508 const ComputedStyle& style = layoutObject->styleRef(); |
1492 if (widthChanged) { | 1509 if (widthChanged) { |
1493 if (style.width().isFixed() && | 1510 if (style.width().isFixed() && |
1494 (style.left().isAuto() || style.right().isAuto())) | 1511 (style.left().isAuto() || style.right().isAuto())) |
1495 layoutObject->setNeedsPositionedMovementLayout(); | 1512 layoutObject->setNeedsPositionedMovementLayout(); |
(...skipping 3051 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4547 DCHECK(m_frame->isMainFrame()); | 4564 DCHECK(m_frame->isMainFrame()); |
4548 return m_initialViewportSize.width(); | 4565 return m_initialViewportSize.width(); |
4549 } | 4566 } |
4550 | 4567 |
4551 int FrameView::initialViewportHeight() const { | 4568 int FrameView::initialViewportHeight() const { |
4552 DCHECK(m_frame->isMainFrame()); | 4569 DCHECK(m_frame->isMainFrame()); |
4553 return m_initialViewportSize.height(); | 4570 return m_initialViewportSize.height(); |
4554 } | 4571 } |
4555 | 4572 |
4556 } // namespace blink | 4573 } // namespace blink |
OLD | NEW |