Skip to content

Commit

Permalink
Auto merge of #13506 - veer66:master, r=mbrubeck
Browse files Browse the repository at this point in the history
A test case change is added to #13442: Fix  #12193 Servo displays upper level Thai character in wrong place.

<!-- Please describe your changes on the following line: -->

<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [ ] `./mach build -d` does not report any errors
- [ ] `./mach test-tidy` does not report any errors
- [ ] These changes fix #__ (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because _____

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->

---

This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/13506)

<!-- Reviewable:end -->
  • Loading branch information
bors-servo committed Feb 1, 2017
2 parents b7887a1 + a83fd07 commit d161f6e
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 9 deletions.
12 changes: 6 additions & 6 deletions components/gfx/text/glyph.rs
Expand Up @@ -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,
Expand All @@ -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) {
Expand Down

This file was deleted.

24 changes: 24 additions & 0 deletions tests/wpt/mozilla/meta/MANIFEST.json
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down
7 changes: 7 additions & 0 deletions tests/wpt/mozilla/tests/css/complex_glyphs_a.html
@@ -0,0 +1,7 @@
<!doctype html>
<meta charset="utf-8">
<link rel="match" href="complex_glyphs_ref.html">
<body>
ยินดี
</body>
</html>
6 changes: 6 additions & 0 deletions tests/wpt/mozilla/tests/css/complex_glyphs_ref.html
@@ -0,0 +1,6 @@
<!doctype html>
<meta charset="utf-8">
<body>
ยิน&#X200B;ดี
</body>
<html>

0 comments on commit d161f6e

Please sign in to comment.