Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
… with corresponding `layout` and `layout_thread` crates, which for now do nothing.
- Loading branch information
1 parent
c1e9347
commit 2b01c26
Showing
19 changed files
with
186 additions
and
12 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
[package] | ||
name = "layout_2020" | ||
version = "0.0.1" | ||
authors = ["The Servo Project Developers"] | ||
license = "MPL-2.0" | ||
edition = "2018" | ||
publish = false | ||
|
||
[lib] | ||
path = "lib.rs" | ||
test = false | ||
doctest = false | ||
|
||
[dependencies] | ||
style = {path = "../style", features = ["servo", "servo-layout-2020"]} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
/* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this | ||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
[package] | ||
name = "layout_thread_2020" | ||
version = "0.0.1" | ||
authors = ["The Servo Project Developers"] | ||
license = "MPL-2.0" | ||
edition = "2018" | ||
publish = false | ||
|
||
[lib] | ||
name = "layout_thread" | ||
path = "lib.rs" | ||
|
||
[dependencies] | ||
crossbeam-channel = "0.3" | ||
euclid = "0.19" | ||
gfx = {path = "../gfx"} | ||
ipc-channel = "0.11" | ||
layout = {path = "../layout_2020", package = "layout_2020"} | ||
layout_traits = {path = "../layout_traits"} | ||
metrics = {path = "../metrics"} | ||
msg = {path = "../msg"} | ||
net_traits = {path = "../net_traits"} | ||
profile_traits = {path = "../profile_traits"} | ||
script_layout_interface = {path = "../script_layout_interface"} | ||
script_traits = {path = "../script_traits"} | ||
servo_url = {path = "../url"} | ||
servo_geometry = {path = "../geometry"} | ||
webrender_api = {git = "https://github.com/servo/webrender", features = ["ipc"]} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
/* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this | ||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */ | ||
|
||
use crossbeam_channel::{Receiver, Sender}; | ||
use euclid::TypedSize2D; | ||
use gfx::font_cache_thread::FontCacheThread; | ||
use ipc_channel::ipc::{IpcReceiver, IpcSender}; | ||
use metrics::PaintTimeMetrics; | ||
use msg::constellation_msg::TopLevelBrowsingContextId; | ||
use msg::constellation_msg::{BackgroundHangMonitorRegister, PipelineId}; | ||
use net_traits::image_cache::ImageCache; | ||
use profile_traits::{mem, time}; | ||
use script_traits::LayoutMsg as ConstellationMsg; | ||
use script_traits::{ConstellationControlMsg, LayoutControlMsg}; | ||
use servo_geometry::DeviceIndependentPixel; | ||
use servo_url::ServoUrl; | ||
use std::sync::atomic::AtomicBool; | ||
use std::sync::Arc; | ||
|
||
pub struct LayoutThread; | ||
|
||
impl layout_traits::LayoutThreadFactory for LayoutThread { | ||
type Message = script_layout_interface::message::Msg; | ||
|
||
#[allow(unused)] | ||
fn create( | ||
id: PipelineId, | ||
top_level_browsing_context_id: TopLevelBrowsingContextId, | ||
url: ServoUrl, | ||
is_iframe: bool, | ||
chan: (Sender<Self::Message>, Receiver<Self::Message>), | ||
pipeline_port: IpcReceiver<LayoutControlMsg>, | ||
background_hang_monitor: Box<dyn BackgroundHangMonitorRegister>, | ||
constellation_chan: IpcSender<ConstellationMsg>, | ||
script_chan: IpcSender<ConstellationControlMsg>, | ||
image_cache: Arc<dyn ImageCache>, | ||
font_cache_thread: FontCacheThread, | ||
time_profiler_chan: time::ProfilerChan, | ||
mem_profiler_chan: mem::ProfilerChan, | ||
content_process_shutdown_chan: Option<IpcSender<()>>, | ||
webrender_api_sender: webrender_api::RenderApiSender, | ||
webrender_document: webrender_api::DocumentId, | ||
paint_time_metrics: PaintTimeMetrics, | ||
busy: Arc<AtomicBool>, | ||
load_webfonts_synchronously: bool, | ||
initial_window_size: TypedSize2D<u32, DeviceIndependentPixel>, | ||
device_pixels_per_px: Option<f32>, | ||
dump_display_list: bool, | ||
dump_display_list_json: bool, | ||
dump_style_tree: bool, | ||
dump_rule_tree: bool, | ||
relayout_event: bool, | ||
nonincremental_layout: bool, | ||
trace_layout: bool, | ||
dump_flow_tree: bool, | ||
) { | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this | ||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */ | ||
|
||
fn main() { | ||
let layout_2013 = std::env::var_os("CARGO_FEATURE_LAYOUT_2013").is_some(); | ||
let layout_2020 = std::env::var_os("CARGO_FEATURE_LAYOUT_2020").is_some(); | ||
|
||
if !(layout_2013 || layout_2020) { | ||
error("Must enable one of the `layout-2013` or `layout-2020` features.") | ||
} | ||
if layout_2013 && layout_2020 { | ||
error("Must not enable both of the `layout-2013` or `layout-2020` features.") | ||
} | ||
} | ||
|
||
fn error(message: &str) { | ||
print!("\n\n Error: {}\n\n", message); | ||
std::process::exit(1) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters