Skip to content

Commit

Permalink
Auto merge of #19975 - paulrouget:killbhtml, r=mbrubeck,emilio
Browse files Browse the repository at this point in the history
Kill browserhtml

Fixes #19971

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/19975)
<!-- Reviewable:end -->
  • Loading branch information
bors-servo committed Feb 13, 2018
2 parents 9e64008 + ee25413 commit b1d3d6f
Show file tree
Hide file tree
Showing 82 changed files with 102 additions and 2,528 deletions.
14 changes: 0 additions & 14 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<plist version="1.0">
<dict>
<key>CFBundleExecutable</key>
<string>run-servo</string>
<string>servo</string>
<key>CFBundleGetInfoString</key>
<string>Servo</string>
<key>CFBundleIconFile</key>
Expand Down
5 changes: 0 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -253,11 +253,6 @@ Run Servo with the command:
./mach run https://www.google.com
```

Also, don't miss the info on the [browserhtml page](https://github.com/browserhtml/browserhtml) on how to run the Browser.html
full tech demo (it provides a more browser-like experience than just browsing a single
URL with servo).


### Commandline Arguments

- `-p INTERVAL` turns on the profiler and dumps info to the console every
Expand Down
30 changes: 2 additions & 28 deletions components/compositing/compositor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,9 @@ use nonzero::NonZero;
use profile_traits::time::{self, ProfilerCategory, profile};
use script_traits::{AnimationState, AnimationTickType, ConstellationMsg, LayoutControlMsg};
use script_traits::{MouseButton, MouseEventType, ScrollState, TouchEventType, TouchId};
use script_traits::{TouchpadPressurePhase, UntrustedNodeAddress, WindowSizeData, WindowSizeType};
use script_traits::CompositorEvent::{MouseMoveEvent, MouseButtonEvent, TouchEvent, TouchpadPressureEvent};
use script_traits::{UntrustedNodeAddress, WindowSizeData, WindowSizeType};
use script_traits::CompositorEvent::{MouseMoveEvent, MouseButtonEvent, TouchEvent};
use servo_config::opts;
use servo_config::prefs::PREFS;
use servo_geometry::DeviceIndependentPixel;
use std::collections::HashMap;
use std::fs::File;
Expand Down Expand Up @@ -864,31 +863,6 @@ impl<Window: WindowMethods> IOCompositor<Window> {
self.send_touch_event(TouchEventType::Cancel, identifier, point);
}

pub fn on_touchpad_pressure_event(&self,
point: TypedPoint2D<f32, DevicePixel>,
pressure: f32,
phase: TouchpadPressurePhase) {
match PREFS.get("dom.forcetouch.enabled").as_boolean() {
Some(true) => {},
_ => return,
}

let results = self.hit_test_at_point(point);
if let Some(item) = results.items.first() {
let event = TouchpadPressureEvent(
item.point_in_viewport.to_untyped(),
pressure,
phase,
Some(UntrustedNodeAddress(item.tag.0 as *const c_void)),
);
let pipeline_id = PipelineId::from_webrender(item.pipeline);
let msg = ConstellationMsg::ForwardEvent(pipeline_id, event);
if let Err(e) = self.constellation_chan.send(msg) {
warn!("Sending event to constellation failed ({}).", e);
}
}
}

/// <http://w3c.github.io/touch-events/#mouse-events>
fn simulate_mouse_click(&mut self, p: TypedPoint2D<f32, DevicePixel>) {
let button = MouseButton::Left;
Expand Down
3 changes: 3 additions & 0 deletions components/compositing/compositor_thread.rs
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,8 @@ pub enum EmbedderMsg {
LoadStart(TopLevelBrowsingContextId),
/// The load of a page has completed
LoadComplete(TopLevelBrowsingContextId),
/// A pipeline panicked. First string is the reason, second one is the backtrace.
Panic(TopLevelBrowsingContextId, String, Option<String>),
}

/// Messages from the painting thread and the constellation thread to the compositor thread.
Expand Down Expand Up @@ -237,6 +239,7 @@ impl Debug for EmbedderMsg {
EmbedderMsg::SetFullscreenState(..) => write!(f, "SetFullscreenState"),
EmbedderMsg::LoadStart(..) => write!(f, "LoadStart"),
EmbedderMsg::LoadComplete(..) => write!(f, "LoadComplete"),
EmbedderMsg::Panic(..) => write!(f, "Panic"),
}
}
}
Expand Down
8 changes: 4 additions & 4 deletions components/compositing/windowing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use gleam::gl;
use ipc_channel::ipc::IpcSender;
use msg::constellation_msg::{Key, KeyModifiers, KeyState, TopLevelBrowsingContextId, TraversalDirection};
use net_traits::net_error_list::NetError;
use script_traits::{LoadData, MouseButton, TouchEventType, TouchId, TouchpadPressurePhase};
use script_traits::{LoadData, MouseButton, TouchEventType, TouchId};
use servo_geometry::DeviceIndependentPixel;
use servo_url::ServoUrl;
use std::fmt::{Debug, Error, Formatter};
Expand Down Expand Up @@ -50,8 +50,6 @@ pub enum WindowEvent {
Refresh,
/// Sent when the window is resized.
Resize,
/// Touchpad Pressure
TouchpadPressure(TypedPoint2D<f32, DevicePixel>, f32, TouchpadPressurePhase),
/// Sent when a new URL is to be loaded.
LoadUrl(TopLevelBrowsingContextId, ServoUrl),
/// Sent when a mouse hit test is to be performed.
Expand Down Expand Up @@ -94,7 +92,6 @@ impl Debug for WindowEvent {
WindowEvent::Idle => write!(f, "Idle"),
WindowEvent::Refresh => write!(f, "Refresh"),
WindowEvent::Resize => write!(f, "Resize"),
WindowEvent::TouchpadPressure(..) => write!(f, "TouchpadPressure"),
WindowEvent::KeyEvent(..) => write!(f, "Key"),
WindowEvent::LoadUrl(..) => write!(f, "LoadUrl"),
WindowEvent::MouseWindowEventClass(..) => write!(f, "Mouse"),
Expand Down Expand Up @@ -192,4 +189,7 @@ pub trait WindowMethods {
/// will want to avoid blocking on UI events, and just
/// run the event loop at the vsync interval.
fn set_animation_state(&self, _state: AnimationState) {}

/// Called when a pipeline panics.
fn handle_panic(&self, browser_id: TopLevelBrowsingContextId, reason: String, backtrace: Option<String>);
}
2 changes: 1 addition & 1 deletion components/config/opts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -609,7 +609,7 @@ pub fn from_cmdline_args(args: &[String]) -> ArgumentParsingResult {
opts.optopt("", "content-process" , "Run as a content process and connect to the given pipe",
"servo-ipc-channel.abcdefg");
opts.optmulti("", "pref",
"A preference to set to enable", "dom.mozbrowser.enabled");
"A preference to set to enable", "dom.bluetooth.enabled");
opts.optflag("b", "no-native-titlebar", "Do not use native titlebar");
opts.optflag("w", "webrender", "Use webrender backend");
opts.optopt("G", "graphics", "Select graphics backend (gl or es2)", "gl");
Expand Down
4 changes: 0 additions & 4 deletions components/config/prefs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -228,10 +228,6 @@ impl Preferences {
self.0.read().unwrap().clone()
}

pub fn is_mozbrowser_enabled(&self) -> bool {
self.get("dom.mozbrowser.enabled").as_boolean().unwrap_or(false)
}

pub fn set(&self, name: &str, value: PrefValue) {
let mut prefs = self.0.write().unwrap();
if let Some(pref) = prefs.get_mut(name) {
Expand Down
Loading

0 comments on commit b1d3d6f

Please sign in to comment.