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

Side by Side Diff: third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp

Issue 2037093002: Null-check PaintLayerScrollableArea lookup. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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
« no previous file with comments | « no previous file | no next file » | 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, 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2009, 2010, 2011 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 2347 matching lines...) Expand 10 before | Expand all | Expand 10 after
2358 } 2358 }
2359 2359
2360 bool CompositedLayerMapping::needsRepaint(const GraphicsLayer& graphicsLayer) co nst 2360 bool CompositedLayerMapping::needsRepaint(const GraphicsLayer& graphicsLayer) co nst
2361 { 2361 {
2362 return isScrollableAreaLayer(&graphicsLayer) ? true : m_owningLayer.needsRep aint(); 2362 return isScrollableAreaLayer(&graphicsLayer) ? true : m_owningLayer.needsRep aint();
2363 } 2363 }
2364 2364
2365 void CompositedLayerMapping::adjustForCompositedScrolling(const GraphicsLayer* g raphicsLayer, IntSize& offset) const 2365 void CompositedLayerMapping::adjustForCompositedScrolling(const GraphicsLayer* g raphicsLayer, IntSize& offset) const
2366 { 2366 {
2367 if (graphicsLayer == m_scrollingContentsLayer.get() || graphicsLayer == m_fo regroundLayer.get()) { 2367 if (graphicsLayer == m_scrollingContentsLayer.get() || graphicsLayer == m_fo regroundLayer.get()) {
2368 DoubleSize adjustedScrollOffset = m_owningLayer.getScrollableArea()->adj ustedScrollOffset(); 2368 if (m_owningLayer.getScrollableArea()) {
2369 offset.expand(-adjustedScrollOffset.width(), -adjustedScrollOffset.heigh t()); 2369 DoubleSize adjustedScrollOffset = m_owningLayer.getScrollableArea()- >adjustedScrollOffset();
2370 offset.expand(-adjustedScrollOffset.width(), -adjustedScrollOffset.h eight());
2371 }
2370 } 2372 }
2371 } 2373 }
2372 2374
2373 void CompositedLayerMapping::paintContents(const GraphicsLayer* graphicsLayer, G raphicsContext& context, 2375 void CompositedLayerMapping::paintContents(const GraphicsLayer* graphicsLayer, G raphicsContext& context,
2374 GraphicsLayerPaintingPhase graphicsLayerPaintingPhase, const IntRect& intere stRect) const 2376 GraphicsLayerPaintingPhase graphicsLayerPaintingPhase, const IntRect& intere stRect) const
2375 { 2377 {
2376 // https://code.google.com/p/chromium/issues/detail?id=343772 2378 // https://code.google.com/p/chromium/issues/detail?id=343772
2377 DisableCompositingQueryAsserts disabler; 2379 DisableCompositingQueryAsserts disabler;
2378 // Allow throttling to make sure no painting paths (e.g., 2380 // Allow throttling to make sure no painting paths (e.g.,
2379 // ContentLayerDelegate::paintContents) try to paint throttled content. 2381 // ContentLayerDelegate::paintContents) try to paint throttled content.
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
2636 } else if (graphicsLayer == m_scrollingContentsLayer.get()) { 2638 } else if (graphicsLayer == m_scrollingContentsLayer.get()) {
2637 name = "Scrolling Contents Layer"; 2639 name = "Scrolling Contents Layer";
2638 } else { 2640 } else {
2639 ASSERT_NOT_REACHED(); 2641 ASSERT_NOT_REACHED();
2640 } 2642 }
2641 2643
2642 return name; 2644 return name;
2643 } 2645 }
2644 2646
2645 } // namespace blink 2647 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698