| 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 1340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1351 setShouldDoFullPaintInvalidationIncludingNonCompositingDescendants(child
); | 1351 setShouldDoFullPaintInvalidationIncludingNonCompositingDescendants(child
); |
| 1352 } | 1352 } |
| 1353 } | 1353 } |
| 1354 | 1354 |
| 1355 bool FrameView::scrollContentsFastPath(const IntSize& scrollDelta) | 1355 bool FrameView::scrollContentsFastPath(const IntSize& scrollDelta) |
| 1356 { | 1356 { |
| 1357 if (!contentsInCompositedLayer() || hasSlowRepaintObjects()) | 1357 if (!contentsInCompositedLayer() || hasSlowRepaintObjects()) |
| 1358 return false; | 1358 return false; |
| 1359 | 1359 |
| 1360 if (!m_viewportConstrainedObjects || m_viewportConstrainedObjects->isEmpty()
) { | 1360 if (!m_viewportConstrainedObjects || m_viewportConstrainedObjects->isEmpty()
) { |
| 1361 InspectorInstrumentation::didScroll(page()); | 1361 InspectorInstrumentation::didScroll(m_frame.get()); |
| 1362 return true; | 1362 return true; |
| 1363 } | 1363 } |
| 1364 | 1364 |
| 1365 for (const auto& viewportConstrainedObject : *m_viewportConstrainedObjects)
{ | 1365 for (const auto& viewportConstrainedObject : *m_viewportConstrainedObjects)
{ |
| 1366 RenderObject* renderer = viewportConstrainedObject; | 1366 RenderObject* renderer = viewportConstrainedObject; |
| 1367 ASSERT(renderer->style()->hasViewportConstrainedPosition()); | 1367 ASSERT(renderer->style()->hasViewportConstrainedPosition()); |
| 1368 ASSERT(renderer->hasLayer()); | 1368 ASSERT(renderer->hasLayer()); |
| 1369 RenderLayer* layer = toRenderBoxModelObject(renderer)->layer(); | 1369 RenderLayer* layer = toRenderBoxModelObject(renderer)->layer(); |
| 1370 | 1370 |
| 1371 if (layer->isPaintInvalidationContainer()) | 1371 if (layer->isPaintInvalidationContainer()) |
| 1372 continue; | 1372 continue; |
| 1373 | 1373 |
| 1374 if (layer->subtreeIsInvisible()) | 1374 if (layer->subtreeIsInvisible()) |
| 1375 continue; | 1375 continue; |
| 1376 | 1376 |
| 1377 // If the fixed layer has a blur/drop-shadow filter applied on at least
one of its parents, we cannot | 1377 // If the fixed layer has a blur/drop-shadow filter applied on at least
one of its parents, we cannot |
| 1378 // scroll using the fast path, otherwise the outsets of the filter will
be moved around the page. | 1378 // scroll using the fast path, otherwise the outsets of the filter will
be moved around the page. |
| 1379 if (layer->hasAncestorWithFilterOutsets()) | 1379 if (layer->hasAncestorWithFilterOutsets()) |
| 1380 return false; | 1380 return false; |
| 1381 | 1381 |
| 1382 setShouldDoFullPaintInvalidationIncludingNonCompositingDescendants(layer
); | 1382 setShouldDoFullPaintInvalidationIncludingNonCompositingDescendants(layer
); |
| 1383 } | 1383 } |
| 1384 | 1384 |
| 1385 InspectorInstrumentation::didScroll(page()); | 1385 InspectorInstrumentation::didScroll(m_frame.get()); |
| 1386 return true; | 1386 return true; |
| 1387 } | 1387 } |
| 1388 | 1388 |
| 1389 void FrameView::scrollContentsSlowPath(const IntRect& updateRect) | 1389 void FrameView::scrollContentsSlowPath(const IntRect& updateRect) |
| 1390 { | 1390 { |
| 1391 if (contentsInCompositedLayer()) { | 1391 if (contentsInCompositedLayer()) { |
| 1392 IntRect updateRect = visibleContentRect(); | 1392 IntRect updateRect = visibleContentRect(); |
| 1393 ASSERT(renderView()); | 1393 ASSERT(renderView()); |
| 1394 renderView()->invalidatePaintRectangle(updateRect); | 1394 renderView()->invalidatePaintRectangle(updateRect); |
| 1395 } | 1395 } |
| (...skipping 743 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2139 | 2139 |
| 2140 if (!wasViewportResized()) | 2140 if (!wasViewportResized()) |
| 2141 return; | 2141 return; |
| 2142 | 2142 |
| 2143 m_lastViewportSize = layoutSize(IncludeScrollbars); | 2143 m_lastViewportSize = layoutSize(IncludeScrollbars); |
| 2144 m_lastZoomFactor = renderView->style()->zoom(); | 2144 m_lastZoomFactor = renderView->style()->zoom(); |
| 2145 | 2145 |
| 2146 m_frame->document()->enqueueResizeEvent(); | 2146 m_frame->document()->enqueueResizeEvent(); |
| 2147 | 2147 |
| 2148 if (m_frame->isMainFrame()) | 2148 if (m_frame->isMainFrame()) |
| 2149 InspectorInstrumentation::didResizeMainFrame(m_frame->page()); | 2149 InspectorInstrumentation::didResizeMainFrame(m_frame.get()); |
| 2150 } | 2150 } |
| 2151 | 2151 |
| 2152 void FrameView::postLayoutTimerFired(Timer<FrameView>*) | 2152 void FrameView::postLayoutTimerFired(Timer<FrameView>*) |
| 2153 { | 2153 { |
| 2154 performPostLayoutTasks(); | 2154 performPostLayoutTasks(); |
| 2155 } | 2155 } |
| 2156 | 2156 |
| 2157 void FrameView::updateCounters() | 2157 void FrameView::updateCounters() |
| 2158 { | 2158 { |
| 2159 RenderView* view = renderView(); | 2159 RenderView* view = renderView(); |
| (...skipping 1878 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4038 { | 4038 { |
| 4039 Settings* settings = frame().settings(); | 4039 Settings* settings = frame().settings(); |
| 4040 if (!settings || !settings->rootLayerScrolls()) | 4040 if (!settings || !settings->rootLayerScrolls()) |
| 4041 return this; | 4041 return this; |
| 4042 | 4042 |
| 4043 RenderView* renderView = this->renderView(); | 4043 RenderView* renderView = this->renderView(); |
| 4044 return renderView ? renderView->scrollableArea() : nullptr; | 4044 return renderView ? renderView->scrollableArea() : nullptr; |
| 4045 } | 4045 } |
| 4046 | 4046 |
| 4047 } // namespace blink | 4047 } // namespace blink |
| OLD | NEW |