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