mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 17:12:43 +00:00 
			
		
		
		
	 e61fdd1dc6
			
		
	
	
		e61fdd1dc6
		
	
	
	
	
		
			
			Previously when a viewBox was passed to a SVG symbol element it would not be taken into account when drawing the SVG.
		
			
				
	
	
		
			35 lines
		
	
	
	
		
			896 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			35 lines
		
	
	
	
		
			896 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| /*
 | |
|  * Copyright (c) 2023, Preston Taylor <95388976+PrestonLTaylor@users.noreply.github.com>
 | |
|  *
 | |
|  * SPDX-License-Identifier: BSD-2-Clause
 | |
|  */
 | |
| 
 | |
| #pragma once
 | |
| 
 | |
| #include <LibWeb/SVG/SVGGraphicsElement.h>
 | |
| 
 | |
| namespace Web::SVG {
 | |
| 
 | |
| class SVGSymbolElement final : public SVGGraphicsElement {
 | |
|     WEB_PLATFORM_OBJECT(SVGSymbolElement, SVGGraphicsElement);
 | |
| 
 | |
| public:
 | |
|     virtual ~SVGSymbolElement() override = default;
 | |
| 
 | |
|     void apply_presentational_hints(CSS::StyleProperties& style) const override;
 | |
| 
 | |
|     Optional<ViewBox> view_box() const { return m_view_box; }
 | |
| 
 | |
| private:
 | |
|     SVGSymbolElement(DOM::Document&, DOM::QualifiedName);
 | |
| 
 | |
|     virtual JS::ThrowCompletionOr<void> initialize(JS::Realm&) override;
 | |
| 
 | |
|     bool is_direct_child_of_use_shadow_tree() const;
 | |
| 
 | |
|     virtual void attribute_changed(DeprecatedFlyString const& name, DeprecatedString const& value) override;
 | |
| 
 | |
|     Optional<ViewBox> m_view_box;
 | |
| };
 | |
| 
 | |
| }
 |