Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(29)

Issue 13934004: Plumb an event through to content/ that is sent just before 'onload'. (Closed)

Created:
7 years, 8 months ago by jeremya
Modified:
7 years, 8 months ago
Reviewers:
jamesr, eseidel
CC:
blink-reviews, abarth_chromum.org, Nate Chapin
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Visibility:
Public.

Description

Plumb an event through to content/ that is sent just before 'onload'. This is to support a change for Chrome packaged app windows that helps to avoid a flash of white when loading a page. Specifically, the app delays showing the window until the 'onload' event has been fired. However, many things depend on the page being visible at 'onload' time, so this change sends a message to the content layer before the 'onload' event is sent, so that any messages generated by JavaScript during the 'onload' event will arrive at the embedder after the window has been shown. The new event simply mirrors the 'didHandleOnloadEvents' path, but notifies before the onload event is sent. BUG=225843

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+19 lines, -0 lines) Patch
M Source/WebCore/dom/Document.cpp View 1 chunk +1 line, -0 lines 0 comments Download
M Source/WebCore/loader/EmptyClients.h View 1 chunk +1 line, -0 lines 0 comments Download
M Source/WebCore/loader/FrameLoader.h View 1 chunk +1 line, -0 lines 0 comments Download
M Source/WebCore/loader/FrameLoader.cpp View 1 chunk +5 lines, -0 lines 0 comments Download
M Source/WebCore/loader/FrameLoaderClient.h View 1 chunk +1 line, -0 lines 0 comments Download
M Source/WebKit/chromium/public/WebFrameClient.h View 1 chunk +3 lines, -0 lines 0 comments Download
M Source/WebKit/chromium/src/FrameLoaderClientImpl.h View 1 chunk +1 line, -0 lines 0 comments Download
M Source/WebKit/chromium/src/FrameLoaderClientImpl.cpp View 1 chunk +6 lines, -0 lines 0 comments Download

Messages

Total messages: 12 (0 generated)
jeremya
7 years, 8 months ago (2013-04-10 19:45:51 UTC) #1
eseidel
On the surface it's not obvious to me how this is different from a capturing ...
7 years, 8 months ago (2013-04-10 19:47:25 UTC) #2
eseidel
Nate may be sad for more Loader callbacks. :)
7 years, 8 months ago (2013-04-10 19:48:01 UTC) #3
jeremya
On 2013/04/10 19:47:25, Eric Seidel (Google) wrote: > On the surface it's not obvious to ...
7 years, 8 months ago (2013-04-10 19:48:15 UTC) #4
eseidel
https://developer.mozilla.org/en-US/docs/DOM/EventTarget.addEventListener ? document.addEventListener("load", myAwesomeListener, true)?
7 years, 8 months ago (2013-04-10 19:50:06 UTC) #5
eseidel
Maybe you want to show the window at DOMContentLoaded? I guess that could be long ...
7 years, 8 months ago (2013-04-10 19:52:14 UTC) #6
jeremya
On 2013/04/10 19:50:06, Eric Seidel (Google) wrote: > https://developer.mozilla.org/en-US/docs/DOM/EventTarget.addEventListener ? > > document.addEventListener("load", myAwesomeListener, true)? ...
7 years, 8 months ago (2013-04-10 19:52:25 UTC) #7
jeremya
On 2013/04/10 19:52:14, Eric Seidel (Google) wrote: > Maybe you want to show the window ...
7 years, 8 months ago (2013-04-10 19:53:19 UTC) #8
jeremya
On 2013/04/10 19:53:19, jeremya wrote: > On 2013/04/10 19:52:14, Eric Seidel (Google) wrote: > > ...
7 years, 8 months ago (2013-04-10 19:54:11 UTC) #9
jeremya
ping- any further thoughts on this?
7 years, 8 months ago (2013-04-11 18:29:35 UTC) #10
jamesr
I don't think onload or DOMContentLoaded are very good proxies for "will this flash white". ...
7 years, 8 months ago (2013-04-11 20:52:55 UTC) #11
jeremya
7 years, 8 months ago (2013-04-11 22:25:22 UTC) #12
On 2013/04/11 20:52:55, jamesr wrote:
> I don't think onload or DOMContentLoaded are very good proxies for "will this
> flash white".  That's a graphical question which has only a passing
relationship
> with DOM loading.  Some pages are ready to display well before
DOMContentLoaded
> and some aren't ready to display until well after onload.  While it may
> correlate well on some set of manual tests, it's not a good general solution. 
> If you want to know something about rendering or graphics you should ask the
> rendering or graphics systems.  The loader definitely shouldn't be involved.
> 
> Can you file a bug describing precisely when you want to receive a
notification?
>  We can discuss there how to wire that up.

Done: http://crbug.com/230634

Closing this review.

Powered by Google App Engine
This is Rietveld 408576698