Commit 0c635956 authored by Yoshifumi Inoue's avatar Yoshifumi Inoue Committed by Commit Bot

Make NGFragmentItem::GetWritingMode() not to crash for kGeneratedText

This patch makes |NGFragmentItem::GetWritingMode()| not to crash for
|kGeneratedText| for preparation of migrating |NGFragmentItem|.

Below is sample stack trace when |GetWritingMode()| called with kGeneratedText
Sample file: fast/css/text-overflow-ellipsis.html

- NGFragmentItem::GetWritingMode()
- NGFragmentItem::IsHorizontal()
- WriteTextFragment()
- Write()
- Write()
- Write()
- LayoutTreeAsText::WriteLayers()
- LayoutTreeAsText::WriteLayers()
- LayoutTreeAsText::WriteLayers()
- ExternalRepresentation()
- ExternalRepresentation()
- WebFrameContentDumper::DumpLayoutTreeAsText()

Bug: 982194
Change-Id: Iae8a55a3fff57a487ac9d21c47c06fd19cae2c5b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1911345
Auto-Submit: Yoshifumi Inoue <yosin@chromium.org>
Commit-Queue: Koji Ishii <kojii@chromium.org>
Reviewed-by: default avatarKoji Ishii <kojii@chromium.org>
Cr-Commit-Position: refs/heads/master@{#714474}
parent 770ecf60
......@@ -237,7 +237,7 @@ class CORE_EXPORT NGFragmentItem : public DisplayItemClient {
}
WritingMode GetWritingMode() const {
DCHECK_EQ(Type(), kText);
DCHECK(Type() == kText || Type() == kGeneratedText) << this;
return Style().GetWritingMode();
}
......
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