Rewild Your Web
18
fork

Configure Feed

Select the types of activity you want to include in your feed.

build: fix htmliframeelement.rs

webbeef 2e13d6ad cccb00cf

+19 -14
+19 -14
patches/components/script/dom/html/htmliframeelement.rs.patch
··· 108 108 }; 109 109 110 110 self.pipeline_id.set(Some(new_pipeline_id)); 111 - @@ -597,6 +636,147 @@ 111 + @@ -597,6 +636,148 @@ 112 112 ); 113 113 } 114 114 115 115 + /// Create an embedded webview for this iframe when the "embed" attribute is present. 116 116 + /// This creates a new top-level WebView instead of a nested browsing context. 117 117 + fn create_embedded_webview(&self) { 118 - + let Some(url) = self.shared_attribute_processing_steps_for_iframe_and_frame_elements() 119 - + else { 118 + + let Some(url) = self.shared_attribute_processing_steps_for_iframe_and_frame_elements( 119 + + ProcessingMode::NotFirstTime, 120 + + ) else { 120 121 + error!("Can't create embedded webview without url"); 121 122 + return; 122 123 + }; ··· 256 257 fn destroy_nested_browsing_context(&self) { 257 258 self.pipeline_id.set(None); 258 259 self.pending_pipeline_id.set(None); 259 - @@ -659,6 +839,13 @@ 260 + @@ -659,6 +840,13 @@ 260 261 lazy_load_resumption_steps: Default::default(), 261 262 pending_navigation: Default::default(), 262 263 already_fired_synchronous_load_event: Default::default(), ··· 270 271 } 271 272 } 272 273 273 - @@ -694,7 +881,158 @@ 274 + @@ -694,7 +882,158 @@ 274 275 self.webview_id.get() 275 276 } 276 277 ··· 429 430 pub(crate) fn sandboxing_flag_set(&self) -> SandboxingFlagSet { 430 431 self.sandboxing_flag_set 431 432 .get() 432 - @@ -1078,6 +1416,89 @@ 433 + @@ -1078,6 +1417,89 @@ 433 434 434 435 // https://html.spec.whatwg.org/multipage/#dom-iframe-longdesc 435 436 make_url_setter!(SetLongDesc, "longdesc"); ··· 519 520 } 520 521 521 522 impl VirtualMethods for HTMLIFrameElement { 522 - @@ -1134,8 +1555,36 @@ 523 + @@ -1134,10 +1556,40 @@ 523 524 // is in a document tree and has a browsing context, which is what causes 524 525 // the child browsing context to be created. 525 526 if self.upcast::<Node>().is_connected_with_browsing_context() { ··· 530 531 + if self.is_embedded_webview.get() { 531 532 + if let Some(webview_id) = self.embedded_webview_id.get() { 532 533 + let url = self 533 - + .shared_attribute_processing_steps_for_iframe_and_frame_elements() 534 + + .shared_attribute_processing_steps_for_iframe_and_frame_elements( 535 + + ProcessingMode::NotFirstTime, 536 + + ) 534 537 + .expect("Failed to get embedding iframe url"); 535 538 + let window = self.owner_window(); 536 539 + window ··· 545 548 + debug!("iframe src set while in browsing context."); 546 549 + self.process_the_iframe_attributes(ProcessingMode::NotFirstTime, cx); 547 550 + } 548 - + } 549 - + }, 551 + } 552 + }, 550 553 + local_name!("embed") => { 551 554 + // The embed attribute determines whether this iframe hosts an embedded webview. 552 555 + // Warn if it's changed after the iframe is already connected, as this is not supported. ··· 555 558 + "The 'embed' attribute on iframe should not be changed after insertion. \ 556 559 + The iframe mode (nested vs embedded webview) is determined at insertion time." 557 560 + ); 558 - } 559 - }, 561 + + } 562 + + }, 560 563 local_name!("loading") => { 561 - @@ -1200,6 +1649,23 @@ 564 + // https://html.spec.whatwg.org/multipage/#attr-iframe-loading 565 + // > When the loading attribute's state is changed to the Eager state, the user agent must run these steps: 566 + @@ -1200,6 +1652,23 @@ 562 567 563 568 debug!("<iframe> running post connection steps"); 564 569 ··· 582 587 // Step 1. Create a new child navigable for insertedNode. 583 588 self.create_nested_browsing_context(cx); 584 589 585 - @@ -1223,11 +1689,25 @@ 590 + @@ -1223,11 +1692,25 @@ 586 591 fn unbind_from_tree(&self, context: &UnbindContext, can_gc: CanGc) { 587 592 self.super_type().unwrap().unbind_from_tree(context, can_gc); 588 593