Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix a few issues #6682

Merged
merged 4 commits into from Jul 22, 2015
Merged
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Fix #6680

  • Loading branch information
boghison committed Jul 22, 2015
commit 681b11c08b6a3a22d0be5c51aaebf40727e3dfeb
@@ -32,7 +32,7 @@ use libc::uintptr_t;
use msg::compositor_msg::{LayerId, LayerKind};
use net_traits::image::base::Image;
use paint_task::PaintLayer;
use smallvec::SmallVec8;
use smallvec::SmallVec;
use std::collections::linked_list::{self, LinkedList};
use std::fmt;
use std::slice::Iter;
@@ -313,7 +313,7 @@ impl StackingContext {
}

// Sort positioned children according to z-index.
let mut positioned_children = SmallVec8::new();
let mut positioned_children: SmallVec<[Arc<StackingContext>; 8]> = SmallVec::new();
for kid in display_list.children.iter() {
positioned_children.push((*kid).clone());
}
@@ -3,7 +3,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */

use euclid::{Point2D, Rect, Size2D};
use smallvec::SmallVec8;
use smallvec::SmallVec;
use std::borrow::ToOwned;
use std::mem;
use std::slice;
@@ -204,11 +204,11 @@ impl Font {
}

pub struct FontGroup {
pub fonts: SmallVec8<Rc<RefCell<Font>>>,
pub fonts: SmallVec<[Rc<RefCell<Font>>; 8]>,
}

impl FontGroup {
pub fn new(fonts: SmallVec8<Rc<RefCell<Font>>>) -> FontGroup {
pub fn new(fonts: SmallVec<[Rc<RefCell<Font>>; 8]>) -> FontGroup {
FontGroup {
fonts: fonts,
}
@@ -13,7 +13,7 @@ use font_template::FontTemplateDescriptor;
use fnv::FnvHasher;
use platform::font::FontHandle;
use platform::font_template::FontTemplateData;
use smallvec::SmallVec8;
use smallvec::SmallVec;
use string_cache::Atom;
use util::cache::HashCache;
use util::geometry::Au;
@@ -159,7 +159,7 @@ impl FontContext {
style.font_style == font_style::T::italic ||
style.font_style == font_style::T::oblique);

let mut fonts = SmallVec8::new();
let mut fonts: SmallVec<[Rc<RefCell<Font>>; 8]> = SmallVec::new();

for family in style.font_family.0.iter() {
// GWTODO: Check on real pages if this is faster as Vec() or HashMap().
@@ -11,7 +11,7 @@ use context::SharedLayoutContext;
use css::node_style::StyledNode;
use data::LayoutDataWrapper;
use incremental::{self, RestyleDamage};
use smallvec::SmallVec16;
use smallvec::SmallVec;
use wrapper::{LayoutElement, LayoutNode};

use script::dom::characterdata::CharacterDataTypeId;
@@ -38,7 +38,7 @@ use util::opts;
use util::vec::ForgetfulSink;

pub struct ApplicableDeclarations {
pub normal: SmallVec16<DeclarationBlock>,
pub normal: SmallVec<[DeclarationBlock; 16]>,
pub before: Vec<DeclarationBlock>,
pub after: Vec<DeclarationBlock>,

@@ -49,15 +49,15 @@ pub struct ApplicableDeclarations {
impl ApplicableDeclarations {
pub fn new() -> ApplicableDeclarations {
ApplicableDeclarations {
normal: SmallVec16::new(),
normal: SmallVec::new(),
before: Vec::new(),
after: Vec::new(),
normal_shareable: false,
}
}

pub fn clear(&mut self) {
self.normal = SmallVec16::new();
self.normal = SmallVec::new();
self.before = Vec::new();
self.after = Vec::new();
self.normal_shareable = false;
@@ -13,7 +13,7 @@ use flow::{self, AFFECTS_COUNTERS, Flow, HAS_COUNTER_AFFECTING_CHILDREN, Immutab
use flow::{InorderFlowTraversal};
use fragment::{Fragment, GeneratedContentInfo, SpecificFragmentInfo, UnscannedTextFragmentInfo};
use incremental::{self, RESOLVE_GENERATED_CONTENT};
use smallvec::SmallVec8;
use smallvec::SmallVec;
use text::TextRunScanner;

use gfx::display_list::OpaqueNode;
@@ -522,7 +522,7 @@ pub fn static_representation(list_style_type: list_style_type::T) -> char {
/// Pushes the string that represents the value rendered using the given *alphabetic system* onto
/// the accumulator per CSS-COUNTER-STYLES § 3.1.4.
fn push_alphabetic_representation(mut value: i32, system: &[char], accumulator: &mut String) {
let mut string = SmallVec8::new();
let mut string: SmallVec<[char; 8]> = SmallVec::new();
while value != 0 {
// Step 1.
value = value - 1;
@@ -545,7 +545,7 @@ fn push_numeric_representation(mut value: i32, system: &[char], accumulator: &mu
}

// Step 2.
let mut string = SmallVec8::new();
let mut string: SmallVec<[char; 8]> = SmallVec::new();
while value != 0 {
// Step 2.1.
string.push(system[(value as usize) % system.len()]);
@@ -57,7 +57,7 @@ use net_traits::image_cache_task::{ImageCacheChan, ImageCacheTask};
use net_traits::storage_task::StorageType;
use script_traits::ScriptControlChan;
use script_traits::UntrustedNodeAddress;
use smallvec::SmallVec1;
use smallvec::SmallVec;
use msg::compositor_msg::ScriptListener;
use msg::constellation_msg::ConstellationChan;
use net_traits::image::base::Image;
@@ -219,7 +219,7 @@ impl<T: JSTraceable> JSTraceable for Vec<T> {

// XXXManishearth Check if the following three are optimized to no-ops
// if e.trace() is a no-op (e.g it is an no_jsmanaged_fields type)
impl<T: JSTraceable + 'static> JSTraceable for SmallVec1<T> {
impl<T: JSTraceable + 'static> JSTraceable for SmallVec<[T; 1]> {
#[inline]
fn trace(&self, trc: *mut JSTracer) {
for e in self.iter() {
@@ -18,7 +18,7 @@ use parser::{ParserContext, log_css_error};
use properties::{PropertyDeclarationBlock, parse_property_declaration_list};
use media_queries::{Device, MediaQueryList, parse_media_query_list};
use font_face::{FontFaceRule, parse_font_face_block};
use smallvec::SmallVec2;
use smallvec::SmallVec;
use viewport::ViewportRule;


@@ -161,13 +161,13 @@ impl Stylesheet {
/// conditional group rule will come before its nested rules.
pub struct Rules<'a> {
// 2 because normal case is likely to be just one level of nesting (@media)
stack: SmallVec2<slice::Iter<'a, CSSRule>>,
stack: SmallVec<[slice::Iter<'a, CSSRule>; 2]>,
device: Option<&'a Device>
}

impl<'a> Rules<'a> {
fn new(iter: slice::Iter<'a, CSSRule>, device: Option<&'a Device>) -> Rules<'a> {
let mut stack = SmallVec2::new();
let mut stack: SmallVec<[slice::Iter<'a, CSSRule>; 2]> = SmallVec::new();
stack.push(iter);

Rules { stack: stack, device: device }
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.