Closed
Bug 457810
Opened 16 years ago
Closed 16 years ago
Speculatively load stylesheets from preloading
Categories
(Core :: DOM: HTML Parser, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: mrbkap, Assigned: bjarne)
References
(Depends on 1 open bug)
Details
(Keywords: fixed1.9.1)
Attachments
(3 files)
(deleted),
patch
|
mrbkap
:
review+
bzbarsky
:
superreview+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
Details | Diff | Splinter Review | |
(deleted),
patch
|
beltzner
:
approval1.9.1+
|
Details | Diff | Splinter Review |
This is similar to bug 457809 but for stylesheets.
Comment 1•16 years ago
|
||
Assuming you have the nsIDocument involved in |doc|, the URI of the sheet in |uri| and an nsICSSLoaderObserver implementation (probably one which just does "return NS_OK;" as the body of StyleSheetLoaded) in |obs|:
doc->CSSLoader()->LoadSheet(uri, doc->NodePrincipal(), obs);
will do the trick, since CSSLoader already caches loaded sheets and already coalesces sheet loads.
You probably want to avoid doing this for alternate stylesheets, though, since currently we deprioritize them and forcing them to load earlier could actually slow sites that use them down.
Assignee | ||
Updated•16 years ago
|
Assignee: nobody → bjarne
Assignee | ||
Comment 3•16 years ago
|
||
This is the part of patch from bug #457809 needed to preload stylesheets. See bug #457809 comment #45.
Requesting another round of reviews just in case...
Attachment #370195 -
Flags: superreview?(bzbarsky)
Attachment #370195 -
Flags: review?(mrbkap)
Updated•16 years ago
|
Attachment #370195 -
Attachment description: V1.0 part of patch to preload images → V1.0 part of patch to preload stylesheets
Attachment #370195 -
Flags: superreview?(bzbarsky) → superreview+
Reporter | ||
Updated•16 years ago
|
Attachment #370195 -
Flags: review?(mrbkap) → review+
Assignee | ||
Updated•16 years ago
|
Keywords: checkin-needed
Assignee | ||
Comment 4•16 years ago
|
||
This can be applied without the fix for bug #457809. Not tested beyond mochitests and some random browsing since it's a trivial code-shuffle.
Comment 5•16 years ago
|
||
Pushed http://hg.mozilla.org/mozilla-central/rev/bf5cf25cdd3c with the following changes to the patch:
1) No changes to nsIDocument IID
2) Fixed checkin comment.
Unfortunately, I missed the fact that the patch doesn't have the right user set. :(
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 6•16 years ago
|
||
Must have shuffled code a little too fast this morning... :\ thanks for fixing up. :)
(Apparently hg qfold does not preserve user-info. Must remember to check this next time!)
Updated•16 years ago
|
Attachment #370827 -
Flags: approval1.9.1?
Comment 8•16 years ago
|
||
We should probably fix bug 485012 before landing this on branch.
Assignee | ||
Comment 9•16 years ago
|
||
Identical to V2.0 but with issues from comment #5 fixed.
Attachment #372430 -
Flags: approval1.9.1?
Updated•16 years ago
|
Attachment #370827 -
Flags: approval1.9.1?
Comment 10•16 years ago
|
||
Comment on attachment 372430 [details] [diff] [review]
V2.0 for 1.9.1 branch
a191=beltzner
Attachment #372430 -
Flags: approval1.9.1? → approval1.9.1+
Comment 11•16 years ago
|
||
Keywords: fixed1.9.1
Comment 12•16 years ago
|
||
And pushed http://hg.mozilla.org/releases/mozilla-1.9.1/rev/e36f8c547a96 to fix the resulting test bustage due to the test fix from bug 457809 never making it to branch....
Depends on: 493968
You need to log in
before you can comment on or make changes to this bug.
Description
•