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

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: 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
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 775 matching lines...) Expand 10 before | Expand all | Expand 10 after
786 applyUpdateLayerCompositingStateChickenEggHacks(layer, compositedLayerUp date); 786 applyUpdateLayerCompositingStateChickenEggHacks(layer, compositedLayerUp date);
787 } 787 }
788 788
789 void RenderLayerCompositor::repaintOnCompositingChange(RenderLayer* layer) 789 void RenderLayerCompositor::repaintOnCompositingChange(RenderLayer* layer)
790 { 790 {
791 // If the renderer is not attached yet, no need to repaint. 791 // If the renderer is not attached yet, no need to repaint.
792 if (layer->renderer() != &m_renderView && !layer->renderer()->parent()) 792 if (layer->renderer() != &m_renderView && !layer->renderer()->parent())
793 return; 793 return;
794 794
795 RenderLayerModelObject* repaintContainer = layer->renderer()->containerForRe paint(); 795 RenderLayerModelObject* repaintContainer = layer->renderer()->containerForRe paint();
796 // FIXME: Repaint container should never be null. crbug.com/363699 796
ojan 2014/04/23 02:07:31 Nit: I'd remove the newlines before/after the asse
797 if (!repaintContainer) 797 ASSERT(repaintContainer);
798 repaintContainer = &m_renderView;
799 798
800 layer->repainter().repaintIncludingNonCompositingDescendants(repaintContaine r); 799 layer->repainter().repaintIncludingNonCompositingDescendants(repaintContaine r);
801 } 800 }
802 801
803 // This method assumes that layout is up-to-date, unlike repaintOnCompositingCha nge(). 802 // This method assumes that layout is up-to-date, unlike repaintOnCompositingCha nge().
804 void RenderLayerCompositor::repaintInCompositedAncestor(RenderLayer* layer, cons t LayoutRect& rect) 803 void RenderLayerCompositor::repaintInCompositedAncestor(RenderLayer* layer, cons t LayoutRect& rect)
805 { 804 {
806 RenderLayer* compositedAncestor = layer->enclosingCompositingLayerForRepaint (ExcludeSelf); 805 RenderLayer* compositedAncestor = layer->enclosingCompositingLayerForRepaint (ExcludeSelf);
807 if (!compositedAncestor) 806 if (!compositedAncestor)
808 return; 807 return;
(...skipping 918 matching lines...) Expand 10 before | Expand all | Expand 10 after
1727 } else if (graphicsLayer == m_scrollLayer.get()) { 1726 } else if (graphicsLayer == m_scrollLayer.get()) {
1728 name = "LocalFrame Scrolling Layer"; 1727 name = "LocalFrame Scrolling Layer";
1729 } else { 1728 } else {
1730 ASSERT_NOT_REACHED(); 1729 ASSERT_NOT_REACHED();
1731 } 1730 }
1732 1731
1733 return name; 1732 return name;
1734 } 1733 }
1735 1734
1736 } // namespace WebCore 1735 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698