mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
Fix compilation errors due to the rebase
It's too complicated to make all the commits in that branch compile properly.
This commit is contained in:
parent
317d700f5d
commit
f8341daf95
9 changed files with 31 additions and 72 deletions
|
@ -14,7 +14,7 @@ doctest = false
|
|||
|
||||
[dependencies]
|
||||
app_units = "0.7"
|
||||
euclid = "0.19"
|
||||
euclid = "0.20"
|
||||
fnv = "1.0"
|
||||
gfx = {path = "../gfx"}
|
||||
gfx_traits = {path = "../gfx_traits"}
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
use crate::display_list::items::OpaqueNode;
|
||||
use app_units::Au;
|
||||
use euclid::Point2D;
|
||||
use euclid::default::Point2D;
|
||||
use fnv::FnvHashMap;
|
||||
use gfx::text::glyph::ByteIndex;
|
||||
use gfx::text::TextRun;
|
||||
|
|
|
@ -6,6 +6,7 @@ use euclid::Vector2D;
|
|||
use gfx_traits;
|
||||
use std::collections::HashMap;
|
||||
use std::f32;
|
||||
use webrender_api::units::LayoutPixel;
|
||||
use webrender_api::ExternalScrollId;
|
||||
|
||||
pub use style::dom::OpaqueNode;
|
||||
|
@ -20,4 +21,4 @@ impl gfx_traits::DisplayList for DisplayList {
|
|||
}
|
||||
|
||||
/// The type of the scroll offset list. This is only populated if WebRender is in use.
|
||||
pub type ScrollOffsetMap = HashMap<ExternalScrollId, Vector2D<f32>>;
|
||||
pub type ScrollOffsetMap = HashMap<ExternalScrollId, Vector2D<f32, LayoutPixel>>;
|
||||
|
|
|
@ -4,8 +4,8 @@
|
|||
|
||||
use crate::display_list::items::DisplayList;
|
||||
use msg::constellation_msg::PipelineId;
|
||||
use webrender_api::units::LayoutSize;
|
||||
use webrender_api::{self, DisplayListBuilder};
|
||||
use webrender_api::units::{LayoutSize};
|
||||
|
||||
pub trait WebRenderDisplayListConverter {
|
||||
fn convert_to_webrender(&mut self, pipeline_id: PipelineId) -> DisplayListBuilder;
|
||||
|
|
|
@ -8,7 +8,7 @@ use crate::context::LayoutContext;
|
|||
use crate::display_list::items::OpaqueNode;
|
||||
use crate::ServoArc;
|
||||
use app_units::Au;
|
||||
use euclid::Rect;
|
||||
use euclid::default::Rect;
|
||||
use script_layout_interface::wrapper_traits::{PseudoElementType, ThreadSafeLayoutNode};
|
||||
use serde::ser::{Serialize, SerializeStruct, Serializer};
|
||||
use style::logical_geometry::{LogicalMargin, LogicalRect};
|
||||
|
|
|
@ -10,7 +10,7 @@ use crate::display_list::IndexableText;
|
|||
use crate::fragment::{Fragment, FragmentBorderBoxIterator};
|
||||
use crate::opaque_node::OpaqueNodeMethods;
|
||||
use app_units::Au;
|
||||
use euclid::{Point2D, Rect, Size2D, Vector2D};
|
||||
use euclid::default::{Point2D, Rect, Size2D, Vector2D};
|
||||
use ipc_channel::ipc::IpcSender;
|
||||
use msg::constellation_msg::PipelineId;
|
||||
use script_layout_interface::rpc::TextIndexResponse;
|
||||
|
@ -358,15 +358,11 @@ impl FragmentBorderBoxIterator for MarginRetrievingFragmentBorderBoxIterator {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn process_content_box_request(
|
||||
requested_node: OpaqueNode,
|
||||
) -> Option<Rect<Au>> {
|
||||
pub fn process_content_box_request(requested_node: OpaqueNode) -> Option<Rect<Au>> {
|
||||
UnioningFragmentBorderBoxIterator::new(requested_node).rect
|
||||
}
|
||||
|
||||
pub fn process_content_boxes_request(
|
||||
requested_node: OpaqueNode,
|
||||
) -> Vec<Rect<Au>> {
|
||||
pub fn process_content_boxes_request(requested_node: OpaqueNode) -> Vec<Rect<Au>> {
|
||||
// FIXME(pcwalton): This has not been updated to handle the stacking context relative
|
||||
// stuff. So the position is wrong in most cases.
|
||||
CollectingFragmentBorderBoxIterator::new(requested_node).rects
|
||||
|
@ -583,7 +579,6 @@ impl FragmentBorderBoxIterator for ParentOffsetBorderBoxIterator {
|
|||
// 2) Is static position *and* is a table or table cell
|
||||
// 3) Is not static position
|
||||
(true, _, _) |
|
||||
(false, Position::Sticky, _) |
|
||||
(false, Position::Absolute, _) |
|
||||
(false, Position::Relative, _) |
|
||||
(false, Position::Fixed, _) => true,
|
||||
|
@ -614,9 +609,7 @@ impl FragmentBorderBoxIterator for ParentOffsetBorderBoxIterator {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn process_node_geometry_request(
|
||||
requested_node: OpaqueNode,
|
||||
) -> Rect<i32> {
|
||||
pub fn process_node_geometry_request(requested_node: OpaqueNode) -> Rect<i32> {
|
||||
FragmentLocatingFragmentIterator::new(requested_node).client_rect
|
||||
}
|
||||
|
||||
|
@ -629,9 +622,7 @@ pub fn process_node_scroll_id_request<N: LayoutNode>(
|
|||
}
|
||||
|
||||
/// https://drafts.csswg.org/cssom-view/#scrolling-area
|
||||
pub fn process_node_scroll_area_request(
|
||||
requested_node: OpaqueNode,
|
||||
) -> Rect<i32> {
|
||||
pub fn process_node_scroll_area_request(requested_node: OpaqueNode) -> Rect<i32> {
|
||||
let iterator = UnioningFragmentScrollAreaIterator::new(requested_node);
|
||||
match iterator.overflow_direction {
|
||||
OverflowDirection::RightAndDown => {
|
||||
|
@ -768,7 +759,7 @@ where
|
|||
};
|
||||
|
||||
let positioned = match style.get_box().position {
|
||||
Position::Relative | Position::Sticky | Position::Fixed | Position::Absolute => true,
|
||||
Position::Relative | Position::Fixed | Position::Absolute => true,
|
||||
_ => false,
|
||||
};
|
||||
|
||||
|
@ -855,9 +846,7 @@ where
|
|||
}
|
||||
}
|
||||
|
||||
pub fn process_offset_parent_query(
|
||||
requested_node: OpaqueNode,
|
||||
) -> OffsetParentResponse {
|
||||
pub fn process_offset_parent_query(requested_node: OpaqueNode) -> OffsetParentResponse {
|
||||
let iterator = ParentOffsetBorderBoxIterator::new(requested_node);
|
||||
|
||||
let node_offset_box = iterator.node_offset_box;
|
||||
|
@ -999,17 +988,7 @@ fn inner_text_collection_steps<N: LayoutNode>(
|
|||
}
|
||||
|
||||
match display {
|
||||
Display::TableCell if !is_last_table_cell() => {
|
||||
// Step 6.
|
||||
items.push(InnerTextItem::Text(String::from("\u{0009}" /* tab */)));
|
||||
},
|
||||
Display::TableRow if !is_last_table_row() => {
|
||||
// Step 7.
|
||||
items.push(InnerTextItem::Text(String::from(
|
||||
"\u{000A}", /* line feed */
|
||||
)));
|
||||
},
|
||||
Display::Block | Display::Flex | Display::TableCaption | Display::Table => {
|
||||
Display::Block => {
|
||||
// Step 9.
|
||||
items.insert(0, InnerTextItem::RequiredLineBreakCount(1));
|
||||
items.push(InnerTextItem::RequiredLineBreakCount(1));
|
||||
|
@ -1020,13 +999,3 @@ fn inner_text_collection_steps<N: LayoutNode>(
|
|||
|
||||
results.append(&mut items);
|
||||
}
|
||||
|
||||
fn is_last_table_cell() -> bool {
|
||||
// FIXME(ferjm) Implement this.
|
||||
false
|
||||
}
|
||||
|
||||
fn is_last_table_row() -> bool {
|
||||
// FIXME(ferjm) Implement this.
|
||||
false
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue