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

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

Issue 2473293002: Naive fix of a call on a nil object in CompositedLayerMapping::containingSquashedLayer. (Closed)
Patch Set: Naive fix of a call on a nil object in CompositedLayerMapping::containingSquashedLayer. Created 4 years, 1 month 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 2592 matching lines...) Expand 10 before | Expand all | Expand 10 after
2603 enclosingIntRect(LayoutRect( 2603 enclosingIntRect(LayoutRect(
2604 r.location() + m_owningLayer.subpixelAccumulation(), r.size())), 2604 r.location() + m_owningLayer.subpixelAccumulation(), r.size())),
2605 invalidationReason, client}; 2605 invalidationReason, client};
2606 ApplyToGraphicsLayers(this, functor, ApplyToScrollingContentLayers); 2606 ApplyToGraphicsLayers(this, functor, ApplyToScrollingContentLayers);
2607 } 2607 }
2608 2608
2609 const GraphicsLayerPaintInfo* CompositedLayerMapping::containingSquashedLayer( 2609 const GraphicsLayerPaintInfo* CompositedLayerMapping::containingSquashedLayer(
2610 const LayoutObject* layoutObject, 2610 const LayoutObject* layoutObject,
2611 const Vector<GraphicsLayerPaintInfo>& layers, 2611 const Vector<GraphicsLayerPaintInfo>& layers,
2612 unsigned maxSquashedLayerIndex) { 2612 unsigned maxSquashedLayerIndex) {
2613 if (!layoutObject)
2614 return nullptr;
2613 for (size_t i = 0; i < layers.size() && i < maxSquashedLayerIndex; ++i) { 2615 for (size_t i = 0; i < layers.size() && i < maxSquashedLayerIndex; ++i) {
2614 if (layoutObject->isDescendantOf(layers[i].paintLayer->layoutObject())) 2616 if (layoutObject->isDescendantOf(layers[i].paintLayer->layoutObject()))
2615 return &layers[i]; 2617 return &layers[i];
2616 } 2618 }
2617 return nullptr; 2619 return nullptr;
2618 } 2620 }
2619 2621
2620 const GraphicsLayerPaintInfo* CompositedLayerMapping::containingSquashedLayer( 2622 const GraphicsLayerPaintInfo* CompositedLayerMapping::containingSquashedLayer(
2621 const LayoutObject* layoutObject, 2623 const LayoutObject* layoutObject,
2622 unsigned maxSquashedLayerIndex) { 2624 unsigned maxSquashedLayerIndex) {
(...skipping 626 matching lines...) Expand 10 before | Expand all | Expand 10 after
3249 } else if (graphicsLayer == m_scrollingContentsLayer.get()) { 3251 } else if (graphicsLayer == m_scrollingContentsLayer.get()) {
3250 name = "Scrolling Contents Layer"; 3252 name = "Scrolling Contents Layer";
3251 } else { 3253 } else {
3252 ASSERT_NOT_REACHED(); 3254 ASSERT_NOT_REACHED();
3253 } 3255 }
3254 3256
3255 return name; 3257 return name;
3256 } 3258 }
3257 3259
3258 } // namespace blink 3260 } // 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