Commit cc83191e authored by cathiechen's avatar cathiechen Committed by Commit Bot

[LayoutNG]Make LayoutNGMarker remaining original WhiteSpace when PropagateStyle

LayoutNGMarker has pre white-space. If its parent changes color and
PropagateStyle() without carry marker's white-space, this will cause extra
layout passes.

Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_layout_ng
Change-Id: I388f1811baf45f31f1ce168b9c7b68d51c2dd1d2
Reviewed-on: https://chromium-review.googlesource.com/1096590Reviewed-by: default avatarKoji Ishii <kojii@chromium.org>
Commit-Queue: cathie chen <cathiechen@tencent.com>
Cr-Commit-Position: refs/heads/master@{#566708}
parent 48046df2
......@@ -553,7 +553,6 @@ crbug.com/591099 fast/lists/004.html [ Failure ]
crbug.com/591099 fast/lists/009-vertical.html [ Failure ]
crbug.com/591099 fast/lists/calc-width-with-space.html [ Failure ]
crbug.com/591099 fast/lists/inline-before-content-after-list-marker.html [ Failure ]
crbug.com/591099 fast/lists/list-color-change-no-layout.html [ Failure ]
crbug.com/591099 fast/lists/list-item-line-height.html [ Failure ]
crbug.com/591099 fast/lists/marker-before-empty-inline.html [ Failure ]
crbug.com/591099 fast/masking/clip-path-selection.html [ Failure ]
......
......@@ -83,6 +83,7 @@
#include "third_party/blink/renderer/core/layout/ng/layout_ng_table_caption.h"
#include "third_party/blink/renderer/core/layout/ng/layout_ng_table_cell.h"
#include "third_party/blink/renderer/core/layout/ng/list/layout_ng_list_item.h"
#include "third_party/blink/renderer/core/layout/ng/list/layout_ng_list_marker.h"
#include "third_party/blink/renderer/core/layout/ng/ng_block_node.h"
#include "third_party/blink/renderer/core/layout/ng/ng_layout_result.h"
#include "third_party/blink/renderer/core/layout/ng/ng_unpositioned_float.h"
......@@ -2395,6 +2396,9 @@ void LayoutObject::PropagateStyleToAnonymousChildren() {
ToLayoutBlockFlow(child)->IsAnonymousBlockContinuation())
new_style->SetPosition(child->Style()->GetPosition());
if (child->IsLayoutNGListMarker())
new_style->SetWhiteSpace(child->Style()->WhiteSpace());
UpdateAnonymousChildStyle(child, *new_style);
child->SetStyle(std::move(new_style));
......
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