Re: Finding link extents (was Re: Setting default stylesheets)

2005-10-27 Thread Boris Zbarsky
Ben Hutchings wrote: The idea is simply to let people use a familiar format and tools, not to support arbitrary existing web pages. Ah, ok. That makes life simpler. ;) -Boris ___ mozilla-embedding mailing list mozilla-embedding@mozilla.org http://

Re: Finding link extents (was Re: Setting default stylesheets)

2005-10-27 Thread Ben Hutchings
On 2005-10-27, Boris Zbarsky <[EMAIL PROTECTED]> wrote: > Ben Hutchings wrote: >> The extents of the content of the link. > > You mean the smallest rectangle that contains all the layout objects > corresponding to descendants of the link DOM node in the DOM? I suppose so, yes. > You can get that

Re: Finding link extents (was Re: Setting default stylesheets)

2005-10-27 Thread Boris Zbarsky
Ben Hutchings wrote: The extents of the content of the link. You mean the smallest rectangle that contains all the layout objects corresponding to descendants of the link DOM node in the DOM? You can get that by getting the rectangles for all those nodes and taking the minimal bounding rect

Re: Finding link extents (was Re: Setting default stylesheets)

2005-10-27 Thread Ben Hutchings
Boris Zbarsky <[EMAIL PROTECTED]> wrote: > Ben Hutchings wrote: >> Currently I'm using nsIDOMNSDocument::GetBoxObjectFor to find the >> extents of each link before scanning for changes, but this doesn't >> always provide the correct extents for my purposes. > > What do you mean by "extents of each

Re: Finding link extents (was Re: Setting default stylesheets)

2005-10-27 Thread Boris Zbarsky
Ben Hutchings wrote: Currently I'm using nsIDOMNSDocument::GetBoxObjectFor to find the extents of each link before scanning for changes, but this doesn't always provide the correct extents for my purposes. What do you mean by "extents of each link", exactly? Given positioned content, etc, a s

Finding link extents (was Re: Setting default stylesheets)

2005-10-27 Thread Ben Hutchings
Boris Zbarsky <[EMAIL PROTECTED]> wrote: > Ben Hutchings wrote: >> I don't suppose you can help with my other query about link extents? > > I'm not sure I saw this query. Then I'll post it again: I'm working on an application that uses Mozilla to render pages for inclusion on a DVD. DVDs can onl

Re: Setting default stylesheets

2005-10-27 Thread Boris Zbarsky
Ben Hutchings wrote: I don't suppose you can help with my other query about link extents? I'm not sure I saw this query. -Boris ___ mozilla-embedding mailing list mozilla-embedding@mozilla.org http://mail.mozilla.org/listinfo/mozilla-embedding

Re: Setting default stylesheets

2005-10-27 Thread Ben Hutchings
Boris Zbarsky <[EMAIL PROTECTED]> wrote: > Ben Hutchings wrote: >> Something I don't understand is that I apparently have to do this for >> each page. How do Seamonkey and Firefox set stylesheets to be applied >> to all pages > > There are hardcoded URIs to the sheets in the C++. > >> and can I do

Re: Setting default stylesheets

2005-10-25 Thread Boris Zbarsky
Ben Hutchings wrote: Something I don't understand is that I apparently have to do this for each page. How do Seamonkey and Firefox set stylesheets to be applied to all pages There are hardcoded URIs to the sheets in the C++. and can I do the same? Yes, if you change the C++ involved... In

Re: Setting default stylesheets

2005-10-25 Thread Ben Hutchings
Boris Zbarsky <[EMAIL PROTECTED]> wrote: > Ben Hutchings wrote: >> It's 1.7.8. > > OK. Then there is no really clean way to do it... You can try creating a > CSSLoader (nsICSSLoader.h) and using it to load sheets, then using > SetAgentStyleSheets() on the presshell, I guess. That works for me,

Re: Setting default stylesheets

2005-10-25 Thread Boris Zbarsky
Ben Hutchings wrote: It's 1.7.8. OK. Then there is no really clean way to do it... You can try creating a CSSLoader (nsICSSLoader.h) and using it to load sheets, then using SetAgentStyleSheets() on the presshell, I guess. -Boris ___ mozilla-embed

Re: Setting default stylesheets

2005-10-25 Thread Ben Hutchings
Boris Zbarsky <[EMAIL PROTECTED]> wrote: > Ben Hutchings wrote: >> Debian's mozilla-dev >> package doesn't include the IDL file. Could this be considered a >> packaging bug? > > Hmm... Which version are they packaging? This interface did not exist in the > 1.7 version of Gecko. > > If you're wo

Re: Setting default stylesheets

2005-10-24 Thread Boris Zbarsky
Ben Hutchings wrote: I figured it was something like that, but didn't know what the tool was - I've used COM previously but not XPCOM. Is it a frozen interface? Not yet, no. Debian's mozilla-dev package doesn't include the IDL file. Could this be considered a packaging bug? Hmm... Which v

Re: Setting default stylesheets

2005-10-24 Thread Ben Hutchings
Boris, you've been very helpful, but I'm afraid I have more questions for you. Boris Zbarsky <[EMAIL PROTECTED]> wrote: > Ben Hutchings wrote: >> Oddly I can only find an IDL file for that, not a header file > > The nsIStyleSheetService.h header is generated via xpidl. I figured it was something

Re: Setting default stylesheets

2005-10-24 Thread Boris Zbarsky
Ben Hutchings wrote: Oddly I can only find an IDL file for that, not a header file The nsIStyleSheetService.h header is generated via xpidl. (LXR denies all knowledge of the identifier). Yeah, lxr kinda sucks like that. Should I attempt to generate a header file, and how should I find a/t

Re: Setting default stylesheets

2005-10-24 Thread Ben Hutchings
Boris Zbarsky <[EMAIL PROTECTED]> wrote: > Ben Hutchings wrote: >> It's not clear to me how to override the default stylesheet(s) when >> embedding Mozilla. > > You can use nsIStyleSheetService to load additional style sheets. Oddly I can only find an IDL file for that, not a header file (LXR deni

Re: Setting default stylesheets

2005-10-24 Thread Boris Zbarsky
Ben Hutchings wrote: It's not clear to me how to override the default stylesheet(s) when embedding Mozilla. You can use nsIStyleSheetService to load additional style sheets. If you want to modify the existing ones, and you're shipping your own gecko, you can always just edit ua.css... -Bor

Setting default stylesheets

2005-10-24 Thread Ben Hutchings
It's not clear to me how to override the default stylesheet(s) when embedding Mozilla. It appears that I can use nsIPresShell::SetAgentStyleSheets to change them, but I don't see how to load a CSS stylesheet and obtain the interface pointer I would pass into this function. How should I do that?