Closed
Bug 305313
Opened 20 years ago
Closed 20 years ago
Allow additional predicates in assertions for bookmarks datasource
Categories
(Firefox :: Bookmarks & History, defect)
Tracking
()
RESOLVED
FIXED
Firefox1.5
People
(Reporter: toddsf, Assigned: toddsf)
Details
(Keywords: fixed1.8)
Attachments
(1 file, 1 obsolete file)
6.60 KB,
patch
|
vlad
:
review+
asa
:
approval1.8b5+
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20050818 Firefox/1.6a1
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20050818 Firefox/1.6a1
nsIBooksMarks service restricts predicates that can be set on the bookmarks
datasource via nsiBookmarksService::CanAccept(). The attached patch allows two
additional predicates (instanceOf and forwardProxy) to be used. These are
required to create bookmarks and folders via the RDF interface.
Reproducible: Always
Assignee | ||
Comment 1•20 years ago
|
||
Comment 2•20 years ago
|
||
This is more of an RFE than a bug, so I'm confirming it.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Comment 3•20 years ago
|
||
ok, no obvious owner for this, so I'm assigning to todd and will help him get
this patch submitted
Assignee: nobody → todd
Comment 4•20 years ago
|
||
So, we're changing the whole bookmarks component and moving to a sqlite-backed
storage solution, does this matter in the new world?
No; this all goes away in the new world.
Comment 6•20 years ago
|
||
So in the new world, we'll be able to make arbitrary RDF assertions in the
bookmarks datasource? or at least will the bookmarks datasource allow folder
creation through nsIRDFDataSource?
Comment 7•20 years ago
|
||
In the new world there will not be a bookmarks RDF datasource.
(There may be a read-only RDF datasource for compatability, but you most likely
won't be able to create new assertions this way)
Comment 9•20 years ago
|
||
Comment on attachment 193283 [details] [diff] [review]
Bookmarks patch for CanAccept().
wow, that's really pretty disappointing... but a whole other issue that myself
or todd can complain about later :)
In the meantime, since this won't be rewritten for 1.5, I'd like to help todd
get this into the trunk. He's got an interesting extension that allows some
neat RDF-based datasource merging that depends on this patch.
Attachment #193283 -
Flags: review?(vladimir)
Are you ok with the kForwardProxy assertion automatically changing if the URL of
the bookmark is ever changed by the user? Also, are you ok with your custom
forwardProxy and instanceOf bits never getting saved to disk?
Assignee | ||
Comment 11•20 years ago
|
||
(In reply to comment #10)
> Are you ok with the kForwardProxy assertion automatically changing if the URL of
> the bookmark is ever changed by the user?
Yes, that's fine.
> Also, are you ok with your custom
> forwardProxy and instanceOf bits never getting saved to disk?
That would be a problem. Would instanceOf be treated any differently from, say,
nextVal (which presumably is saved to disk)? They're both container-related, so
I assumed they're both written to disk. What did I overlook?
(In reply to comment #11)
> > Also, are you ok with your custom
> > forwardProxy and instanceOf bits never getting saved to disk?
>
> That would be a problem. Would instanceOf be treated any differently from, say,
> nextVal (which presumably is saved to disk)? They're both container-related, so
> I assumed they're both written to disk. What did I overlook?
nextVal is never saved to disk as nextval; Bookmarks are not serialized using
RDF. It's purely an in-memory store that's populated from bookmarks.html and
written to it using a custom pseudo-HTML goop writer.
Assignee | ||
Comment 13•20 years ago
|
||
(In reply to comment #12)
>
> nextVal is never saved to disk as nextval; Bookmarks are not serialized using
> RDF. It's purely an in-memory store that's populated from bookmarks.html and
> written to it using a custom pseudo-HTML goop writer.
Thanks for pointing that out -- I had overlooked how bookmarks get written to disk.
Fortunately, I don't think it affects what I'm trying to do. The goal is to make
the same sequence of assertions that the bookmark service itself generates (on
mInner) when it creates, modifies, or deletes bookmarks, folders, separators,
etc. As it stands now, the only obstacle is CanAccept(), which refuses from
clients a few types of assertions (like instanceOf) that it uses itself
internally. (Actually, bmsvc calls container utils::MakeSeq() which does an
instanceOf assertion. But I digress.)
So long as the datasource's state is the same after my series of manual
assertions as it would be had I used one of bmsvc's functions (e.g.,
CreateFolder()) directly, everything else should work out. I'm not trying to
create any new types of assertions, but merely echo manually the ones that bmsvc
uses itself.
Assignee | ||
Comment 14•20 years ago
|
||
Revised patch for CanAccept(). Now also allows NC:ID assertions.
Attachment #193283 -
Attachment is obsolete: true
Comment on attachment 193283 [details] [diff] [review]
Bookmarks patch for CanAccept().
I'm still a little scared about this, because I'm not sure what the behaviour
will be of things if instanceOf/etc. are set to things that are not expected...
the entire bookmarks system is rather fragile. However, the risk here is only
if an extension actually sets these RDF assertions itself, and shouldn't affect
normal usage, so that's probably safe enough.
r=vladimir
Attachment #193283 -
Flags: review?(vladimir) → review+
Assignee | ||
Updated•20 years ago
|
Flags: blocking1.8b5?
Target Milestone: --- → Firefox1.5
Comment 16•20 years ago
|
||
Todd,
Please land this on the trunk and mark the bug as resolved->fixed. Then ask
for 1.8b5 approval in the patch.
Flags: blocking1.8b5? → blocking1.8b5+
Assignee | ||
Comment 17•20 years ago
|
||
(In reply to comment #16)
> Todd,
>
> Please land this on the trunk and mark the bug as resolved->fixed. Then ask
> for 1.8b5 approval in the patch.
Mike,
Can you please provide some direction on what I need to do to land this patch on
the trunk? {Insert clueless newbie apologies here.}
Thanks,
-Todd
Comment 18•20 years ago
|
||
(In reply to comment #17)
> Can you please provide some direction on what I need to do to land this patch on
> the trunk? {Insert clueless newbie apologies here.}
You need to find someone with CVS access to check it in. You can try asking
#developers on irc.mozilla.org.
Todd, I can get it landed for you on the trunk; wasn't sure if you had cvs
access or not. I'll get it in in a bit today.
Assignee | ||
Comment 20•20 years ago
|
||
(In reply to comment #19)
> Todd, I can get it landed for you on the trunk; wasn't sure if you had cvs
> access or not. I'll get it in in a bit today.
>
Vlad,
No, I don't have cvs access. Thanks for your help.
-Todd
Comment on attachment 195194 [details] [diff] [review]
Revised patch.
r=vladimir on revised patch
checked in on trunk.
Attachment #195194 -
Flags: review+
Assignee | ||
Updated•20 years ago
|
Attachment #195194 -
Flags: approval1.8b5?
Assignee | ||
Updated•20 years ago
|
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Updated•20 years ago
|
Attachment #195194 -
Flags: approval1.8b5? → approval1.8b5+
Comment 22•20 years ago
|
||
Vlad - can you also land on 1.8 branch and mark fixed1.8?
Checked in on branch.
Keywords: fixed1.8
You need to log in
before you can comment on or make changes to this bug.
Description
•