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