Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(932)

Side by Side Diff: Source/core/rendering/RenderLayer.cpp

Issue 264963004: Mark when we may have been invalidated to early out on repaintTreeAfterLayout. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 481 matching lines...) Expand 10 before | Expand all | Expand 10 after
492 492
493 if (renderer()->style()->hasViewportConstrainedPosition()) 493 if (renderer()->style()->hasViewportConstrainedPosition())
494 flags |= HasSeenViewportConstrainedAncestor; 494 flags |= HasSeenViewportConstrainedAncestor;
495 495
496 if (renderer()->hasOverflowClip()) 496 if (renderer()->hasOverflowClip())
497 flags |= HasSeenAncestorWithOverflowClip; 497 flags |= HasSeenAncestorWithOverflowClip;
498 498
499 if ((flags & IsOverflowScroll) && (flags & HasSeenAncestorWithOverflowClip) && !m_canSkipRepaintRectsUpdateOnScroll) { 499 if ((flags & IsOverflowScroll) && (flags & HasSeenAncestorWithOverflowClip) && !m_canSkipRepaintRectsUpdateOnScroll) {
500 // FIXME: We could track the repaint container as we walk down the tree. 500 // FIXME: We could track the repaint container as we walk down the tree.
501 repainter().computeRepaintRects(renderer()->containerForRepaint()); 501 repainter().computeRepaintRects(renderer()->containerForRepaint());
502 renderer()->setMayNeedInvalidation(true);
502 } else { 503 } else {
503 // Check that RenderLayerRepainter's cached rects are correct. 504 // Check that RenderLayerRepainter's cached rects are correct.
504 // FIXME: re-enable these assertions when the issue with table cells is resolved: https://bugs.webkit.org/show_bug.cgi?id=103432 505 // FIXME: re-enable these assertions when the issue with table cells is resolved: https://bugs.webkit.org/show_bug.cgi?id=103432
505 // ASSERT(repainter().m_repaintRect == renderer()->clippedOverflowRectFo rRepaint(renderer()->containerForRepaint())); 506 // ASSERT(repainter().m_repaintRect == renderer()->clippedOverflowRectFo rRepaint(renderer()->containerForRepaint()));
506 } 507 }
507 508
508 for (RenderLayer* child = firstChild(); child; child = child->nextSibling()) 509 for (RenderLayer* child = firstChild(); child; child = child->nextSibling())
509 child->updateLayerPositionsAfterScroll(geometryMap, flags); 510 child->updateLayerPositionsAfterScroll(geometryMap, flags);
510 511
511 // We don't update our reflection as scrolling is a translation which does n ot change the size() 512 // We don't update our reflection as scrolling is a translation which does n ot change the size()
(...skipping 422 matching lines...) Expand 10 before | Expand all | Expand 10 after
934 return has3DTransform() || m_has3DTransformedDescendant; 935 return has3DTransform() || m_has3DTransformedDescendant;
935 936
936 return has3DTransform(); 937 return has3DTransform();
937 } 938 }
938 939
939 bool RenderLayer::updateLayerPosition() 940 bool RenderLayer::updateLayerPosition()
940 { 941 {
941 LayoutPoint localPoint; 942 LayoutPoint localPoint;
942 LayoutSize inlineBoundingBoxOffset; // We don't put this into the RenderLaye r x/y for inlines, so we need to subtract it out when done. 943 LayoutSize inlineBoundingBoxOffset; // We don't put this into the RenderLaye r x/y for inlines, so we need to subtract it out when done.
943 944
945 renderer()->setMayNeedInvalidation(true);
946
944 if (renderer()->isInline() && renderer()->isRenderInline()) { 947 if (renderer()->isInline() && renderer()->isRenderInline()) {
945 RenderInline* inlineFlow = toRenderInline(renderer()); 948 RenderInline* inlineFlow = toRenderInline(renderer());
946 IntRect lineBox = inlineFlow->linesBoundingBox(); 949 IntRect lineBox = inlineFlow->linesBoundingBox();
947 setSize(lineBox.size()); 950 setSize(lineBox.size());
948 inlineBoundingBoxOffset = toSize(lineBox.location()); 951 inlineBoundingBoxOffset = toSize(lineBox.location());
949 localPoint += inlineBoundingBoxOffset; 952 localPoint += inlineBoundingBoxOffset;
950 } else if (RenderBox* box = renderBox()) { 953 } else if (RenderBox* box = renderBox()) {
951 // FIXME: Is snapping the size really needed here for the RenderBox case ? 954 // FIXME: Is snapping the size really needed here for the RenderBox case ?
952 setSize(pixelSnappedIntSize(box->size(), box->location())); 955 setSize(pixelSnappedIntSize(box->size(), box->location()));
953 localPoint += box->topLeftLocationOffset(); 956 localPoint += box->topLeftLocationOffset();
(...skipping 3056 matching lines...) Expand 10 before | Expand all | Expand 10 after
4010 } 4013 }
4011 } 4014 }
4012 4015
4013 void showLayerTree(const WebCore::RenderObject* renderer) 4016 void showLayerTree(const WebCore::RenderObject* renderer)
4014 { 4017 {
4015 if (!renderer) 4018 if (!renderer)
4016 return; 4019 return;
4017 showLayerTree(renderer->enclosingLayer()); 4020 showLayerTree(renderer->enclosingLayer());
4018 } 4021 }
4019 #endif 4022 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698