Commit 47f01930 authored by Chris Harrelson's avatar Chris Harrelson Committed by Commit Bot

Remove workaround for missing LocalBorderBoxProperties.

This was added to prevent crashes. Let's remove it
now to see if those crashes were fixed, and to uncover
more failure cases, which may shed light on similar crash
bugs we cannot reproduce.

Bug: 708372
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: I1e89c3fcc859af65d82c9945a14cbf5aac8ef8c8
Reviewed-on: https://chromium-review.googlesource.com/598452Reviewed-by: default avatarPhilip Rogers <pdr@chromium.org>
Commit-Queue: Chris Harrelson <chrishtr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#491548}
parent c257d879
...@@ -281,26 +281,18 @@ void PaintLayerClipper::CalculateRectsWithGeometryMapper( ...@@ -281,26 +281,18 @@ void PaintLayerClipper::CalculateRectsWithGeometryMapper(
layer_.ConvertToLayerCoords(context.root_layer, offset); layer_.ConvertToLayerCoords(context.root_layer, offset);
layer_bounds = LayoutRect(offset, LayoutSize(layer_.size())); layer_bounds = LayoutRect(offset, LayoutSize(layer_.size()));
// TODO(chrishtr): fix the underlying bug that causes this situation. CalculateBackgroundClipRectWithGeometryMapper(context, background_rect);
if (!layer_.GetLayoutObject().FirstFragment()->PaintProperties() && background_rect.Intersect(paint_dirty_rect);
!layer_.GetLayoutObject().FirstFragment()->LocalBorderBoxProperties()) {
background_rect = ClipRect(LayoutRect(LayoutRect::InfiniteIntRect()));
foreground_rect = ClipRect(LayoutRect(LayoutRect::InfiniteIntRect()));
} else {
CalculateBackgroundClipRectWithGeometryMapper(context, background_rect);
background_rect.Intersect(paint_dirty_rect);
foreground_rect = background_rect; foreground_rect = background_rect;
if (ShouldClipOverflow(context)) { if (ShouldClipOverflow(context)) {
LayoutBoxModelObject& layout_object = layer_.GetLayoutObject(); LayoutBoxModelObject& layout_object = layer_.GetLayoutObject();
LayoutRect overflow_and_clip_rect = LayoutRect overflow_and_clip_rect =
ToLayoutBox(layout_object) ToLayoutBox(layout_object)
.OverflowClipRect(offset, .OverflowClipRect(offset, context.overlay_scrollbar_clip_behavior);
context.overlay_scrollbar_clip_behavior); foreground_rect.Intersect(overflow_and_clip_rect);
foreground_rect.Intersect(overflow_and_clip_rect); if (layout_object.StyleRef().HasBorderRadius())
if (layout_object.StyleRef().HasBorderRadius()) foreground_rect.SetHasRadius(true);
foreground_rect.SetHasRadius(true);
}
} }
} }
...@@ -535,13 +527,6 @@ void PaintLayerClipper::CalculateBackgroundClipRect( ...@@ -535,13 +527,6 @@ void PaintLayerClipper::CalculateBackgroundClipRect(
const ClipRectsContext& context, const ClipRectsContext& context,
ClipRect& output) const { ClipRect& output) const {
if (use_geometry_mapper_) { if (use_geometry_mapper_) {
// TODO(chrishtr): fix the underlying bug that causes this situation.
if (!layer_.GetLayoutObject().FirstFragment()->PaintProperties() &&
!layer_.GetLayoutObject().FirstFragment()->LocalBorderBoxProperties()) {
output.SetRect(FloatClipRect());
return;
}
CalculateBackgroundClipRectWithGeometryMapper(context, output); CalculateBackgroundClipRectWithGeometryMapper(context, output);
return; return;
} }
......
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