OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009, 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2009, 2010 Apple Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 476 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
487 | 487 |
488 void RenderLayerCompositor::repaintOnCompositingChange(RenderLayer* layer) | 488 void RenderLayerCompositor::repaintOnCompositingChange(RenderLayer* layer) |
489 { | 489 { |
490 // If the renderer is not attached yet, no need to repaint. | 490 // If the renderer is not attached yet, no need to repaint. |
491 if (layer->renderer() != &m_renderView && !layer->renderer()->parent()) | 491 if (layer->renderer() != &m_renderView && !layer->renderer()->parent()) |
492 return; | 492 return; |
493 | 493 |
494 layer->repainter().repaintIncludingNonCompositingDescendants(); | 494 layer->repainter().repaintIncludingNonCompositingDescendants(); |
495 } | 495 } |
496 | 496 |
497 // This method assumes that layout is up-to-date, unlike repaintOnCompositingCha
nge(). | |
498 void RenderLayerCompositor::repaintInCompositedAncestor(RenderLayer* layer, cons
t LayoutRect& rect) | |
499 { | |
500 RenderLayer* compositedAncestor = layer->enclosingCompositingLayerForPaintIn
validation(ExcludeSelf); | |
501 if (!compositedAncestor) | |
502 return; | |
503 ASSERT(compositedAncestor->compositingState() == PaintsIntoOwnBacking || com
positedAncestor->compositingState() == PaintsIntoGroupedBacking); | |
504 | |
505 LayoutPoint offset; | |
506 layer->convertToLayerCoords(compositedAncestor, offset); | |
507 LayoutRect repaintRect = rect; | |
508 repaintRect.moveBy(offset); | |
509 compositedAncestor->repainter().setBackingNeedsRepaintInRect(repaintRect); | |
510 } | |
511 | |
512 void RenderLayerCompositor::frameViewDidChangeLocation(const IntPoint& contentsO
ffset) | 497 void RenderLayerCompositor::frameViewDidChangeLocation(const IntPoint& contentsO
ffset) |
513 { | 498 { |
514 if (m_overflowControlsHostLayer) | 499 if (m_overflowControlsHostLayer) |
515 m_overflowControlsHostLayer->setPosition(contentsOffset); | 500 m_overflowControlsHostLayer->setPosition(contentsOffset); |
516 } | 501 } |
517 | 502 |
518 void RenderLayerCompositor::frameViewDidChangeSize() | 503 void RenderLayerCompositor::frameViewDidChangeSize() |
519 { | 504 { |
520 if (m_containerLayer) { | 505 if (m_containerLayer) { |
521 FrameView* frameView = m_renderView.frameView(); | 506 FrameView* frameView = m_renderView.frameView(); |
(...skipping 686 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1208 } else if (graphicsLayer == m_scrollLayer.get()) { | 1193 } else if (graphicsLayer == m_scrollLayer.get()) { |
1209 name = "LocalFrame Scrolling Layer"; | 1194 name = "LocalFrame Scrolling Layer"; |
1210 } else { | 1195 } else { |
1211 ASSERT_NOT_REACHED(); | 1196 ASSERT_NOT_REACHED(); |
1212 } | 1197 } |
1213 | 1198 |
1214 return name; | 1199 return name; |
1215 } | 1200 } |
1216 | 1201 |
1217 } // namespace WebCore | 1202 } // namespace WebCore |
OLD | NEW |