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

Side by Side Diff: Source/core/rendering/compositing/RenderLayerCompositor.cpp

Issue 247803003: Remove assumption that null containerForRepaint assumes RenderView (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix zee nits Created 6 years, 8 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
« no previous file with comments | « Source/core/rendering/RenderView.h ('k') | Source/web/LinkHighlight.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009, 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2009, 2010 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 765 matching lines...) Expand 10 before | Expand all | Expand 10 after
776 applyUpdateLayerCompositingStateChickenEggHacks(layer, compositedLayerUp date); 776 applyUpdateLayerCompositingStateChickenEggHacks(layer, compositedLayerUp date);
777 } 777 }
778 778
779 void RenderLayerCompositor::repaintOnCompositingChange(RenderLayer* layer) 779 void RenderLayerCompositor::repaintOnCompositingChange(RenderLayer* layer)
780 { 780 {
781 // If the renderer is not attached yet, no need to repaint. 781 // If the renderer is not attached yet, no need to repaint.
782 if (layer->renderer() != &m_renderView && !layer->renderer()->parent()) 782 if (layer->renderer() != &m_renderView && !layer->renderer()->parent())
783 return; 783 return;
784 784
785 RenderLayerModelObject* repaintContainer = layer->renderer()->containerForRe paint(); 785 RenderLayerModelObject* repaintContainer = layer->renderer()->containerForRe paint();
786 // FIXME: Repaint container should never be null. crbug.com/363699 786 ASSERT(repaintContainer);
787 if (!repaintContainer)
788 repaintContainer = &m_renderView;
789
790 layer->repainter().repaintIncludingNonCompositingDescendants(repaintContaine r); 787 layer->repainter().repaintIncludingNonCompositingDescendants(repaintContaine r);
791 } 788 }
792 789
793 // This method assumes that layout is up-to-date, unlike repaintOnCompositingCha nge(). 790 // This method assumes that layout is up-to-date, unlike repaintOnCompositingCha nge().
794 void RenderLayerCompositor::repaintInCompositedAncestor(RenderLayer* layer, cons t LayoutRect& rect) 791 void RenderLayerCompositor::repaintInCompositedAncestor(RenderLayer* layer, cons t LayoutRect& rect)
795 { 792 {
796 RenderLayer* compositedAncestor = layer->enclosingCompositingLayerForRepaint (ExcludeSelf); 793 RenderLayer* compositedAncestor = layer->enclosingCompositingLayerForRepaint (ExcludeSelf);
797 if (!compositedAncestor) 794 if (!compositedAncestor)
798 return; 795 return;
799 ASSERT(compositedAncestor->compositingState() == PaintsIntoOwnBacking || com positedAncestor->compositingState() == PaintsIntoGroupedBacking); 796 ASSERT(compositedAncestor->compositingState() == PaintsIntoOwnBacking || com positedAncestor->compositingState() == PaintsIntoGroupedBacking);
(...skipping 917 matching lines...) Expand 10 before | Expand all | Expand 10 after
1717 } else if (graphicsLayer == m_scrollLayer.get()) { 1714 } else if (graphicsLayer == m_scrollLayer.get()) {
1718 name = "LocalFrame Scrolling Layer"; 1715 name = "LocalFrame Scrolling Layer";
1719 } else { 1716 } else {
1720 ASSERT_NOT_REACHED(); 1717 ASSERT_NOT_REACHED();
1721 } 1718 }
1722 1719
1723 return name; 1720 return name;
1724 } 1721 }
1725 1722
1726 } // namespace WebCore 1723 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderView.h ('k') | Source/web/LinkHighlight.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698