mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Fix up script and layout.
This commit is contained in:
parent
d78ca4c4f9
commit
7b0679848b
49 changed files with 99 additions and 85 deletions
|
@ -6,6 +6,7 @@
|
|||
|
||||
#![deny(unsafe_code)]
|
||||
|
||||
use StyleArc;
|
||||
use app_units::Au;
|
||||
use canvas_traits::CanvasMsg;
|
||||
use context::{LayoutContext, with_thread_local_font_context};
|
||||
|
@ -39,7 +40,6 @@ use std::borrow::ToOwned;
|
|||
use std::cmp::{Ordering, max, min};
|
||||
use std::collections::LinkedList;
|
||||
use std::sync::{Arc, Mutex};
|
||||
use style::arc_ptr_eq;
|
||||
use style::computed_values::{border_collapse, box_sizing, clear, color, display, mix_blend_mode};
|
||||
use style::computed_values::{overflow_wrap, overflow_x, position, text_decoration_line, transform};
|
||||
use style::computed_values::{transform_style, vertical_align, white_space, word_break};
|
||||
|
@ -95,10 +95,10 @@ pub struct Fragment {
|
|||
pub node: OpaqueNode,
|
||||
|
||||
/// The CSS style of this fragment.
|
||||
pub style: Arc<ServoComputedValues>,
|
||||
pub style: StyleArc<ServoComputedValues>,
|
||||
|
||||
/// The CSS style of this fragment when it's selected
|
||||
pub selected_style: Arc<ServoComputedValues>,
|
||||
pub selected_style: StyleArc<ServoComputedValues>,
|
||||
|
||||
/// The position of this fragment relative to its owning flow. The size includes padding and
|
||||
/// border, but not margin.
|
||||
|
@ -672,8 +672,8 @@ impl Fragment {
|
|||
/// Constructs a new `Fragment` instance from an opaque node.
|
||||
pub fn from_opaque_node_and_style(node: OpaqueNode,
|
||||
pseudo: PseudoElementType<()>,
|
||||
style: Arc<ServoComputedValues>,
|
||||
selected_style: Arc<ServoComputedValues>,
|
||||
style: StyleArc<ServoComputedValues>,
|
||||
selected_style: StyleArc<ServoComputedValues>,
|
||||
mut restyle_damage: RestyleDamage,
|
||||
specific: SpecificFragmentInfo)
|
||||
-> Fragment {
|
||||
|
@ -702,7 +702,7 @@ impl Fragment {
|
|||
/// type. For the new anonymous fragment, layout-related values (border box, etc.) are reset to
|
||||
/// initial values.
|
||||
pub fn create_similar_anonymous_fragment(&self,
|
||||
style: Arc<ServoComputedValues>,
|
||||
style: StyleArc<ServoComputedValues>,
|
||||
specific: SpecificFragmentInfo)
|
||||
-> Fragment {
|
||||
let writing_mode = style.writing_mode;
|
||||
|
@ -1846,7 +1846,7 @@ impl Fragment {
|
|||
match (&mut self.specific, &next_fragment.specific) {
|
||||
(&mut SpecificFragmentInfo::ScannedText(ref mut this_info),
|
||||
&SpecificFragmentInfo::ScannedText(ref other_info)) => {
|
||||
debug_assert!(arc_ptr_eq(&this_info.run, &other_info.run));
|
||||
debug_assert!(::arc_ptr_eq(&this_info.run, &other_info.run));
|
||||
this_info.range_end_including_stripped_whitespace =
|
||||
other_info.range_end_including_stripped_whitespace;
|
||||
if other_info.requires_line_break_afterward_if_wrapping_on_newlines() {
|
||||
|
@ -2398,7 +2398,7 @@ impl Fragment {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn repair_style(&mut self, new_style: &Arc<ServoComputedValues>) {
|
||||
pub fn repair_style(&mut self, new_style: &StyleArc<ServoComputedValues>) {
|
||||
self.style = (*new_style).clone()
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue