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

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

Issue 2617433005: Null-check scrollable area when invalidating sticky constraints. (Closed)
Patch Set: Created 3 years, 11 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) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) 4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com)
5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) 5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com)
6 * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
7 * Copyright (C) 2010 Google Inc. All rights reserved. 7 * Copyright (C) 2010 Google Inc. All rights reserved.
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after
394 // scroll reasons are recomputed. 394 // scroll reasons are recomputed.
395 } else { 395 } else {
396 // This may get re-added to viewport constrained objects if the object 396 // This may get re-added to viewport constrained objects if the object
397 // went from sticky to fixed. 397 // went from sticky to fixed.
398 frameView->removeViewportConstrainedObject(this); 398 frameView->removeViewportConstrainedObject(this);
399 399
400 // Remove sticky constraints for this layer. 400 // Remove sticky constraints for this layer.
401 if (layer()) { 401 if (layer()) {
402 DisableCompositingQueryAsserts disabler; 402 DisableCompositingQueryAsserts disabler;
403 if (const PaintLayer* ancestorOverflowLayer = 403 if (const PaintLayer* ancestorOverflowLayer =
404 layer()->ancestorOverflowLayer()) 404 layer()->ancestorOverflowLayer()) {
405 ancestorOverflowLayer->getScrollableArea() 405 if (PaintLayerScrollableArea* scrollableArea =
406 ->invalidateStickyConstraintsFor(layer()); 406 ancestorOverflowLayer->getScrollableArea())
407 scrollableArea->invalidateStickyConstraintsFor(layer());
408 }
407 } 409 }
408 410
409 // TODO(pdr): When slimming paint v2 is enabled, we will need to 411 // TODO(pdr): When slimming paint v2 is enabled, we will need to
410 // invalidate the scroll paint property subtree for this so main thread 412 // invalidate the scroll paint property subtree for this so main thread
411 // scroll reasons are recomputed. 413 // scroll reasons are recomputed.
412 } 414 }
413 } 415 }
414 416
415 if (newStyleIsViewportConstained != oldStyleIsViewportConstrained) { 417 if (newStyleIsViewportConstained != oldStyleIsViewportConstrained) {
416 if (newStyleIsViewportConstained && layer()) 418 if (newStyleIsViewportConstained && layer())
(...skipping 921 matching lines...) Expand 10 before | Expand all | Expand 10 after
1338 if (rootElementStyle->hasBackground()) 1340 if (rootElementStyle->hasBackground())
1339 return false; 1341 return false;
1340 1342
1341 if (node() != document().firstBodyElement()) 1343 if (node() != document().firstBodyElement())
1342 return false; 1344 return false;
1343 1345
1344 return true; 1346 return true;
1345 } 1347 }
1346 1348
1347 } // namespace blink 1349 } // 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