mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
Auto merge of #13506 - veer66:master, r=mbrubeck
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 -->
This commit is contained in:
commit
d161f6ec44
5 changed files with 43 additions and 9 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue