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 415 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
492 m_clipper.clearClipRects(); | 493 m_clipper.clearClipRects(); |
493 | 494 |
494 if (renderer()->style()->hasViewportConstrainedPosition()) | 495 if (renderer()->style()->hasViewportConstrainedPosition()) |
495 flags |= HasSeenViewportConstrainedAncestor; | 496 flags |= HasSeenViewportConstrainedAncestor; |
496 | 497 |
497 if (renderer()->hasOverflowClip()) | 498 if (renderer()->hasOverflowClip()) |
498 flags |= HasSeenAncestorWithOverflowClip; | 499 flags |= HasSeenAncestorWithOverflowClip; |
499 | 500 |
500 if (flags & HasSeenViewportConstrainedAncestor | 501 if (flags & HasSeenViewportConstrainedAncestor |
501 || (flags & IsOverflowScroll && flags & HasSeenAncestorWithOverflowClip
&& !m_canSkipRepaintRectsUpdateOnScroll)) { | 502 || (flags & IsOverflowScroll && flags & HasSeenAncestorWithOverflowClip
&& !m_canSkipRepaintRectsUpdateOnScroll)) { |
| 503 // FIXME: This may not be needed. Once repaint-after-layout isn't |
| 504 // under-painting for layer's we should see if this can be removed. |
| 505 LayoutRectRecorder recorder(*m_renderer); |
| 506 |
502 // FIXME: Remove incremental compositing updates after fixing the chicke
n/egg issues | 507 // FIXME: Remove incremental compositing updates after fixing the chicke
n/egg issues |
503 // https://code.google.com/p/chromium/issues/detail?id=343756 | 508 // https://code.google.com/p/chromium/issues/detail?id=343756 |
504 DisableCompositingQueryAsserts disabler; | 509 DisableCompositingQueryAsserts disabler; |
505 // FIXME: We could track the repaint container as we walk down the tree. | 510 // FIXME: We could track the repaint container as we walk down the tree. |
506 repainter().computeRepaintRects(renderer()->containerForRepaint(), geome
tryMap); | 511 repainter().computeRepaintRects(renderer()->containerForRepaint(), geome
tryMap); |
507 } else { | 512 } else { |
508 // Check that RenderLayerRepainter's cached rects are correct. | 513 // Check that RenderLayerRepainter's cached rects are correct. |
509 // FIXME: re-enable these assertions when the issue with table cells is
resolved: https://bugs.webkit.org/show_bug.cgi?id=103432 | 514 // FIXME: re-enable these assertions when the issue with table cells is
resolved: https://bugs.webkit.org/show_bug.cgi?id=103432 |
510 // ASSERT(repainter().m_repaintRect == renderer()->clippedOverflowRectFo
rRepaint(renderer()->containerForRepaint())); | 515 // ASSERT(repainter().m_repaintRect == renderer()->clippedOverflowRectFo
rRepaint(renderer()->containerForRepaint())); |
511 // ASSERT(repainter().m_outlineBox == renderer()->outlineBoundsForRepain
t(renderer()->containerForRepaint(), geometryMap)); | 516 // ASSERT(repainter().m_outlineBox == renderer()->outlineBoundsForRepain
t(renderer()->containerForRepaint(), geometryMap)); |
(...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
937 if (preserves3D()) | 942 if (preserves3D()) |
938 return has3DTransform() || m_has3DTransformedDescendant; | 943 return has3DTransform() || m_has3DTransformedDescendant; |
939 | 944 |
940 return has3DTransform(); | 945 return has3DTransform(); |
941 } | 946 } |
942 | 947 |
943 bool RenderLayer::updateLayerPosition() | 948 bool RenderLayer::updateLayerPosition() |
944 { | 949 { |
945 LayoutPoint localPoint; | 950 LayoutPoint localPoint; |
946 LayoutSize inlineBoundingBoxOffset; // We don't put this into the RenderLaye
r x/y for inlines, so we need to subtract it out when done. | 951 LayoutSize inlineBoundingBoxOffset; // We don't put this into the RenderLaye
r x/y for inlines, so we need to subtract it out when done. |
| 952 |
| 953 LayoutRectRecorder recorder(*m_renderer); |
| 954 |
947 if (renderer()->isInline() && renderer()->isRenderInline()) { | 955 if (renderer()->isInline() && renderer()->isRenderInline()) { |
948 RenderInline* inlineFlow = toRenderInline(renderer()); | 956 RenderInline* inlineFlow = toRenderInline(renderer()); |
949 IntRect lineBox = inlineFlow->linesBoundingBox(); | 957 IntRect lineBox = inlineFlow->linesBoundingBox(); |
950 setSize(lineBox.size()); | 958 setSize(lineBox.size()); |
951 inlineBoundingBoxOffset = toSize(lineBox.location()); | 959 inlineBoundingBoxOffset = toSize(lineBox.location()); |
952 localPoint += inlineBoundingBoxOffset; | 960 localPoint += inlineBoundingBoxOffset; |
953 } else if (RenderBox* box = renderBox()) { | 961 } else if (RenderBox* box = renderBox()) { |
954 // FIXME: Is snapping the size really needed here for the RenderBox case
? | 962 // FIXME: Is snapping the size really needed here for the RenderBox case
? |
955 setSize(pixelSnappedIntSize(box->size(), box->location())); | 963 setSize(pixelSnappedIntSize(box->size(), box->location())); |
956 localPoint += box->topLeftLocationOffset(); | 964 localPoint += box->topLeftLocationOffset(); |
(...skipping 528 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1485 // The reflection layer should not be moved to the parent. | 1493 // The reflection layer should not be moved to the parent. |
1486 if (m_reflectionInfo) | 1494 if (m_reflectionInfo) |
1487 removeChild(m_reflectionInfo->reflectionLayer()); | 1495 removeChild(m_reflectionInfo->reflectionLayer()); |
1488 | 1496 |
1489 // Now walk our kids and reattach them to our parent. | 1497 // Now walk our kids and reattach them to our parent. |
1490 RenderLayer* current = m_first; | 1498 RenderLayer* current = m_first; |
1491 while (current) { | 1499 while (current) { |
1492 RenderLayer* next = current->nextSibling(); | 1500 RenderLayer* next = current->nextSibling(); |
1493 removeChild(current); | 1501 removeChild(current); |
1494 m_parent->addChild(current, nextSib); | 1502 m_parent->addChild(current, nextSib); |
1495 current->repainter().setRepaintStatus(NeedsFullRepaint); | 1503 |
| 1504 if (RuntimeEnabledFeatures::repaintAfterLayoutEnabled()) |
| 1505 current->renderer()->setShouldDoFullRepaintAfterLayout(true); |
| 1506 else |
| 1507 current->repainter().setRepaintStatus(NeedsFullRepaint); |
1496 | 1508 |
1497 // Hits in compositing/overflow/automatically-opt-into-composited-scroll
ing-part-1.html | 1509 // Hits in compositing/overflow/automatically-opt-into-composited-scroll
ing-part-1.html |
1498 DisableCompositingQueryAsserts disabler; | 1510 DisableCompositingQueryAsserts disabler; |
1499 | 1511 |
1500 current->updateLayerPositions(0); // FIXME: use geometry map. | 1512 current->updateLayerPositions(0); // FIXME: use geometry map. |
1501 current = next; | 1513 current = next; |
1502 } | 1514 } |
1503 | 1515 |
1504 // Remove us from the parent. | 1516 // Remove us from the parent. |
1505 m_parent->removeChild(this); | 1517 m_parent->removeChild(this); |
(...skipping 2562 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4068 } | 4080 } |
4069 } | 4081 } |
4070 | 4082 |
4071 void showLayerTree(const WebCore::RenderObject* renderer) | 4083 void showLayerTree(const WebCore::RenderObject* renderer) |
4072 { | 4084 { |
4073 if (!renderer) | 4085 if (!renderer) |
4074 return; | 4086 return; |
4075 showLayerTree(renderer->enclosingLayer()); | 4087 showLayerTree(renderer->enclosingLayer()); |
4076 } | 4088 } |
4077 #endif | 4089 #endif |
OLD | NEW |