mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Update rustc to revision 2cfb5acb5a2751c759627377e602bac4f88f2d19.
This commit is contained in:
parent
cf616b90a2
commit
16c7060bc8
153 changed files with 2095 additions and 1298 deletions
|
@ -22,7 +22,7 @@ use geom::point::Point2D;
|
|||
/// In the uncommon case (multiple glyphs per unicode character, large glyph index/advance, or
|
||||
/// glyph offsets), we pack the glyph count into GlyphEntry, and store the other glyph information
|
||||
/// in DetailedGlyphStore.
|
||||
#[deriving(Clone, Show)]
|
||||
#[deriving(Clone, Show, Copy)]
|
||||
struct GlyphEntry {
|
||||
value: u32,
|
||||
}
|
||||
|
@ -87,7 +87,7 @@ impl GlyphEntry {
|
|||
pub type GlyphId = u32;
|
||||
|
||||
// TODO: unify with bit flags?
|
||||
#[deriving(PartialEq)]
|
||||
#[deriving(PartialEq, Copy)]
|
||||
pub enum BreakType {
|
||||
None,
|
||||
Normal,
|
||||
|
@ -251,7 +251,7 @@ impl GlyphEntry {
|
|||
|
||||
// Stores data for a detailed glyph, in the case that several glyphs
|
||||
// correspond to one character, or the glyph's data couldn't be packed.
|
||||
#[deriving(Clone, Show)]
|
||||
#[deriving(Clone, Show, Copy)]
|
||||
struct DetailedGlyph {
|
||||
id: GlyphId,
|
||||
// glyph's advance, in the text's direction (RTL or RTL)
|
||||
|
@ -270,7 +270,7 @@ impl DetailedGlyph {
|
|||
}
|
||||
}
|
||||
|
||||
#[deriving(PartialEq, Clone, Eq, Show)]
|
||||
#[deriving(PartialEq, Clone, Eq, Show, Copy)]
|
||||
struct DetailedGlyphRecord {
|
||||
// source string offset/GlyphEntry offset in the TextRun
|
||||
entry_offset: CharIndex,
|
||||
|
@ -411,6 +411,7 @@ impl<'a> DetailedGlyphStore {
|
|||
|
||||
// This struct is used by GlyphStore clients to provide new glyph data.
|
||||
// It should be allocated on the stack and passed by reference to GlyphStore.
|
||||
#[deriving(Copy)]
|
||||
pub struct GlyphData {
|
||||
id: GlyphId,
|
||||
advance: Au,
|
||||
|
@ -443,6 +444,7 @@ impl GlyphData {
|
|||
// through glyphs (either for a particular TextRun offset, or all glyphs).
|
||||
// Rather than eagerly assembling and copying glyph data, it only retrieves
|
||||
// values as they are needed from the GlyphStore, using provided offsets.
|
||||
#[deriving(Copy)]
|
||||
pub enum GlyphInfo<'a> {
|
||||
Simple(&'a GlyphStore, CharIndex),
|
||||
Detail(&'a GlyphStore, CharIndex, u16),
|
||||
|
|
|
@ -503,7 +503,7 @@ impl Shaper {
|
|||
// space (U+00A0) left in the text after the white space processing rules have been
|
||||
// applied. The effect of the property on other word-separator characters is undefined."
|
||||
// We elect to only space the two required code points.
|
||||
if character == ' ' || character == '\u00a0' {
|
||||
if character == ' ' || character == '\u{a0}' {
|
||||
advance = advance + options.word_spacing
|
||||
}
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ use servo_util::geometry::Au;
|
|||
use servo_util::range::Range;
|
||||
use servo_util::vec::{Comparator, FullBinarySearchMethods};
|
||||
use std::slice::Items;
|
||||
use sync::Arc;
|
||||
use std::sync::Arc;
|
||||
use text::glyph::{CharIndex, GlyphStore};
|
||||
|
||||
/// A single "paragraph" of text in one font size and style.
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
use text::glyph::CharIndex;
|
||||
|
||||
#[deriving(PartialEq)]
|
||||
#[deriving(PartialEq, Eq, Copy)]
|
||||
pub enum CompressionMode {
|
||||
CompressNone,
|
||||
CompressWhitespace,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue