Commit 2b285d02 authored by Kent Tamura's avatar Kent Tamura Committed by Commit Bot

Remove ShadowRoot check in LayoutBlock::HasLineIfEmpty

LayoutObject::GetNode() can't be a ShadowRoot.
This CL has no behavior changes.

Change-Id: I0a29734abf4fbf388b4702038f051910cdd28956
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2108262
Auto-Submit: Kent Tamura <tkent@chromium.org>
Reviewed-by: default avatarYoshifumi Inoue <yosin@chromium.org>
Commit-Queue: Yoshifumi Inoue <yosin@chromium.org>
Commit-Queue: Kent Tamura <tkent@chromium.org>
Cr-Commit-Position: refs/heads/master@{#751242}
parent 3c00e7de
......@@ -32,7 +32,6 @@
#include "third_party/blink/renderer/core/css/style_engine.h"
#include "third_party/blink/renderer/core/dom/document.h"
#include "third_party/blink/renderer/core/dom/element.h"
#include "third_party/blink/renderer/core/dom/shadow_root.h"
#include "third_party/blink/renderer/core/editing/drag_caret.h"
#include "third_party/blink/renderer/core/editing/editing_utilities.h"
#include "third_party/blink/renderer/core/editing/frame_selection.h"
......@@ -1680,11 +1679,6 @@ bool LayoutBlock::HasLineIfEmpty() const {
if (GetNode()) {
if (IsRootEditableElement(*GetNode()))
return true;
if (auto* shadow_root = DynamicTo<ShadowRoot>(GetNode())) {
if (IsA<HTMLInputElement>(shadow_root->host()))
return true;
}
}
return FirstLineStyleRef().HasLineIfEmpty();
}
......
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