mirror of
https://github.com/servo/servo.git
synced 2025-08-11 08:25:32 +01:00
Auto merge of #19975 - paulrouget:killbhtml, r=mbrubeck,emilio
Kill browserhtml Fixes https://github.com/servo/servo/issues/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 -->
This commit is contained in:
commit
b1d3d6f632
82 changed files with 102 additions and 2528 deletions
|
@ -26,7 +26,6 @@ unstable = ["libservo/unstable"]
|
|||
|
||||
[dependencies]
|
||||
backtrace = "0.3"
|
||||
browserhtml = {git = "https://github.com/browserhtml/browserhtml", branch = "crate"}
|
||||
bitflags = "1.0"
|
||||
compositing = {path = "../../components/compositing"}
|
||||
euclid = "0.16"
|
||||
|
|
|
@ -23,7 +23,7 @@ use msg::constellation_msg::{KeyModifiers, KeyState, TraversalDirection};
|
|||
use net_traits::net_error_list::NetError;
|
||||
#[cfg(any(target_os = "linux", target_os = "macos"))]
|
||||
use osmesa_sys;
|
||||
use script_traits::{LoadData, TouchEventType, TouchpadPressurePhase};
|
||||
use script_traits::{LoadData, TouchEventType};
|
||||
use servo::ipc_channel::ipc::IpcSender;
|
||||
use servo_config::opts;
|
||||
use servo_config::prefs::PREFS;
|
||||
|
@ -518,12 +518,6 @@ impl Window {
|
|||
let point = TypedPoint2D::new(touch.location.0 as f32, touch.location.1 as f32);
|
||||
self.event_queue.borrow_mut().push(WindowEvent::Touch(phase, id, point));
|
||||
}
|
||||
Event::TouchpadPressure(pressure, stage) => {
|
||||
let m = self.mouse_pos.get();
|
||||
let point = TypedPoint2D::new(m.x as f32, m.y as f32);
|
||||
let phase = glutin_pressure_stage_to_touchpad_pressure_phase(stage);
|
||||
self.event_queue.borrow_mut().push(WindowEvent::TouchpadPressure(point, pressure, phase));
|
||||
}
|
||||
Event::Refresh => {
|
||||
self.event_queue.borrow_mut().push(WindowEvent::Refresh);
|
||||
}
|
||||
|
@ -1360,6 +1354,10 @@ impl WindowMethods for Window {
|
|||
fn supports_clipboard(&self) -> bool {
|
||||
true
|
||||
}
|
||||
|
||||
fn handle_panic(&self, _: BrowserId, _reason: String, _backtrace: Option<String>) {
|
||||
// Nothing to do here yet. The crash has already been reported on the console.
|
||||
}
|
||||
}
|
||||
|
||||
fn glutin_phase_to_touch_event_type(phase: TouchPhase) -> TouchEventType {
|
||||
|
@ -1371,16 +1369,6 @@ fn glutin_phase_to_touch_event_type(phase: TouchPhase) -> TouchEventType {
|
|||
}
|
||||
}
|
||||
|
||||
fn glutin_pressure_stage_to_touchpad_pressure_phase(stage: i64) -> TouchpadPressurePhase {
|
||||
if stage < 1 {
|
||||
TouchpadPressurePhase::BeforeClick
|
||||
} else if stage < 2 {
|
||||
TouchpadPressurePhase::AfterFirstClick
|
||||
} else {
|
||||
TouchpadPressurePhase::AfterSecondClick
|
||||
}
|
||||
}
|
||||
|
||||
fn is_printable(key_code: VirtualKeyCode) -> bool {
|
||||
use glutin::VirtualKeyCode::*;
|
||||
match key_code {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue