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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 #include "core/frame/LocalFrame.h" | 57 #include "core/frame/LocalFrame.h" |
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/FilterEffectRenderer.h" | 63 #include "core/rendering/FilterEffectRenderer.h" |
64 #include "core/rendering/HitTestRequest.h" | 64 #include "core/rendering/HitTestRequest.h" |
65 #include "core/rendering/HitTestResult.h" | 65 #include "core/rendering/HitTestResult.h" |
66 #include "core/rendering/HitTestingTransformState.h" | 66 #include "core/rendering/HitTestingTransformState.h" |
| 67 #include "core/rendering/LayoutRectRecorder.h" |
67 #include "core/rendering/RenderFlowThread.h" | 68 #include "core/rendering/RenderFlowThread.h" |
68 #include "core/rendering/RenderGeometryMap.h" | 69 #include "core/rendering/RenderGeometryMap.h" |
69 #include "core/rendering/RenderInline.h" | 70 #include "core/rendering/RenderInline.h" |
70 #include "core/rendering/RenderReplica.h" | 71 #include "core/rendering/RenderReplica.h" |
71 #include "core/rendering/RenderScrollbar.h" | 72 #include "core/rendering/RenderScrollbar.h" |
72 #include "core/rendering/RenderScrollbarPart.h" | 73 #include "core/rendering/RenderScrollbarPart.h" |
73 #include "core/rendering/RenderTreeAsText.h" | 74 #include "core/rendering/RenderTreeAsText.h" |
74 #include "core/rendering/RenderView.h" | 75 #include "core/rendering/RenderView.h" |
75 #include "core/rendering/compositing/CompositedLayerMapping.h" | 76 #include "core/rendering/compositing/CompositedLayerMapping.h" |
76 #include "core/rendering/compositing/RenderLayerCompositor.h" | 77 #include "core/rendering/compositing/RenderLayerCompositor.h" |
(...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
489 m_clipper.clearClipRects(); | 490 m_clipper.clearClipRects(); |
490 | 491 |
491 if (renderer()->style()->hasViewportConstrainedPosition()) | 492 if (renderer()->style()->hasViewportConstrainedPosition()) |
492 flags |= HasSeenViewportConstrainedAncestor; | 493 flags |= HasSeenViewportConstrainedAncestor; |
493 | 494 |
494 if (renderer()->hasOverflowClip()) | 495 if (renderer()->hasOverflowClip()) |
495 flags |= HasSeenAncestorWithOverflowClip; | 496 flags |= HasSeenAncestorWithOverflowClip; |
496 | 497 |
497 if (flags & HasSeenViewportConstrainedAncestor | 498 if (flags & HasSeenViewportConstrainedAncestor |
498 || (flags & IsOverflowScroll && flags & HasSeenAncestorWithOverflowClip
&& !m_canSkipRepaintRectsUpdateOnScroll)) { | 499 || (flags & IsOverflowScroll && flags & HasSeenAncestorWithOverflowClip
&& !m_canSkipRepaintRectsUpdateOnScroll)) { |
| 500 // FIXME: This may not be needed. Once repaint-after-layout isn't |
| 501 // under-painting for layer's we should see if this can be removed. |
| 502 LayoutRectRecorder recorder(*m_renderer); |
| 503 |
499 // FIXME: Remove incremental compositing updates after fixing the chicke
n/egg issues | 504 // FIXME: Remove incremental compositing updates after fixing the chicke
n/egg issues |
500 // https://code.google.com/p/chromium/issues/detail?id=343756 | 505 // https://code.google.com/p/chromium/issues/detail?id=343756 |
501 DisableCompositingQueryAsserts disabler; | 506 DisableCompositingQueryAsserts disabler; |
502 // FIXME: We could track the repaint container as we walk down the tree. | 507 // FIXME: We could track the repaint container as we walk down the tree. |
503 repainter().computeRepaintRects(renderer()->containerForRepaint(), geome
tryMap); | 508 repainter().computeRepaintRects(renderer()->containerForRepaint(), geome
tryMap); |
504 } else { | 509 } else { |
505 // Check that RenderLayerRepainter's cached rects are correct. | 510 // Check that RenderLayerRepainter's cached rects are correct. |
506 // FIXME: re-enable these assertions when the issue with table cells is
resolved: https://bugs.webkit.org/show_bug.cgi?id=103432 | 511 // FIXME: re-enable these assertions when the issue with table cells is
resolved: https://bugs.webkit.org/show_bug.cgi?id=103432 |
507 // ASSERT(repainter().m_repaintRect == renderer()->clippedOverflowRectFo
rRepaint(renderer()->containerForRepaint())); | 512 // ASSERT(repainter().m_repaintRect == renderer()->clippedOverflowRectFo
rRepaint(renderer()->containerForRepaint())); |
508 // ASSERT(repainter().m_outlineBox == renderer()->outlineBoundsForRepain
t(renderer()->containerForRepaint(), geometryMap)); | 513 // ASSERT(repainter().m_outlineBox == renderer()->outlineBoundsForRepain
t(renderer()->containerForRepaint(), geometryMap)); |
(...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
916 if (preserves3D()) | 921 if (preserves3D()) |
917 return has3DTransform() || m_has3DTransformedDescendant; | 922 return has3DTransform() || m_has3DTransformedDescendant; |
918 | 923 |
919 return has3DTransform(); | 924 return has3DTransform(); |
920 } | 925 } |
921 | 926 |
922 bool RenderLayer::updateLayerPosition() | 927 bool RenderLayer::updateLayerPosition() |
923 { | 928 { |
924 LayoutPoint localPoint; | 929 LayoutPoint localPoint; |
925 LayoutSize inlineBoundingBoxOffset; // We don't put this into the RenderLaye
r x/y for inlines, so we need to subtract it out when done. | 930 LayoutSize inlineBoundingBoxOffset; // We don't put this into the RenderLaye
r x/y for inlines, so we need to subtract it out when done. |
| 931 |
| 932 LayoutRectRecorder recorder(*m_renderer); |
| 933 |
926 if (renderer()->isInline() && renderer()->isRenderInline()) { | 934 if (renderer()->isInline() && renderer()->isRenderInline()) { |
927 RenderInline* inlineFlow = toRenderInline(renderer()); | 935 RenderInline* inlineFlow = toRenderInline(renderer()); |
928 IntRect lineBox = inlineFlow->linesBoundingBox(); | 936 IntRect lineBox = inlineFlow->linesBoundingBox(); |
929 setSize(lineBox.size()); | 937 setSize(lineBox.size()); |
930 inlineBoundingBoxOffset = toSize(lineBox.location()); | 938 inlineBoundingBoxOffset = toSize(lineBox.location()); |
931 localPoint += inlineBoundingBoxOffset; | 939 localPoint += inlineBoundingBoxOffset; |
932 } else if (RenderBox* box = renderBox()) { | 940 } else if (RenderBox* box = renderBox()) { |
933 // FIXME: Is snapping the size really needed here for the RenderBox case
? | 941 // FIXME: Is snapping the size really needed here for the RenderBox case
? |
934 setSize(pixelSnappedIntSize(box->size(), box->location())); | 942 setSize(pixelSnappedIntSize(box->size(), box->location())); |
935 localPoint += box->topLeftLocationOffset(); | 943 localPoint += box->topLeftLocationOffset(); |
(...skipping 529 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1465 // The reflection layer should not be moved to the parent. | 1473 // The reflection layer should not be moved to the parent. |
1466 if (m_reflectionInfo) | 1474 if (m_reflectionInfo) |
1467 removeChild(m_reflectionInfo->reflectionLayer()); | 1475 removeChild(m_reflectionInfo->reflectionLayer()); |
1468 | 1476 |
1469 // Now walk our kids and reattach them to our parent. | 1477 // Now walk our kids and reattach them to our parent. |
1470 RenderLayer* current = m_first; | 1478 RenderLayer* current = m_first; |
1471 while (current) { | 1479 while (current) { |
1472 RenderLayer* next = current->nextSibling(); | 1480 RenderLayer* next = current->nextSibling(); |
1473 removeChild(current); | 1481 removeChild(current); |
1474 m_parent->addChild(current, nextSib); | 1482 m_parent->addChild(current, nextSib); |
1475 current->repainter().setRepaintStatus(NeedsFullRepaint); | 1483 |
| 1484 if (RuntimeEnabledFeatures::repaintAfterLayoutEnabled()) |
| 1485 current->renderer()->setShouldDoFullRepaintAfterLayout(true); |
| 1486 else |
| 1487 current->repainter().setRepaintStatus(NeedsFullRepaint); |
1476 | 1488 |
1477 // Hits in compositing/overflow/automatically-opt-into-composited-scroll
ing-part-1.html | 1489 // Hits in compositing/overflow/automatically-opt-into-composited-scroll
ing-part-1.html |
1478 DisableCompositingQueryAsserts disabler; | 1490 DisableCompositingQueryAsserts disabler; |
1479 | 1491 |
1480 current->updateLayerPositions(0); // FIXME: use geometry map. | 1492 current->updateLayerPositions(0); // FIXME: use geometry map. |
1481 current = next; | 1493 current = next; |
1482 } | 1494 } |
1483 | 1495 |
1484 // Remove us from the parent. | 1496 // Remove us from the parent. |
1485 m_parent->removeChild(this); | 1497 m_parent->removeChild(this); |
(...skipping 2552 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4038 } | 4050 } |
4039 } | 4051 } |
4040 | 4052 |
4041 void showLayerTree(const WebCore::RenderObject* renderer) | 4053 void showLayerTree(const WebCore::RenderObject* renderer) |
4042 { | 4054 { |
4043 if (!renderer) | 4055 if (!renderer) |
4044 return; | 4056 return; |
4045 showLayerTree(renderer->enclosingLayer()); | 4057 showLayerTree(renderer->enclosingLayer()); |
4046 } | 4058 } |
4047 #endif | 4059 #endif |
OLD | NEW |