Chromium Code Reviews| 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 1345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1356 || layer->viewportConstrainedNotCompositedReason() == RenderLayer::N otCompositedForNoVisibleContent) { | 1356 || layer->viewportConstrainedNotCompositedReason() == RenderLayer::N otCompositedForNoVisibleContent) { |
| 1357 // Don't invalidate for invisible fixed layers. | 1357 // Don't invalidate for invisible fixed layers. |
| 1358 continue; | 1358 continue; |
| 1359 } | 1359 } |
| 1360 | 1360 |
| 1361 if (layer->hasAncestorWithFilterOutsets()) { | 1361 if (layer->hasAncestorWithFilterOutsets()) { |
| 1362 // If the fixed layer has a blur/drop-shadow filter applied on at le ast one of its parents, we cannot | 1362 // If the fixed layer has a blur/drop-shadow filter applied on at le ast one of its parents, we cannot |
| 1363 // scroll using the fast path, otherwise the outsets of the filter w ill be moved around the page. | 1363 // scroll using the fast path, otherwise the outsets of the filter w ill be moved around the page. |
| 1364 return false; | 1364 return false; |
| 1365 } | 1365 } |
| 1366 | |
| 1366 IntRect updateRect = pixelSnappedIntRect(layer->repaintRectIncludingNonC ompositingDescendants()); | 1367 IntRect updateRect = pixelSnappedIntRect(layer->repaintRectIncludingNonC ompositingDescendants()); |
| 1367 updateRect = contentsToRootView(updateRect); | 1368 |
| 1368 if (!isCompositedContentLayer && clipsRepaints()) | 1369 RenderLayer* enclosingCompositingLayer = layer->enclosingCompositingLaye r(false); |
| 1369 updateRect.intersect(rectToScroll); | 1370 if (enclosingCompositingLayer && !enclosingCompositingLayer->renderer()- >isRenderView()) { |
| 1370 if (!updateRect.isEmpty()) | 1371 // If the fixed-position layer is contained by a composited layer th at is not its containing block, |
| 1371 regionToUpdate.unite(updateRect); | 1372 // then we have to invlidate that enclosing layer, not the RenderVie w. |
|
enne (OOO)
2013/09/11 21:09:39
typo: invalidate
| |
| 1373 updateRect.moveBy(scrollPosition()); | |
|
enne (OOO)
2013/09/11 21:09:39
Can you convince me that the scrollPosition is the
shawnsingh
2013/09/11 23:10:38
The function that computes the update rect 8 lines
enne (OOO)
2013/09/12 00:07:53
Hrm. In that case, why do you need to add scrollPo
| |
| 1374 IntRect previousRect = updateRect; | |
| 1375 previousRect.move(scrollDelta); | |
| 1376 updateRect.unite(previousRect); | |
| 1377 enclosingCompositingLayer->setBackingNeedsRepaintInRect(updateRect); | |
| 1378 } else { | |
| 1379 // Coalesce the repaints that will be issued to the renderView. | |
| 1380 updateRect = contentsToRootView(updateRect); | |
| 1381 if (!isCompositedContentLayer && clipsRepaints()) | |
| 1382 updateRect.intersect(rectToScroll); | |
| 1383 if (!updateRect.isEmpty()) | |
| 1384 regionToUpdate.unite(updateRect); | |
| 1385 } | |
| 1372 } | 1386 } |
| 1373 | 1387 |
| 1374 // 1) scroll | 1388 // 1) scroll |
| 1375 hostWindow()->scroll(scrollDelta, rectToScroll, clipRect); | 1389 hostWindow()->scroll(scrollDelta, rectToScroll, clipRect); |
| 1376 | 1390 |
| 1377 // 2) update the area of fixed objects that has been invalidated | 1391 // 2) update the area of fixed objects that has been invalidated |
| 1378 Vector<IntRect> subRectsToUpdate = regionToUpdate.rects(); | 1392 Vector<IntRect> subRectsToUpdate = regionToUpdate.rects(); |
| 1379 size_t viewportConstrainedObjectsCount = subRectsToUpdate.size(); | 1393 size_t viewportConstrainedObjectsCount = subRectsToUpdate.size(); |
| 1380 for (size_t i = 0; i < viewportConstrainedObjectsCount; ++i) { | 1394 for (size_t i = 0; i < viewportConstrainedObjectsCount; ++i) { |
| 1381 IntRect updateRect = subRectsToUpdate[i]; | 1395 IntRect updateRect = subRectsToUpdate[i]; |
| (...skipping 1998 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3380 return frame().document()->existingAXObjectCache(); | 3394 return frame().document()->existingAXObjectCache(); |
| 3381 return 0; | 3395 return 0; |
| 3382 } | 3396 } |
| 3383 | 3397 |
| 3384 bool FrameView::isMainFrame() const | 3398 bool FrameView::isMainFrame() const |
| 3385 { | 3399 { |
| 3386 return m_frame->page() && m_frame->page()->mainFrame() == m_frame; | 3400 return m_frame->page() && m_frame->page()->mainFrame() == m_frame; |
| 3387 } | 3401 } |
| 3388 | 3402 |
| 3389 } // namespace WebCore | 3403 } // namespace WebCore |
| OLD | NEW |