[Webkit-unassigned] [Bug 158466] Add event support for link preload.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Jul 1 06:21:04 PDT 2016


https://bugs.webkit.org/show_bug.cgi?id=158466

--- Comment #51 from Yoav Weiss <yoav at yoav.ws> ---
(In reply to comment #50)
> Comment on attachment 282324 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=282324&action=review
> 
> > Source/WebCore/loader/LinkLoader.cpp:70
> > +        m_client.linkLoadingErrored();
> 
> We called these on a 0-delay timer before, but now they are called
> synchronously.  Why the change?

So, I thought that we're calling two separate timers here (mistaking dispatchEvent() calls in HTMLLinkElement to EventSender::dispatchEventSoon()), and thought I'd remove one. However, that's not the case, and sync calling the load event here is the wrong behavior.

The reason I stumbled upon this to begin with is the failure of delaying_onload_link_preload_after_discovery_image.html


Digging further it seems that the reason for the failure is that DOMWindow's load event is called synchronously while resource onload events are called in an async way. However, I believe <img onload> is called asynchronously, yet is called before window.onload (test case: http://test.weissyoav.com/tests/onload.html)

I need to analyze this some more and figure out why is the <link> behavior here different than <img>. Then I need to make sure <link onload> is called after window.onload, while keeping its async nature.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20160701/01d4e675/attachment.html>


More information about the webkit-unassigned mailing list