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 1240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1251 if (m_viewportConstrainedObjects && m_viewportConstrainedObjects->contains(o
bject)) { | 1251 if (m_viewportConstrainedObjects && m_viewportConstrainedObjects->contains(o
bject)) { |
1252 m_viewportConstrainedObjects->remove(object); | 1252 m_viewportConstrainedObjects->remove(object); |
1253 | 1253 |
1254 if (ScrollingCoordinator* scrollingCoordinator = this->scrollingCoordina
tor()) | 1254 if (ScrollingCoordinator* scrollingCoordinator = this->scrollingCoordina
tor()) |
1255 scrollingCoordinator->frameViewFixedObjectsDidChange(this); | 1255 scrollingCoordinator->frameViewFixedObjectsDidChange(this); |
1256 } | 1256 } |
1257 } | 1257 } |
1258 | 1258 |
1259 void FrameView::viewportSizeChanged(bool widthChanged, bool heightChanged) | 1259 void FrameView::viewportSizeChanged(bool widthChanged, bool heightChanged) |
1260 { | 1260 { |
| 1261 if (m_frame->settings() && m_frame->settings()->rootLayerScrolls()) { |
| 1262 // The background must be repainted when the FrameView is resized, even
if the initial |
| 1263 // containing block does not change (so we can't rely on layout to issue
the invalidation). |
| 1264 // This is because the background fills the main GraphicsLayer, which ta
kes the size of the |
| 1265 // layout viewport. |
| 1266 // TODO(skobes): Paint non-fixed backgrounds into the scrolling contents
layer and avoid |
| 1267 // this invalidation (http://crbug.com/568847). |
| 1268 if (LayoutView* lv = layoutView()) |
| 1269 lv->setShouldDoFullPaintInvalidation(); |
| 1270 } |
| 1271 |
1261 if (!hasViewportConstrainedObjects()) | 1272 if (!hasViewportConstrainedObjects()) |
1262 return; | 1273 return; |
1263 | 1274 |
1264 for (const auto& viewportConstrainedObject : *m_viewportConstrainedObjects)
{ | 1275 for (const auto& viewportConstrainedObject : *m_viewportConstrainedObjects)
{ |
1265 LayoutObject* layoutObject = viewportConstrainedObject; | 1276 LayoutObject* layoutObject = viewportConstrainedObject; |
1266 const ComputedStyle& style = layoutObject->styleRef(); | 1277 const ComputedStyle& style = layoutObject->styleRef(); |
1267 if (widthChanged) { | 1278 if (widthChanged) { |
1268 if (style.width().isFixed() && (style.left().isAuto() || style.right
().isAuto())) | 1279 if (style.width().isFixed() && (style.left().isAuto() || style.right
().isAuto())) |
1269 layoutObject->setNeedsPositionedMovementLayout(); | 1280 layoutObject->setNeedsPositionedMovementLayout(); |
1270 else | 1281 else |
(...skipping 2741 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4012 return m_hiddenForThrottling && m_crossOriginForThrottling; | 4023 return m_hiddenForThrottling && m_crossOriginForThrottling; |
4013 } | 4024 } |
4014 | 4025 |
4015 LayoutBox& FrameView::boxForScrollControlPaintInvalidation() const | 4026 LayoutBox& FrameView::boxForScrollControlPaintInvalidation() const |
4016 { | 4027 { |
4017 ASSERT(layoutView()); | 4028 ASSERT(layoutView()); |
4018 return *layoutView(); | 4029 return *layoutView(); |
4019 } | 4030 } |
4020 | 4031 |
4021 } // namespace blink | 4032 } // namespace blink |
OLD | NEW |