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

Unified Diff: third_party/WebKit/Source/platform/fonts/shaping/ShapeResultTestInfo.cpp

Issue 2869893005: Clamp RunInfo::num_characters when shaping ranges with context (Closed)
Patch Set: Created 3 years, 7 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
« no previous file with comments | « third_party/WebKit/Source/platform/fonts/shaping/ShapeResultTestInfo.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/platform/fonts/shaping/ShapeResultTestInfo.cpp
diff --git a/third_party/WebKit/Source/platform/fonts/shaping/ShapeResultTestInfo.cpp b/third_party/WebKit/Source/platform/fonts/shaping/ShapeResultTestInfo.cpp
index 6f8e24084e537fcf54c4933d50a07a729fa81f78..c04d44293c2398c8ee357cbafb23c1bbc818d960 100644
--- a/third_party/WebKit/Source/platform/fonts/shaping/ShapeResultTestInfo.cpp
+++ b/third_party/WebKit/Source/platform/fonts/shaping/ShapeResultTestInfo.cpp
@@ -15,10 +15,12 @@ unsigned ShapeResultTestInfo::NumberOfRunsForTesting() const {
bool ShapeResultTestInfo::RunInfoForTesting(unsigned run_index,
unsigned& start_index,
+ unsigned& num_characters,
unsigned& num_glyphs,
hb_script_t& script) const {
if (run_index < runs_.size() && runs_[run_index]) {
start_index = runs_[run_index]->start_index_;
+ num_characters = runs_[run_index]->num_characters_;
num_glyphs = runs_[run_index]->glyph_data_.size();
script = runs_[run_index]->script_;
return true;
@@ -26,6 +28,15 @@ bool ShapeResultTestInfo::RunInfoForTesting(unsigned run_index,
return false;
}
+bool ShapeResultTestInfo::RunInfoForTesting(unsigned run_index,
+ unsigned& start_index,
+ unsigned& num_glyphs,
+ hb_script_t& script) const {
+ unsigned num_characters;
+ return RunInfoForTesting(run_index, start_index, num_characters, num_glyphs,
+ script);
+}
+
uint16_t ShapeResultTestInfo::GlyphForTesting(unsigned run_index,
size_t glyph_index) const {
return runs_[run_index]->glyph_data_[glyph_index].glyph;
« no previous file with comments | « third_party/WebKit/Source/platform/fonts/shaping/ShapeResultTestInfo.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698