OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
58 #include "core/frame/Settings.h" | 58 #include "core/frame/Settings.h" |
59 #include "core/html/HTMLFrameElement.h" | 59 #include "core/html/HTMLFrameElement.h" |
60 #include "core/page/Page.h" | 60 #include "core/page/Page.h" |
61 #include "core/page/scrolling/ScrollingCoordinator.h" | 61 #include "core/page/scrolling/ScrollingCoordinator.h" |
62 #include "core/rendering/ColumnInfo.h" | 62 #include "core/rendering/ColumnInfo.h" |
63 #include "core/rendering/CompositedLayerMapping.h" | 63 #include "core/rendering/CompositedLayerMapping.h" |
64 #include "core/rendering/FilterEffectRenderer.h" | 64 #include "core/rendering/FilterEffectRenderer.h" |
65 #include "core/rendering/HitTestRequest.h" | 65 #include "core/rendering/HitTestRequest.h" |
66 #include "core/rendering/HitTestResult.h" | 66 #include "core/rendering/HitTestResult.h" |
67 #include "core/rendering/HitTestingTransformState.h" | 67 #include "core/rendering/HitTestingTransformState.h" |
68 #include "core/rendering/LayoutRectRecorder.h" | |
68 #include "core/rendering/RenderFlowThread.h" | 69 #include "core/rendering/RenderFlowThread.h" |
69 #include "core/rendering/RenderGeometryMap.h" | 70 #include "core/rendering/RenderGeometryMap.h" |
70 #include "core/rendering/RenderInline.h" | 71 #include "core/rendering/RenderInline.h" |
71 #include "core/rendering/RenderLayerCompositor.h" | 72 #include "core/rendering/RenderLayerCompositor.h" |
72 #include "core/rendering/RenderReplica.h" | 73 #include "core/rendering/RenderReplica.h" |
73 #include "core/rendering/RenderScrollbar.h" | 74 #include "core/rendering/RenderScrollbar.h" |
74 #include "core/rendering/RenderScrollbarPart.h" | 75 #include "core/rendering/RenderScrollbarPart.h" |
75 #include "core/rendering/RenderTreeAsText.h" | 76 #include "core/rendering/RenderTreeAsText.h" |
76 #include "core/rendering/RenderView.h" | 77 #include "core/rendering/RenderView.h" |
77 #include "core/rendering/svg/ReferenceFilterBuilder.h" | 78 #include "core/rendering/svg/ReferenceFilterBuilder.h" |
(...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
463 if (this != view->layer()) | 464 if (this != view->layer()) |
464 geometryMap.pushMappingsToAncestor(parent(), 0); | 465 geometryMap.pushMappingsToAncestor(parent(), 0); |
465 | 466 |
466 // FIXME: why is it OK to not check the ancestors of this layer in order to | 467 // FIXME: why is it OK to not check the ancestors of this layer in order to |
467 // initialize the HasSeenViewportConstrainedAncestor and HasSeenAncestorWith OverflowClip flags? | 468 // initialize the HasSeenViewportConstrainedAncestor and HasSeenAncestorWith OverflowClip flags? |
468 updateLayerPositionsAfterScroll(&geometryMap, IsOverflowScroll); | 469 updateLayerPositionsAfterScroll(&geometryMap, IsOverflowScroll); |
469 } | 470 } |
470 | 471 |
471 void RenderLayer::updateLayerPositionsAfterScroll(RenderGeometryMap* geometryMap , UpdateLayerPositionsAfterScrollFlags flags) | 472 void RenderLayer::updateLayerPositionsAfterScroll(RenderGeometryMap* geometryMap , UpdateLayerPositionsAfterScrollFlags flags) |
472 { | 473 { |
474 LayoutRectRecorder recorder(*m_renderer); | |
Julien - ping for review
2014/02/14 18:05:48
This seems too heavy handed (but we could leave wi
dsinclair
2014/02/14 18:15:27
It's possible this isn't needed at all. I've been
| |
475 | |
473 // FIXME: This shouldn't be needed, but there are some corner cases where | 476 // FIXME: This shouldn't be needed, but there are some corner cases where |
474 // these flags are still dirty. Update so that the check below is valid. | 477 // these flags are still dirty. Update so that the check below is valid. |
475 updateDescendantDependentFlags(); | 478 updateDescendantDependentFlags(); |
476 | 479 |
477 // If we have no visible content and no visible descendants, there is no poi nt recomputing | 480 // If we have no visible content and no visible descendants, there is no poi nt recomputing |
478 // our rectangles as they will be empty. If our visibility changes, we are e xpected to | 481 // our rectangles as they will be empty. If our visibility changes, we are e xpected to |
479 // recompute all our positions anyway. | 482 // recompute all our positions anyway. |
480 if (subtreeIsInvisible()) | 483 if (subtreeIsInvisible()) |
481 return; | 484 return; |
482 | 485 |
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
705 } | 708 } |
706 } | 709 } |
707 | 710 |
708 void RenderLayer::setHasVisibleContent() | 711 void RenderLayer::setHasVisibleContent() |
709 { | 712 { |
710 if (m_hasVisibleContent && !m_visibleContentStatusDirty) { | 713 if (m_hasVisibleContent && !m_visibleContentStatusDirty) { |
711 ASSERT(!parent() || parent()->hasVisibleDescendant()); | 714 ASSERT(!parent() || parent()->hasVisibleDescendant()); |
712 return; | 715 return; |
713 } | 716 } |
714 | 717 |
718 LayoutRectRecorder recorder(*m_renderer); | |
Julien - ping for review
2014/02/14 18:05:48
I wouldn't expect changing visible content (mostly
dsinclair
2014/02/14 18:15:27
So, the reason I did this here is because I'm curr
| |
715 m_visibleContentStatusDirty = false; | 719 m_visibleContentStatusDirty = false; |
716 m_hasVisibleContent = true; | 720 m_hasVisibleContent = true; |
717 repainter().computeRepaintRects(renderer()->containerForRepaint()); | 721 repainter().computeRepaintRects(renderer()->containerForRepaint()); |
718 if (!m_stackingNode->isNormalFlowOnly()) { | 722 if (!m_stackingNode->isNormalFlowOnly()) { |
719 // We don't collect invisible layers in z-order lists if we are not in c ompositing mode. | 723 // We don't collect invisible layers in z-order lists if we are not in c ompositing mode. |
720 // As we became visible, we need to dirty our stacking containers ancest ors to be properly | 724 // As we became visible, we need to dirty our stacking containers ancest ors to be properly |
721 // collected. FIXME: When compositing, we could skip this dirtying phase . | 725 // collected. FIXME: When compositing, we could skip this dirtying phase . |
722 for (RenderLayerStackingNode* sc = m_stackingNode->ancestorStackingConta inerNode(); sc; sc = sc->ancestorStackingContainerNode()) { | 726 for (RenderLayerStackingNode* sc = m_stackingNode->ancestorStackingConta inerNode(); sc; sc = sc->ancestorStackingContainerNode()) { |
723 sc->dirtyZOrderLists(); | 727 sc->dirtyZOrderLists(); |
724 if (sc->layer()->hasVisibleContent()) | 728 if (sc->layer()->hasVisibleContent()) |
(...skipping 724 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1449 // The reflection layer should not be moved to the parent. | 1453 // The reflection layer should not be moved to the parent. |
1450 if (m_reflectionInfo) | 1454 if (m_reflectionInfo) |
1451 removeChild(m_reflectionInfo->reflectionLayer()); | 1455 removeChild(m_reflectionInfo->reflectionLayer()); |
1452 | 1456 |
1453 // Now walk our kids and reattach them to our parent. | 1457 // Now walk our kids and reattach them to our parent. |
1454 RenderLayer* current = m_first; | 1458 RenderLayer* current = m_first; |
1455 while (current) { | 1459 while (current) { |
1456 RenderLayer* next = current->nextSibling(); | 1460 RenderLayer* next = current->nextSibling(); |
1457 removeChild(current); | 1461 removeChild(current); |
1458 m_parent->addChild(current, nextSib); | 1462 m_parent->addChild(current, nextSib); |
1459 current->repainter().setRepaintStatus(NeedsFullRepaint); | 1463 if (RuntimeEnabledFeatures::repaintAfterLayoutEnabled()) |
1464 current->renderer()->setShouldDoFullRepaintAfterLayout(true); | |
1465 else | |
1466 current->repainter().setRepaintStatus(NeedsFullRepaint); | |
1460 current->updateLayerPositions(0); // FIXME: use geometry map. | 1467 current->updateLayerPositions(0); // FIXME: use geometry map. |
1461 current = next; | 1468 current = next; |
1462 } | 1469 } |
1463 | 1470 |
1464 // Remove us from the parent. | 1471 // Remove us from the parent. |
1465 m_parent->removeChild(this); | 1472 m_parent->removeChild(this); |
1466 m_renderer->destroyLayer(); | 1473 m_renderer->destroyLayer(); |
1467 } | 1474 } |
1468 | 1475 |
1469 void RenderLayer::insertOnlyThisLayer() | 1476 void RenderLayer::insertOnlyThisLayer() |
(...skipping 2545 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4015 } | 4022 } |
4016 } | 4023 } |
4017 | 4024 |
4018 void showLayerTree(const WebCore::RenderObject* renderer) | 4025 void showLayerTree(const WebCore::RenderObject* renderer) |
4019 { | 4026 { |
4020 if (!renderer) | 4027 if (!renderer) |
4021 return; | 4028 return; |
4022 showLayerTree(renderer->enclosingLayer()); | 4029 showLayerTree(renderer->enclosingLayer()); |
4023 } | 4030 } |
4024 #endif | 4031 #endif |
OLD | NEW |