Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial styles #392

Merged
merged 4 commits into from
Feb 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 37 additions & 22 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ gosub_net = { path = "./crates/gosub_net", features = [] }
gosub_config = { path = "./crates/gosub_config", features = [] }
gosub_html5 = { path = "./crates/gosub_html5", features = [] }
gosub_css3 = { path = "./crates/gosub_css3", features = [] }
gosub_styling = { path = "./crates/gosub_styling", features = [] }
gosub_webexecutor = { path = "./crates/gosub_webexecutor", features = [] }
gosub_jsapi = { path = "./crates/gosub_jsapi", features = [] }
gosub_testing = { path = "./crates/gosub_testing", features = [] }
Expand Down Expand Up @@ -81,4 +82,4 @@ opt-level = 3
codegen-units = 1

[lib]
crate-type = ["staticlib"]
crate-type = ["staticlib"]
5 changes: 1 addition & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@ build: ## Build the project
section "Cargo build" ;\
cargo build --all

fix: ## Fix formatting and clippy errors (deprecated)
echo "Use 'make format' instead"

format: ## Fix formatting and clippy errors
cargo fmt --all
cargo clippy --all --fix --allow-dirty --allow-staged
Expand All @@ -40,7 +37,7 @@ test_commands:
cargo run --bin html5-parser-test >/dev/null
cargo run --bin parser-test >/dev/null
cargo run --bin config-store list >/dev/null
cargo run --bin gosub-parser ./tests/data/tree_iterator/stackoverflow.html >/dev/null
cargo run --bin gosub-parser file://tests/data/tree_iterator/stackoverflow.html >/dev/null
cargo run --example html5-parser >/dev/null

help: ## Display available commands
Expand Down
4 changes: 2 additions & 2 deletions benches/tree_iterator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ fn wikipedia_main_page(c: &mut Criterion) {
let _ = char_iter.read_from_file(html_file, Some(gosub_shared::bytes::Encoding::UTF8));
char_iter.set_confidence(gosub_shared::bytes::Confidence::Certain);

let main_document = DocumentBuilder::new_document();
let main_document = DocumentBuilder::new_document(None);
let document = Document::clone(&main_document);
let _ = Html5Parser::parse_document(&mut char_iter, document, None);

Expand All @@ -45,7 +45,7 @@ fn stackoverflow_home(c: &mut Criterion) {
let _ = char_iter.read_from_file(html_file, Some(gosub_shared::bytes::Encoding::UTF8));
char_iter.set_confidence(gosub_shared::bytes::Confidence::Certain);

let main_document = DocumentBuilder::new_document();
let main_document = DocumentBuilder::new_document(None);
let document = Document::clone(&main_document);
let _ = Html5Parser::parse_document(&mut char_iter, document, None);

Expand Down
2 changes: 1 addition & 1 deletion crates/gosub_bindings/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ pub unsafe extern "C" fn gosub_rendertree_init(html: *const c_char) -> *mut Rend
chars.read_from_str(html_str, Some(Encoding::UTF8));
chars.set_confidence(Confidence::Certain);

let doc = DocumentBuilder::new_document();
let doc = DocumentBuilder::new_document(None);
let parse_result = Html5Parser::parse_document(&mut chars, Document::clone(&doc), None);

if parse_result.is_ok() {
Expand Down
2 changes: 1 addition & 1 deletion crates/gosub_css3/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ gosub_shared = { path = "../gosub_shared", features = [] }
lazy_static = "1.4"
log = "0.4.20"
simple_logger = "4.2.0"

anyhow = { version = "1.0.80", features = [] }
1 change: 1 addition & 0 deletions crates/gosub_css3/src/convert.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pub mod ast_converter;
Loading
Loading