Commit 98c9b1d4 authored by Chris Harrelson's avatar Chris Harrelson Committed by Commit Bot

Add defensive code to PaintLayerClipper to avoid crashing when there is no

fragment.

Bug: 750500
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: Idc4608f9f871e912458310992703455d9d7ab4cf
Reviewed-on: https://chromium-review.googlesource.com/703460Reviewed-by: default avatarXianzhu Wang <wangxianzhu@chromium.org>
Commit-Queue: Chris Harrelson <chrishtr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#506865}
parent 35f0d576
...@@ -322,6 +322,10 @@ void PaintLayerClipper::CalculateRects( ...@@ -322,6 +322,10 @@ void PaintLayerClipper::CalculateRects(
const LayoutPoint* offset_from_root) const { const LayoutPoint* offset_from_root) const {
if (use_geometry_mapper_) { if (use_geometry_mapper_) {
DCHECK(fragment_data); DCHECK(fragment_data);
// TODO(chrishtr): find the root cause of not having a fragment and fix
// it.
if (!fragment_data)
return;
CalculateRectsWithGeometryMapper(context, *fragment_data, paint_dirty_rect, CalculateRectsWithGeometryMapper(context, *fragment_data, paint_dirty_rect,
layer_bounds, background_rect, layer_bounds, background_rect,
foreground_rect, offset_from_root); foreground_rect, offset_from_root);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment