File tree Expand file tree Collapse file tree 2 files changed +2
-26
lines changed
Userland/Libraries/LibWeb/HTML Expand file tree Collapse file tree 2 files changed +2
-26
lines changed Original file line number Diff line number Diff line change @@ -35,8 +35,8 @@ JS::GCPtr<Layout::Node> HTMLIFrameElement::create_layout_node(NonnullRefPtr<CSS:
35
35
void HTMLIFrameElement::attribute_changed (DeprecatedFlyString const & name, DeprecatedString const & value)
36
36
{
37
37
HTMLElement::attribute_changed (name, value);
38
- if (name == HTML::AttributeNames::src )
39
- load_src (value );
38
+ if (m_nested_browsing_context )
39
+ process_the_iframe_attributes ( );
40
40
}
41
41
42
42
// https://html.spec.whatwg.org/multipage/iframe-embed-object.html#the-iframe-element:the-iframe-element-6
@@ -109,28 +109,6 @@ void HTMLIFrameElement::removed_from(DOM::Node* node)
109
109
}
110
110
}
111
111
112
- void HTMLIFrameElement::load_src (DeprecatedString const & value)
113
- {
114
- if (!m_nested_browsing_context)
115
- return ;
116
-
117
- if (value.is_null ())
118
- return ;
119
-
120
- auto url = document ().parse_url (value);
121
- if (!url.is_valid ()) {
122
- dbgln (" iframe failed to load URL: Invalid URL: {}" , value);
123
- return ;
124
- }
125
- if (url.scheme () == " file" && document ().origin ().scheme () != " file" ) {
126
- dbgln (" iframe failed to load URL: Security violation: {} may not load {}" , document ().url (), url);
127
- return ;
128
- }
129
-
130
- dbgln (" Loading iframe document from {}" , value);
131
- m_nested_browsing_context->loader ().load (url, FrameLoader::Type::IFrame);
132
- }
133
-
134
112
// https://html.spec.whatwg.org/multipage/rendering.html#attributes-for-embedded-content-and-images
135
113
void HTMLIFrameElement::apply_presentational_hints (CSS::StyleProperties& style) const
136
114
{
Original file line number Diff line number Diff line change @@ -39,8 +39,6 @@ class HTMLIFrameElement final : public NavigableContainer {
39
39
// https://html.spec.whatwg.org/multipage/iframe-embed-object.html#process-the-iframe-attributes
40
40
void process_the_iframe_attributes (bool initial_insertion = false );
41
41
42
- void load_src (DeprecatedString const &);
43
-
44
42
// https://html.spec.whatwg.org/multipage/iframe-embed-object.html#current-navigation-was-lazy-loaded
45
43
bool m_current_navigation_was_lazy_loaded { false };
46
44
};
You can’t perform that action at this time.
0 commit comments