Commit 53eada7a authored by Yoshifumi Inoue's avatar Yoshifumi Inoue Committed by Commit Bot

Make NGInlineCursor::IsLineBreak() not to crash for non-text type for NGFragmentItem

This patch changes |NGInlineCursor::IsLineBreak()| not to crash for non-text
type for |NGFragmentItem| as |NGPaintFragment|.

This patch makes following test to pass instead of crash:
 - editing/pasteboard/drag-drop-input-textarea.html
 - fast/events/remove-target-with-shadow-in-drag.html
 - http/tests/security/drag-drop-different-origin.html
 - virtual/mouseevent_fractional/fast/events/remove-target-with-shadow-in-drag.html


Bug: 982194
Change-Id: Ib5656688308080e8aede3ca5ffabfa43e32f4019
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1909060
Commit-Queue: Yoshifumi Inoue <yosin@chromium.org>
Commit-Queue: Koji Ishii <kojii@chromium.org>
Auto-Submit: Yoshifumi Inoue <yosin@chromium.org>
Reviewed-by: default avatarKoji Ishii <kojii@chromium.org>
Cr-Commit-Position: refs/heads/master@{#714157}
parent 54c33402
...@@ -259,7 +259,7 @@ bool NGInlineCursor::IsLineBreak() const { ...@@ -259,7 +259,7 @@ bool NGInlineCursor::IsLineBreak() const {
return false; return false;
} }
if (current_item_) if (current_item_)
return current_item_->IsLineBreak(); return IsText() && current_item_->IsLineBreak();
NOTREACHED(); NOTREACHED();
return false; return false;
} }
......
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