Closed
Bug 436234
Opened 18 years ago
Closed 17 years ago
Patch to extend the core embedding api
Categories
(Core Graveyard :: Embedding: APIs, defect)
Core Graveyard
Embedding: APIs
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: tristan.van.berkom, Unassigned)
Details
Attachments
(2 files, 3 obsolete files)
|
40.64 KB,
patch
|
Details | Diff | Splinter Review | |
|
7.06 KB,
application/octet-stream
|
Details |
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.8.1.14) Gecko/20080404 Firefox/2.0.0.14
Build Identifier:
This patch implements the following new apis:
MozApp object - used for global apis not contextual to a MozView
(such as preferences), this object is a singleton and is instanciated
by the MozView instead of initializing the embedding api (the first to
instantiate the MozApp object initializes the embedding api).
MozApp::SetCharPref(...) // Set a string pref
MozApp::SetBoolPref(...) // Set a boolean pref
// Load inline data instead of a url
nsresult MozView::LoadData(const PRUint8 *data,
PRUint32 len,
const char *base_url,
const char *content_type);
// Notify by way of nsIURIContentListener that a uri is about to
// be loaded, allow returning TRUE to abort the load.
PRBool MozViewListener::OpenURI(const char* newLocation);
// Notify by way of ProgressListener that currently loading document
// is finished loading.
void MozViewListener::DocumentLoaded();
Reproducible: Sometimes
Steps to Reproduce:
1.
2.
3.
| Reporter | ||
Comment 1•18 years ago
|
||
| Reporter | ||
Comment 2•18 years ago
|
||
Oops I should note, the attached patch is against:
http://hg.mozilla.org/users/blassey_mozilla.com/embedding/
Comment 3•18 years ago
|
||
Comment on attachment 322893 [details] [diff] [review]
the patch
>+ * This program is free software; you can redistribute it and/or
>+ * modify it under the terms of the GNU Lesser General Public License as
>+ * published by the Free Software Foundation; version 2.1 of the License.
We're going to need this in the typical mozilla tri-license, is that possible?
We should probably be updating all of the files to add the tri-license, but for now at least no new files should go in without it (and certainly not as lgpl-only).
>+nsresult MozView::LoadData(const PRUint8 *data,
>+ PRUint32 len,
>+ const char *base_url,
>+ const char *content_type)
>+{
Probably baseURI, contentType, data, len would be a better order for these args (though honestly I can't justify that :))
| Reporter | ||
Comment 4•18 years ago
|
||
> We're going to need this in the typical mozilla tri-license, is that possible?
>
> We should probably be updating all of the files to add the tri-license, but for
> now at least no new files should go in without it (and certainly not as
> lgpl-only).
Yes ofcourse, that was just me not paying attention to detail and
copy-pasting code.
> >+nsresult MozView::LoadData(const PRUint8 *data,
> >+ PRUint32 len,
> >+ const char *base_url,
> >+ const char *content_type)
> >+{
>
> Probably baseURI, contentType, data, len would be a better order for these args
> (though honestly I can't justify that :))
Haha thats no problem for me, I am a fan of consitancy and elegance
for no other justifyable reasons :)
Anyway, things are a little difficult for probably the next few days
(I am in bolivia of all places, just got off a 30 hour bus ride and
am probably heading for another one...)
So no worries, I will update my sandbox and refit this patch as
soon as I get somewhere more appropriate.
| Reporter | ||
Comment 5•18 years ago
|
||
ok, I fixed the license and the loaddata prototype...
made MozApp not a singleton to work better with init/term embedding calls
(should be noted that using MozApp you should keep one in scope).
attaching a patch from "hg outgoing -p" - should keep my change history
in tact but is a little rougher on the eye - let me know if you need
a straight diff.
| Reporter | ||
Comment 6•18 years ago
|
||
| Reporter | ||
Comment 7•18 years ago
|
||
Comment on attachment 322893 [details] [diff] [review]
the patch
obsoleted by new patch
Attachment #322893 -
Attachment is obsolete: true
| Reporter | ||
Comment 8•18 years ago
|
||
| Reporter | ||
Comment 9•18 years ago
|
||
Attachment #325001 -
Attachment is obsolete: true
| Reporter | ||
Comment 10•18 years ago
|
||
these new patches include the licence and api fixes (missed them before oops)
Attachment #325006 -
Attachment is obsolete: true
Comment 11•17 years ago
|
||
I've been integrating this, but did need to make a few 'fixes':
* Changed the project files back to VC++ 2005. Guess this is the downside to having these checked in.
* Added the pref include path to the project settings and changed embed.cpp to just #include "nsIPref.h". Needed as the Linux GTK version won't build with #include "pref/nsIPref.h"
* Changed ContentListener.h and .cpp to unix end of lines
I'll ask Dave if he can push this changes to the main repo
Comment 12•17 years ago
|
||
It's in the main repo now.
I would resolve the bug, but don't have the rights to do so.
| Reporter | ||
Comment 13•17 years ago
|
||
thanks great, resolving.
Status: UNCONFIRMED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Updated•7 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•