summaryrefslogtreecommitdiff
path: root/chromium/third_party/blink/renderer/core/layout/ng/inline/ng_inline_items_builder.h
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/third_party/blink/renderer/core/layout/ng/inline/ng_inline_items_builder.h')
-rw-r--r--chromium/third_party/blink/renderer/core/layout/ng/inline/ng_inline_items_builder.h20
1 files changed, 17 insertions, 3 deletions
diff --git a/chromium/third_party/blink/renderer/core/layout/ng/inline/ng_inline_items_builder.h b/chromium/third_party/blink/renderer/core/layout/ng/inline/ng_inline_items_builder.h
index d0354cf76ed..9b2faf2ab4c 100644
--- a/chromium/third_party/blink/renderer/core/layout/ng/inline/ng_inline_items_builder.h
+++ b/chromium/third_party/blink/renderer/core/layout/ng/inline/ng_inline_items_builder.h
@@ -6,9 +6,11 @@
#define THIRD_PARTY_BLINK_RENDERER_CORE_LAYOUT_NG_INLINE_NG_INLINE_ITEMS_BUILDER_H_
#include "third_party/blink/renderer/core/core_export.h"
+#include "third_party/blink/renderer/core/layout/layout_block_flow.h"
#include "third_party/blink/renderer/core/layout/ng/inline/empty_offset_mapping_builder.h"
#include "third_party/blink/renderer/core/layout/ng/inline/ng_inline_item.h"
#include "third_party/blink/renderer/core/layout/ng/inline/ng_offset_mapping_builder.h"
+#include "third_party/blink/renderer/core/layout/ng/svg/svg_inline_node_data.h"
#include "third_party/blink/renderer/platform/fonts/font_height.h"
#include "third_party/blink/renderer/platform/wtf/allocator/allocator.h"
#include "third_party/blink/renderer/platform/wtf/text/string_builder.h"
@@ -44,9 +46,14 @@ class NGInlineItemsBuilderTemplate {
public:
// Create a builder that appends items to |items|.
- NGInlineItemsBuilderTemplate(LayoutBlockFlow* block_flow,
- Vector<NGInlineItem>* items)
- : block_flow_(block_flow), items_(items) {}
+ NGInlineItemsBuilderTemplate(
+ LayoutBlockFlow* block_flow,
+ Vector<NGInlineItem>* items,
+ const SvgTextChunkOffsets* chunk_offsets = nullptr)
+ : block_flow_(block_flow),
+ items_(items),
+ text_chunk_offsets_(chunk_offsets),
+ is_text_combine_(block_flow_->IsLayoutNGTextCombine()) {}
~NGInlineItemsBuilderTemplate();
LayoutBlockFlow* GetLayoutBlockFlow() const { return block_flow_; }
@@ -98,6 +105,7 @@ class NGInlineItemsBuilderTemplate {
// Append a unicode "object replacement character" for an atomic inline,
// signaling the presence of a non-text object to the unicode bidi algorithm.
void AppendAtomicInline(LayoutObject* layout_object);
+ void AppendBlockInInline(LayoutObject* layout_object);
// Append floats and positioned objects in the same way as atomic inlines.
// Because these objects need positions, they will be handled in
@@ -178,6 +186,9 @@ class NGInlineItemsBuilderTemplate {
};
Vector<BidiContext> bidi_context_;
+ const SvgTextChunkOffsets* text_chunk_offsets_;
+
+ const bool is_text_combine_;
bool has_bidi_controls_ = false;
bool has_ruby_ = false;
bool is_empty_inline_ = true;
@@ -202,6 +213,9 @@ class NGInlineItemsBuilderTemplate {
void AppendForcedBreakCollapseWhitespace(LayoutObject*);
void AppendForcedBreak(LayoutObject*);
+ bool AppendTextChunks(const String& string, LayoutText& layout_text);
+ void ExitAndEnterSvgTextChunk(LayoutText& layout_text);
+ void EnterSvgTextChunk(const ComputedStyle* style);
void RemoveTrailingCollapsibleSpaceIfExists();
void RemoveTrailingCollapsibleSpace(NGInlineItem*);