Commit 1a379b6e authored by eae's avatar eae Committed by Commit bot

[LayoutNG] Update NGLayoutInputText

Update NGLayoutInputText to include further fields for run segmentation.

BUG=591099
R=drott@chromium.org

Review-Url: https://codereview.chromium.org/2323283002
Cr-Commit-Position: refs/heads/master@{#417567}
parent 1e99661f
...@@ -6,22 +6,32 @@ ...@@ -6,22 +6,32 @@
#define NGLayoutInputText_h #define NGLayoutInputText_h
#include "core/CoreExport.h" #include "core/CoreExport.h"
#include "core/layout/ng/ng_direction.h"
#include "core/style/ComputedStyle.h" #include "core/style/ComputedStyle.h"
#include "platform/fonts/FontFallbackPriority.h"
#include "platform/fonts/shaping/CachingWordShaper.h" #include "platform/fonts/shaping/CachingWordShaper.h"
#include "platform/fonts/shaping/ShapeResult.h" #include "platform/fonts/shaping/ShapeResult.h"
#include "platform/heap/Handle.h" #include "platform/heap/Handle.h"
#include "wtf/Vector.h" #include "wtf/Vector.h"
#include "wtf/text/WTFString.h" #include "wtf/text/WTFString.h"
#include <unicode/uscript.h>
namespace blink { namespace blink {
// Struct representing a single text node or styled inline element with text // Struct representing a single text node or styled inline element with text
// content. In this representation TextNodes are merged up into their parent // content segmented by style, text direction, sideways rotation, font fallback
// inline element where possible. // priority (text, symbol, emoji, etc) and script (but not by font).
// In this representation TextNodes are merged up into their parent inline
// element where possible.
struct NGLayoutInputTextItem { struct NGLayoutInputTextItem {
unsigned start_offset; unsigned start_offset;
unsigned end_offset; unsigned end_offset;
NGDirection direction;
UScriptCode script;
FontFallbackPriority fallback_priority;
bool rotate_sideways;
RefPtr<ComputedStyle> style; RefPtr<ComputedStyle> style;
RefPtr<ShapeResult> shape_result;
}; };
// Class representing all text content for a given inline layout root in the // Class representing all text content for a given inline layout root in the
...@@ -53,7 +63,6 @@ class CORE_EXPORT NGLayoutInputText final ...@@ -53,7 +63,6 @@ class CORE_EXPORT NGLayoutInputText final
// utf-8 or utf-16. Currently we always shape in utf16 and // utf-8 or utf-16. Currently we always shape in utf16 and
// upconvert latin-1. // upconvert latin-1.
String text_; String text_;
RefPtr<ShapeResult> shape_result_;
Vector<NGLayoutInputTextItem> items_; Vector<NGLayoutInputTextItem> items_;
}; };
......
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