diff --git a/components/gfx/text/glyph.rs b/components/gfx/text/glyph.rs index 73a66ff19bf..ea5a009959e 100644 --- a/components/gfx/text/glyph.rs +++ b/components/gfx/text/glyph.rs @@ -254,10 +254,10 @@ impl<'a> DetailedGlyphStore { let i = self.detail_lookup.binary_search(&key) .expect("Invalid index not found in detailed glyph lookup table!"); - - assert!(i + (count as usize) <= self.detail_buffer.len()); + let main_detail_offset = self.detail_lookup[i].detail_offset; + assert!(main_detail_offset + (count as usize) <= self.detail_buffer.len()); // return a slice into the buffer - &self.detail_buffer[i .. i + count as usize] + &self.detail_buffer[main_detail_offset .. main_detail_offset + count as usize] } fn detailed_glyph_with_index(&'a self, @@ -274,9 +274,9 @@ impl<'a> DetailedGlyphStore { let i = self.detail_lookup.binary_search(&key) .expect("Invalid index not found in detailed glyph lookup table!"); - - assert!(i + (detail_offset as usize) < self.detail_buffer.len()); - &self.detail_buffer[i + (detail_offset as usize)] + let main_detail_offset = self.detail_lookup[i].detail_offset; + assert!(main_detail_offset + (detail_offset as usize) < self.detail_buffer.len()); + &self.detail_buffer[main_detail_offset + (detail_offset as usize)] } fn ensure_sorted(&mut self) { diff --git a/tests/wpt/metadata-css/css-text-3_dev/html/word-break-break-all-007.htm.ini b/tests/wpt/metadata-css/css-text-3_dev/html/word-break-break-all-007.htm.ini deleted file mode 100644 index b2b3212943b..00000000000 --- a/tests/wpt/metadata-css/css-text-3_dev/html/word-break-break-all-007.htm.ini +++ /dev/null @@ -1,3 +0,0 @@ -[word-break-break-all-007.htm] - type: reftest - expected: FAIL diff --git a/tests/wpt/mozilla/meta/MANIFEST.json b/tests/wpt/mozilla/meta/MANIFEST.json index 3f703020e7c..8cc05282ff4 100644 --- a/tests/wpt/mozilla/meta/MANIFEST.json +++ b/tests/wpt/mozilla/meta/MANIFEST.json @@ -1340,6 +1340,18 @@ "url": "/_mozilla/css/clip_a.html" } ], + "css/complex_glyphs_a.html": [ + { + "path": "css/complex_glyphs_a.html", + "references": [ + [ + "/_mozilla/css/complex_glyphs_ref.html", + "==" + ] + ], + "url": "/_mozilla/css/complex_glyphs_a.html" + } + ], "css/content_color.html": [ { "path": "css/content_color.html", @@ -16802,6 +16814,18 @@ "url": "/_mozilla/css/clip_a.html" } ], + "css/complex_glyphs_a.html": [ + { + "path": "css/complex_glyphs_a.html", + "references": [ + [ + "/_mozilla/css/complex_glyphs_ref.html", + "==" + ] + ], + "url": "/_mozilla/css/complex_glyphs_a.html" + } + ], "css/content_color.html": [ { "path": "css/content_color.html", diff --git a/tests/wpt/mozilla/tests/css/complex_glyphs_a.html b/tests/wpt/mozilla/tests/css/complex_glyphs_a.html new file mode 100644 index 00000000000..08032c978d5 --- /dev/null +++ b/tests/wpt/mozilla/tests/css/complex_glyphs_a.html @@ -0,0 +1,7 @@ + + + + +ยินดี + + diff --git a/tests/wpt/mozilla/tests/css/complex_glyphs_ref.html b/tests/wpt/mozilla/tests/css/complex_glyphs_ref.html new file mode 100644 index 00000000000..d168d10945d --- /dev/null +++ b/tests/wpt/mozilla/tests/css/complex_glyphs_ref.html @@ -0,0 +1,6 @@ + + + +ยิน​ดี + +