mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 03:22:43 +00:00 
			
		
		
		
	 6e19ab2bbc
			
		
	
	
		6e19ab2bbc
		
	
	
	
	
		
			
			We have a new, improved string type coming up in AK (OOM aware, no null state), and while it's going to use UTF-8, the name UTF8String is a mouthful - so let's free up the String name by renaming the existing class. Making the old one have an annoying name will hopefully also help with quick adoption :^)
		
			
				
	
	
		
			48 lines
		
	
	
	
		
			1.6 KiB
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			48 lines
		
	
	
	
		
			1.6 KiB
		
	
	
	
		
			C++
		
	
	
	
	
	
| /*
 | |
|  * Copyright (c) 2020-2021, Andreas Kling <kling@serenityos.org>
 | |
|  *
 | |
|  * SPDX-License-Identifier: BSD-2-Clause
 | |
|  */
 | |
| 
 | |
| #pragma once
 | |
| 
 | |
| #include <LibWeb/HTML/BrowsingContextContainer.h>
 | |
| 
 | |
| namespace Web::HTML {
 | |
| 
 | |
| class HTMLIFrameElement final : public BrowsingContextContainer {
 | |
|     WEB_PLATFORM_OBJECT(HTMLIFrameElement, BrowsingContextContainer);
 | |
| 
 | |
| public:
 | |
|     virtual ~HTMLIFrameElement() override;
 | |
| 
 | |
|     virtual JS::GCPtr<Layout::Node> create_layout_node(NonnullRefPtr<CSS::StyleProperties>) override;
 | |
| 
 | |
|     // https://html.spec.whatwg.org/multipage/urls-and-fetching.html#will-lazy-load-element-steps
 | |
|     bool will_lazy_load_element() const;
 | |
| 
 | |
|     void set_current_navigation_was_lazy_loaded(bool value) { m_current_navigation_was_lazy_loaded = value; }
 | |
| 
 | |
|     virtual void apply_presentational_hints(CSS::StyleProperties&) const override;
 | |
| 
 | |
| private:
 | |
|     HTMLIFrameElement(DOM::Document&, DOM::QualifiedName);
 | |
| 
 | |
|     // ^DOM::Element
 | |
|     virtual void inserted() override;
 | |
|     virtual void removed_from(Node*) override;
 | |
|     virtual void parse_attribute(FlyString const& name, DeprecatedString const& value) override;
 | |
|     virtual i32 default_tab_index_value() const override;
 | |
| 
 | |
|     // https://html.spec.whatwg.org/multipage/iframe-embed-object.html#process-the-iframe-attributes
 | |
|     void process_the_iframe_attributes(bool initial_insertion = false);
 | |
| 
 | |
|     void load_src(DeprecatedString const&);
 | |
| 
 | |
|     // https://html.spec.whatwg.org/multipage/iframe-embed-object.html#current-navigation-was-lazy-loaded
 | |
|     bool m_current_navigation_was_lazy_loaded { false };
 | |
| };
 | |
| 
 | |
| void run_iframe_load_event_steps(HTML::HTMLIFrameElement&);
 | |
| 
 | |
| }
 |