mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Upgrade to rustc 1.3.0-dev (f3b97a74a 2015-07-03)
This commit is contained in:
parent
02d84a1347
commit
75e3e787f6
15 changed files with 96 additions and 116 deletions
|
@ -14,6 +14,7 @@ use msg::constellation_msg::{AnimationState, Msg, PipelineId};
|
|||
use script::layout_interface::Animation;
|
||||
use script_traits::{ConstellationControlMsg, ScriptControlChan};
|
||||
use std::mem;
|
||||
use std::sync::Arc;
|
||||
use std::sync::mpsc::Sender;
|
||||
use style::animation::{GetMod, PropertyAnimation};
|
||||
use style::properties::ComputedValues;
|
||||
|
@ -68,7 +69,6 @@ pub fn process_new_animations(rw_data: &mut LayoutTaskData, pipeline_id: Pipelin
|
|||
|
||||
/// Recalculates style for an animation. This does *not* run with the DOM lock held.
|
||||
pub fn recalc_style_for_animation(flow: &mut Flow, animation: &Animation) {
|
||||
#![allow(unsafe_code)] // #6376
|
||||
let mut damage = RestyleDamage::empty();
|
||||
flow.mutate_fragments(&mut |fragment| {
|
||||
if fragment.node.id() != animation.node {
|
||||
|
@ -85,7 +85,7 @@ pub fn recalc_style_for_animation(flow: &mut Flow, animation: &Animation) {
|
|||
}
|
||||
|
||||
let mut new_style = fragment.style.clone();
|
||||
animation.property_animation.update(&mut *unsafe { new_style.make_unique() }, progress);
|
||||
animation.property_animation.update(&mut *Arc::make_unique(&mut new_style), progress);
|
||||
damage.insert(incremental::compute_damage(&Some(fragment.style.clone()), &new_style));
|
||||
fragment.style = new_style
|
||||
});
|
||||
|
|
|
@ -939,7 +939,6 @@ impl InlineFlow {
|
|||
fn justify_inline_fragments(fragments: &mut InlineFragments,
|
||||
line: &Line,
|
||||
slack_inline_size: Au) {
|
||||
#![allow(unsafe_code)] // #6376
|
||||
// Fast path.
|
||||
if slack_inline_size == Au(0) {
|
||||
return
|
||||
|
@ -974,9 +973,9 @@ impl InlineFlow {
|
|||
// FIXME(pcwalton): This is an awful lot of uniqueness making. I don't see any easy way
|
||||
// to get rid of it without regressing the performance of the non-justified case,
|
||||
// though.
|
||||
let run = unsafe { scanned_text_fragment_info.run.make_unique() };
|
||||
let run = Arc::make_unique(&mut scanned_text_fragment_info.run);
|
||||
{
|
||||
let glyph_runs = unsafe { run.glyphs.make_unique() };
|
||||
let glyph_runs = Arc::make_unique(&mut run.glyphs);
|
||||
for mut glyph_run in glyph_runs.iter_mut() {
|
||||
let mut range = glyph_run.range.intersect(&fragment_range);
|
||||
if range.is_empty() {
|
||||
|
@ -984,7 +983,7 @@ impl InlineFlow {
|
|||
}
|
||||
range.shift_by(-glyph_run.range.begin());
|
||||
|
||||
let glyph_store = unsafe { glyph_run.glyph_store.make_unique() };
|
||||
let glyph_store = Arc::make_unique(&mut glyph_run.glyph_store);
|
||||
glyph_store.distribute_extra_space_in_range(&range,
|
||||
space_per_expansion_opportunity);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue