mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Upgrade to rustc 551a74dddd84cf01440ee84148ebd18bc68bd7c8.
This commit is contained in:
parent
7b87085c18
commit
ef8edd4e87
168 changed files with 2247 additions and 2408 deletions
|
@ -27,7 +27,7 @@ use util::geometry::Au;
|
|||
use util::linked_list::split_off_head;
|
||||
use util::logical_geometry::{LogicalSize, WritingMode};
|
||||
use util::range::{Range, RangeIndex};
|
||||
use util::smallvec::{SmallVec, SmallVec1};
|
||||
use util::smallvec::SmallVec1;
|
||||
|
||||
/// A stack-allocated object for scanning an inline flow into `TextRun`-containing `TextFragment`s.
|
||||
pub struct TextRunScanner {
|
||||
|
@ -185,7 +185,7 @@ impl TextRunScanner {
|
|||
};
|
||||
|
||||
// FIXME(https://github.com/rust-lang/rust/issues/23338)
|
||||
let mut font = fontgroup.fonts.get(0).borrow_mut();
|
||||
let mut font = fontgroup.fonts[0].borrow_mut();
|
||||
Arc::new(box TextRun::new(&mut *font, run_text, &options))
|
||||
};
|
||||
|
||||
|
@ -193,7 +193,7 @@ impl TextRunScanner {
|
|||
debug!("TextRunScanner: pushing {} fragment(s)", self.clump.len());
|
||||
for (logical_offset, old_fragment) in
|
||||
mem::replace(&mut self.clump, LinkedList::new()).into_iter().enumerate() {
|
||||
let mut range = *new_ranges.get(logical_offset);
|
||||
let mut range = new_ranges[logical_offset];
|
||||
if range.is_empty() {
|
||||
debug!("Elided an `SpecificFragmentInfo::UnscannedText` because it was \
|
||||
zero-length after compression");
|
||||
|
@ -238,14 +238,14 @@ impl TextRunScanner {
|
|||
let length = string.len();
|
||||
let original = mem::replace(string, String::with_capacity(length));
|
||||
for character in original.chars() {
|
||||
string.push(character.to_uppercase())
|
||||
string.extend(character.to_uppercase())
|
||||
}
|
||||
}
|
||||
text_transform::T::lowercase => {
|
||||
let length = string.len();
|
||||
let original = mem::replace(string, String::with_capacity(length));
|
||||
for character in original.chars() {
|
||||
string.push(character.to_lowercase())
|
||||
string.extend(character.to_lowercase())
|
||||
}
|
||||
}
|
||||
text_transform::T::capitalize => {
|
||||
|
@ -258,7 +258,7 @@ impl TextRunScanner {
|
|||
//
|
||||
// http://dev.w3.org/csswg/css-text/#typographic-letter-unit
|
||||
if capitalize_next_letter && character.is_alphabetic() {
|
||||
string.push(character.to_uppercase());
|
||||
string.extend(character.to_uppercase());
|
||||
capitalize_next_letter = false;
|
||||
continue
|
||||
}
|
||||
|
@ -308,7 +308,7 @@ pub fn font_metrics_for_style(font_context: &mut FontContext, font_style: Arc<Fo
|
|||
-> FontMetrics {
|
||||
let fontgroup = font_context.get_layout_font_group_for_style(font_style);
|
||||
// FIXME(https://github.com/rust-lang/rust/issues/23338)
|
||||
let font = fontgroup.fonts.get(0).borrow();
|
||||
let font = fontgroup.fonts[0].borrow();
|
||||
font.metrics.clone()
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue