mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
Auto merge of #6574 - Ms2ger:for_node, r=pcwalton
Remove ReplacedImageFragmentInfo::for_node and unsafe code it required. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6574) <!-- Reviewable:end -->
This commit is contained in:
commit
805232a85e
1 changed files with 0 additions and 11 deletions
|
@ -18,7 +18,6 @@ use inline::{InlineFragmentContext, InlineFragmentNodeInfo, InlineMetrics};
|
|||
use layout_debug;
|
||||
use model::{self, IntrinsicISizes, IntrinsicISizesContribution, MaybeAuto, specified};
|
||||
use text;
|
||||
use opaque_node::OpaqueNodeMethods;
|
||||
use wrapper::ThreadSafeLayoutNode;
|
||||
|
||||
use euclid::{Point2D, Rect, Size2D};
|
||||
|
@ -29,7 +28,6 @@ use msg::constellation_msg::{ConstellationChan, Msg, PipelineId, SubpageId};
|
|||
use net_traits::image::base::Image;
|
||||
use net_traits::image_cache_task::UsePlaceholder;
|
||||
use rustc_serialize::{Encodable, Encoder};
|
||||
use script_traits::UntrustedNodeAddress;
|
||||
use std::borrow::ToOwned;
|
||||
use std::cmp::{max, min};
|
||||
use std::collections::LinkedList;
|
||||
|
@ -114,11 +112,6 @@ pub struct Fragment {
|
|||
pub debug_id: u16,
|
||||
}
|
||||
|
||||
#[allow(unsafe_code)]
|
||||
unsafe impl Send for Fragment {}
|
||||
#[allow(unsafe_code)]
|
||||
unsafe impl Sync for Fragment {}
|
||||
|
||||
impl Encodable for Fragment {
|
||||
fn encode<S: Encoder>(&self, e: &mut S) -> Result<(), S::Error> {
|
||||
e.emit_struct("fragment", 0, |e| {
|
||||
|
@ -402,7 +395,6 @@ impl ImageFragmentInfo {
|
|||
|
||||
#[derive(Clone)]
|
||||
pub struct ReplacedImageFragmentInfo {
|
||||
pub for_node: UntrustedNodeAddress,
|
||||
pub computed_inline_size: Option<Au>,
|
||||
pub computed_block_size: Option<Au>,
|
||||
pub dom_inline_size: Option<Au>,
|
||||
|
@ -415,10 +407,7 @@ impl ReplacedImageFragmentInfo {
|
|||
dom_width: Option<Au>,
|
||||
dom_height: Option<Au>) -> ReplacedImageFragmentInfo {
|
||||
let is_vertical = node.style().writing_mode.is_vertical();
|
||||
let untrusted_node = node.opaque().to_untrusted_node_address();
|
||||
|
||||
ReplacedImageFragmentInfo {
|
||||
for_node: untrusted_node,
|
||||
computed_inline_size: None,
|
||||
computed_block_size: None,
|
||||
dom_inline_size: if is_vertical {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue