Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1090)

Unified Diff: third_party/WebKit/Source/platform/fonts/shaping/ShapeResult.h

Issue 2924263003: [LayoutNG] Initial letter-spacing and word-spacing support (Closed)
Patch Set: Cleanup Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/platform/fonts/shaping/ShapeResult.h
diff --git a/third_party/WebKit/Source/platform/fonts/shaping/ShapeResult.h b/third_party/WebKit/Source/platform/fonts/shaping/ShapeResult.h
index 2aa13672ba40c7806033a42eed70efd225d9cf06..1139558e9ece957a3646a9949df365cd510a5ca1 100644
--- a/third_party/WebKit/Source/platform/fonts/shaping/ShapeResult.h
+++ b/third_party/WebKit/Source/platform/fonts/shaping/ShapeResult.h
@@ -46,6 +46,7 @@ struct hb_buffer_t;
namespace blink {
class Font;
+template <typename TextContainerType>
class ShapeResultSpacing;
class SimpleFontData;
class TextRun;
@@ -90,7 +91,10 @@ class PLATFORM_EXPORT ShapeResult : public RefCounted<ShapeResult> {
return LayoutUnit::FromFloatCeil(PositionForOffset(offset));
}
- PassRefPtr<ShapeResult> ApplySpacingToCopy(ShapeResultSpacing&,
+ void ApplySpacing(ShapeResultSpacing<StringView>&,
+ const StringView&,
+ TextDirection);
+ PassRefPtr<ShapeResult> ApplySpacingToCopy(ShapeResultSpacing<TextRun>&,
const TextRun&) const;
void CopyRange(unsigned start, unsigned end, ShapeResult*) const;
@@ -105,7 +109,10 @@ class PLATFORM_EXPORT ShapeResult : public RefCounted<ShapeResult> {
return AdoptRef(new ShapeResult(other));
}
- void ApplySpacing(ShapeResultSpacing&, const TextRun&);
+ template <typename TextContainerType>
+ void ApplySpacing(ShapeResultSpacing<TextContainerType>&,
+ const TextContainerType&,
+ bool is_rtl);
void InsertRun(std::unique_ptr<ShapeResult::RunInfo>,
unsigned start_glyph,
unsigned num_glyphs,

Powered by Google App Engine
This is Rietveld 408576698