Repository navigation
LibWeb: ignore repeat(auto-fit/auto-fill, auto) as it is not allowed - #23155
Conversation
|
Hello! One or more of the commit messages in this PR do not match the SerenityOS code submission policy, please check the |
9d170d7 to
326c0f2
Compare
|
please, add a layout test for this change so we can be sure it won't regress in the future :) layout tests live here https://github.com/SerenityOS/serenity/tree/master/Tests/LibWeb/Layout command that could be used to run tests |
d131eea to
46cd14f
Compare
OK, something like this then? |
46cd14f to
bd42841
Compare
I think we have an undeclared rule to use layout-tests when it is possible, as in this case. ref-tests are usually used for testing paint-related things that can't be caught in layout dumps. |
AtkinsSJ
left a comment
There was a problem hiding this comment.
This looks good! Thank you. :^)
|
Oh whoops, Aliaksandr is right. A layout test would be better. |
bd42841 to
4028dcd
Compare
kalenikaliaksandr
left a comment
There was a problem hiding this comment.
great, thank you!
|
Related, this took way longer than expected. Turns out the index 9a2a449f..1d4b3659 100644
--- a/Userland/Utilities/headless-browser.cpp
+++ b/Userland/Utilities/headless-browser.cpp
@@ -282,8 +282,8 @@ static ErrorOr<TestResult> run_dump_test(HeadlessWebContentView& view, StringVie
if (mode == TestMode::Layout) {
view.on_load_finish = [&](auto const& loaded_url) {
- VERIFY(url.equals(loaded_url, URL::ExcludeFragment::Yes));
-
+ dbgln("Loaded: {}, need {}", loaded_url, url);
+ if(loaded_url == url) {
// NOTE: We take a screenshot here to force the lazy layout of SVG-as-image documents to happen.
// It also causes a lot more code to run, which is good for finding bugs. :^)
(void)view.take_screenshot();
@@ -293,7 +293,10 @@ static ErrorOr<TestResult> run_dump_test(HeadlessWebContentView& view, StringVie
builder.append("\n"sv);
builder.append(view.dump_paint_tree().release_value_but_fixme_should_propagate_errors());
result = builder.to_string().release_value_but_fixme_should_propagate_errors();
+
+
loop.quit(0);
+ }
};
view.on_text_test_finish = {};
} else if (mode == TestMode::Text) {My invocation: ./Tests/LibWeb/rebaseline-libweb-test "/Users/tommy/Repos/serenity/Tests/LibWeb/Layout/input/grid/repeat-auto-fit-fill-cannot-have-auto.html" |
|
Just let me know if you want me to include that in the PR :-) |
|
It's good to do one thing per PR. That seems unrelated to this one? (I don't know if it's something desirable for a different PR.) |
|
Sure thing, #23156 |
|
@pixelspark You ended up being our 1000th contributor, congrats! 🥳 |
|
Cool, impressive milestone for the project 🎉 |
Fixes #23154