Commit 1bea478e authored by Aleks Totic's avatar Aleks Totic Committed by Commit Bot

[LayoutNG] Fix abspos crash caused by edge conditions

Bug: 740993
Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_layout_ng
Change-Id: Iebb2dea88b6e111893de79e86854d92dcd3932f8
Reviewed-on: https://chromium-review.googlesource.com/1123114Reviewed-by: default avatarKoji Ishii <kojii@chromium.org>
Reviewed-by: default avatarIan Kilpatrick <ikilpatrick@chromium.org>
Commit-Queue: Aleks Totic <atotic@chromium.org>
Cr-Commit-Position: refs/heads/master@{#572054}
parent 1cb7337e
...@@ -302,7 +302,6 @@ crbug.com/591099 external/wpt/html/rendering/non-replaced-elements/the-fieldset- ...@@ -302,7 +302,6 @@ crbug.com/591099 external/wpt/html/rendering/non-replaced-elements/the-fieldset-
crbug.com/591099 external/wpt/html/rendering/replaced-elements/svg-embedded-sizing/svg-in-img-auto.html [ Failure ] crbug.com/591099 external/wpt/html/rendering/replaced-elements/svg-embedded-sizing/svg-in-img-auto.html [ Failure ]
crbug.com/591099 external/wpt/html/rendering/replaced-elements/svg-embedded-sizing/svg-in-img-percentage.html [ Failure ] crbug.com/591099 external/wpt/html/rendering/replaced-elements/svg-embedded-sizing/svg-in-img-percentage.html [ Failure ]
crbug.com/591099 external/wpt/html/rendering/replaced-elements/svg-inline-sizing/svg-inline.html [ Failure ] crbug.com/591099 external/wpt/html/rendering/replaced-elements/svg-inline-sizing/svg-inline.html [ Failure ]
crbug.com/591099 external/wpt/html/semantics/interactive-elements/the-dialog-element/centering.html [ Crash ]
crbug.com/591099 external/wpt/payment-handler/can-make-payment-event-constructor.https.worker.html [ Pass ] crbug.com/591099 external/wpt/payment-handler/can-make-payment-event-constructor.https.worker.html [ Pass ]
crbug.com/591099 external/wpt/payment-request/payment-allowed-by-feature-policy.https.sub.html [ Pass ] crbug.com/591099 external/wpt/payment-request/payment-allowed-by-feature-policy.https.sub.html [ Pass ]
crbug.com/591099 external/wpt/payment-request/payment-disabled-by-feature-policy.https.sub.html [ Pass ] crbug.com/591099 external/wpt/payment-request/payment-disabled-by-feature-policy.https.sub.html [ Pass ]
......
...@@ -40,11 +40,14 @@ NGOutOfFlowLayoutPart::NGOutOfFlowLayoutPart( ...@@ -40,11 +40,14 @@ NGOutOfFlowLayoutPart::NGOutOfFlowLayoutPart(
default_containing_block_.style = &container_style; default_containing_block_.style = &container_style;
default_containing_block_.content_size = container_builder_->Size(); default_containing_block_.content_size = container_builder_->Size();
default_containing_block_.content_size.inline_size -= default_containing_block_.content_size.inline_size =
borders_and_scrollers.InlineSum(); std::max(default_containing_block_.content_size.inline_size -
default_containing_block_.content_size.block_size -= borders_and_scrollers.InlineSum(),
borders_and_scrollers.BlockSum(); LayoutUnit());
default_containing_block_.content_size.block_size =
std::max(default_containing_block_.content_size.block_size -
borders_and_scrollers.BlockSum(),
LayoutUnit());
default_containing_block_.content_offset = NGLogicalOffset{ default_containing_block_.content_offset = NGLogicalOffset{
borders_and_scrollers.inline_start, borders_and_scrollers.block_start}; borders_and_scrollers.inline_start, borders_and_scrollers.block_start};
default_containing_block_.content_physical_offset = default_containing_block_.content_physical_offset =
......
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