mirror of
https://github.com/RGBCube/serenity
synced 2025-05-24 18:15:07 +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
|
@ -1,7 +1,8 @@
|
|||
#include <LibCore/CFile.h>
|
||||
#include <LibHTML/Dump.h>
|
||||
#include <LibHTML/Frame.h>
|
||||
#include <LibHTML/Parser/Parser.h>
|
||||
#include <LibHTML/Parser/CSSParser.h>
|
||||
#include <LibHTML/Parser/HTMLParser.h>
|
||||
#include <stdio.h>
|
||||
|
||||
int main(int argc, char** argv)
|
||||
|
@ -11,8 +12,15 @@ int main(int argc, char** argv)
|
|||
fprintf(stderr, "Error: %s\n", f.error_string());
|
||||
return 1;
|
||||
}
|
||||
|
||||
extern const char default_stylesheet_source[];
|
||||
String css = default_stylesheet_source;
|
||||
|
||||
auto sheet = parse_css(css);
|
||||
dump_sheet(sheet);
|
||||
|
||||
String html = String::copy(f.read_all());
|
||||
auto doc = parse(html);
|
||||
auto doc = parse_html(html);
|
||||
dump_tree(doc);
|
||||
|
||||
doc->build_layout_tree();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue