mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Auto merge of #18722 - heycam:family-list, r=upsuper
style: Use a SharedFontList object to store font-family values for Gecko Reviewed by Xidorn and Manish in https://bugzilla.mozilla.org/show_bug.cgi?id=1397626. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./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 _____ <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- 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/18722) <!-- Reviewable:end -->
This commit is contained in:
commit
3b7a82b8c7
10 changed files with 724 additions and 412 deletions
|
@ -135,7 +135,7 @@ impl FontContext {
|
|||
|
||||
let mut fonts: SmallVec<[Rc<RefCell<Font>>; 8]> = SmallVec::new();
|
||||
|
||||
for family in &style.font_family.0 {
|
||||
for family in style.font_family.0.iter() {
|
||||
// GWTODO: Check on real pages if this is faster as Vec() or HashMap().
|
||||
let mut cache_hit = false;
|
||||
for cached_font_entry in &self.layout_font_cache {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue