Rewild Your Web
web browser dweb

chore: update Servo to 36aa8e9c739e6e4beb8f96e488202aaaf77d3b6a

+51 -51
+1 -1
forkme.lock
··· 1 - c6fbaf33e2bdb9b7c7bcf2a03486f0c6b8ebf308 1 + 36aa8e9c739e6e4beb8f96e488202aaaf77d3b6a
+1 -1
htmlshell/Cargo.toml
··· 6 6 edition.workspace = true 7 7 8 8 [features] 9 - default = ["libservo/clipboard", "js_jit", "max_log_level", "media-gstreamer", "native-bluetooth", "webgpu"] 9 + default = ["libservo/clipboard", "js_jit", "max_log_level", "media-gstreamer", "native-bluetooth", "webgpu"] 10 10 gamepad = ["libservo/gamepad"] 11 11 global-hotkeys = ["dep:global-hotkey"] 12 12 crown = ["libservo/crown"]
+6 -6
patches/components/layout/display_list/mod.rs.patch
··· 4 4 use style::values::specified::text::TextDecorationLine; 5 5 use style_traits::{CSSPixel as StyloCSSPixel, DevicePixel as StyloDevicePixel}; 6 6 use webrender_api::units::{ 7 - - DeviceIntSize, DevicePixel, LayoutPixel, LayoutRect, LayoutSideOffsets, LayoutSize, 7 + - DeviceIntSize, DevicePixel, LayoutPixel, LayoutPoint, LayoutRect, LayoutSideOffsets, LayoutSize, 8 8 + DeviceIntSize, DevicePixel, LayoutPixel, LayoutPoint, LayoutRect, LayoutSideOffsets, 9 9 + LayoutSize, LayoutTransform, 10 10 }; 11 11 use webrender_api::{ 12 12 self as wr, BorderDetails, BorderRadius, BorderSide, BoxShadowClipMode, BuiltDisplayList, 13 - - ClipChainId, ClipMode, ColorF, CommonItemProperties, ComplexClipRegion, NinePatchBorder, 14 - - NinePatchBorderSource, NormalBorder, PrimitiveFlags, PropertyBinding, SpatialId, 15 - - SpatialTreeItemKey, units, 13 + - ClipChainId, ClipMode, ColorF, CommonItemProperties, ComplexClipRegion, GlyphInstance, 14 + - NinePatchBorder, NinePatchBorderSource, NormalBorder, PrimitiveFlags, PropertyBinding, 15 + - SpatialId, SpatialTreeItemKey, units, 16 16 + ClipChainId, ClipMode, ColorF, CommonItemProperties, ComplexClipRegion, ExternalScrollId, 17 - + NinePatchBorder, NinePatchBorderSource, NormalBorder, PrimitiveFlags, PropertyBinding, 18 - + ReferenceFrameKind, SpatialId, SpatialTreeItemKey, TransformStyle, units, 17 + + GlyphInstance, NinePatchBorder, NinePatchBorderSource, NormalBorder, PrimitiveFlags, 18 + + PropertyBinding, ReferenceFrameKind, SpatialId, SpatialTreeItemKey, TransformStyle, units, 19 19 }; 20 20 use wr::units::LayoutVector2D; 21 21
+11 -11
patches/components/script/dom/document.rs.patch
··· 25 25 use fonts::WebFontDocumentContext; 26 26 use html5ever::{LocalName, Namespace, QualName, local_name, ns}; 27 27 use hyper_serde::Serde; 28 - @@ -611,6 +614,9 @@ 28 + @@ -613,6 +616,9 @@ 29 29 #[ignore_malloc_size_of = "TODO: unimplemented on Image"] 30 30 favicon: RefCell<Option<Image>>, 31 31 ··· 35 35 /// All websockets created that are associated with this document. 36 36 websockets: DOMTracker<WebSocket>, 37 37 38 - @@ -843,6 +849,12 @@ 38 + @@ -845,6 +851,12 @@ 39 39 40 40 // Set the document's activity level, reflow if necessary, and suspend or resume timers. 41 41 self.activity.set(activity); ··· 48 48 let media = ServoMedia::get(); 49 49 let pipeline_id = self.window().pipeline_id(); 50 50 let client_context_id = 51 - @@ -856,6 +868,7 @@ 51 + @@ -858,6 +870,7 @@ 52 52 53 53 self.title_changed(); 54 54 self.notify_embedder_favicon(); ··· 56 56 self.dirty_all_nodes(); 57 57 self.window().resume(can_gc); 58 58 media.resume(&client_context_id); 59 - @@ -1248,6 +1261,9 @@ 59 + @@ -1262,6 +1275,9 @@ 60 60 LoadStatus::Started, 61 61 )); 62 62 self.send_to_embedder(EmbedderMsg::Status(self.webview_id(), None)); ··· 66 66 } 67 67 }, 68 68 DocumentReadyState::Complete => { 69 - @@ -1256,6 +1272,9 @@ 69 + @@ -1270,6 +1286,9 @@ 70 70 self.webview_id(), 71 71 LoadStatus::Complete, 72 72 )); ··· 76 76 } 77 77 update_with_current_instant(&self.dom_complete); 78 78 }, 79 - @@ -1664,7 +1683,13 @@ 79 + @@ -1678,7 +1697,13 @@ 80 80 let window = self.window(); 81 81 if window.is_top_level() { 82 82 let title = self.title().map(String::from); ··· 91 91 } 92 92 } 93 93 94 - @@ -1673,6 +1698,18 @@ 94 + @@ -1687,6 +1712,18 @@ 95 95 window.send_to_embedder(msg); 96 96 } 97 97 ··· 110 110 pub(crate) fn dirty_all_nodes(&self) { 111 111 let root = match self.GetDocumentElement() { 112 112 Some(root) => root, 113 - @@ -3158,9 +3195,59 @@ 113 + @@ -3172,9 +3209,59 @@ 114 114 current_rendering_epoch, 115 115 ); 116 116 ··· 170 170 pub(crate) fn handle_no_longer_waiting_on_asynchronous_image_updates(&self) { 171 171 self.waiting_on_canvas_image_updates.set(false); 172 172 } 173 - @@ -3893,6 +3980,7 @@ 173 + @@ -3908,6 +3995,7 @@ 174 174 active_sandboxing_flag_set: Cell::new(SandboxingFlagSet::empty()), 175 175 creation_sandboxing_flag_set: Cell::new(creation_sandboxing_flag_set), 176 176 favicon: RefCell::new(None), ··· 178 178 websockets: DOMTracker::new(), 179 179 details_name_groups: Default::default(), 180 180 protocol_handler_automation_mode: Default::default(), 181 - @@ -4992,6 +5080,36 @@ 181 + @@ -5007,6 +5095,36 @@ 182 182 183 183 pub(crate) fn notify_embedder_favicon(&self) { 184 184 if let Some(ref image) = *self.favicon.borrow() { ··· 215 215 self.send_to_embedder(EmbedderMsg::NewFavicon(self.webview_id(), image.clone())); 216 216 } 217 217 } 218 - @@ -5000,6 +5118,20 @@ 218 + @@ -5015,6 +5133,20 @@ 219 219 *self.favicon.borrow_mut() = Some(favicon); 220 220 self.notify_embedder_favicon(); 221 221 }
+7 -12
patches/components/script/dom/html/htmlformelement.rs.patch
··· 1 1 --- original 2 2 +++ modified 3 - @@ -857,8 +857,11 @@ 4 - 5 - // Step 19 3 + @@ -868,7 +868,7 @@ 4 + // form's node navigable, and noopener. 6 5 let source = doc.browsing_context().unwrap(); 7 - - let (maybe_chosen, _new) = source 8 - - .choose_browsing_context(target_attribute_value.unwrap_or(DOMString::new()), noopener); 9 - + let (maybe_chosen, _new) = source.choose_browsing_context( 10 - + target_attribute_value.unwrap_or(DOMString::new()), 11 - + noopener, 12 - + None, 13 - + ); 6 + let (maybe_chosen, _new) = 7 + - source.choose_browsing_context(target.unwrap_or_default(), noopener); 8 + + source.choose_browsing_context(target.unwrap_or_default(), noopener, None); 14 9 15 - // Step 20 16 - let chosen = match maybe_chosen { 10 + let Some(chosen) = maybe_chosen else { 11 + // Step 23. If targetNavigable is null, then return.
+23 -18
patches/components/script/dom/html/htmliframeelement.rs.patch
··· 69 69 #[dom_struct] 70 70 pub(crate) struct HTMLIFrameElement { 71 71 htmlelement: HTMLElement, 72 - @@ -93,6 +105,30 @@ 73 - /// while script at this point(when the flag is set) 74 - /// expects those to run only for the navigated documented. 75 - pending_navigation: Cell<bool>, 72 + @@ -97,6 +109,30 @@ 73 + /// an empty iframe is attached. In that case, we shouldn't fire a 74 + /// subsequent asynchronous load event. 75 + already_fired_synchronous_load_event: Cell<bool>, 76 76 + /// Whether this iframe is in "embed" mode (hosting a top-level webview). 77 77 + is_embedded_webview: Cell<bool>, 78 78 + /// The embedded webview ID when in embed mode. ··· 100 100 } 101 101 102 102 impl HTMLIFrameElement { 103 - @@ -229,6 +265,8 @@ 103 + @@ -255,6 +291,8 @@ 104 104 viewport_details, 105 105 user_content_manager_id: None, 106 106 theme: window.theme(), ··· 109 109 }; 110 110 111 111 self.pipeline_id.set(Some(new_pipeline_id)); 112 - @@ -443,6 +481,143 @@ 112 + @@ -484,6 +522,147 @@ 113 113 ); 114 114 } 115 115 116 116 + /// Create an embedded webview for this iframe when the "embed" attribute is present. 117 117 + /// This creates a new top-level WebView instead of a nested browsing context. 118 118 + fn create_embedded_webview(&self) { 119 - + let url = self.get_url(); 119 + + let Some(url) = self.shared_attribute_processing_steps_for_iframe_and_frame_elements() 120 + + else { 121 + + error!("Can't create embedded webview without url"); 122 + + return; 123 + + }; 120 124 + let document = self.owner_document(); 121 125 + let window = self.owner_window(); 122 126 + ··· 253 257 fn destroy_nested_browsing_context(&self) { 254 258 self.pipeline_id.set(None); 255 259 self.pending_pipeline_id.set(None); 256 - @@ -502,6 +677,13 @@ 257 - throttled: Cell::new(false), 260 + @@ -544,6 +723,13 @@ 258 261 script_window_proxies: ScriptThread::window_proxies(), 259 262 pending_navigation: Default::default(), 263 + already_fired_synchronous_load_event: Default::default(), 260 264 + is_embedded_webview: Cell::new(false), 261 265 + embedded_webview_id: Cell::new(None), 262 266 + embedded_history: DomRefCell::new(Vec::new()), ··· 267 271 } 268 272 } 269 273 270 - @@ -537,7 +719,150 @@ 274 + @@ -579,6 +765,149 @@ 271 275 self.webview_id.get() 272 276 } 273 277 ··· 353 357 + 354 358 + /// Get the effective webview ID, taking into account embedded webview mode. 355 359 + /// Returns the embedded webview ID if in embed mode, otherwise the parent webview ID. 356 - #[inline] 360 + + #[inline] 357 361 + pub(crate) fn embedded_webview_id(&self) -> Option<WebViewId> { 358 362 + if self.is_embedded_webview.get() { 359 363 + self.embedded_webview_id.get() ··· 414 418 + self.page_zoom.set(zoom); 415 419 + } 416 420 + 417 - + #[inline] 421 + #[inline] 418 422 pub(crate) fn sandboxing_flag_set(&self) -> SandboxingFlagSet { 419 423 self.sandboxing_flag_set 420 - .get() 421 - @@ -871,6 +1196,85 @@ 424 + @@ -917,6 +1246,85 @@ 422 425 // This is specified as reflecting the name content attribute of the 423 426 // element, not the name of the child browsing context. 424 427 make_getter!(Name, "name"); ··· 504 507 } 505 508 506 509 impl VirtualMethods for HTMLIFrameElement { 507 - @@ -922,8 +1326,34 @@ 510 + @@ -968,8 +1376,36 @@ 508 511 // is in a document tree and has a browsing context, which is what causes 509 512 // the child browsing context to be created. 510 513 if self.upcast::<Node>().is_connected_with_browsing_context() { ··· 514 517 + // processing iframe attributes (which is for regular nested iframes). 515 518 + if self.is_embedded_webview.get() { 516 519 + if let Some(webview_id) = self.embedded_webview_id.get() { 517 - + let url = self.get_url(); 520 + + let url = self 521 + + .shared_attribute_processing_steps_for_iframe_and_frame_elements() 522 + + .expect("Failed to get embedding iframe url"); 518 523 + let window = self.owner_window(); 519 524 + window 520 525 + .as_global_scope() ··· 541 546 } 542 547 }, 543 548 _ => {}, 544 - @@ -967,6 +1397,23 @@ 549 + @@ -1013,6 +1449,23 @@ 545 550 546 551 debug!("<iframe> running post connection steps"); 547 552 ··· 565 570 // Step 1. Create a new child navigable for insertedNode. 566 571 self.create_nested_browsing_context(can_gc); 567 572 568 - @@ -989,8 +1436,22 @@ 573 + @@ -1035,8 +1488,22 @@ 569 574 fn unbind_from_tree(&self, context: &UnbindContext, can_gc: CanGc) { 570 575 self.super_type().unwrap().unbind_from_tree(context, can_gc); 571 576
+1 -1
patches/components/script/links.rs.patch
··· 1 1 --- original 2 2 +++ modified 3 - @@ -386,7 +386,7 @@ 3 + @@ -434,7 +434,7 @@ 4 4 let source = document.browsing_context().unwrap(); 5 5 let (maybe_chosen, history_handling) = match target_attribute_value { 6 6 Some(name) => {
+1 -1
patches/components/script_bindings/codegen/Bindings.conf.patch
··· 1 1 --- original 2 2 +++ modified 3 - @@ -253,6 +253,10 @@ 3 + @@ -257,6 +257,10 @@ 4 4 'canGc': ['CheckValidity', 'GetLabels', 'GetValidity', 'SetValidity', 'ReportValidity', 'States'], 5 5 }, 6 6