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 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
354 return; | 354 return; |
355 } | 355 } |
356 | 356 |
357 RenderPart* renderer = m_frame->ownerRenderer(); | 357 RenderPart* renderer = m_frame->ownerRenderer(); |
358 if (!renderer) | 358 if (!renderer) |
359 return; | 359 return; |
360 | 360 |
361 IntRect paintInvalidationRect = rect; | 361 IntRect paintInvalidationRect = rect; |
362 paintInvalidationRect.move(renderer->borderLeft() + renderer->paddingLeft(), | 362 paintInvalidationRect.move(renderer->borderLeft() + renderer->paddingLeft(), |
363 renderer->borderTop() + renderer->paddingTop()); | 363 renderer->borderTop() + renderer->paddingTop()); |
364 renderer->repaintRectangle(paintInvalidationRect); | 364 renderer->invalidatePaintRectangle(paintInvalidationRect); |
365 } | 365 } |
366 | 366 |
367 void FrameView::setFrameRect(const IntRect& newRect) | 367 void FrameView::setFrameRect(const IntRect& newRect) |
368 { | 368 { |
369 IntRect oldRect = frameRect(); | 369 IntRect oldRect = frameRect(); |
370 if (newRect == oldRect) | 370 if (newRect == oldRect) |
371 return; | 371 return; |
372 | 372 |
373 // Autosized font sizes depend on the width of the viewing area. | 373 // Autosized font sizes depend on the width of the viewing area. |
374 bool autosizerNeedsUpdating = false; | 374 bool autosizerNeedsUpdating = false; |
(...skipping 622 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
997 m_nestedLayoutCount--; | 997 m_nestedLayoutCount--; |
998 if (m_nestedLayoutCount) | 998 if (m_nestedLayoutCount) |
999 return; | 999 return; |
1000 | 1000 |
1001 if (RuntimeEnabledFeatures::repaintAfterLayoutEnabled()) { | 1001 if (RuntimeEnabledFeatures::repaintAfterLayoutEnabled()) { |
1002 invalidateTree(rootForThisLayout); | 1002 invalidateTree(rootForThisLayout); |
1003 } else if (m_doFullPaintInvalidation) { | 1003 } else if (m_doFullPaintInvalidation) { |
1004 // FIXME: This isn't really right, since the RenderView doesn't fully en
compass | 1004 // FIXME: This isn't really right, since the RenderView doesn't fully en
compass |
1005 // the visibleContentRect(). It just happens to work out most of the tim
e, | 1005 // the visibleContentRect(). It just happens to work out most of the tim
e, |
1006 // since first layouts and printing don't have you scrolled anywhere. | 1006 // since first layouts and printing don't have you scrolled anywhere. |
1007 renderView()->repaint(); | 1007 renderView()->paintInvalidationForWholeRenderer(); |
1008 } | 1008 } |
1009 | 1009 |
1010 m_doFullPaintInvalidation = false; | 1010 m_doFullPaintInvalidation = false; |
1011 | 1011 |
1012 #ifndef NDEBUG | 1012 #ifndef NDEBUG |
1013 // Post-layout assert that nobody was re-marked as needing layout during lay
out. | 1013 // Post-layout assert that nobody was re-marked as needing layout during lay
out. |
1014 document->renderView()->assertSubtreeIsLaidOut(); | 1014 document->renderView()->assertSubtreeIsLaidOut(); |
1015 #endif | 1015 #endif |
1016 | 1016 |
1017 // FIXME: It should be not possible to remove the FrameView from the frame/p
age during layout | 1017 // FIXME: It should be not possible to remove the FrameView from the frame/p
age during layout |
(...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1417 const RenderLayerModelObject* repaintContainer = layer->renderer()->cont
ainerForRepaint(); | 1417 const RenderLayerModelObject* repaintContainer = layer->renderer()->cont
ainerForRepaint(); |
1418 if (repaintContainer && !repaintContainer->isRenderView()) { | 1418 if (repaintContainer && !repaintContainer->isRenderView()) { |
1419 // If the fixed-position layer is contained by a composited layer th
at is not its containing block, | 1419 // If the fixed-position layer is contained by a composited layer th
at is not its containing block, |
1420 // then we have to invalidate that enclosing layer, not the RenderVi
ew. | 1420 // then we have to invalidate that enclosing layer, not the RenderVi
ew. |
1421 // FIXME: Why do we need to issue this invalidation? Won't the fixed
position element just scroll | 1421 // FIXME: Why do we need to issue this invalidation? Won't the fixed
position element just scroll |
1422 // with the enclosing layer. | 1422 // with the enclosing layer. |
1423 updateRect.moveBy(scrollPosition()); | 1423 updateRect.moveBy(scrollPosition()); |
1424 IntRect previousRect = updateRect; | 1424 IntRect previousRect = updateRect; |
1425 previousRect.move(scrollDelta); | 1425 previousRect.move(scrollDelta); |
1426 updateRect.unite(previousRect); | 1426 updateRect.unite(previousRect); |
1427 layer->renderer()->repaintUsingContainer(repaintContainer, updateRec
t, InvalidationScroll); | 1427 layer->renderer()->invalidatePaintUsingContainer(repaintContainer, u
pdateRect, InvalidationScroll); |
1428 } else { | 1428 } else { |
1429 // Coalesce the paint invalidations that will be issued to the rende
rView. | 1429 // Coalesce the paint invalidations that will be issued to the rende
rView. |
1430 updateRect = contentsToRootView(updateRect); | 1430 updateRect = contentsToRootView(updateRect); |
1431 if (!isCompositedContentLayer && clipsPaintInvalidations()) | 1431 if (!isCompositedContentLayer && clipsPaintInvalidations()) |
1432 updateRect.intersect(rectToScroll); | 1432 updateRect.intersect(rectToScroll); |
1433 if (!updateRect.isEmpty()) | 1433 if (!updateRect.isEmpty()) |
1434 regionToUpdate.unite(updateRect); | 1434 regionToUpdate.unite(updateRect); |
1435 } | 1435 } |
1436 } | 1436 } |
1437 | 1437 |
(...skipping 27 matching lines...) Expand all Loading... |
1465 if (contentsInCompositedLayer()) { | 1465 if (contentsInCompositedLayer()) { |
1466 IntRect updateRect = visibleContentRect(); | 1466 IntRect updateRect = visibleContentRect(); |
1467 ASSERT(renderView()); | 1467 ASSERT(renderView()); |
1468 renderView()->layer()->repainter().setBackingNeedsRepaintInRect(updateRe
ct); | 1468 renderView()->layer()->repainter().setBackingNeedsRepaintInRect(updateRe
ct); |
1469 } | 1469 } |
1470 if (RenderPart* frameRenderer = m_frame->ownerRenderer()) { | 1470 if (RenderPart* frameRenderer = m_frame->ownerRenderer()) { |
1471 if (isEnclosedInCompositingLayer()) { | 1471 if (isEnclosedInCompositingLayer()) { |
1472 LayoutRect rect(frameRenderer->borderLeft() + frameRenderer->padding
Left(), | 1472 LayoutRect rect(frameRenderer->borderLeft() + frameRenderer->padding
Left(), |
1473 frameRenderer->borderTop() + frameRenderer->paddingT
op(), | 1473 frameRenderer->borderTop() + frameRenderer->paddingT
op(), |
1474 visibleWidth(), visibleHeight()); | 1474 visibleWidth(), visibleHeight()); |
1475 frameRenderer->repaintRectangle(rect); | 1475 frameRenderer->invalidatePaintRectangle(rect); |
1476 return; | 1476 return; |
1477 } | 1477 } |
1478 } | 1478 } |
1479 | 1479 |
1480 ScrollView::scrollContentsSlowPath(updateRect); | 1480 ScrollView::scrollContentsSlowPath(updateRect); |
1481 } | 1481 } |
1482 | 1482 |
1483 // Note that this gets called at painting time. | 1483 // Note that this gets called at painting time. |
1484 void FrameView::setIsOverlapped(bool isOverlapped) | 1484 void FrameView::setIsOverlapped(bool isOverlapped) |
1485 { | 1485 { |
(...skipping 1787 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3273 void FrameView::willRemoveScrollbar(Scrollbar* scrollbar, ScrollbarOrientation o
rientation) | 3273 void FrameView::willRemoveScrollbar(Scrollbar* scrollbar, ScrollbarOrientation o
rientation) |
3274 { | 3274 { |
3275 ScrollableArea::willRemoveScrollbar(scrollbar, orientation); | 3275 ScrollableArea::willRemoveScrollbar(scrollbar, orientation); |
3276 if (AXObjectCache* cache = axObjectCache()) { | 3276 if (AXObjectCache* cache = axObjectCache()) { |
3277 cache->remove(scrollbar); | 3277 cache->remove(scrollbar); |
3278 cache->handleScrollbarUpdate(this); | 3278 cache->handleScrollbarUpdate(this); |
3279 } | 3279 } |
3280 } | 3280 } |
3281 | 3281 |
3282 } // namespace WebCore | 3282 } // namespace WebCore |
OLD | NEW |