Closed
Bug 787378
Opened 12 years ago
Closed 12 years ago
Dispatch a "firstpaint" event for mozbrowsers
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla18
People
(Reporter: cjones, Assigned: justin.lebar+bug)
References
Details
(Keywords: dev-doc-needed)
Attachments
(2 files)
4.19 KB,
patch
|
cjones
:
review+
|
Details | Diff | Splinter Review |
5.05 KB,
patch
|
cjones
:
review+
|
Details | Diff | Splinter Review |
This lets the embedder know when the iframe has valid pixels available. This is useful for things like https://github.com/mozilla-b2g/gaia/issues/4213 .
To implement this, I think we'd want to
- register a MozAfterPaint listener from BrowserElementChild when it's initialized
- when the first MozAfterPaint event is dispatched, fire the "firstpaint" notification to the embedder
- unhook the MozAfterPaint listener (they can cause some perf issues)
Assignee | ||
Updated•12 years ago
|
Assignee: nobody → justin.lebar+bug
Reporter | ||
Comment 1•12 years ago
|
||
Hm ... need to be careful about about:blank here.
Assignee | ||
Comment 2•12 years ago
|
||
(In reply to Chris Jones [:cjones] [:warhammer] from comment #1)
> Hm ... need to be careful about about:blank here.
Yeah, I was just about to comment on that. :) But I think we can just check the location of the docshell/document.
Assignee | ||
Comment 3•12 years ago
|
||
> But I think we can just check the location of the docshell/document.
...unless http://foo.com can be painted before the docshell's location changes away from about:blank. I hope not, but I'm not sure.
Reporter | ||
Comment 4•12 years ago
|
||
If that were true, I think that many things other than this would be broken.
Assignee | ||
Comment 5•12 years ago
|
||
One way to find out, I guess.
https://tbpl.mozilla.org/?tree=Try&rev=0f81ae103909
Anyone want to take bets on which platform will go randomorange? My money is on OSX.
Assignee | ||
Comment 6•12 years ago
|
||
No random oranges; just permaorange on opt builds on all platforms. :)
Assignee | ||
Comment 7•12 years ago
|
||
Second time's a charm? https://tbpl.mozilla.org/?tree=Try&rev=3ec505fdd543
Assignee | ||
Comment 8•12 years ago
|
||
Attachment #657434 -
Flags: review?
Assignee | ||
Comment 9•12 years ago
|
||
Attachment #657435 -
Flags: review?
Assignee | ||
Updated•12 years ago
|
Attachment #657434 -
Flags: review? → review?(dale)
Assignee | ||
Updated•12 years ago
|
Attachment #657435 -
Flags: review? → review?(dale)
Reporter | ||
Comment 10•12 years ago
|
||
Comment on attachment 657434 [details] [diff] [review]
Part 1: Fire a "firstpaint" event in iframe mozbrowser.
Stealing.
>diff --git a/dom/browser-element/BrowserElementChild.js b/dom/browser-element/BrowserElementChild.js
> function debug(msg) {
>- //dump("BrowserElementChild - " + msg + "\n");
>+ // dump("BrowserElementChild - " + msg + "\n");
This is distracting, please remove.
Looks good! r=me with nitfix
Attachment #657434 -
Flags: review?(dale) → review+
Reporter | ||
Updated•12 years ago
|
Attachment #657435 -
Flags: review?(dale) → review+
Assignee | ||
Comment 11•12 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/0d060c3e7d65
https://hg.mozilla.org/integration/mozilla-inbound/rev/50e752beca26
I, um, forgot to put "r=cjones" in the commit messages. Oops.
Reporter | ||
Comment 12•12 years ago
|
||
10 demerits. 10 more and we bust you down to L2 ;).
Comment 13•12 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/0d060c3e7d65
https://hg.mozilla.org/mozilla-central/rev/50e752beca26
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla18
Updated•12 years ago
|
Keywords: dev-doc-needed
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•