summaryrefslogtreecommitdiff
path: root/chromium/third_party/blink/renderer/core/layout/layout_br.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/third_party/blink/renderer/core/layout/layout_br.cc')
-rw-r--r--chromium/third_party/blink/renderer/core/layout/layout_br.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/chromium/third_party/blink/renderer/core/layout/layout_br.cc b/chromium/third_party/blink/renderer/core/layout/layout_br.cc
index c96e4cd4a6a..cb96635ea09 100644
--- a/chromium/third_party/blink/renderer/core/layout/layout_br.cc
+++ b/chromium/third_party/blink/renderer/core/layout/layout_br.cc
@@ -38,6 +38,7 @@ LayoutBR::LayoutBR(Node* node) : LayoutText(node, NewlineString()) {}
LayoutBR::~LayoutBR() = default;
int LayoutBR::LineHeight(bool first_line) const {
+ NOT_DESTROYED();
const ComputedStyle& style = StyleRef(
first_line && GetDocument().GetStyleEngine().UsesFirstLineRules());
return style.ComputedLineHeight();
@@ -45,22 +46,27 @@ int LayoutBR::LineHeight(bool first_line) const {
void LayoutBR::StyleDidChange(StyleDifference diff,
const ComputedStyle* old_style) {
+ NOT_DESTROYED();
LayoutText::StyleDidChange(diff, old_style);
}
int LayoutBR::CaretMinOffset() const {
+ NOT_DESTROYED();
return 0;
}
int LayoutBR::CaretMaxOffset() const {
+ NOT_DESTROYED();
return 1;
}
PositionWithAffinity LayoutBR::PositionForPoint(const PhysicalOffset&) const {
+ NOT_DESTROYED();
return CreatePositionWithAffinity(0);
}
Position LayoutBR::PositionForCaretOffset(unsigned offset) const {
+ NOT_DESTROYED();
DCHECK_LE(offset, 1u);
DCHECK(GetNode());
return offset ? Position::AfterNode(*GetNode())
@@ -69,6 +75,7 @@ Position LayoutBR::PositionForCaretOffset(unsigned offset) const {
base::Optional<unsigned> LayoutBR::CaretOffsetForPosition(
const Position& position) const {
+ NOT_DESTROYED();
if (position.IsNull() || position.AnchorNode() != GetNode())
return base::nullopt;
DCHECK(position.IsBeforeAnchor() || position.IsAfterAnchor()) << position;