mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 09:42:45 +00:00 
			
		
		
		
	LibHTML: Add an empty CSS parser.
This commit is contained in:
		
							parent
							
								
									85d71024f7
								
							
						
					
					
						commit
						891e668e35
					
				
					 14 changed files with 67 additions and 11 deletions
				
			
		
							
								
								
									
										11
									
								
								LibHTML/Parser/CSSParser.cpp
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								LibHTML/Parser/CSSParser.cpp
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,11 @@ | |||
| #include <LibHTML/CSS/StyleSheet.h> | ||||
| #include <LibHTML/Parser/CSSParser.h> | ||||
| #include <ctype.h> | ||||
| #include <stdio.h> | ||||
| 
 | ||||
| NonnullRefPtr<StyleSheet> parse_css(const String& css) | ||||
| { | ||||
|     Vector<NonnullRefPtr<StyleRule>> rules; | ||||
| 
 | ||||
|     return StyleSheet::create(move(rules)); | ||||
| } | ||||
							
								
								
									
										7
									
								
								LibHTML/Parser/CSSParser.h
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										7
									
								
								LibHTML/Parser/CSSParser.h
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,7 @@ | |||
| #pragma once | ||||
| 
 | ||||
| #include <AK/NonnullRefPtr.h> | ||||
| #include <LibHTML/CSS/StyleSheet.h> | ||||
| 
 | ||||
| NonnullRefPtr<StyleSheet> parse_css(const String&); | ||||
| 
 | ||||
|  | @ -1,6 +1,6 @@ | |||
| #include <LibHTML/DOM/Element.h> | ||||
| #include <LibHTML/DOM/Text.h> | ||||
| #include <LibHTML/Parser/Parser.h> | ||||
| #include <LibHTML/Parser/HTMLParser.h> | ||||
| #include <ctype.h> | ||||
| #include <stdio.h> | ||||
| 
 | ||||
|  | @ -32,7 +32,7 @@ static bool is_self_closing_tag(const String& tag_name) | |||
|         || tag_name == "wbr"; | ||||
| } | ||||
| 
 | ||||
| NonnullRefPtr<Document> parse(const String& html) | ||||
| NonnullRefPtr<Document> parse_html(const String& html) | ||||
| { | ||||
|     Vector<NonnullRefPtr<ParentNode>> node_stack; | ||||
| 
 | ||||
|  | @ -3,5 +3,5 @@ | |||
| #include <AK/NonnullRefPtr.h> | ||||
| #include <LibHTML/DOM/Document.h> | ||||
| 
 | ||||
| NonnullRefPtr<Document> parse(const String& html); | ||||
| NonnullRefPtr<Document> parse_html(const String&); | ||||
| 
 | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Andreas Kling
						Andreas Kling