diff options
Diffstat (limited to 'chromium/third_party/blink/renderer/core/layout/layout_text.h')
-rw-r--r-- | chromium/third_party/blink/renderer/core/layout/layout_text.h | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/chromium/third_party/blink/renderer/core/layout/layout_text.h b/chromium/third_party/blink/renderer/core/layout/layout_text.h index 3548afaf77a..17ca490ad20 100644 --- a/chromium/third_party/blink/renderer/core/layout/layout_text.h +++ b/chromium/third_party/blink/renderer/core/layout/layout_text.h @@ -97,6 +97,7 @@ class CORE_EXPORT LayoutText : public LayoutObject { void AttachTextBox(InlineTextBox*); void RemoveTextBox(InlineTextBox*); + bool HasInlineFragments() const final; NGPaintFragment* FirstInlineFragment() const final; void SetFirstInlineFragment(NGPaintFragment*) final; wtf_size_t FirstInlineFragmentItemIndex() const final; @@ -218,10 +219,6 @@ class CORE_EXPORT LayoutText : public LayoutObject { InlineTextBox* FirstTextBox() const { return TextBoxes().First(); } InlineTextBox* LastTextBox() const { return TextBoxes().Last(); } - // True if we have inline text box children which implies rendered text (or - // whitespace) output. - bool HasTextBoxes() const; - // TODO(layoutng) Legacy-only implementation of HasTextBoxes. // All callers should call HasTextBoxes instead, and take NG into account. bool HasLegacyTextBoxes() const { return FirstTextBox(); } @@ -331,6 +328,10 @@ class CORE_EXPORT LayoutText : public LayoutObject { } virtual base::span<NGInlineItem>* GetNGInlineItems() { return nullptr; } + void InvalidateSubtreeLayoutForFontUpdates() override; + + void DetachAbstractInlineTextBoxesIfNeeded(); + protected: void WillBeDestroyed() override; @@ -439,6 +440,7 @@ class CORE_EXPORT LayoutText : public LayoutObject { private: ContentCaptureManager* GetContentCaptureManager(); + void DetachAbstractInlineTextBoxes(); // Used for LayoutNG with accessibility. True if inline fragments are // associated to |NGAbstractInlineTextBox|. @@ -517,6 +519,11 @@ inline float LayoutText::HyphenWidth(const Font& font, style, direction)); } +inline void LayoutText::DetachAbstractInlineTextBoxesIfNeeded() { + if (UNLIKELY(has_abstract_inline_text_box_)) + DetachAbstractInlineTextBoxes(); +} + DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutText, IsText()); inline LayoutText* Text::GetLayoutObject() const { |