From 552906b0f222c5d5dd11b9fd73829d510980461a Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Thu, 16 Jul 2020 11:45:35 +0200 Subject: BASELINE: Update Chromium to 83.0.4103.122 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Ie3a82f5bb0076eec2a7c6a6162326b4301ee291e Reviewed-by: Michael BrĂ¼ning --- .../third_party/blink/renderer/core/layout/layout_text.h | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'chromium/third_party/blink/renderer/core/layout/layout_text.h') 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* 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 { -- cgit v1.2.1