Commit e9e0da37 authored by Yoshifumi Inoue's avatar Yoshifumi Inoue Committed by Commit Bot

[NGFragmentItem] Make NGFragmentItem::DebugName() to return as NGPaintFragment::DebugName()

This patch changes |NGFragmentItem::DebugName()| to return as
|NGPaintFragment::DebugName()| to get identical output for paint invalidation
test (|internals.layerTreeAsText()|) for ease of managing flag specific test
expectations, e.g. reducing rebaseline.


Following 9 tests are passed:
* paint/invalidation/selection/invalidation-rect-includes-newline-for-rtl.html
* paint/invalidation/selection/invalidation-rect-includes-newline-for-vertical-lr.html
* paint/invalidation/selection/invalidation-rect-includes-newline-for-vertical-rl.html
* paint/invalidation/selection/invalidation-rect-includes-newline.html
* paint/invalidation/selection/japanese-rl-selection-clear.html
* paint/invalidation/selection/selection-partial-invalidation-between-blocks.html
* paint/invalidation/selection/selection-rl.html
* paint/invalidation/selection/selection-within-composited-scroller.html
* paint/invalidation/selection/text-selection-rect-in-overflow.html

Bug: 982194
Change-Id: Ib35d1e6e8f944209a5752a5f7c7ded5151bdf752
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2014353
Auto-Submit: Yoshifumi Inoue <yosin@chromium.org>
Reviewed-by: default avatarKoji Ishii <kojii@chromium.org>
Reviewed-by: default avatarIan Kilpatrick <ikilpatrick@chromium.org>
Commit-Queue: Koji Ishii <kojii@chromium.org>
Commit-Queue: Yoshifumi Inoue <yosin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#733939}
parent a683f6fe
...@@ -240,6 +240,24 @@ TextDirection NGFragmentItem::ResolvedDirection() const { ...@@ -240,6 +240,24 @@ TextDirection NGFragmentItem::ResolvedDirection() const {
} }
String NGFragmentItem::DebugName() const { String NGFragmentItem::DebugName() const {
// TODO(yosin): Once |NGPaintFragment| is removed, we should get rid of
// following if-statements.
// For ease of rebasing, we use same |DebugName()| as |NGPaintFrgment|.
if (Type() == NGFragmentItem::kBox) {
StringBuilder name;
name.Append("NGPhysicalBoxFragment ");
name.Append(layout_object_->DebugName());
return name.ToString();
}
if (Type() == NGFragmentItem::kText) {
StringBuilder name;
name.Append("NGPhysicalTextFragment '");
name.Append(Text(*layout_object_->ContainingBlockFlowFragment()->Items()));
name.Append('\'');
return name.ToString();
}
if (Type() == NGFragmentItem::kLine)
return "NGPhysicalLineBoxFragment";
return "NGFragmentItem"; return "NGFragmentItem";
} }
......
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