Flashbang (white background) effect before page loads: sweclockers.com
Just tested this browser and this is something that doesn't happen with firefox/chromium and it's forks.
I don't know the cause of this issue, but I'm running Linux and I suspect more sites might have similar issues.
Looking at the site, the relevant CSS is this:
body {
background: var(--background-main, #edeceb);
}
@media (prefers-color-scheme: dark) {
:root.os-default {
--background-main: #101010;
}
}
On load, the <html> element doesn't have a class set, so the background colour is the fallback near-white #edeceb. Then at some point JS adds the os-default class, and so the --background-main value exists and is used.
I'm not 100% sure here because #edeceb looks so much like white, so it might be something else. But it's definitely suspicious. Maybe we're either taking longer to run JS than other browsers, or we're not waiting as long before first paint.
I am not sure, but I think the site is pretty lightweight on the js side. The white-ish color is very odd because the site has had a dark theme for over a decade.
On Fri, 19 Jul 2024, 10:16 Sam Atkins, @.***> wrote:
Looking at the site, the relevant CSS is this:
body { background: var(--background-main, #edeceb); } @media (prefers-color-scheme: dark) { :root.os-default { --background-main: #101010; } }
On load, the element doesn't have a class set, so the background colour is the fallback near-white #edeceb. Then at some point JS adds the os-default class, and so the --background-main value exists and is used.
I'm not 100% sure here because #edeceb looks so much like white, so it might be something else. But it's definitely suspicious. Maybe we're either taking longer to run JS than other browsers, or we're not waiting as long before first paint.
— Reply to this email directly, view it on GitHub https://github.com/LadybirdBrowser/ladybird/issues/695#issuecomment-2238621725, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAPIOP4LBK7WFKSNDBEYN7LZNDDO5AVCNFSM6AAAAABLCRZDQSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMZYGYZDCNZSGU . You are receiving this because you authored the thread.Message ID: @.***>
same issue happens on https://www.linux.org.ru/
https://sweclockers.com seems to crash for me on current master:
0 liblagom-ak.0.0.0.dylib 0x000000010345e8a0 ak_trap + 56
1 liblagom-ak.0.0.0.dylib 0x000000010345ebb0 ak_assertion_failed + 0
2 liblagom-web.0.0.0.dylib 0x0000000105367694 Web::Layout::FormattingContext::compute_height_for_absolutely_positioned_non_replaced_element(Web::Layout::Box const&, Web::Layout::AvailableSpace const&, Web::Layout::FormattingContext::BeforeOrAfterInsideLayout)::$_0::operator()(Web::CSS::Length) const + 0
3 liblagom-web.0.0.0.dylib 0x0000000105361bf0 Web::Layout::FormattingContext::compute_width_for_absolutely_positioned_replaced_element(Web::Layout::Box const&, Web::Layout::AvailableSpace const&) + 596
4 liblagom-web.0.0.0.dylib 0x0000000105367f84 Web::Layout::FormattingContext::layout_absolutely_positioned_element(Web::Layout::Box const&, Web::Layout::AvailableSpace const&) + 340
5 liblagom-web.0.0.0.dylib 0x000000010534a58c Web::Layout::BlockFormattingContext::parent_context_did_dimension_child_root_box() + 400
6 liblagom-web.0.0.0.dylib 0x000000010534981c Web::Layout::BlockFormattingContext::~BlockFormattingContext() + 44
7 liblagom-web.0.0.0.dylib 0x0000000105099290 Web::DOM::Document::update_layout() + 804
8 liblagom-web.0.0.0.dylib 0x00000001050c6f44 Web::DOM::Element::scroll_into_view(AK::Optional<AK::Variant<bool, Web::DOM::ScrollIntoViewOptions>>) + 160
9 liblagom-web.0.0.0.dylib 0x00000001050af910 AK::Function<void ()>::CallableWrapper<Web::DOM::Document::set_focused_element(Web::DOM::Element*)::$_0>::call() + 72
10 liblagom-web.0.0.0.dylib 0x0000000104e9d194 AK::Function<void (Web::CSS::CSSRule const&)>::operator()(Web::CSS::CSSRule const&) const + 76
11 liblagom-web.0.0.0.dylib 0x00000001051da43c Web::HTML::EventLoop::process() + 84
12 liblagom-web.0.0.0.dylib 0x0000000104e9d194 AK::Function<void (Web::CSS::CSSRule const&)>::operator()(Web::CSS::CSSRule const&) const + 76
13 liblagom-core.0.0.0.dylib 0x000000010323ee5c AK::Function<void (AK::Error&)>::operator()(AK::Error&) const + 76
14 liblagom-core.0.0.0.dylib 0x000000010323e378 Core::EventReceiver::dispatch_event(Core::Event&, Core::EventReceiver*) + 112
15 liblagom-core.0.0.0.dylib 0x000000010324b628 Core::ThreadEventQueue::process() + 424
16 liblagom-core.0.0.0.dylib 0x000000010323c0ec Core::EventLoop::spin_until(AK::Function<bool ()>) + 92
17 liblagom-web.0.0.0.dylib 0x00000001054158bc Web::Platform::EventLoopPluginSerenity::spin_until(GC::Root<GC::Function<bool ()>>) + 116
18 liblagom-web.0.0.0.dylib 0x00000001051d9fb4 Web::HTML::EventLoop::spin_until(GC::Ref<GC::Function<bool ()>>) + 360
19 liblagom-web.0.0.0.dylib 0x00000001052a2084 Web::HTML::HTMLParser::the_end(GC::Ref<Web::DOM::Document>, GC::Ptr<Web::HTML::HTMLParser>) + 1000
20 liblagom-web.0.0.0.dylib 0x00000001052a1ba8 Web::HTML::HTMLParser::run(URL::URL const&, Web::HTML::HTMLTokenizer::StopAtInsertionPoint) + 244
21 liblagom-web.0.0.0.dylib 0x00000001050b90c4 AK::Function<void ()>::CallableWrapper<Web::load_html_document(Web::HTML::NavigationParams const&)::$_0::operator()(AK::Detail::ByteBuffer<32ul>) const::'lambda'()>::call() + 128
22 liblagom-web.0.0.0.dylib 0x0000000104e9d194 AK::Function<void (Web::CSS::CSSRule const&)>::operator()(Web::CSS::CSSRule const&) const + 76
23 liblagom-core.0.0.0.dylib 0x000000010323ee5c AK::Function<void (AK::Error&)>::operator()(AK::Error&) const + 76
24 liblagom-core.0.0.0.dylib 0x000000010324b5e0 Core::ThreadEventQueue::process() + 352
25 liblagom-core.0.0.0.dylib 0x0000000103252928 Core::EventLoopImplementationUnix::exec() + 44
26 liblagom-core.0.0.0.dylib 0x000000010323bfa4 Core::EventLoop::exec() + 72
27 WebContent 0x0000000102b81324 serenity_main(Main::Arguments) + 4420
28 WebContent 0x0000000102c26fbc main + 196
29 dyld 0x0000000199cd8274 start + 2840
i think this is fixed with implementation of a deferred page rendering until all css is loaded
Is this still an issue? I can not reproduce this on the current master 11dc254d27e8f98ef95ef07d36da4610f0502299
I still get an initially white screen when testing this.