OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved. |
3 * | 3 * |
4 * Portions are Copyright (C) 1998 Netscape Communications Corporation. | 4 * Portions are Copyright (C) 1998 Netscape Communications Corporation. |
5 * | 5 * |
6 * Other contributors: | 6 * Other contributors: |
7 * Robert O'Callahan <roc+@cs.cmu.edu> | 7 * Robert O'Callahan <roc+@cs.cmu.edu> |
8 * David Baron <dbaron@fas.harvard.edu> | 8 * David Baron <dbaron@fas.harvard.edu> |
9 * Christian Biesinger <cbiesinger@web.de> | 9 * Christian Biesinger <cbiesinger@web.de> |
10 * Randall Jesup <rjesup@wgate.com> | 10 * Randall Jesup <rjesup@wgate.com> |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 , m_visibleDescendantStatusDirty(false) | 149 , m_visibleDescendantStatusDirty(false) |
150 , m_hasVisibleDescendant(false) | 150 , m_hasVisibleDescendant(false) |
151 , m_isPaginated(false) | 151 , m_isPaginated(false) |
152 , m_3DTransformedDescendantStatusDirty(true) | 152 , m_3DTransformedDescendantStatusDirty(true) |
153 , m_has3DTransformedDescendant(false) | 153 , m_has3DTransformedDescendant(false) |
154 #if USE(ACCELERATED_COMPOSITING) | 154 #if USE(ACCELERATED_COMPOSITING) |
155 , m_hasCompositingDescendant(false) | 155 , m_hasCompositingDescendant(false) |
156 , m_mustOverlapCompositedLayers(false) | 156 , m_mustOverlapCompositedLayers(false) |
157 #endif | 157 #endif |
158 , m_containsDirtyOverlayScrollbars(false) | 158 , m_containsDirtyOverlayScrollbars(false) |
| 159 , m_canSkipRepaintRectsUpdateOnScroll(renderer->isTableCell()) |
159 , m_renderer(renderer) | 160 , m_renderer(renderer) |
160 , m_parent(0) | 161 , m_parent(0) |
161 , m_previous(0) | 162 , m_previous(0) |
162 , m_next(0) | 163 , m_next(0) |
163 , m_first(0) | 164 , m_first(0) |
164 , m_last(0) | 165 , m_last(0) |
165 , m_posZOrderList(0) | 166 , m_posZOrderList(0) |
166 , m_negZOrderList(0) | 167 , m_negZOrderList(0) |
167 , m_normalFlowList(0) | 168 , m_normalFlowList(0) |
168 , m_clipRects(0) | 169 , m_clipRects(0) |
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
416 | 417 |
417 void RenderLayer::clearRepaintRects() | 418 void RenderLayer::clearRepaintRects() |
418 { | 419 { |
419 ASSERT(!m_hasVisibleContent); | 420 ASSERT(!m_hasVisibleContent); |
420 ASSERT(!m_visibleContentStatusDirty); | 421 ASSERT(!m_visibleContentStatusDirty); |
421 | 422 |
422 m_repaintRect = IntRect(); | 423 m_repaintRect = IntRect(); |
423 m_outlineBox = IntRect(); | 424 m_outlineBox = IntRect(); |
424 } | 425 } |
425 | 426 |
426 void RenderLayer::updateLayerPositionsAfterScroll(bool fixed) | 427 void RenderLayer::updateLayerPositionsAfterScroll(UpdateLayerPositionsAfterScrol
lFlags flags) |
427 { | 428 { |
428 ASSERT(!m_visibleContentStatusDirty); | 429 ASSERT(!m_visibleContentStatusDirty); |
429 | 430 |
430 // If we have no visible content, there is no point recomputing our rectangl
es as | 431 // If we have no visible content, there is no point recomputing our rectangl
es as |
431 // they will be empty. If our visibility changes, we are expected to recompu
te all | 432 // they will be empty. If our visibility changes, we are expected to recompu
te all |
432 // our positions anyway. | 433 // our positions anyway. |
433 if (!m_hasVisibleContent) | 434 if (!m_hasVisibleContent) |
434 return; | 435 return; |
435 | 436 |
436 updateLayerPosition(); | 437 updateLayerPosition(); |
437 | 438 |
438 if (fixed || renderer()->style()->position() == FixedPosition) { | 439 if ((flags & HasSeenFixedPositionedAncestor) || renderer()->style()->positio
n() == FixedPosition) { |
439 // FIXME: Is it worth passing the offsetFromRoot around like in updateLa
yerPositions? | 440 // FIXME: Is it worth passing the offsetFromRoot around like in updateLa
yerPositions? |
440 computeRepaintRects(); | 441 computeRepaintRects(); |
441 fixed = true; | 442 flags |= HasSeenFixedPositionedAncestor; |
442 } else if (renderer()->hasTransform() && !renderer()->isRenderView()) { | 443 } else if (renderer()->hasTransform() && !renderer()->isRenderView()) { |
443 // Transforms act as fixed position containers, so nothing inside a | 444 // Transforms act as fixed position containers, so nothing inside a |
444 // transformed element can be fixed relative to the viewport if the | 445 // transformed element can be fixed relative to the viewport if the |
445 // transformed element is not fixed itself or child of a fixed element. | 446 // transformed element is not fixed itself or child of a fixed element. |
446 return; | 447 return; |
| 448 } else if ((flags & HasSeenAncestorWithOverflowClip) && !m_canSkipRepaintRec
tsUpdateOnScroll) { |
| 449 // If we have seen an overflow clip, we should update our repaint rects
as clippedOverflowRectForRepaint |
| 450 // intersects it with our ancestor overflow clip that may have moved. |
| 451 computeRepaintRects(); |
447 } | 452 } |
448 | 453 |
| 454 if (renderer()->hasOverflowClip()) |
| 455 flags |= HasSeenAncestorWithOverflowClip; |
| 456 |
449 for (RenderLayer* child = firstChild(); child; child = child->nextSibling()) | 457 for (RenderLayer* child = firstChild(); child; child = child->nextSibling()) |
450 child->updateLayerPositionsAfterScroll(fixed); | 458 child->updateLayerPositionsAfterScroll(flags); |
451 | 459 |
452 // We don't update our reflection as scrolling is a translation which does n
ot change the size() | 460 // We don't update our reflection as scrolling is a translation which does n
ot change the size() |
453 // of an object, thus RenderReplica will still repaint itself properly as th
e layer position was | 461 // of an object, thus RenderReplica will still repaint itself properly as th
e layer position was |
454 // updated above. | 462 // updated above. |
455 | 463 |
456 if (m_marquee) | 464 if (m_marquee) |
457 m_marquee->updateMarqueePosition(); | 465 m_marquee->updateMarqueePosition(); |
458 } | 466 } |
459 | 467 |
460 void RenderLayer::updateTransform() | 468 void RenderLayer::updateTransform() |
(...skipping 3865 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4326 } | 4334 } |
4327 } | 4335 } |
4328 | 4336 |
4329 void showLayerTree(const WebCore::RenderObject* renderer) | 4337 void showLayerTree(const WebCore::RenderObject* renderer) |
4330 { | 4338 { |
4331 if (!renderer) | 4339 if (!renderer) |
4332 return; | 4340 return; |
4333 showLayerTree(renderer->enclosingLayer()); | 4341 showLayerTree(renderer->enclosingLayer()); |
4334 } | 4342 } |
4335 #endif | 4343 #endif |
OLD | NEW |