Compare commits

..

1092 Commits

Author SHA1 Message Date
igor%mir2.org
96154ba631 cosmetics: end-of-line whitespace removal again
git-svn-id: svn://10.0.0.236/branches/less_static@115249 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-22 23:28:28 +00:00
(no author)
771cbc6bfd This commit was manufactured by cvs2svn to create branch 'less_static'.
git-svn-id: svn://10.0.0.236/branches/less_static@113702 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-05 13:47:17 +00:00
nboyd%atg.com
7c8814ac5e Have ClassNameHelper object be allocated lazily
git-svn-id: svn://10.0.0.236/trunk@113701 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-05 13:47:16 +00:00
nboyd%atg.com
6546deedfa Don't hold a static reference to a ClassLoader that will prevent JavaAdapter classes
from being unloaded.


git-svn-id: svn://10.0.0.236/trunk@113700 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-05 13:37:50 +00:00
locka%iol.ie
8e370dc046 Remove GetContentShellById from nsIWebShellWindow & impl as it's already defined in nsIXULWindow. b=122861 r=timeless@mac.com sr=jag@netscape.com
git-svn-id: svn://10.0.0.236/trunk@113699 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-05 12:41:47 +00:00
jst%netscape.com
d79bb6b848 Checking in Pete Zha's <pete.zha@sun.com> fix for bug 121726. Don't remove and re-insert form controls into form.elements when the name or id changes. This caused form.elements to be incorrectly ordered and is pointless to start with. r=jkeiser@iname.com, sr=jst@netscape.com
git-svn-id: svn://10.0.0.236/trunk@113698 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-05 10:36:28 +00:00
seawood%netscape.com
4fdf7a334f Add Makefile.ins for mapi
Bug #120135


git-svn-id: svn://10.0.0.236/trunk@113697 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-05 09:23:43 +00:00
racham%netscape.com
7d58d05fe4 Fixing bugscape bug 9846. Adding default version number for html domain pre-population. r=ducarroz, sr=sspitzer
git-svn-id: svn://10.0.0.236/trunk@113696 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-05 09:06:26 +00:00
racham%netscape.com
8718c76ea7 Fixing bugscape bug 9846. This fix allows ISPs to prepopulate list of html domains that can be added to html domain list of send format check. r=ducarroz, sr=sspitzer
git-svn-id: svn://10.0.0.236/trunk@113695 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-05 09:04:04 +00:00
racham%netscape.com
a8c4ef6d78 Fixing bug 122309. Using new ParseString routine to parse ports list. r=dougt, sr=jag
git-svn-id: svn://10.0.0.236/trunk@113694 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-05 08:39:30 +00:00
racham%netscape.com
f17221e5ab Fixing bug 122309. Adding a new routine that can take a string and parse it on a delimiter to add elements to the nsCStringArray. r=dougt, sr=jag
git-svn-id: svn://10.0.0.236/trunk@113693 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-05 08:35:28 +00:00
bbaetz%student.usyd.edu.au
cfd7df1801 Point to ftp.netscape.com/Welcome for ftp tests since ftp.mozilla.org
appears to be loaded
rs=jag


git-svn-id: svn://10.0.0.236/trunk@113692 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-05 07:16:24 +00:00
jst%netscape.com
4373fa4ab0 More comments...
git-svn-id: svn://10.0.0.236/trunk@113691 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-05 07:13:50 +00:00
jband%netscape.com
bc42c1e965 Add better support to xpconnect for converting between variants and arrays. bug 120881. r=dbradley sr=vidur. Trivial fix for case where we were hitting an assert at xpcom shutdown. bug 121536. r=dbradley rs=vidur.
git-svn-id: svn://10.0.0.236/trunk@113690 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-05 06:45:08 +00:00
jst%netscape.com
a9d86459c5 Fixing bug 123078. Making document.<n> === document['<n>'] for backwards compatibility reasons. r=peterv@netscape.com, sr=rpotts@netscape.com
git-svn-id: svn://10.0.0.236/trunk@113689 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-05 06:44:04 +00:00
peterlubczynski%netscape.com
5190a48a4e Propigate wParam for mouse events directly to plugin bug 123005 r=kmcclusk sr=beard
git-svn-id: svn://10.0.0.236/trunk@113688 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-05 06:13:44 +00:00
leaf%mozilla.org
711edb1165 Automated update
git-svn-id: svn://10.0.0.236/trunk@113687 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-05 06:12:07 +00:00
jst%netscape.com
deafb819b5 Whitespace cleanup...
git-svn-id: svn://10.0.0.236/trunk@113686 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-05 06:04:56 +00:00
seawood%netscape.com
b2b991e8b1 Since we build a program called nsinstall in the tree, make sure that uwe use the full path to the nsinstall.exe found in wintools.zip.
Bug #123294 r=bryner


git-svn-id: svn://10.0.0.236/trunk@113685 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-05 06:01:58 +00:00
jst%netscape.com
a49bb992db Fixing bug 116834. Making element.innerHTML='...<script>...</script>...' not execute the script, this makes mozilla compatible with IE wrt innerHTML and execution of scripts. r=bzbarsky@mit.edu, sr=rpotts@netscape.com
git-svn-id: svn://10.0.0.236/trunk@113684 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-05 05:53:56 +00:00
jst%netscape.com
4e17fc730c Fixing bug 115352. Making FlushPendingNotifications() properly flush the parent document as well if there is one. This causes layout data in iframes to not always be up to date since iframe sizes are dependent on the parent being reflown. r=peterv@netscape.com, sr=rpotts@netscape.com
git-svn-id: svn://10.0.0.236/trunk@113683 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-05 05:47:22 +00:00
jst%netscape.com
d7991ba5d1 Fixing compiler warnings and defaulting line numbers to 0 in stead of (PRUint32)-1. sr=rpotts@netscape.com
git-svn-id: svn://10.0.0.236/trunk@113682 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-05 05:43:08 +00:00
mscott%netscape.com
b8826d2beb Bug #123457 --> fix some thread safety assertion warnings by making sure
the notifications callback for the socket gets released on the UI thread.
r/sr=bienvenu


git-svn-id: svn://10.0.0.236/trunk@113681 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-05 05:05:37 +00:00
rpotts%netscape.com
bc4e6e1a96 bug #117948 (r=bzarsky@mit.edu, sr=vidur@netscape.com) Ignore the HTTP Window-Target header inside of <meta> tags
git-svn-id: svn://10.0.0.236/trunk@113680 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-05 04:46:54 +00:00
blakeross%telocity.com
7c257b4a2f Backing this out because it made shift+space not do a space, which I think is worse in the end. (122017). r=ben sr=hewitt
git-svn-id: svn://10.0.0.236/trunk@113679 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-05 04:43:47 +00:00
rpotts%netscape.com
acd07aa585 bug #122150 (r=jst@netscape.com, sr=darin@netscape.com) File transport was using the wrong nsIProgressEventSink when firing notifications...
git-svn-id: svn://10.0.0.236/trunk@113678 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-05 04:42:25 +00:00
jst%netscape.com
cdb28fa8fb Checking in Fabian's <hidday@geocities.com> fix for bug 69196. Making image.border, .hspace, and .vspace default to 1 an not -1. r=sicking@bigfoot.com, sr=jst@netscape.com
git-svn-id: svn://10.0.0.236/trunk@113677 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-05 04:37:10 +00:00
jst%netscape.com
e5c226065e Checking in Fabian's <hidday@geocities.com> fix for bug 76895. Making cloneNode() work on document fragments. r=bzbarsky@mit.edu, sr=jst@netscape.com
git-svn-id: svn://10.0.0.236/trunk@113676 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-05 04:22:17 +00:00
bzbarsky%mit.edu
f1b8d786a1 mfcEmbed has no Equals() on CString. Oops. Fixing mfcembed bustage.
git-svn-id: svn://10.0.0.236/trunk@113675 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-05 03:54:32 +00:00
ian.mcgreer%sun.com
51a288738c cleanup suggested by review by Nelson
git-svn-id: svn://10.0.0.236/trunk@113674 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-05 03:53:50 +00:00
naving%netscape.com
06e1e4d86e 74781 r=bienvenu sr=sspitzer. Select the newly downloaded pop3 message that was truncated by limit size.
git-svn-id: svn://10.0.0.236/trunk@113673 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-05 03:46:15 +00:00
dougt%netscape.com
1f176a9aaf Fixing calling conventions of NS_IMPL_THREADSAFE_RELEASE. Submitted by Tobias Oberstein. r=me, sr=jband@netscape.com.
git-svn-id: svn://10.0.0.236/trunk@113672 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-05 03:34:44 +00:00
mcafee%netscape.com
1c233440d2 Adding --file support. verbal r= alecf
git-svn-id: svn://10.0.0.236/trunk@113671 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-05 03:25:24 +00:00
bzbarsky%mit.edu
c1d76095eb Fix bustage. "i" is already declared.
git-svn-id: svn://10.0.0.236/trunk@113670 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-05 03:11:01 +00:00
darin%netscape.com
3ddd33baaa final patch for bug 109179 "replace nsStdEscape with NS_EscapeURL"
r=dougt, sr=alecf


git-svn-id: svn://10.0.0.236/trunk@113669 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-05 03:08:15 +00:00
chak%netscape.com
d26dd8bed1 Fix for #123054 - Rearrange profile dlgs in MfcEmbed
r=adamlock, sr=alecf


git-svn-id: svn://10.0.0.236/trunk@113668 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-05 02:57:54 +00:00
bryner%netscape.com
db6f813361 Fixing bug 122034 (tabbing not working from xbl selects). Not turned on yet.
git-svn-id: svn://10.0.0.236/trunk@113667 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-05 02:14:50 +00:00
vidur%netscape.com
418679d380 Fix for bug 122305. XMLHttpRequest now has a way to override the mime type of the incoming stream. r=heikki, sr=jst
git-svn-id: svn://10.0.0.236/trunk@113666 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-05 02:10:52 +00:00
bzbarsky%mit.edu
2fd80b82c9 Convert Compare() to Equals() where possible now that we can do
case-insensitive Equals().  Bug 115289, r=alecf, sr=jag


git-svn-id: svn://10.0.0.236/trunk@113665 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-05 02:03:07 +00:00
sspitzer%netscape.com
2a88b29b3d fix for #122481, crash when creating (and then unsubscribing) from bogus
newsgroups, like news://news.mozilla.org/foo/bar.

also some code cleanup.

r/sr=bienvenu.  thanks to hwaara for the initial patch.


git-svn-id: svn://10.0.0.236/trunk@113664 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-05 02:00:25 +00:00
jst%netscape.com
5aa4af9df0 Fixing bug 123438. Making element.localName not be uppercased for XHTML elements. r=heikki@netscape.com, sr=vidur@netscape.com
git-svn-id: svn://10.0.0.236/trunk@113663 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-05 01:51:06 +00:00
relyea%netscape.com
c7a84be240 Fix error path, only free arena is one was allocated.
git-svn-id: svn://10.0.0.236/trunk@113662 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-05 01:47:01 +00:00
pschwartau%netscape.com
c9de0b7992 Initial add. Regression test for bug 123437.
git-svn-id: svn://10.0.0.236/trunk@113661 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-05 01:44:52 +00:00
varga%utcru.sk
62fd668a27 Fix for 122794. Outliner columns ordered incorrectly.
- use selection sort instead of quick sort, since quick sort in unstable
r=bryner, sr=hewitt


git-svn-id: svn://10.0.0.236/trunk@113660 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-05 01:44:51 +00:00
cathleen%netscape.com
ec77313291 eliminates 107 nsCRT::memset calls to use memset instead. removed nsCRT::memset() function. bug 118135 r=dp sr=brendan
git-svn-id: svn://10.0.0.236/trunk@113659 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-05 01:41:13 +00:00
bbaetz%student.usyd.edu.au
010788b22a Bug 110241 pt 2 - fix regression from previous checkin, and remove a
couple of write-only vars
r=dougt, sr=darin


git-svn-id: svn://10.0.0.236/trunk@113658 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-05 01:38:44 +00:00
dougt%netscape.com
37a71e53f5 Adding comments to the nsIGenericFactory file. bug 123442. r=gagan@netscape.com, sr=alecf@netscape.com
git-svn-id: svn://10.0.0.236/trunk@113657 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-05 01:38:43 +00:00
mscott%netscape.com
26d531c5cb Bug #122236 --> set the performing biff flag when we are about to perform biff
and register the root folder as a listener on the url so it can clear the flag
r=naving
sr=bienvenu


git-svn-id: svn://10.0.0.236/trunk@113656 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-05 01:36:42 +00:00
mscott%netscape.com
fbe18f8362 Bug #122236 --> set the performing biff flag when we are about to perform biff
and register the root folder as a listener on the url so it can clear the flag

Bug #123440 --> don't give a message window when performing biff, this keeps
biff from bringing up any form of UI.
r=naving
sr=bienvenu


git-svn-id: svn://10.0.0.236/trunk@113655 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-05 01:36:15 +00:00
heikki%netscape.com
c5b81825af Bug 119335, string assertion in XMLContentSerializer, use Substring for non-null terminated string. r=jst, sr=jag.
git-svn-id: svn://10.0.0.236/trunk@113654 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-05 01:35:34 +00:00
mscott%netscape.com
f0d23cc9d7 Bug #122236 --> only show the biff icon in the system tray if
we are performing biff as opposed to the user clicking get new mail
add a flag to the server to store biff state
r=naving
sr=bienvenu


git-svn-id: svn://10.0.0.236/trunk@113653 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-05 01:35:32 +00:00
mscott%netscape.com
48341120ab Bug #122236 --> only show the biff icon in the system tray if
we are performing biff as opposed to the user clicking get new mail
add a flag to the server to store biff state
r=naving
sr=bienvenu

Bug #122500 --> create a message window for the biff icon in the
system tray. this removes our dependency on the hidden window. On double
click, open up the last used 3-pane window or create a new one.
r=bhuvan
sr=bienvenu


git-svn-id: svn://10.0.0.236/trunk@113652 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-05 01:34:53 +00:00
waldemar%netscape.com
c89eb0f8c2 Fixed stub compile error
git-svn-id: svn://10.0.0.236/trunk@113651 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-05 01:13:30 +00:00
waldemar%netscape.com
d27901c0a3 Expanded map to allow type-narrowing conditions in its condition expression
git-svn-id: svn://10.0.0.236/trunk@113650 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-05 01:13:03 +00:00
cltbld%netscape.com
b1fd072d06 Better logfile test names
git-svn-id: svn://10.0.0.236/trunk@113649 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-05 00:48:59 +00:00
bbaetz%student.usyd.edu.au
8ec543447a Bug 119715 - strictvaluechecks should always be enabled
r=justdave, gerv


git-svn-id: svn://10.0.0.236/trunk@113648 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-05 00:20:09 +00:00
bbaetz%student.usyd.edu.au
2c81615c9a Bug 122418 pt2 - obsoleting a patch from the create attachment screen gave
a taint error.


git-svn-id: svn://10.0.0.236/trunk@113647 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-05 00:11:48 +00:00
alexsavulov%netscape.com
07f131e852 DOCUMENTATION CHANGE - not affecting the build
git-svn-id: svn://10.0.0.236/trunk@113646 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-04 23:28:29 +00:00
seawood%netscape.com
e1a1ac02a7 Move impl of nsIndexedToHTML::Create from .h to .cpp to fix BeOS bustage.
Bug 74803 sr=sfraser


git-svn-id: svn://10.0.0.236/trunk@113643 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-04 23:23:21 +00:00
nelsonb%netscape.com
a9cd5beaa8 Plug one of the leaks reported in bugzilla bug 123081
git-svn-id: svn://10.0.0.236/trunk@113642 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-04 23:15:11 +00:00
ian.mcgreer%sun.com
3e0d2561a3 plug leak found doing client auth, move freeing of cert's slot down a level in case the cert was not made external
git-svn-id: svn://10.0.0.236/trunk@113640 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-04 23:04:11 +00:00
mjudge%netscape.com
e6b116a625 command handler needed to be added to exports. blocker 123399
git-svn-id: svn://10.0.0.236/trunk@113639 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-04 22:58:51 +00:00
mjudge%netscape.com
99a1881c37 change to export command handler. blocker fix for 123399
git-svn-id: svn://10.0.0.236/trunk@113637 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-04 22:53:35 +00:00
gerv%gerv.net
2a14c2e071 Remove JS strict warning.
git-svn-id: svn://10.0.0.236/trunk@113636 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-04 22:47:26 +00:00
ian.mcgreer%sun.com
0240bece7f fix leak reported in bug 123081 by avoiding allocation for time variable
git-svn-id: svn://10.0.0.236/trunk@113633 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-04 22:34:22 +00:00
bbaetz%student.usyd.edu.au
d2945c40c2 bug 122418 - setting attachment status fails taint checks. Just needed to
detaint after checking.
r=gerv,kiko


git-svn-id: svn://10.0.0.236/trunk@113632 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-04 22:16:18 +00:00
ian.mcgreer%sun.com
7ec531594f last part of bug 121628, permanent slots should respond immediately to IsPresent() call
git-svn-id: svn://10.0.0.236/trunk@113631 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-04 21:57:07 +00:00
gerv%gerv.net
4711cd34e5 show_bug.cgi templatisation.
git-svn-id: svn://10.0.0.236/trunk@113629 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-04 21:17:17 +00:00
waldemar%netscape.com
3ddc09d4af Updated license
git-svn-id: svn://10.0.0.236/trunk@113628 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-04 21:13:45 +00:00
waldemar%netscape.com
f5b53beb84 Major reorganization of object structure, environments, frames, and bindings. Added compile/run flag to all expression evaluation functions.
git-svn-id: svn://10.0.0.236/trunk@113627 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-04 21:12:28 +00:00
waldemar%netscape.com
99127cdceb Added another test case
git-svn-id: svn://10.0.0.236/trunk@113626 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-04 21:11:02 +00:00
waldemar%netscape.com
5b51f9b435 Added delete-adjacent-duplicates
git-svn-id: svn://10.0.0.236/trunk@113625 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-04 21:09:51 +00:00
waldemar%netscape.com
57833896b4 Added m-dash
git-svn-id: svn://10.0.0.236/trunk@113624 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-04 21:09:29 +00:00
waldemar%netscape.com
4047f11fef Removed license
git-svn-id: svn://10.0.0.236/trunk@113623 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-04 21:09:05 +00:00
waldemar%netscape.com
b913abd7d3 Incomplete attempt to define bit-set and restricted-set semantic types and to define the set-field record/tuple constructor
git-svn-id: svn://10.0.0.236/trunk@113622 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-04 21:08:18 +00:00
shrutiv%netscape.com
75d88cb579 Adding Macintosh OSX installer screen to the wizard (r=smeredith)
git-svn-id: svn://10.0.0.236/trunk@113620 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-04 20:05:30 +00:00
shrutiv%netscape.com
4800e6ce39 Fix for bugzilla 118240: Last screen of wizard must be changed for Mac
customization (r=smeredith)


git-svn-id: svn://10.0.0.236/trunk@113619 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-04 20:01:39 +00:00
shrutiv%netscape.com
c62c135f1d Fix for bug 118240: Last screen of wizard must be changed for Mac
customization (r=smeredith)


git-svn-id: svn://10.0.0.236/trunk@113618 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-04 19:49:15 +00:00
shrutiv%netscape.com
8192f40c86 Fix for bug 118240: Last screen of wizard must be changed for Mac
customization (r=smeredith)


git-svn-id: svn://10.0.0.236/trunk@113617 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-04 19:42:37 +00:00
nboyd%atg.com
ccd738333b Clean up formatting.
git-svn-id: svn://10.0.0.236/trunk@113613 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-04 18:58:03 +00:00
relyea%netscape.com
37eb96be75 Function to read PQG params from the key.
git-svn-id: svn://10.0.0.236/trunk@113612 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-04 18:00:14 +00:00
zach%zachlipton.com
137895e51f Fix for bug 87398: checksetup.pl should warn if not run as root. Patch
adds a warning if the user has webservergroup set but does not run
checksetup.pl as root.

r1=kiko, r2=justdave


git-svn-id: svn://10.0.0.236/trunk@113610 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-04 16:38:33 +00:00
bzbarsky%mit.edu
c2dafa9a2d Fix appearance of filter extensions twice in filepicker. Bug 115670,
r=bryner, sr=jag.


git-svn-id: svn://10.0.0.236/trunk@113609 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-04 16:12:18 +00:00
wtc%netscape.com
6060dc6b69 Temporary hack to make 'depend' do a 'clean' in NSS.
git-svn-id: svn://10.0.0.236/trunk@113608 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-04 15:57:38 +00:00
sicking%bigfoot.com
ef42436f16 Final part of bug 59912. Call SetDocument before adding any attributes on elements in the result of XSLT-transformations. This fixes (at least) onclick-like attributes.
r=peterv sr=jst


git-svn-id: svn://10.0.0.236/trunk@113606 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-04 15:31:41 +00:00
nboyd%atg.com
8ba4f03273 Change version to 1.5R4pre.
git-svn-id: svn://10.0.0.236/trunk@113605 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-04 15:26:31 +00:00
mkaply%us.ibm.com
65b729bf7d #108280
r=mkaply, sr=blizzard
Make OS/2 use display facenames on DBCS fonts.


git-svn-id: svn://10.0.0.236/trunk@113603 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-04 14:44:36 +00:00
timeless%mac.com
030e9d615b Bug 122809ÿMismatched allocator/deallocator ToNewCString & delete[]
r=bzbarsky@mit.edu sr=jag


git-svn-id: svn://10.0.0.236/trunk@113602 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-04 14:37:01 +00:00
rods%netscape.com
daf06d9375 Remove checking for numeric input from header/footer input
part of fix to 120062 r=dcone sr=hyatt


git-svn-id: svn://10.0.0.236/trunk@113600 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-04 13:38:13 +00:00
ccarlen%netscape.com
caadeea75a Bug 121235 - Freeze nsIDirectoryServiceProvider2. r=dougt@netscape.com/sr=jband@netscape.com
git-svn-id: svn://10.0.0.236/trunk@113599 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-04 13:10:54 +00:00
bbaetz%student.usyd.edu.au
e20fe58870 Bug 95732 - remove logincookies.cryptpassword, and invalidate cookies from
the db when required instead.
(Also fixes bug 58242 as a side effect)

r=myk, kiko


git-svn-id: svn://10.0.0.236/trunk@113598 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-04 12:23:05 +00:00
hyatt%netscape.com
cdc7d6d6d8 Fix Macho and Cocoa horkage because of a missing ifdef.
git-svn-id: svn://10.0.0.236/trunk@113597 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-04 10:56:42 +00:00
seawood%netscape.com
1fe10f037c Remove destination file if it exists before copying.
Bug #120586 r=bryner


git-svn-id: svn://10.0.0.236/trunk@113596 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-04 09:15:52 +00:00
leaf%mozilla.org
dabc9839b7 Automated update
git-svn-id: svn://10.0.0.236/trunk@113595 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-04 09:12:11 +00:00
bryner%netscape.com
453c723957 Don't try to build native theme support on gtk2 (API changes). r=cls.
git-svn-id: svn://10.0.0.236/trunk@113594 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-04 09:03:53 +00:00
seawood%netscape.com
db2075a2e3 Removing fallback hooks for deprecated configure options.
git-svn-id: svn://10.0.0.236/trunk@113593 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-04 08:59:16 +00:00
seawood%netscape.com
6a70d87d0a Increase the lgot buffer for static Irix builds.
Bug #122917 r=nickb@adacel.com.au


git-svn-id: svn://10.0.0.236/trunk@113592 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-04 06:25:43 +00:00
blakeross%telocity.com
d2d17b6520 79047 - shift+space should scroll upwards. r=ben sr=hewitt
git-svn-id: svn://10.0.0.236/trunk@113591 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-04 06:15:14 +00:00
blakeross%telocity.com
8ebc9524ff 122017 - shouldn't always unset shift when dispatching keypress event. r=ben sr=hewitt
git-svn-id: svn://10.0.0.236/trunk@113590 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-04 06:14:10 +00:00
seawood%netscape.com
6e46c8276f Use LDFLAGS when linking SIMPLE_PROGRAMS on win32
Bug #123065


git-svn-id: svn://10.0.0.236/trunk@113589 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-04 05:53:51 +00:00
seawood%netscape.com
ef829e43db Set MAPFILE in config.mk instead of rules.mk
git-svn-id: svn://10.0.0.236/trunk@113588 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-04 05:49:14 +00:00
blakeross%telocity.com
352f4a09fb 67139 - title of active window should be checked in tasks menu. r=ben sr=hewitt
git-svn-id: svn://10.0.0.236/trunk@113587 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-04 05:15:47 +00:00
cotter%netscape.com
a89a12f6e4 privacy & security help content update for Form Manager help, per 122806, r=oeschger
git-svn-id: svn://10.0.0.236/trunk@113586 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-04 03:52:33 +00:00
blakeross%telocity.com
7d279b7a8c 123285 - columns aren't correctly persisted in history and other outliners. r=ben sr=hewitt
git-svn-id: svn://10.0.0.236/trunk@113585 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-04 03:44:51 +00:00
justdave%syndicomm.com
40ab41ff77 Fix for bug 14461: QA contact is no longer required. You can still leave it blank in editing and creating components if you
want, even if it's enabled now.  This is consistant with the behavior of this field everywhere else in Bugzilla now.
Eventually this will be a per-product setting whether to enforce having one or not.
Patch by Matthew Tuck <matty@chariot.net.au>
r= justdave x 2


git-svn-id: svn://10.0.0.236/trunk@113584 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-04 00:41:40 +00:00
sicking%bigfoot.com
742947de1e Fix IRIX bustage
git-svn-id: svn://10.0.0.236/trunk@113583 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-03 21:36:03 +00:00
rbs%maths.uq.edu.au
fe7bb4aef5 Using the recently added APIs to respond to dynamic changes: a _much_ simpler (re)fix of bug 114909 - dynamically changing displaystyle attribute in <mstyle> tag doesn't change display
git-svn-id: svn://10.0.0.236/trunk@113582 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-03 21:15:29 +00:00
rbs%maths.uq.edu.au
bc9ff10418 Add ReLayout() - a driver that hides the details needed to re-sync a frame subtree in case of dynamic changes: rebuild of automatic data, re-resolve script styles, fire a reflow
git-svn-id: svn://10.0.0.236/trunk@113581 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-03 21:06:51 +00:00
rbs%maths.uq.edu.au
de6635197e slight simplification - the removal will recurse down to the wrapped child
git-svn-id: svn://10.0.0.236/trunk@113580 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-03 20:11:37 +00:00
jband%netscape.com
9ce852e366 unbust XPCONNECT_STANDALONE build. No change to default build. bug 121438. rs=jband.
git-svn-id: svn://10.0.0.236/trunk@113579 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-03 20:05:22 +00:00
sicking%bigfoot.com
6838b8f4b5 Make relational comparisons between NodeSets and booleans follow the spec.
b=116540 r=Pike sr=jst


git-svn-id: svn://10.0.0.236/trunk@113578 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-03 19:50:27 +00:00
beard%netscape.com
1a035e7a78 Fixing bustage caused by newly added mozilla/modules/libpr0n/decoders/ijpeg directory. Added explicit search path of ::decoders:jpeg: before ::.
git-svn-id: svn://10.0.0.236/trunk@113577 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-03 19:13:51 +00:00
blakeross%telocity.com
39cb58daff fix an oops in last nights checkin. sr=hewitt
git-svn-id: svn://10.0.0.236/trunk@113576 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-03 18:27:09 +00:00
myk%mozilla.org
f89a91a9e4 Fix for bug 121747: Stops every script before it does anything else if Bugzilla is currently shut down. Also adds global template
instantiation code to globals.pl.
Patch by Myk Melez <myk@mozilla.org>.
r=gerv,kiko


git-svn-id: svn://10.0.0.236/trunk@113573 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-03 09:28:48 +00:00
blakeross%telocity.com
9ee927920a 121180 - clicking or dbl clicking on wrong things in bookmarks/history incorrectly opens url. a left and then right click in quick succession in bookmarks is counted as a double click. r=hewitt sr=ben
git-svn-id: svn://10.0.0.236/trunk@113572 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-03 08:40:31 +00:00
bryner%netscape.com
632ac8da85 Fixing some warnings in xpcom. Bug 118377, r=hwaara, sr=shaver.
git-svn-id: svn://10.0.0.236/trunk@113571 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-03 07:05:10 +00:00
seawood%netscape.com
7b423bbbcc Add INSTALL file which outlines the basic steps to setting up a tinderbox
Clean up README


git-svn-id: svn://10.0.0.236/trunk@113568 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-03 06:31:44 +00:00
darin%netscape.com
3769c6f9ed backing out some changes that accidentally slipped in!
git-svn-id: svn://10.0.0.236/trunk@113567 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-03 06:24:55 +00:00
blizzard%redhat.com
a3c36cf3d5 Add gtk2 to the list of dirs that are built. No bug on this. r=cls
git-svn-id: svn://10.0.0.236/trunk@113565 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-03 06:09:22 +00:00
blizzard%redhat.com
47f131cf51 Add warning about this not being implemented. Not part of the build.
git-svn-id: svn://10.0.0.236/trunk@113564 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-03 06:08:21 +00:00
blizzard%redhat.com
28419b1a35 Gtk2 files for viewer. Not part of the build.
git-svn-id: svn://10.0.0.236/trunk@113563 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-03 06:06:06 +00:00
leaf%mozilla.org
8bc5eccf5e Automated update
git-svn-id: svn://10.0.0.236/trunk@113562 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-03 04:42:15 +00:00
samuel%sieb.net
f0983bfcd8 Bug 112920 - add css rule for superfluous notifies
r=rginda
chatzilla only


git-svn-id: svn://10.0.0.236/trunk@113561 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-03 04:36:59 +00:00
samuel%sieb.net
4b95e62e27 Bug 112920 - enhancement to notify code
r=rginda
chatzilla only


git-svn-id: svn://10.0.0.236/trunk@113560 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-03 04:35:26 +00:00
wtc%netscape.com
a464983a2e Bugzilla bug 117479: add the PR_ABS macro. Thanks to Roland Mainz
<Roland.Mainz@informatik.med.uni-giessen.de> for the patch.


git-svn-id: svn://10.0.0.236/trunk@113559 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-03 04:34:50 +00:00
seawood%netscape.com
f3c761d348 Add check to see if 'cd $MOZ_TOOLS && pwd` failed.
git-svn-id: svn://10.0.0.236/trunk@113558 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-03 04:34:43 +00:00
blizzard%redhat.com
024ca97902 Bug #92033. Land changes to get gfx/ building with gtk2. Lots of ifdef code here. r=cls,bryner sr=alecf
git-svn-id: svn://10.0.0.236/trunk@113557 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-03 03:47:18 +00:00
leaf%mozilla.org
17d9bc1085 Automated update
git-svn-id: svn://10.0.0.236/trunk@113556 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-03 03:42:16 +00:00
relyea%netscape.com
36e3068bc1 Bug 117978: accessor functions to all JCE keystore API to be implemented.
git-svn-id: svn://10.0.0.236/trunk@113555 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-03 03:37:26 +00:00
bzbarsky%mit.edu
25554d8060 Send "referer" header when loading links via link toolbar. Bug 119478,
r=choess@stwing.upenn.edu, sr=blake


git-svn-id: svn://10.0.0.236/trunk@113554 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-03 03:28:59 +00:00
seawood%netscape.com
f01d8582cf Add support for MOZ_PROFILE, MOZ_COVERAGE, & MOZ_MAPINFO for win32 gmake builds.
Set these variables in your MOZCONFIG file before running configure or on the make cmd line when building in individual dirs.


git-svn-id: svn://10.0.0.236/trunk@113553 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-03 03:28:07 +00:00
leaf%mozilla.org
ecb2db1c4c Automated update
git-svn-id: svn://10.0.0.236/trunk@113552 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-03 03:12:08 +00:00
seawood%netscape.com
6746e087bc Add warning message if cl test prog fails for cygwin targets
git-svn-id: svn://10.0.0.236/trunk@113551 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-03 03:06:07 +00:00
seawood%netscape.com
c94f385d8c Do not install the mozilla script on win32
git-svn-id: svn://10.0.0.236/trunk@113550 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-03 02:45:54 +00:00
bzbarsky%mit.edu
32878c94aa Fix strict JS warning. Patch by Alex Vincent <jscript@pacbell.net>,
r=brade, sr=kin


git-svn-id: svn://10.0.0.236/trunk@113549 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-03 02:37:02 +00:00
pavlov%netscape.com
27a18104fd adding new stub files for work with using intel's jpeg library
git-svn-id: svn://10.0.0.236/trunk@113548 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-03 01:54:08 +00:00
blakeross%telocity.com
6f1b90acc1 92749 - "view background image" context menu item doesn't always appear when it should. r=bz sr=hewitt
git-svn-id: svn://10.0.0.236/trunk@113547 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-03 00:58:38 +00:00
jband%netscape.com
5518ba6525 Add support for chaining 'additional managers' to the global interface info manager. This includes weakref support. This system allows us to dynamically aggregate interface info managers to support systems like SOAP. Clients of the interface info manager can traverse that list of additonal managers (if any are present) or ignore it. This fixes bug 103805. r=dbradley sr=vidur.
git-svn-id: svn://10.0.0.236/trunk@113546 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-03 00:56:16 +00:00
seawood%netscape.com
0118504ff3 Add $(BIN_SUFFIX) to mkdepend defines
git-svn-id: svn://10.0.0.236/trunk@113545 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-03 00:41:00 +00:00
blakeross%telocity.com
6a2f5ed18a 39070 - can't dnd images or <areas>. r=ben sr=hewitt
git-svn-id: svn://10.0.0.236/trunk@113544 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-03 00:06:12 +00:00
bryner%netscape.com
1a11ac5be2 Rest of the patch for bug 122542. I accidentely checked in the incomplete patch. r=varga, sr=hyatt.
git-svn-id: svn://10.0.0.236/trunk@113543 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-02 23:22:10 +00:00
jband%netscape.com
f5ff27091a Add C++ string support includes needed when AString params are used - NOT PART OF DEFAULT BUILD
git-svn-id: svn://10.0.0.236/trunk@113540 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-02 22:33:16 +00:00
jband%netscape.com
37f418f3dd Initial checkin of WSDL -> xpcom interface info translator quick test - NOT PART OF THE BUILD
git-svn-id: svn://10.0.0.236/trunk@113539 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-02 22:31:12 +00:00
jband%netscape.com
a9712b4166 Commiting accumulated interface info extensions changes. NOT PART OF THE BUILD
git-svn-id: svn://10.0.0.236/trunk@113538 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-02 22:18:56 +00:00
jband%netscape.com
367216bc3e Initial checkin of WSDL -> xpcom interface info translator. - NOT PART OF THE BUILD
git-svn-id: svn://10.0.0.236/trunk@113537 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-02 21:37:23 +00:00
alecf%netscape.com
43bee42ecd more dependency updates
git-svn-id: svn://10.0.0.236/trunk@113536 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-02 21:29:01 +00:00
alecf%netscape.com
eeea2a1861 fix for bug 108988 r=caillon@returnzero.com, sr=blake
also fix a minor warning while I'm there


git-svn-id: svn://10.0.0.236/trunk@113535 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-02 21:13:10 +00:00
mkaply%us.ibm.com
d357e19dc2 OS/2 bustage
git-svn-id: svn://10.0.0.236/trunk@113534 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-02 20:37:39 +00:00
alecf%netscape.com
c666ed8fca dependency update
git-svn-id: svn://10.0.0.236/trunk@113533 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-02 20:09:29 +00:00
ian.mcgreer%sun.com
e16c936a53 Fix cert leaks when building a chain. There are several client auth bugs filed, this may not be for any one in particular, but was found with tstclnt.
git-svn-id: svn://10.0.0.236/trunk@113532 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-02 20:01:22 +00:00
seawood%netscape.com
1cce7268dc s/command_handler/commandhandler/. Fixing win32 gmake bustage
git-svn-id: svn://10.0.0.236/trunk@113531 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-02 20:00:00 +00:00
ian.mcgreer%sun.com
633f5faf30 bug 90518, selfserv dumps cache state before shutdown with -y option
git-svn-id: svn://10.0.0.236/trunk@113530 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-02 19:39:48 +00:00
bienvenu%netscape.com
711f501004 disallow drag drop into read-only imap folders r=naving, sr=mscott 112103
git-svn-id: svn://10.0.0.236/trunk@113528 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-02 17:30:03 +00:00
bienvenu%netscape.com
c2485da7ba fix crash in morkRow::closerow object r=naving, sr=mscott 104659
git-svn-id: svn://10.0.0.236/trunk@113527 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-02 16:57:25 +00:00
bzbarsky%mit.edu
e72122a020 Make the unknown decoder pick up <table> and <div>. Bug 83480, r=rpotts,
sr=darin


git-svn-id: svn://10.0.0.236/trunk@113526 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-02 16:10:04 +00:00
rayw%netscape.com
15b1571fdb Converted tests to use new names for services on my soap server.
SOAP is not part of default build.


git-svn-id: svn://10.0.0.236/trunk@113525 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-02 15:42:27 +00:00
mkaply%us.ibm.com
1a35befbac HPUX bustage
git-svn-id: svn://10.0.0.236/trunk@113524 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-02 14:30:00 +00:00
mkaply%us.ibm.com
75746a5566 OS/2 bustage
git-svn-id: svn://10.0.0.236/trunk@113523 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-02 14:28:55 +00:00
mcafee%netscape.com
0049fa1e5f Fixing more bustage. r=mjudge
git-svn-id: svn://10.0.0.236/trunk@113522 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-02 08:10:55 +00:00
mcafee%netscape.com
1b7b202a89 Fixing build bustage, tab lossage
git-svn-id: svn://10.0.0.236/trunk@113521 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-02 07:58:39 +00:00
mcafee%netscape.com
524c5d653c Ignore generated files.
git-svn-id: svn://10.0.0.236/trunk@113520 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-02 07:53:30 +00:00
mjudge%netscape.com
b12c99a155 xuldoc not content_xul
git-svn-id: svn://10.0.0.236/trunk@113519 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-02 07:49:04 +00:00
mjudge%netscape.com
6d432b1041 bad slash
git-svn-id: svn://10.0.0.236/trunk@113518 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-02 07:48:06 +00:00
mjudge%netscape.com
4f465d2207 wrong requires. fix bustage
git-svn-id: svn://10.0.0.236/trunk@113517 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-02 06:59:44 +00:00
mjudge%netscape.com
15dedb88c4 missed this one
git-svn-id: svn://10.0.0.236/trunk@113516 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-02 06:03:50 +00:00
rbs%maths.uq.edu.au
2ff8bf1765 Continuing to factor handlers to rebuild automatic data during dynamic changes
git-svn-id: svn://10.0.0.236/trunk@113515 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-02 05:43:03 +00:00
blakeross%telocity.com
1cc6cc00c4 117672 - minor ui defect in mailnews pref pane. r=ben sr=hewitt
git-svn-id: svn://10.0.0.236/trunk@113514 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-02 05:42:17 +00:00
blakeross%telocity.com
ae786e96e5 109560 - edit menu in history is broken. r=ben sr=hewitt
git-svn-id: svn://10.0.0.236/trunk@113513 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-02 05:30:55 +00:00
blakeross%telocity.com
04f561119e 72796 - alt+space depresses focused elt additionally. r=ben sr=hewitt
git-svn-id: svn://10.0.0.236/trunk@113512 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-02 05:26:36 +00:00
blakeross%telocity.com
17cbced010 120984 - removing unnecessary code in nsglobalhistory. r/sr=me,ben
git-svn-id: svn://10.0.0.236/trunk@113511 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-02 05:22:20 +00:00
blakeross%telocity.com
b93d9137a9 98805 - need confirmation dialog, not aler,t when disabling ql. r=law sr=hewittCVS: ----------------------------------------------------------------------
git-svn-id: svn://10.0.0.236/trunk@113510 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-02 05:19:40 +00:00
blakeross%telocity.com
58723b91b4 98805 - need confirmation dialog, not aler,t when disabling ql. r=law sr=hewitt
git-svn-id: svn://10.0.0.236/trunk@113509 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-02 05:18:26 +00:00
mjudge%netscape.com
80554b8869 file from previous checkin
git-svn-id: svn://10.0.0.236/trunk@113508 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-02 05:14:25 +00:00
mjudge%netscape.com
40f7d1b02e 115922 embedding work. no changes should be observed in current product this will only affect the embedded effort. This moves the command handler stuff from content xul to embedding/components/commandhandler. a=judd r=saari built on mac/windows/gmake with this we will be able to finish removing editorshell from the app and have a true embedded editor.akkana will pick this up after me and finish the embedding work.
git-svn-id: svn://10.0.0.236/trunk@113507 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-02 05:13:56 +00:00
lordpixel%mac.com
cafbcdfba1 Final trunk fix for bug# 119118.
r=netdemon, sr=smfr.

r=sleestack (sherif) for checkin while tree closed


git-svn-id: svn://10.0.0.236/trunk@113506 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-02 04:44:14 +00:00
peterlubczynski%netscape.com
324ffc5a5e Fix by Serge for crash after installing Java Plug-in on Linux bug 122246 r=peterl sr=beard
git-svn-id: svn://10.0.0.236/trunk@113505 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-02 04:42:05 +00:00
wtc%netscape.com
0993648262 Bugzilla bug 122961: export CERT_CreateSubjectCertList for PSM.
git-svn-id: svn://10.0.0.236/trunk@113504 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-02 04:41:06 +00:00
dougt%netscape.com
bb7377d5e8 backing out my optimization
git-svn-id: svn://10.0.0.236/trunk@113502 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-02 03:20:01 +00:00
darin%netscape.com
7814a2d020 should fix btek bustage
git-svn-id: svn://10.0.0.236/trunk@113501 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-02 02:49:52 +00:00
darin%netscape.com
b6b52d0d83 fixes bug 86917 "socket transport should try all ip addresses returned by
DNS service" r=gordon, sr=rpotts


git-svn-id: svn://10.0.0.236/trunk@113500 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-02 02:45:25 +00:00
depstein%netscape.com
0335fbd08c Fixed web prog lstnr logging bug; added onStateChangeString() method to QaUtils. Also added entry to url table in nsIWebNav.cpp
git-svn-id: svn://10.0.0.236/trunk@113499 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-02 02:34:27 +00:00
bryner%netscape.com
ab15008e78 adding -moz-appearance for xbl listboxes. not turned on yet.
git-svn-id: svn://10.0.0.236/trunk@113498 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-02 02:23:17 +00:00
pschwartau%netscape.com
39e30db812 Initial add. Regression test for bug 123002.
git-svn-id: svn://10.0.0.236/trunk@113497 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-02 02:03:43 +00:00
racham%netscape.com
cbcaff45cc Fixing bug 122108. Changing the label from ISP or email provider to Email account in the accountwizard's account type page. r=robinf, jglick, bhuvan
git-svn-id: svn://10.0.0.236/trunk@113496 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-02 01:59:34 +00:00
rayw%netscape.com
9cd6379065 A variety of bug fixes in SOAP, most notably, eliminating 1999 schema
types.

SOAP is not part of default build.


git-svn-id: svn://10.0.0.236/trunk@113495 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-02 01:47:27 +00:00
relyea%netscape.com
3c5d08984b Add new PK11_ImportSymKeyWithFlags function for JSS
git-svn-id: svn://10.0.0.236/trunk@113494 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-02 01:46:05 +00:00
bryner%netscape.com
122d4289d3 Adding classic skin css for xbl checkboxes. Also fixing up borders on comboboxes. Not turned on yet.
git-svn-id: svn://10.0.0.236/trunk@113493 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-02 01:42:25 +00:00
rjc%netscape.com
3ea20f13ac Fix bug # 122952: Mac OS X internet search issues. r=sdagley,sfraser
git-svn-id: svn://10.0.0.236/trunk@113492 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-02 01:35:33 +00:00
vidur%netscape.com
7673c9518e Scoping rules seem to be different on windows and linux. Fixed compiler error on windows. This is not yet part of the default build.
git-svn-id: svn://10.0.0.236/trunk@113491 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-02 01:32:04 +00:00
jst%netscape.com
3ca2b8124f Fixing bug 113856. Don't crash when resolving a name of a class w/o a primary iid. r=heikki@netscape.com, sr=vidur@netscape.com
git-svn-id: svn://10.0.0.236/trunk@113490 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-02 01:31:22 +00:00
dougt%netscape.com
154c1a0782 fixes 122892. Optimization Clone of nsLocalFile. Instead of reiniting object, we use default c++ copy construction. r=ccarlen@netscape.com, sr=dveditz@netscape.com
git-svn-id: svn://10.0.0.236/trunk@113489 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-02 01:25:57 +00:00
javi%netscape.com
7fbb88f57b Fix Mac bustage.
git-svn-id: svn://10.0.0.236/trunk@113487 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-02 01:20:54 +00:00
bzbarsky%mit.edu
b9f15766ea add .shtml to list of extensions we register with ourselves. Bug 60733,
r=law, sr=alecf.


git-svn-id: svn://10.0.0.236/trunk@113484 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-02 01:06:36 +00:00
rogerl%netscape.com
faeb4c2ffd Incremental fixes.
git-svn-id: svn://10.0.0.236/trunk@113483 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-02 01:06:34 +00:00
jj%netscape.com
de388a3149 updating to 0.9.8
git-svn-id: svn://10.0.0.236/trunk@113482 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-02 01:05:47 +00:00
bbaetz%student.usyd.edu.au
88e6e84628 Bug 110241 - redo ftp control connection parsing code
r=dougt, sr=darin


git-svn-id: svn://10.0.0.236/trunk@113478 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-02 00:55:06 +00:00
varga%utcru.sk
ed6a00ae2e Fix for 120976. Drop feedback needs some polishing.
r=bryner, sr=blake


git-svn-id: svn://10.0.0.236/trunk@113477 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-02 00:54:19 +00:00
peterlubczynski%netscape.com
32321d73c4 Restore consuming of keypress events and don't pass them to plugins also give windowless plugins focus when mouse clicked bug 122501 r=kmcclusk@netscape.com sr=beard
git-svn-id: svn://10.0.0.236/trunk@113475 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-02 00:23:30 +00:00
peterlubczynski%netscape.com
3a102d9545 Send raw keyboard event for windowless plugins, bug 122501 r=kmcclusk@netscape.com sr=beard
git-svn-id: svn://10.0.0.236/trunk@113474 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-02 00:21:53 +00:00
jst%netscape.com
e88756b2b7 Fixing bug 113498. Making .src on a new Image(); always be absolute. r=sicking@bigfoot.com, rs=rpotts@netscape.com.
git-svn-id: svn://10.0.0.236/trunk@113473 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-02 00:17:40 +00:00
dveditz%netscape.com
6196387bf8 bug 94108/122881 clean up obsolete components to prevent scary errors
for people who upgrade. patch by curt@netscape.com, r=ssu/sr=dveditz


git-svn-id: svn://10.0.0.236/trunk@113472 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-02 00:13:12 +00:00
varga%utcru.sk
295a8002c4 Fix for bugs:
120299 - Drop feedback is narrow first time
121187 - drag of message summary line (even without drop) garbles bounding box

r=sfraser, sr=hyatt


git-svn-id: svn://10.0.0.236/trunk@113471 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-02 00:13:07 +00:00
law%netscape.com
3719c10b3a Bug 117702; change wording to say 'system tray'; r=caillon, sr=blake
git-svn-id: svn://10.0.0.236/trunk@113469 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-02 00:09:46 +00:00
law%netscape.com
4b806dba32 Bug 119767; remove bogus text/html entry from defaulit mimeTypes.rdf; r=bzbarsky, sr=ben
git-svn-id: svn://10.0.0.236/trunk@113468 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-02 00:07:35 +00:00
peterlubczynski%netscape.com
fc583de88a Fix for plugins not being able to get handle to doc's window if plugin is HIDDEN because it has no view. Use the pres shell instead. bug 123059 r=ToddTaylor sr=beard
git-svn-id: svn://10.0.0.236/trunk@113467 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-02 00:07:20 +00:00
law%netscape.com
905119f6b5 Bug 107088; don't set any group/world permissions on temp file; r=bzbarsky, sr=darin
git-svn-id: svn://10.0.0.236/trunk@113466 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-02 00:06:12 +00:00
bryner%netscape.com
6e61e54a46 Adding classic skin css for xbl select widget. Not turned on yet.
git-svn-id: svn://10.0.0.236/trunk@113465 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-01 23:59:26 +00:00
law%netscape.com
f54f76debd Bug 120931; remember last used directory (for older versions of windows that don't do it automatically); r=cmanske, sr=ben
git-svn-id: svn://10.0.0.236/trunk@113464 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-01 23:58:55 +00:00
rjesup%wgate.com
5f600bf6e5 Bug 117667: access past end of docshell child array. sr=jst, r=joki
git-svn-id: svn://10.0.0.236/trunk@113463 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-01 23:56:48 +00:00
jaggernaut%netscape.com
0ac23b506b Bug 90221: Click() needs to act like a real click. r=jst, sr=hyatt
git-svn-id: svn://10.0.0.236/trunk@113462 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-01 23:55:49 +00:00
cmanske%netscape.com
b4ef8479ba Fixed Open Location dialog for Composer, b=122933, r=brade, sr=hewitt
git-svn-id: svn://10.0.0.236/trunk@113461 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-01 23:53:30 +00:00
law%netscape.com
2013e60c16 Bug 94756; make file picker check for read-only files when saving; r=cmanske, sr=ben
git-svn-id: svn://10.0.0.236/trunk@113460 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-01 23:52:58 +00:00
samuel%sieb.net
38ea9c6ced Bug 122910 - chatzilla won't start
r=rginda
not in the build


git-svn-id: svn://10.0.0.236/trunk@113459 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-01 23:48:11 +00:00
hewitt%netscape.com
8fa2c0020b 110001 - onpagehide should not fire events when traversing back in the wizard, r=racham, sr=blake
git-svn-id: svn://10.0.0.236/trunk@113458 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-01 23:09:42 +00:00
ccarlen%netscape.com
eba9538f7a Not part of build, very out of date.
git-svn-id: svn://10.0.0.236/trunk@113457 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-01 23:07:47 +00:00
ssu%netscape.com
def5b868f6 fixing bug 115582 - File/Attachments/Save All doesn't have access key. r=racham, sr=mscott
git-svn-id: svn://10.0.0.236/trunk@113456 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-01 23:05:45 +00:00
hewitt%netscape.com
59e6d9a637 120609 - Autocomplete drop down list has white vertical borders on left and right side, r=blake, sr=hyatt
git-svn-id: svn://10.0.0.236/trunk@113455 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-01 23:03:22 +00:00
ccarlen%netscape.com
d4f88daea6 Bug 120026 - rework PPEmbed so its classes are less dependent and more easily reusable. r=adamlock@netscape.com/sr=sfraser@netscape.com
git-svn-id: svn://10.0.0.236/trunk@113454 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-01 22:57:19 +00:00
ccarlen%netscape.com
3799e84dd5 New files for bug 120026 - rework PPEmbed so its classes are less dependent and more easily reusable. r=adamlock@netscape.com/sr=sfraser@netscape.com
git-svn-id: svn://10.0.0.236/trunk@113453 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-01 22:55:18 +00:00
serge%netscape.com
dc78c9c9ed fix #109353; N620, Trunk & M097 crash [@ libpthread.so.0 - PL_strfree]; r=peterl, sr=beard
git-svn-id: svn://10.0.0.236/trunk@113452 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-01 22:50:59 +00:00
jj%netscape.com
1cdcd82c6f this file causes the OS9 Finder to flip the "isPackage" flag of the "macbuild" directory, preventing its access. PkfInfo can be generated on the fly by the build script instead, like the current Carbon build automation does.
git-svn-id: svn://10.0.0.236/trunk@113451 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-01 22:38:18 +00:00
heikki%netscape.com
51cf66c5f5 Bug 122710, dtd folder in dist/bin should be moved into res. r=rbs@maths.uq.edu.au&harishd, sr=sfraser.
git-svn-id: svn://10.0.0.236/trunk@113450 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-01 22:28:55 +00:00
pinkerton%netscape.com
ae9adfc171 tree->treeview bug 115747, rs=hyatt
git-svn-id: svn://10.0.0.236/trunk@113449 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-01 22:21:51 +00:00
hewitt%netscape.com
b63f84685c 114580 - commonDialog is slow as molasses, r=jag, sr=bryner
git-svn-id: svn://10.0.0.236/trunk@113448 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-01 22:18:59 +00:00
rginda%netscape.com
35e3f21bfb - venkman only -
bug 122850, venkman error on startup
the fix for bug 121744 made |for (a in undefined);| throw an error, so now we have to validate |attrs| here.


git-svn-id: svn://10.0.0.236/trunk@113447 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-01 22:12:09 +00:00
naving%netscape.com
33319c4dd2 115071 r=nhotta (for collation part) sr=mscott. fix folder-pane, menus sorting on mac os x by using collation
key and creating sort arcs as nsIRDFBlob. Added abiltity to createBlobNode
123017 sr=bienvenu fixing start-ip crash in nsMsgFolderDatasource


git-svn-id: svn://10.0.0.236/trunk@113446 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-01 21:46:05 +00:00
peterlubczynski%netscape.com
ca86fbd4ee Checking in for nis@sparc.spb.su, fix for Java applets inserted as <OBJECT> run in spite of Java is turned off in Preferences bug 116888 r=peterl sr=beard
git-svn-id: svn://10.0.0.236/trunk@113445 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-01 21:40:49 +00:00
bzbarsky%mit.edu
bcc31f85dd Don't let an empty intl.charset.default pref set the document charset to
the empty string.  Fall back to ISO-8859-1 in the script loader if there
is no other charset set.  Bug 118404, r=harishd, sr=jst


git-svn-id: svn://10.0.0.236/trunk@113444 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-01 21:36:00 +00:00
akkana%netscape.com
efa43449be 121046: fix a rewrap hang. r=adu@sparc.spb.su sr=kin
git-svn-id: svn://10.0.0.236/trunk@113443 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-01 21:29:16 +00:00
darin%netscape.com
0442329028 fixes bug 123031 "Setting username and password on nsIURI object damages
host part of URL, preventing FTP transfer" r=cmanske, sr=mscott


git-svn-id: svn://10.0.0.236/trunk@113442 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-01 21:20:51 +00:00
darin%netscape.com
e4b147b47f fixes bug 122675 "socket transport doesn't cancel properly if busy resolving
or connecting" r=gordon, sr=mscott


git-svn-id: svn://10.0.0.236/trunk@113441 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-01 21:18:13 +00:00
wtc%netscape.com
eba46abb7a Bugzilla bug 122712: moved the two newly exported symbols to the right
place.


git-svn-id: svn://10.0.0.236/trunk@113440 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-01 21:16:43 +00:00
mcafee%netscape.com
daa2e99a89 Back to PrintSize
git-svn-id: svn://10.0.0.236/trunk@113439 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-01 21:07:04 +00:00
darin%netscape.com
4b34d2efe1 fixes bug 122787 "(nsIURI) nsStandardURL::SetFileName doesn't recalculate mPath"
r=dougt, sr=mscott


git-svn-id: svn://10.0.0.236/trunk@113438 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-01 21:03:10 +00:00
andreas.otte%debitel.net
a67c733b80 making patch for bug 120959 [Use of ".." in address causes links to
relative URL's to fail] a little bit prettier (remove unnecessary
clause), r=brendan, sr=darin


git-svn-id: svn://10.0.0.236/trunk@113437 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-01 20:30:15 +00:00
bzbarsky%mit.edu
5490fe59f6 View source channels should implement nsIUploadChannel for when we get
postdata working with them.  Bug 122851, r=darin, sr=rpotts.


git-svn-id: svn://10.0.0.236/trunk@113436 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-01 20:18:26 +00:00
rods%netscape.com
75f3adcd31 fix ref count bloat
Bug 123011 sr=hyatt


git-svn-id: svn://10.0.0.236/trunk@113435 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-01 20:12:35 +00:00
seawood%netscape.com
4f41222d8a Fixing win32 gmake bustage
git-svn-id: svn://10.0.0.236/trunk@113434 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-01 19:52:42 +00:00
mcafee%netscape.com
e23a48cbcb Adding graph server support to trace-malloc tests
git-svn-id: svn://10.0.0.236/trunk@113433 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-01 19:01:40 +00:00
ian.mcgreer%sun.com
9b23ec2d9d fix cert leak found by client auth
git-svn-id: svn://10.0.0.236/trunk@113432 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-01 18:18:13 +00:00
relyea%netscape.com
300485bc29 Fix memory leak.
git-svn-id: svn://10.0.0.236/trunk@113431 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-01 17:57:05 +00:00
myk%mozilla.org
75dca718c9 Fix for bug 98021: Cleans up "edit attachment" interface on NS4.x by removing text of buttons that do not work in that browser.
Patch by Myk Melez <myk@mozilla.org>.
r=kiko x 2


git-svn-id: svn://10.0.0.236/trunk@113430 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-01 17:50:00 +00:00
wtc%netscape.com
911b346fe5 Bugzilla bug 122944: detect Cygwin's uname.
git-svn-id: svn://10.0.0.236/trunk@113429 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-01 17:27:55 +00:00
ian.mcgreer%sun.com
126fdb9cd7 bug 121628, persistent cache of hardware token certs
git-svn-id: svn://10.0.0.236/trunk@113428 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-01 17:25:15 +00:00
rods%netscape.com
798a2cf9a2 fix bustage
git-svn-id: svn://10.0.0.236/trunk@113427 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-01 17:19:10 +00:00
rods%netscape.com
ab7bd4353a fix bustage
git-svn-id: svn://10.0.0.236/trunk@113426 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-01 17:04:03 +00:00
rods%netscape.com
01be94da6c fix build breakage
git-svn-id: svn://10.0.0.236/trunk@113425 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-01 16:17:40 +00:00
rods%netscape.com
f944fc2ad3 Added GlobalPrintSettings
Bug 120622 r=dcone sr=waterson


git-svn-id: svn://10.0.0.236/trunk@113424 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-01 15:48:21 +00:00
rods%netscape.com
82a2414831 enable a margin like gap specification for printing on unix
make it settable via the joboptions dialog
Bug 102596 r=roland sr=kin


git-svn-id: svn://10.0.0.236/trunk@113423 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-01 15:31:15 +00:00
mkaply%us.ibm.com
1211f86623 #122482
rs=jst
Make OS/2 go down a Windows path to fix some focus events


git-svn-id: svn://10.0.0.236/trunk@113422 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-01 15:14:35 +00:00
rbs%maths.uq.edu.au
ef52d88af3 Added two APIs, InheritAutomaticData() & TransmitAutomaticData(), to respond to dynamic changes that affect automatic data (i.e., data inferred from the actual definition of each MathML tag). The computation of the data was so far mostly locked in Init() and SetInitialChildList() which are meant to be called only once in the life-time of a frame. Factored this computation into the two APIs to be used to rebuild the data, and which can be called repeatedly as appropriate, when dynamic changes arise in the content model. Shuffled code to stay in sync and consolidated the hooks used dynamic changes with the APIs
git-svn-id: svn://10.0.0.236/trunk@113421 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-01 15:10:50 +00:00
jake%acutex.net
18e6a3ea4d Bug 122154 part 2 - Eliminiate the use of the "usetms" Javascript cache variable.
Patch by Christian Reis <kiko@async.com.br>
r= bbaetz, jake


git-svn-id: svn://10.0.0.236/trunk@113420 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-01 14:52:37 +00:00
rods%netscape.com
20b4083174 1) Removes the arg of nsIDOMWindow in the nsIWebBrowserPrint calls
2) Adds a couple of new methods and an attr to nsIWebBrowserPrint (navigate, is frameset, & exitPP)
3) Removes all but one method from nsIContentViewerFile.idl/h the remaining call is for print regression testing
4) Removes the "static" implementation of nsIContentViewerFile.h
5) Fixed up nsIContentViewerFile.idl and turned it back on so it is now generating the header file
6) Removed all uses of nsIContentViewerFile.h except for the WebCrawler (uses it for Printing Regression testing)
7) nsDocumentViewer.cpp now implements nsIWebBrowserPrint.idl this makes it easier to add new print functionality in one place
8) You can now ask an instance of the ContentViewer for a nsIWebBrowserPrint to do printing (it retruns the nsIWebBrowserPrint interface implemented by the nsDocumentViewer)
9) Anybody who was using nsIContentViewerFile to print will now use nsIWebBrowserPrint
10) You can now do a "GetInterface()" on a GlobalWindow for a nsIWebBrowserPrint
11) The browser UI now uses the GetInterface on the GlobalWindow to get a nsIWebBrowserPrint object to do printing and this can be used for all printing functionality
Bug 120622 r=dcone sr=waterson


git-svn-id: svn://10.0.0.236/trunk@113419 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-01 14:52:11 +00:00
locka%iol.ie
7098e78188 Obvious fix to stop deprecated winEmbed from crashing. b=120956
git-svn-id: svn://10.0.0.236/trunk@113418 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-01 14:33:33 +00:00
jake%acutex.net
7efb764af7 Bug 121636 - Provide support for cvsgraph (requires the cvsgraph binary, see bug 121636 for more information).
r= kiko


git-svn-id: svn://10.0.0.236/trunk@113417 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-01 14:32:55 +00:00
rbs%maths.uq.edu.au
72fc39cdaf activate the rhelper to wrap foreign frames
git-svn-id: svn://10.0.0.236/trunk@113416 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-01 14:31:21 +00:00
rbs%maths.uq.edu.au
7c7c9f7ebf Helper class use for wrapping non-MathML elements (e.g., html:img) so that they can mix better with other surrounding MathML markups. Factored previous code here and added hooks that were needed for child list operations
git-svn-id: svn://10.0.0.236/trunk@113415 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-01 14:23:07 +00:00
jaggernaut%netscape.com
69ac84dbd0 Bug 122083: Typing "v", "vi", "vie" ... "view-source" into URL bar and pressing enter freezes Mozilla. r=dbradley, sr=alecf
git-svn-id: svn://10.0.0.236/trunk@113414 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-01 14:22:22 +00:00
locka%iol.ie
807280c2ba Fix for stall when saving certain documents. Don't count non-persistent URIs when figuring out whether to do state notifications synchronously or asynchronously. b=122078 r=brade@netscape.com sr=rpotts@netscape.com
git-svn-id: svn://10.0.0.236/trunk@113413 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-01 12:42:13 +00:00
timeless%mac.com
e73045e569 Bug 109138 platform detection not working on macintosh
r=bbaetz r=gerv
adds another regexp for MacOSX


git-svn-id: svn://10.0.0.236/trunk@113412 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-01 10:05:04 +00:00
seawood%netscape.com
2eaf14d1b4 Had the logic backwards
git-svn-id: svn://10.0.0.236/trunk@113410 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-01 08:40:31 +00:00
dean_tessman%hotmail.com
e8149ab232 Forgot the .h for 122057.
git-svn-id: svn://10.0.0.236/trunk@113409 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-01 06:55:41 +00:00
ian%hixie.ch
3e9ca21d73 * Added getGroupMembers() to the User data source.
* Fixed a bug in the MySQL implementation of User data source's getGroupName() method. It treated 'row' as an array ref instead of a normal array.
* Made the MySQL User data source automatically add a group with ID 1, named 'Administrators'.
* Special-cased the group with ID 1 in the user object so that if a user is in that group, he automatically is assumed to have all rights.
* Fixed a bug with the saving of the original groups in the user object (the backup object was simply a reference to the original object, which was later changed in place, causing the backup to change too).
* Fixed the handling of rights in the user object constructor to simply set the rights in one line instead of using indirection.
* Fixed the invalidateRights() method of the user object to correctly re-set the rights (previously it was not turning the generated array into a hashref).
* Added a setup.install implementation to the login component. It now queries the user for an administration username and creates the relevant user and puts it in the magic group 1.
* Fixed a call to checkAddress() in the login component.


git-svn-id: svn://10.0.0.236/trunk@113408 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-01 06:48:02 +00:00
ian%hixie.ch
78a5b28737 Commented out the call to Net::SMTP's verify() method and replaced it with a generic regexp sanity check. It appears that VRFY is not correctly implemented on all servers. (I may be mistaken on this; it might just be a bug somewhere in the PLIF code that is messing something up, but I couldn't find it if so.)
git-svn-id: svn://10.0.0.236/trunk@113407 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-01 06:38:55 +00:00
dean_tessman%hotmail.com
d20cb76545 122057 - springloaded folders trigger too easily
r=varga@utcru.sk, sr=ben


git-svn-id: svn://10.0.0.236/trunk@113406 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-01 06:36:28 +00:00
ian%hixie.ch
bcf3696b25 Added a check that ensures that the configuration file is not readable or writable by anyone except the user running the script. This closes a potential security hole on shared machines. Changed the umask during the creation of the configuration file so that the permission bits are set that way too. Added a comment to clarify the superficially recursive nature of the configuration database and the configuration data source.
git-svn-id: svn://10.0.0.236/trunk@113405 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-01 06:36:27 +00:00
ian%hixie.ch
d36a91026e Another change that should be done at some point: Move PLIF/DataSource/*/MySQL.pm to PLIF/DataSource/MySQL/*.pm
git-svn-id: svn://10.0.0.236/trunk@113404 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-01 06:32:17 +00:00
wtc%netscape.com
6cba3e1cfe Bugzilla bug 119340: install a SIGTERM handler on Linux for debugging.
git-svn-id: svn://10.0.0.236/trunk@113403 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-01 05:57:49 +00:00
seawood%netscape.com
f12faa3172 Add windbgdlg to standalone xpcom list
git-svn-id: svn://10.0.0.236/trunk@113402 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-01 05:31:30 +00:00
ducarroz%netscape.com
ac100a19d2 Fix for bug 122625. Remove the window from the cache when ComposeInit is called. Also, alway make sure that the last type of compose window used get in the cache. R=cavin, SR=mscott
git-svn-id: svn://10.0.0.236/trunk@113401 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-01 05:15:01 +00:00
bryner%netscape.com
c5d149916e bug 108791 - infinite recursion crash when tabbing if there is no focusable content. r=saari, sr=sfraser.
git-svn-id: svn://10.0.0.236/trunk@113400 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-01 05:14:44 +00:00
seawood%netscape.com
25e0750204 Do not place the .res file inthe srcdir
git-svn-id: svn://10.0.0.236/trunk@113399 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-01 04:50:32 +00:00
seawood%netscape.com
365f6849de Skip installing mozilla-config & run-mozilla.sh on os/2 & win32
git-svn-id: svn://10.0.0.236/trunk@113398 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-01 04:49:21 +00:00
seawood%netscape.com
f7cdc080f7 Fixing win32 gmake bustage from Cavin's checkin of bug #119441.
git-svn-id: svn://10.0.0.236/trunk@113397 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-01 04:12:54 +00:00
racham%netscape.com
d366eae2b3 Fixing bug 122868. Check for existence of accountValues before saving an account in onSave routine to avoid problems with deleted accounts. sr=mscott
git-svn-id: svn://10.0.0.236/trunk@113396 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-01 03:59:06 +00:00
bryner%netscape.com
20a287ba58 bug 122542 - make outliner content view only respond to ContentInserted/ContentRemoved notifications concerning its own outliner. Also fix html option support. r=varga, sr=hyatt.
git-svn-id: svn://10.0.0.236/trunk@113395 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-01 03:21:38 +00:00
roc+%cs.cmu.edu
71e04391bf Bug 122325. Repaint correct areas when a view is resized. r=kmcclusk,sr=waterson
git-svn-id: svn://10.0.0.236/trunk@113394 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-01 03:10:59 +00:00
cavin%netscape.com
ea51a673c6 Fix for #119441. Added code to prefix lines starting with "From " with ">" in the msg body. r=ducarroz, sr=sspitzer.
git-svn-id: svn://10.0.0.236/trunk@113393 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-01 02:36:58 +00:00
relyea%netscape.com
9ec4db4c97 certutil -L now opens the DB ReadOnly. Add the '-X' option to the test is still
testing the R/W case.


git-svn-id: svn://10.0.0.236/trunk@113392 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-01 02:28:32 +00:00
relyea%netscape.com
4965975f8a Make the following functions open the databases Readonly:
ListCerts PrintHelp ListKeys ListModules CheckCertValidity Version

Add an option (-X) to restore the old behaviour of openning the Databases R/W


git-svn-id: svn://10.0.0.236/trunk@113391 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-01 02:26:40 +00:00
alecf%netscape.com
f7ee18f044 one more part of fix for bug 107575, including the much coveted whitespace
remove aIgnoreCase parameter from all nsString and nsCString consumers
sr=jag, r=shaver


git-svn-id: svn://10.0.0.236/trunk@113390 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-01 01:53:09 +00:00
shrutiv%netscape.com
cfab9c51c9 Removing variable 'linuxoption' and correcting indentation
git-svn-id: svn://10.0.0.236/trunk@113389 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-01 01:49:05 +00:00
rods%netscape.com
e3017ad0ff This was suppose to go in as part of
Bug 122530 r=dcone sr=hyatt


git-svn-id: svn://10.0.0.236/trunk@113388 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-01 01:42:37 +00:00
rjc%netscape.com
bed41cef23 Fix bug # 122757: Mac OS 9/X packages. Also, de-tab. r=tingley sr=waterson
git-svn-id: svn://10.0.0.236/trunk@113387 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-01 00:49:29 +00:00
darin%netscape.com
3f0914eda9 fix mach-o bustage
git-svn-id: svn://10.0.0.236/trunk@113386 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-01 00:48:32 +00:00
jaggernaut%netscape.com
4e98524ff9 Just fixing some indents/whitespace, rs=mozbot
git-svn-id: svn://10.0.0.236/trunk@113385 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-01 00:45:58 +00:00
pete%alphanumerica.com
76dbb12d7a r=dougt
This file is very old and very outdated. Please use jslib for local file i/o
jslib.mozdev.org.

Not part of the build

--pete


git-svn-id: svn://10.0.0.236/trunk@113384 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-01 00:30:25 +00:00
rjc%netscape.com
e44721dff3 Fix bug # 113894: RDF persistance issue, and get nsFileSpec out of RDF. r=sr's = darin, waterson
git-svn-id: svn://10.0.0.236/trunk@113383 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-01 00:24:27 +00:00
rogerl%netscape.com
5464363ef6 Incremental ECMA test suite fixes.
git-svn-id: svn://10.0.0.236/trunk@113382 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-01 00:05:37 +00:00
rjc%netscape.com
6ee0e210e2 Fix bug # 112860: trivial null check for PPEmbed. r=ccarlen
git-svn-id: svn://10.0.0.236/trunk@113381 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-01 00:03:25 +00:00
bbaetz%student.usyd.edu.au
37e83dae0b Bug 122744 - charting fails taint checks
r=daa@distributed.net, gerv


git-svn-id: svn://10.0.0.236/trunk@113380 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-31 23:51:38 +00:00
bbaetz%student.usyd.edu.au
af02b7487d Fix up "used only once" warning from kiko's checkin.
r=kiko x 2.


git-svn-id: svn://10.0.0.236/trunk@113379 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-31 23:46:51 +00:00
danm%netscape.com
5ae1a11f6f change in wording of comment. bug 122393
git-svn-id: svn://10.0.0.236/trunk@113378 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-31 23:32:07 +00:00
cavin%netscape.com
b8e8220800 Fix for bugscape 11772. Reset the phone number arrays after the numbers are parsed and copied to an address card object. r=ducarroz, sr=mscott.
git-svn-id: svn://10.0.0.236/trunk@113377 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-31 23:25:04 +00:00
darin%netscape.com
9577ca27d8 possibly fixes bustage on objdir tinderbox's
git-svn-id: svn://10.0.0.236/trunk@113376 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-31 23:15:03 +00:00
darin%netscape.com
f9fabb5da4 fixes win32 bustage
git-svn-id: svn://10.0.0.236/trunk@113375 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-31 23:05:20 +00:00
blizzard%redhat.com
1a5a0eee88 Back out fixes for 121011 until I fix more issues.
git-svn-id: svn://10.0.0.236/trunk@113373 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-31 22:45:26 +00:00
bzbarsky%mit.edu
ec37d8f825 Don't use "(null)" for the image filename if there is no filename in the
url.  Bug 121504, r=doron, sr=blake


git-svn-id: svn://10.0.0.236/trunk@113372 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-31 22:30:50 +00:00
naving%netscape.com
75cff9aa43 112927 sr=bienvenu. fix whitespace, we do lot more than alerting, we backup old rules.dat as rulesbackup.dat
and create a new rules.dat and alert is thrown when receiving new mail/opening filters dialog.


git-svn-id: svn://10.0.0.236/trunk@113371 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-31 22:23:42 +00:00
darin%netscape.com
38e3bdc4e9 fixes bug 118651 "nsIFileURL.file needs to return nsIFile that was set"
r=dougt, sr=rpotts


git-svn-id: svn://10.0.0.236/trunk@113370 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-31 22:17:35 +00:00
heikki%netscape.com
10484cc5cc Bug 106053, remove unused XHTML namespace declarations, and fix incorrect namespace usages. r=harishd, sr=hewitt.
git-svn-id: svn://10.0.0.236/trunk@113369 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-31 22:12:36 +00:00
naving%netscape.com
b289c7bddf 112927 sr=bienvenu. Made it so that we alert the user in case we cannot
parse rules.dat, upon getting filterList


git-svn-id: svn://10.0.0.236/trunk@113368 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-31 22:08:48 +00:00
naving%netscape.com
cb1c5fb41f 112927 sr=bienvenu makefile changes
git-svn-id: svn://10.0.0.236/trunk@113367 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-31 21:58:26 +00:00
alecf%netscape.com
0a5545c945 windows side of fix to bug 100676 - remove xpcom dependency on uconv by switching to native locale-conversion routines
r=ccarlen, sr=dveditz


git-svn-id: svn://10.0.0.236/trunk@113366 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-31 21:55:01 +00:00
alecf%netscape.com
c3215fb222 mac side of fix for bug 100676
code by ccarlen, r=alecf, sr=sfraser
remove xpcom dependency on uconv by switching to native mac locale-conversion routines


git-svn-id: svn://10.0.0.236/trunk@113365 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-31 21:54:16 +00:00
dougt%netscape.com
b0f0084cf4 fixing another type
git-svn-id: svn://10.0.0.236/trunk@113362 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-31 21:45:04 +00:00
bienvenu%netscape.com
698e59f48c fix crash playing back offline empty of imap trash when trash is selected, check for null dbfolderinfo rs=mscott 121799
git-svn-id: svn://10.0.0.236/trunk@113361 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-31 21:19:55 +00:00
locka%iol.ie
23d7d6395e NOT PART OF BUILD. Nullify pointer
git-svn-id: svn://10.0.0.236/trunk@113360 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-31 21:04:39 +00:00
mscott%netscape.com
5bb62e7ef4 Bug #108965 --> remove xul emitter from the build
r=ducarroz
sr=sspitzer


git-svn-id: svn://10.0.0.236/trunk@113359 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-31 21:02:16 +00:00
dougt%netscape.com
b75a3cfdef Fixing typo
git-svn-id: svn://10.0.0.236/trunk@113358 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-31 20:43:22 +00:00
pinkerton%netscape.com
533bae36a4 if label attribute changes, set the parent menu to dirty. r=sdagley/sr=blake. bug#122826, bugscape#11829
git-svn-id: svn://10.0.0.236/trunk@113357 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-31 20:43:17 +00:00
seawood%netscape.com
37b1446d30 Per the hpux compiler:
# Nonempty source files must end with a newline that is not preceded by a backslash.


git-svn-id: svn://10.0.0.236/trunk@113356 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-31 20:39:17 +00:00
pinkerton%netscape.com
cf8f4871db add MANIFEST_IDL for content:html:document:public
git-svn-id: svn://10.0.0.236/trunk@113355 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-31 20:35:06 +00:00
pinkerton%netscape.com
3cd8c83ac1 moving idl into MANIFEST_IDL to fix bustage.
git-svn-id: svn://10.0.0.236/trunk@113354 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-31 20:34:17 +00:00
locka%iol.ie
e584cbfe98 NOT PART OF BUILD. Make plugin easier to build
git-svn-id: svn://10.0.0.236/trunk@113353 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-31 20:32:00 +00:00
mkaply%us.ibm.com
e91a3a7744 No bug - fix some tabs that were really bugging me
git-svn-id: svn://10.0.0.236/trunk@113352 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-31 20:31:59 +00:00
despotdaemon%netscape.com
abe8aff7b4 Pseudo-automatic update of changes made by endico@mozilla.org.
git-svn-id: svn://10.0.0.236/trunk@113351 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-31 20:30:54 +00:00
bzbarsky%mit.edu
ea2ee4e526 Check that the uri actually has an extension before trying to
GetTypeFromExtension.  Bug 122742, r=timeless, sr=darin.


git-svn-id: svn://10.0.0.236/trunk@113350 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-31 20:12:53 +00:00
jake%acutex.net
11e4684e5b Bug 122636 - Templatise colchange.cgi
Patch by David Lawrence <dkl@redhat.com> and Christian Reis <kiko@async.com.br>
r= kiko, jake


git-svn-id: svn://10.0.0.236/trunk@113349 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-31 20:12:50 +00:00
bienvenu%netscape.com
8d7bbb7ce2 fix hourglass problem selecting a non-selectable imap folder r=naving, sr=mscott 120608
git-svn-id: svn://10.0.0.236/trunk@113348 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-31 20:10:06 +00:00
akkana%netscape.com
1a4a0619ba 113551: add bindings for Sun copy/paste keys. r=bz, sr=kin
git-svn-id: svn://10.0.0.236/trunk@113347 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-31 19:59:02 +00:00
hwaara%chello.se
24e148d7f5 #74248, implement the capability to _underline_ words, just like *bold* works. Patch by Neil Rashbrook <neil@parkwaycc.co.uk>.
r=hwaara, sr=hewitt


git-svn-id: svn://10.0.0.236/trunk@113346 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-31 19:51:58 +00:00
rginda%netscape.com
aea77eb096 bug 65512, fix typo on HELLO message
git-svn-id: svn://10.0.0.236/trunk@113345 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-31 19:48:49 +00:00
pinkerton%netscape.com
2972973e02 tooltips themed. r=sdagley/sr=ben. bug#115754
git-svn-id: svn://10.0.0.236/trunk@113344 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-31 19:45:20 +00:00
radha%netscape.com
2e0a0cfd1f Changes related to wyciwyg protocol implementation. r=35340 r/sr by jst, nisheeth, darin
git-svn-id: svn://10.0.0.236/trunk@113343 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-31 19:45:01 +00:00
radha%netscape.com
309a70610e wyciwyg channel files added. bug=35340 r/sr = jst, nisheeth, darin
git-svn-id: svn://10.0.0.236/trunk@113342 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-31 19:44:08 +00:00
ccarlen%netscape.com
f2682c9416 Bug 101362 - Don't use Unicode ellipsis char in properties. r=mkaply@us.ibm.com
git-svn-id: svn://10.0.0.236/trunk@113341 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-31 19:43:43 +00:00
mikep%oeone.com
25b6f7e115 Fixing bug 122673, recur forever events broken.
git-svn-id: svn://10.0.0.236/trunk@113340 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-31 19:40:44 +00:00
seawood%netscape.com
c790e01283 Removing removed Makefiles
git-svn-id: svn://10.0.0.236/trunk@113339 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-31 19:39:33 +00:00
radha%netscape.com
38a7a759a1 Changes related to wyciwyg protocol implementation. r=35340 r/sr by jst, darin,nisheeth
git-svn-id: svn://10.0.0.236/trunk@113338 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-31 19:38:16 +00:00
radha%netscape.com
9607a6f0c7 Changes related to wyciwyg protocol implementation. r=35340 r/sr by jst, nisheeth, darin.
git-svn-id: svn://10.0.0.236/trunk@113337 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-31 19:36:45 +00:00
radha%netscape.com
0a2fcf9a45 Initial checkin for wyciwyg protocol implementation. bug=35340 r/sr by nisheeth, darin, jst
git-svn-id: svn://10.0.0.236/trunk@113336 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-31 19:35:33 +00:00
radha%netscape.com
cad9148b23 *** empty log message ***
git-svn-id: svn://10.0.0.236/trunk@113335 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-31 19:33:05 +00:00
mikep%oeone.com
55553ca6c7 Removing alert.
git-svn-id: svn://10.0.0.236/trunk@113334 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-31 19:31:01 +00:00
mikep%oeone.com
d5c92ea8e9 Fixing bug 122676, no indication of events in left hand unifinder.
git-svn-id: svn://10.0.0.236/trunk@113332 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-31 19:29:02 +00:00
ian.mcgreer%sun.com
c2387fe9a7 have certutil shutdown cleanly so purify is easier to deal with
git-svn-id: svn://10.0.0.236/trunk@113331 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-31 19:27:07 +00:00
relyea%netscape.com
0318f63324 Fix thread local storage leak.
git-svn-id: svn://10.0.0.236/trunk@113329 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-31 19:18:55 +00:00
javi%netscape.com
b301c828f4 Make the projects depend on a .exp file that doesn't start with '_' so that we know the .exp file wasn't generated by CodeWarrior.
git-svn-id: svn://10.0.0.236/trunk@113328 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-31 19:10:46 +00:00
javi%netscape.com
ba5935c915 Use LoadableRoots.mcp.exp instead of _*.exp so that we know
the .exp wasn't generated by CodeWarrior.


git-svn-id: svn://10.0.0.236/trunk@113327 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-31 19:05:27 +00:00
mikep%oeone.com
1179bc8354 Fixing js warnings, and a fix for bug 109262.
git-svn-id: svn://10.0.0.236/trunk@113326 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-31 19:00:00 +00:00
ian%hixie.ch
cd94938f2b Removed an erroneous comment, which should be the last traces of the old problem of the lack of a configuration file being a fatal error.
git-svn-id: svn://10.0.0.236/trunk@113325 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-31 18:30:21 +00:00
ian%hixie.ch
095dfaa67a Theoretical nit: call inherited constructor just in case at some point in the future it does something useful...
git-svn-id: svn://10.0.0.236/trunk@113324 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-31 17:35:52 +00:00
ian.mcgreer%sun.com
f0c3d0a6e5 couple of fixes
git-svn-id: svn://10.0.0.236/trunk@113323 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-31 17:28:49 +00:00
ian.mcgreer%sun.com
efbc7765e6 bug 90518, implement methods for dumping the state of the cache and temp cert store in NSS 3.4
git-svn-id: svn://10.0.0.236/trunk@113322 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-31 17:08:32 +00:00
jake%acutex.net
9fab98208e Some additional files we should be ignoring
git-svn-id: svn://10.0.0.236/trunk@113321 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-31 16:28:35 +00:00
locka%iol.ie
b756e0d7c4 Remove dead webshell xlib stuff. b=113970
git-svn-id: svn://10.0.0.236/trunk@113320 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-31 15:48:23 +00:00
locka%iol.ie
371c7f20e3 Remove dead RaptorShell. b=113970
git-svn-id: svn://10.0.0.236/trunk@113319 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-31 15:46:33 +00:00
locka%iol.ie
6de7fb8599 Remove dead makefiles. b=113970
git-svn-id: svn://10.0.0.236/trunk@113318 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-31 15:45:34 +00:00
locka%iol.ie
51247535aa Remove dead ngprefs. b=113970
git-svn-id: svn://10.0.0.236/trunk@113317 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-31 15:43:26 +00:00
locka%iol.ie
20e4ad1b98 Remove reference to dead embed subdir. b=113970
git-svn-id: svn://10.0.0.236/trunk@113316 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-31 15:39:26 +00:00
locka%iol.ie
e8ac7f2beb Remove dead test code - ComFactory. b=113970
git-svn-id: svn://10.0.0.236/trunk@113315 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-31 15:34:42 +00:00
locka%iol.ie
96e2d61128 Remove reference to dead test ComFactory. b=113970
git-svn-id: svn://10.0.0.236/trunk@113314 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-31 15:33:32 +00:00
rods%netscape.com
8ee374e751 Enables builds to compile in special faetures only available in the current SDK
Bug 122530 r=dcone sr=hyatt


git-svn-id: svn://10.0.0.236/trunk@113313 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-31 14:40:33 +00:00
rods%netscape.com
b23f492af0 This does the following:
1) Removes the EnumeratePrinterExtended from nsIPrintOptions and all impls of it
2) Sets the Windows platform to once again use the native print dialog
3) The nsDeviceContextSpecWin will detect at runtime whether to use the standard PRINTDLG or the new PRINTDLGEX (supported by XP and WIN2k), this new code is only compiled in when the ifdef MOZ_REQUIRE_CURRENT_SDK is defined.
4) It adds an extra Property Sheet to the new dialog for Frameset Printing options
5) Now creates a DEVMODE before the diaog is created, this is used for setting different options in the print dialog before it comes up.
122530 r=dcone sr=hyatt


git-svn-id: svn://10.0.0.236/trunk@113312 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-31 14:30:22 +00:00
jake%acutex.net
0b5e8f4c53 Bug 122589 -- Update gnats conversion script to newer schema of 2.14.
Patch by Andrea Dell'Amico <adellam@link.it>


git-svn-id: svn://10.0.0.236/trunk@113311 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-31 14:29:21 +00:00
rods%netscape.com
e7492a75bb Clipping wasn't being set correctly in the PageContentFrame when the reflow was smaller than a page
Bug 122434  r=dcone sr=hyatt


git-svn-id: svn://10.0.0.236/trunk@113310 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-31 14:24:06 +00:00
igor%mir2.org
172a122344 Use heapsort instead of qsort for Array.sort to follow JS for reasons described in http://bugzilla.mozilla.org/show_bug.cgi?id=99120
git-svn-id: svn://10.0.0.236/trunk@113309 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-31 10:08:17 +00:00
despotdaemon%netscape.com
c20f68385d Pseudo-automatic update of changes made by badami@netscape.com.
git-svn-id: svn://10.0.0.236/trunk@113308 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-31 09:33:51 +00:00
bbaetz%student.usyd.edu.au
2370ca85ab Bug 122548 - ftp was adding bogus (empty) entries for files. We shouldn't
be caching these at all
r=dougt, sr=darin


git-svn-id: svn://10.0.0.236/trunk@113307 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-31 08:43:52 +00:00
seawood%netscape.com
308f00fd3c Remove check against fd->secret->md.connectionReturnValue as it always returns 0. Fixing page not loading due to nonblocking connection problem.
Bug #121327 r=arougthopher@lizardland.net


git-svn-id: svn://10.0.0.236/trunk@113306 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-31 07:43:22 +00:00
mscott%netscape.com
c2ab48dbae Bug #122351 --> if the shell doesn't support wide string
friendly versions of Shell_NotifyW, then gracefully fall back and
use the older ASCII versions (Shell_Notify).
r=bhuvan
sr=sspitzer


git-svn-id: svn://10.0.0.236/trunk@113305 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-31 07:31:07 +00:00
brendan%mozilla.org
7804e10cfe Fix for(i in null) and for(i in undefined) to error per ECMA, rather than iterating zero times (121744, r=khanson, sr=shaver).
git-svn-id: svn://10.0.0.236/trunk@113304 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-31 07:30:05 +00:00
cotter%netscape.com
c43af1c5c6 ongoing privacy & security updates; forms, privacy & security prefs changes; r=oeschger
git-svn-id: svn://10.0.0.236/trunk@113303 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-31 06:40:35 +00:00
seawood%netscape.com
aabd7d93bb Call 'alldep' instead of 'depend build' to avoid the extra export stage.
r=bryner


git-svn-id: svn://10.0.0.236/trunk@113299 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-31 06:15:19 +00:00
mcafee%netscape.com
fa6cde4e30 adding mocha to dns
git-svn-id: svn://10.0.0.236/trunk@113297 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-31 05:25:08 +00:00
jaggernaut%netscape.com
a2f89e8b76 Bug 113519: cannot build with cookie extension disabled. Patch by Stephen P. Morse <morse@netscape.com>, r=/sr=darin,alecf,smfr.
Step 3: remove old files


git-svn-id: svn://10.0.0.236/trunk@113296 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-31 05:22:41 +00:00
racham%netscape.com
d98bf2c815 Fixing bug 4198. This fix allows ISPs to add a customized signature file to their user mail accounts. r=ducarroz, sr=sspitzer
git-svn-id: svn://10.0.0.236/trunk@113295 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-31 05:22:24 +00:00
sfraser%netscape.com
2d6d3a935e Back out a change that I commited by mistake, which turned double-buffering off. Thanks to jrgm for catching this.
git-svn-id: svn://10.0.0.236/trunk@113294 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-31 05:15:56 +00:00
racham%netscape.com
d3e9affe90 Fixing bug 4198. This fix allows ISPs to add a customized signature file to their user mail accounts. r=ducarroz, sr=sspitzer
git-svn-id: svn://10.0.0.236/trunk@113293 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-31 05:15:27 +00:00
bernd.mielke%snafu.de
1cbad10dec fieldset reflow cleanup:
bug 120958 report correct maxElementSize under table reflow conditions
bug 48318 implement correct default alignement under bidi conditions, make legend alignment
          indepedent of fieldset content if fieldset size is not content driven.
bug 80422 route trough events for floats inside a fieldset
bug 42302 honour padding-top
bug 60375 large maxElementsize overwrite computedWidth
r=karnaze sr=waterson


git-svn-id: svn://10.0.0.236/trunk@113292 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-31 05:09:13 +00:00
stephend%netscape.com
a985708f0f Bug 120255. Label text in download for offline dialog is confusing. r=jglick@netscape.com/sr=bienvenu@netscape.com
git-svn-id: svn://10.0.0.236/trunk@113290 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-31 04:33:30 +00:00
varga%utcru.sk
3ccaa6cebb Fix for bug 120579. Dragging a bookmark draws frame of entire window.
r=pinkerton, sr=blake


git-svn-id: svn://10.0.0.236/trunk@113289 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-31 04:31:22 +00:00
timeless%mac.com
2dc16480de Bug 122518 Speed up the showbuilds.cgi redirect on http://tinderbox.mozilla.org
patch by netdemonz@yahoo.com r=mcafee


git-svn-id: svn://10.0.0.236/trunk@113288 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-31 04:22:39 +00:00
bienvenu%netscape.com
5a94e045d4 fix for failure downloading multiple newsgroups for offline use rs=mscott 102872
git-svn-id: svn://10.0.0.236/trunk@113287 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-31 04:20:55 +00:00
jaggernaut%netscape.com
55556e470a Bug 113519: cannot build with cookie extension disabled. Patch by Stephen P. Morse <morse@netscape.com>, r=/sr=darin,alecf,smfr.
Step 2: Modify existing files to stop pointing at old files and start pointing at new files.


git-svn-id: svn://10.0.0.236/trunk@113286 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-31 04:08:19 +00:00
ddrinan%netscape.com
7de8255ea6 Checkin for relyea. Call CERT_DestoryCertificateList instead of CERT_DestroyCertList
git-svn-id: svn://10.0.0.236/trunk@113285 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-31 04:00:12 +00:00
samuel%sieb.net
849b0a8bee Bug 119294 - fix JS strict warning
r=walk84
not in the build


git-svn-id: svn://10.0.0.236/trunk@113284 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-31 03:40:12 +00:00
samuel%sieb.net
df821fe0b1 Bug 116544 - fix 005 and 004 messages handlers
r=rginda
not in the build


git-svn-id: svn://10.0.0.236/trunk@113283 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-31 03:33:17 +00:00
samuel%sieb.net
fe09dfbfe2 Bug 117292 - add entities for the new copy messages menu item
r=rginda
not in the build


git-svn-id: svn://10.0.0.236/trunk@113282 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-31 03:31:06 +00:00
samuel%sieb.net
e697f044c7 Bug 117292 - add menu item for copying messages
r=rginda
not in the build


git-svn-id: svn://10.0.0.236/trunk@113281 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-31 03:29:11 +00:00
samuel%sieb.net
02845ef96f Bug 117292 - add pref for copying messages
r=rginda
not in the build


git-svn-id: svn://10.0.0.236/trunk@113280 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-31 03:28:31 +00:00
samuel%sieb.net
91c2130107 Bug 117292 - copy notification messages to the network tab and fix strict warnings
r=rginda
not in the build


git-svn-id: svn://10.0.0.236/trunk@113279 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-31 03:27:38 +00:00
samuel%sieb.net
0d74a05313 Bug 117292 - copy important messages to the network tab
r=rginda
not in the build


git-svn-id: svn://10.0.0.236/trunk@113278 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-31 03:25:41 +00:00
morse%netscape.com
e1008ffe52 bug 116303, js prompt loses default input text, r=sgehani, sr=alecf
git-svn-id: svn://10.0.0.236/trunk@113277 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-31 03:16:58 +00:00
waterson%netscape.com
10164a96b6 Add test case for bug 46918.
git-svn-id: svn://10.0.0.236/trunk@113276 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-31 03:02:30 +00:00
rginda%netscape.com
3551321d16 - venkman only -
fix feedback call in cmdBreak
remove busted code in soruceView.onSelect, which tried to prevent users from selecting multiple ranges.  It didn't work, and we don't need it anyway.
catch exceptions during dispatchCommand and display a message on the consoel view
fix = vs. == mixup in sourceView.getContext, arg!
add breakpointIndexList to sourceView.getContext so we can disable all selected breakpoints.
remove some debug dumps
add command name to dbgDispatch message


git-svn-id: svn://10.0.0.236/trunk@113275 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-31 02:42:09 +00:00
curt%netscape.com
d836fda598 Moves xpi wrapped installer up a directory. Fixes 110919. r=leaf sr=dveditz.
git-svn-id: svn://10.0.0.236/trunk@113274 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-31 02:23:44 +00:00
relyea%netscape.com
5ec404ae36 Fix certlist memory leak.
git-svn-id: svn://10.0.0.236/trunk@113273 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-31 02:19:43 +00:00
naving%netscape.com
2474941163 117723 r=bienvenu sr=mscott make drag and drop of messages work across multiple mail 3 pane windows
git-svn-id: svn://10.0.0.236/trunk@113272 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-31 02:16:12 +00:00
wtc%netscape.com
52cd995d98 Bugzilla bug 119340: backed out the fix. We are still seeing the
"selfserv process not detectable" errors on Linux and I don't have
time to get to the bottom of it.
Modified files:
	cmd/selfserv/selfserv.c tests/common/init.sh tests/ssl/ssl.sh


git-svn-id: svn://10.0.0.236/trunk@113271 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-31 02:03:57 +00:00
darin%netscape.com
1031af74be fixes bug 121521 "ABR doing 'File->Open...' to open a file from disk"
r=jrgm,andreas.otte, sr=mscott


git-svn-id: svn://10.0.0.236/trunk@113270 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-31 01:53:05 +00:00
rginda%netscape.com
362831b18c fix incorrect bracing, r=beard
git-svn-id: svn://10.0.0.236/trunk@113269 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-31 01:32:43 +00:00
cavin%netscape.com
42bc064181 Fix for bug 113421. Closed the msg db after a folder is imported so that the db can be re-generated when the imported folder is re-opened. r=naving, sr=bienvenu.
git-svn-id: svn://10.0.0.236/trunk@113268 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-31 01:28:27 +00:00
rogerl%netscape.com
c24ad789c9 Fixes for RE bytecode + adding Context parameter for base JSObect methods
(and associated fall-out). Fixes for Array.length ahndling.Fixing Boolean
prototype.


git-svn-id: svn://10.0.0.236/trunk@113267 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-31 01:25:26 +00:00
rginda%netscape.com
d10290761a adding REQUIRES for unix and windows bustage, r=beard
git-svn-id: svn://10.0.0.236/trunk@113266 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-31 01:18:33 +00:00
smeredith%netscape.com
fe22d56442 Mentioned the XSL. Problem prefs.
git-svn-id: svn://10.0.0.236/trunk@113265 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-31 01:17:16 +00:00
wtc%netscape.com
e7047bdc33 Bugzilla bug 122712: temporarily export two additional symbols for Mozilla
static build.


git-svn-id: svn://10.0.0.236/trunk@113264 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-31 01:03:21 +00:00
sonja.mirtitsch%sun.com
05688870d1 put the sleep 30 back into the linux ssl test to give the selfserv time
to free the socket...


git-svn-id: svn://10.0.0.236/trunk@113263 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-31 01:01:47 +00:00
despotdaemon%netscape.com
65b32aaafd Pseudo-automatic update of changes made by knous@mozilla.org.
git-svn-id: svn://10.0.0.236/trunk@113262 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-31 00:54:34 +00:00
rginda%netscape.com
2665dd37cd - venkman only -
ASSERT that we have children in removeChildAtIndex
dump the context object if |console.dbgContexts| in the contextFunction.
make cmdClear work if given a breakpointIndexList.
fix cmdFindBp.
add script realization debugging if |console.dbgRealize|.
add command dispatch debugging if |console.dbgDispatch|.
fix bug 110387, crash on exiting venkman.
add dbg* prefs and sync-debug command in venkman-dev.js.


git-svn-id: svn://10.0.0.236/trunk@113261 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-31 00:48:57 +00:00
relyea%netscape.com
7e68464d13 restore checks for critical extenstions and fail if we have any we don't
recognize. Just remove the bogus check that v2 crls must have critical extensions


git-svn-id: svn://10.0.0.236/trunk@113260 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-31 00:42:43 +00:00
rginda%netscape.com
f5f8993e60 changing a string constant, comenting out a DEBUG_rginda
use more descriptive url when compiling prettyprint changes


git-svn-id: svn://10.0.0.236/trunk@113259 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-31 00:37:28 +00:00
sonja.mirtitsch%sun.com
d6ea734305 next thry for bug 115200
git-svn-id: svn://10.0.0.236/trunk@113258 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-31 00:34:04 +00:00
jaggernaut%netscape.com
17e7cfc2ce Bug 113519: cannot build with cookie extension disabled. Patch by Stephen P. Morse <morse@netscape.com>, r=/sr=darin,alecf,smfr.
Step 1: add new files


git-svn-id: svn://10.0.0.236/trunk@113257 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-31 00:29:19 +00:00
relyea%netscape.com
830ed3ff75 Set token flag when saving the CRLs so they actually get put into the database!
git-svn-id: svn://10.0.0.236/trunk@113256 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-31 00:18:09 +00:00
beard%netscape.com
3f185a60cd Fix for bug #118003. r=peterl, sr=jst.
git-svn-id: svn://10.0.0.236/trunk@113255 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-31 00:17:18 +00:00
relyea%netscape.com
92d5738180 Fix searching code so it can find CRL's
git-svn-id: svn://10.0.0.236/trunk@113254 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-31 00:16:29 +00:00
rogerl%netscape.com
c629dbb4d9 Added shell for testing regexp engine.
git-svn-id: svn://10.0.0.236/trunk@113253 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-30 23:58:53 +00:00
rjc%netscape.com
add5fc9aad Fix bug # 122571: add ability to determine if a directory is actually a package (for Mac OS 9/X) r=ccarlen sr=ben
git-svn-id: svn://10.0.0.236/trunk@113252 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-30 23:53:12 +00:00
hwaara%chello.se
77b463d341 #122688, fixing ignore/watched threads to display icons in classic properly.
r=andreww, sr=blake


git-svn-id: svn://10.0.0.236/trunk@113251 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-30 23:50:18 +00:00
blakeross%telocity.com
c2dc7bbd5a 78509 - hang trying to make an internet shortcut with : / \ in title via dnd (and shortcut isn't created). r=pink sr=ben
git-svn-id: svn://10.0.0.236/trunk@113250 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-30 23:31:46 +00:00
waterson%netscape.com
ea95cf7620 Bug 46918, 3490. Clean up inline margin handling. r=rbs, sr=kin
git-svn-id: svn://10.0.0.236/trunk@113249 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-30 23:28:56 +00:00
pinkerton%netscape.com
8d80368955 give trees some theme luv. r=andreww/sr=ben. bug 122685
git-svn-id: svn://10.0.0.236/trunk@113248 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-30 23:02:56 +00:00
bienvenu%netscape.com
08a57b76dc get downloading newsgroups for offline use working better, r=naving, sr=mscott 84061
git-svn-id: svn://10.0.0.236/trunk@113246 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-30 22:58:30 +00:00
bienvenu%netscape.com
40100fbd87 whitespace cleanup
git-svn-id: svn://10.0.0.236/trunk@113245 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-30 22:53:05 +00:00
bienvenu%netscape.com
f525b594e3 fix watched/ignored to show icon immediately r=hwaara, sr=mscott 122642
git-svn-id: svn://10.0.0.236/trunk@113244 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-30 22:47:14 +00:00
bienvenu%netscape.com
b71cf03bcf remove db entries for expired articles when downloading msgs for offline use r=naving, sr=mscott 122386
git-svn-id: svn://10.0.0.236/trunk@113243 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-30 22:46:08 +00:00
bbaetz%student.usyd.edu.au
e663ddf3a0 Bug 122307 - FTP doesn't work if memory and disck cache sizes are 0
r=dougt, sr=darin


git-svn-id: svn://10.0.0.236/trunk@113242 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-30 22:44:44 +00:00
naving%netscape.com
9c79a0be05 116329 one small change to patch by tingley@sundell.net r=rjc sr=waterson. Made it so that XULSortService
can grok for nsIRDFBlob


git-svn-id: svn://10.0.0.236/trunk@113241 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-30 22:37:17 +00:00
ducarroz%netscape.com
d5f0b72b17 Fix for bug 120281. Rename contentChanged to gContentChanged. Patch provided by Alex Vincent <jscript@pacbell.net>. R=ducarroz, SR=bienvenu
git-svn-id: svn://10.0.0.236/trunk@113240 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-30 22:34:35 +00:00
pavlov%netscape.com
daa07fbe9f fixing bug 104999 on windows. r=dcone sr=waterson
git-svn-id: svn://10.0.0.236/trunk@113239 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-30 22:17:55 +00:00
mkaply%us.ibm.com
db245cb834 OS/2 only - update os2pref.js with better fonts
git-svn-id: svn://10.0.0.236/trunk@113237 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-30 22:05:32 +00:00
pinkerton%netscape.com
d6cb53e13b fix case where some pushbuttons were too narrow. r=sdagley/sr=sfraser. bug# 120896
git-svn-id: svn://10.0.0.236/trunk@113236 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-30 22:01:44 +00:00
dsirnapalli%netscape.com
db360d1e43 *** empty log message ***
git-svn-id: svn://10.0.0.236/trunk@113235 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-30 22:00:24 +00:00
pschwartau%netscape.com
475800eea1 Initial add. Regression test for bug 121744.
git-svn-id: svn://10.0.0.236/trunk@113232 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-30 21:57:28 +00:00
dougt%netscape.com
9fad99d1de adding @return comments.
git-svn-id: svn://10.0.0.236/trunk@113231 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-30 21:56:34 +00:00
jaggernaut%netscape.com
bfb2d6a9eb Bug 46200: more cleaning up of dead code, r=ben, sr=alecf
git-svn-id: svn://10.0.0.236/trunk@113229 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-30 21:41:06 +00:00
nhotta%netscape.com
f0dac040f0 MIME encoder change, fixed a problem of treating separater characters (and some clean up),
contributed by adu@sparc.spb.su, bug 92355, r=nhotta, sr=sspitzer.


git-svn-id: svn://10.0.0.236/trunk@113228 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-30 21:26:39 +00:00
nhotta%netscape.com
9bfdcd4a27 Fixed charset conversion problem for headers for SaveAs (and some clean up),
contributed by adu@sparc.spb.su, bug 74424, r=nhotta, sr=sspitzer.


git-svn-id: svn://10.0.0.236/trunk@113227 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-30 21:26:17 +00:00
sfraser%netscape.com
67a35c1a08 Making the nsModuleComponentInfo data const; bug 74803. r=dp, sr=waterson
git-svn-id: svn://10.0.0.236/trunk@113225 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-30 21:14:20 +00:00
cbiesinger%web.de
7c2a2cb503 Fixing bug 41187, adding internal-gopher-sound icon
r=pavlov sr=waterson


git-svn-id: svn://10.0.0.236/trunk@113224 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-30 21:02:29 +00:00
nicolson%netscape.com
5533d3ca90 Fix problems caused by changing package names.
git-svn-id: svn://10.0.0.236/trunk@113223 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-30 20:54:24 +00:00
nicolson%netscape.com
4ff972e904 move org/mozilla/jss/manage subdirectory to org/mozilla/jss
git-svn-id: svn://10.0.0.236/trunk@113222 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-30 20:51:00 +00:00
nicolson%netscape.com
43d64c6ff9 move /manage subdirectory up one level to coincide with org.mozilla.jss
package name


git-svn-id: svn://10.0.0.236/trunk@113221 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-30 20:50:18 +00:00
nicolson%netscape.com
8f9e2369e4 move this stuff up one directory to coincide with the org.mozilla.jss
package name.


git-svn-id: svn://10.0.0.236/trunk@113220 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-30 20:49:00 +00:00
nicolson%netscape.com
a321a332a4 update all classes to be in org.mozilla.jss.tests.package.
Improve TestKeyGen test.


git-svn-id: svn://10.0.0.236/trunk@113219 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-30 20:47:41 +00:00
nicolson%netscape.com
0075d37a74 added KeyPairGenerator.
git-svn-id: svn://10.0.0.236/trunk@113218 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-30 20:39:09 +00:00
nicolson%netscape.com
0e99cc2162 Change default token from InternalCryptoToken to InternalKeyStorageToken.
git-svn-id: svn://10.0.0.236/trunk@113217 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-30 20:38:53 +00:00
nicolson%netscape.com
dde4c9b7e7 always do a private_export.
git-svn-id: svn://10.0.0.236/trunk@113216 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-30 20:00:31 +00:00
nicolson%netscape.com
a5a292e64e Fix 122437: Memory leak in read method of SSLSocket
git-svn-id: svn://10.0.0.236/trunk@113214 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-30 19:52:02 +00:00
myk%mozilla.org
278c5a5f14 Fix for bug 109480: Removes createattachment.cgi from CVS.
Removed by Myk Melez <myk@mozilla.org>.
r=bbaetz x 2


git-svn-id: svn://10.0.0.236/trunk@113213 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-30 18:08:01 +00:00
rayw%netscape.com
b717e1974f A number of SOAP bug fixes including fixing problems with fault handling,
using wstrings instead of astrings for  arrays, and ignoring the http
status and returning a fault code when there is one.

SOAP is not part of default build.


git-svn-id: svn://10.0.0.236/trunk@113211 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-30 17:40:06 +00:00
mikep%oeone.com
99b1b6cf79 Changing location of data file from home to profile directory.
git-svn-id: svn://10.0.0.236/trunk@113210 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-30 17:06:14 +00:00
mikep%oeone.com
777aa22dd8 Fixing problem with left hand tree.
git-svn-id: svn://10.0.0.236/trunk@113209 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-30 16:15:29 +00:00
timeless%mac.com
461b2f1149 Bug 117716 XBL Bindings Property radio group should have horizontal orient
patch by neil@parkwaycc.co.uk r=bzbarsky@mit.edu sr=hewitt


git-svn-id: svn://10.0.0.236/trunk@113208 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-30 15:51:39 +00:00
mikep%oeone.com
969d32bfc0 fixing strict warnings for calendar
git-svn-id: svn://10.0.0.236/trunk@113207 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-30 15:45:39 +00:00
mikep%oeone.com
63f574817b Many xul bug fixes for adding events and small bug fix in the week view.
git-svn-id: svn://10.0.0.236/trunk@113206 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-30 15:22:19 +00:00
blizzard%redhat.com
056f2fe1bf Bug #121011. widget misses mouse-up event after scrolling when mouse button is released outside the widget area. Track passive grabs with sButtonMotionTarget. r=bryner, sr=shaver
git-svn-id: svn://10.0.0.236/trunk@113205 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-30 14:57:53 +00:00
myk%mozilla.org
3bad919c98 Fix for bug 104521: Removes old attachment interface in favor of new attachment tracker.
Patch by Myk Melez <myk@mozilla.org>.
r=bbaetz,kiko


git-svn-id: svn://10.0.0.236/trunk@113204 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-30 14:14:12 +00:00
bbaetz%student.usyd.edu.au
65d995cd1d Bug 122154 - change arrays to numeric, and clean up query.atml js
patch by kiko@async.com.br, r=caillon,bbaetz


git-svn-id: svn://10.0.0.236/trunk@113203 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-30 13:43:11 +00:00
rginda%netscape.com
dd071b060f quiet bogus "potentially unused" warnings, see bug 121178, sr=brendan
git-svn-id: svn://10.0.0.236/trunk@113202 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-30 08:37:57 +00:00
alecf%netscape.com
4331ed65d3 First part of fix for bug 107575 - remove nsString::FindChar because there is already an nsAString::FindChar, and remove the "ignore case" option in RFindChar
r=dougt, sr=jag


git-svn-id: svn://10.0.0.236/trunk@113200 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-30 06:04:29 +00:00
mjudge%netscape.com
1d98bc69e0 BUG115229 files not in build yet. checking in new files to make tree landing of editor embedded work go more smoothely
git-svn-id: svn://10.0.0.236/trunk@113197 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-30 05:15:42 +00:00
blizzard%redhat.com
0ddbd5c1fa Get scrollbars on popups working properly. Not part of the build. No bug on this.
git-svn-id: svn://10.0.0.236/trunk@113196 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-30 04:52:29 +00:00
mjudge%netscape.com
4de829d793 BUG115229 files not in build yet. checking in new files to make tree landing of editor embedded work go more smoothely
git-svn-id: svn://10.0.0.236/trunk@113195 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-30 04:46:54 +00:00
mjudge%netscape.com
58da2c0adf BUG115229 files not in build yet. checking in new files to make tree landing of editor embedded work go more smoothely
new bitmap for editor toolbar.


git-svn-id: svn://10.0.0.236/trunk@113194 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-30 04:45:18 +00:00
mjudge%netscape.com
9f9b518210 files not in build yet. BUG 115922. embedding work for editor. checking in files not in build yet to make tree landing more smooth.
git-svn-id: svn://10.0.0.236/trunk@113193 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-30 04:44:14 +00:00
sonja.mirtitsch%sun.com
833765f0bd another try for QA / RE / tinderbox problem bug #115200
git-svn-id: svn://10.0.0.236/trunk@113192 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-30 04:37:35 +00:00
morse%netscape.com
24f63093a1 bug 113089, doubleclick in chose-user screen should close window, r=sgehani, sr=alecf
git-svn-id: svn://10.0.0.236/trunk@113191 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-30 04:21:51 +00:00
sfraser%netscape.com
a58abd053a Chamnges to allow for making every module's nsModuleComponentInfo data const; bug 74803. r=dp, sr=waterson
git-svn-id: svn://10.0.0.236/trunk@113190 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-30 04:05:47 +00:00
seawood%netscape.com
18da129413 Use .get() when assigning nsXPIDLCString to const char*. Fixing OS/2 & AIX bustage.
git-svn-id: svn://10.0.0.236/trunk@113189 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-30 03:51:47 +00:00
rginda%netscape.com
b4a3c50667 - venkman only -
bug 122021, add comments re: leading/trailing spaces and quotes in venkman string files.


git-svn-id: svn://10.0.0.236/trunk@113188 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-30 03:45:48 +00:00
ducarroz%netscape.com
35f3f37671 Fix for bug 100036. Need to remove node from bottom to top to avoid removing a newly merged text node. R=cavin, SR=bienvenu
git-svn-id: svn://10.0.0.236/trunk@113187 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-30 03:37:19 +00:00
smeredith%netscape.com
ca8342bb53 Fixed locked pref bug in pref editor.
Updated the documentation.


git-svn-id: svn://10.0.0.236/trunk@113186 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-30 03:21:40 +00:00
timeless%mac.com
0566424203 Bug 120211 Hook-up a dialog which warns users of the broken Xfree86 Xprt
patch by Roland.Mainz@informatik.med.uni-giessen.de r=timeless sr=jag


git-svn-id: svn://10.0.0.236/trunk@113185 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-30 03:15:27 +00:00
rginda%netscape.com
edc9a7f5e3 - venkman only -
remove debug dumps in variious getContext functions
warning cleanup in outliner-utils.js
add chrome-filter command to set the state of console.enableChromeFilter
if on, chrome files will not be displayed in the scripts view, and they will be filtered by the debugger service.  If off, chrome files will be treated the same as others.  chrome files are identified by a leading "chrome:" in the url.
add "Display Browser Files" checkitem to View menu.
add |feedback| function, which calls |display| only if the event began at the console.
fix async loading issue in SourceText.loadSource
fix boolean pref getter in venkman-prefs.js


git-svn-id: svn://10.0.0.236/trunk@113184 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-30 03:05:49 +00:00
cathleen%netscape.com
dd8ebc5bd1 eliminate nsCRT::zero() to use memset to zero instead, bug 118135, r=dp sr=waterson
git-svn-id: svn://10.0.0.236/trunk@113183 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-30 02:55:57 +00:00
serge%netscape.com
72ccea118e fix #115308, NPN_PostURL[Notify] does not handle binary data; r=bnesse, sr=darin
git-svn-id: svn://10.0.0.236/trunk@113181 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-30 02:40:46 +00:00
darin%netscape.com
b801661659 fixes bug 121765 "NS_MakeAbsoluteWithCharset should not URL escape before
calling nsIURI::Resolve" r=nhotta, sr=brendan


git-svn-id: svn://10.0.0.236/trunk@113180 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-30 02:40:27 +00:00
jband%netscape.com
07ee695610 fix bug 121118. Don't crash if interfaceinfo is not resolvable at runtime. r=dbradley sr=brendan
git-svn-id: svn://10.0.0.236/trunk@113179 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-30 02:36:20 +00:00
bzbarsky%mit.edu
470ea1917e Make sure we lowercase types/extensions before putting them in the
datasource and that we lowercase types/extensions before comparing to
the datasource.  Bug 114462, r=law, sr=mscott.


git-svn-id: svn://10.0.0.236/trunk@113178 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-30 02:34:15 +00:00
darin%netscape.com
8ad1ba8651 removing dead, empty file
git-svn-id: svn://10.0.0.236/trunk@113177 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-30 02:29:51 +00:00
waterson%netscape.com
e42395b6b7 Bug 122367. I give up. Force block frames to have NS_BLOCK_SPACE_MGR bit set. r=dbaron.
git-svn-id: svn://10.0.0.236/trunk@113176 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-30 02:10:14 +00:00
rogerl%netscape.com
7492e8edc9 Bytecode version of engine.
git-svn-id: svn://10.0.0.236/trunk@113175 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-30 02:02:33 +00:00
kaie%netscape.com
debe0dea95 b=122503 msgCompFields.securityInfo morphs from nsIMsgSMIMECompFields to nsISupport.
r=kaie sr=mscott


git-svn-id: svn://10.0.0.236/trunk@113174 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-30 01:58:35 +00:00
bryner%netscape.com
c76cc7e915 Bug 122512 - make sure we don't construct inline frames for children of a select (size > 1) widget when using xbl form controls. r=hewitt,sr=hyatt.
git-svn-id: svn://10.0.0.236/trunk@113173 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-30 01:38:55 +00:00
hyatt%netscape.com
35046a1728 Fix for 122031, r=pink, sr=brendan
git-svn-id: svn://10.0.0.236/trunk@113172 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-30 01:24:15 +00:00
hyatt%netscape.com
c7d42ad5fa Fix CocoaZilla bustage caused by accidental commit of a text file as binary. Not part of build.
git-svn-id: svn://10.0.0.236/trunk@113171 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-30 01:23:23 +00:00
relyea%netscape.com
f5ee7acbf0 Unsigned values are always greater than '0'!
git-svn-id: svn://10.0.0.236/trunk@113170 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-30 00:48:24 +00:00
relyea%netscape.com
a47cb54982 Indexes are zero based. Do our realloc when index == size (not after).
git-svn-id: svn://10.0.0.236/trunk@113169 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-30 00:25:34 +00:00
relyea%netscape.com
b30eea42df 1) put some defensive programming so we don't crash on invalid der.
2) set the start offset correctly for multi-byte lengths when decoding sets
and sequences


git-svn-id: svn://10.0.0.236/trunk@113168 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-30 00:24:12 +00:00
cathleen%netscape.com
daf06d1fa1 fix win32 static build bustage, bug 122477 sr=waterson r=mcafee
git-svn-id: svn://10.0.0.236/trunk@113167 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-29 23:39:44 +00:00
gerv%gerv.net
4c6b3e1925 Bug 117509 - createaccount.cgi templatisation.
git-svn-id: svn://10.0.0.236/trunk@113165 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-29 23:26:37 +00:00
blizzard%redhat.com
3e263972ef Bug #121246. Fix rendering problems with text areas and menus. Not part of the build.
git-svn-id: svn://10.0.0.236/trunk@113164 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-29 23:24:00 +00:00
bbaetz%student.usyd.edu.au
b5fd1e48f2 Bug 115720 - migrated ("network.proxy.type", 3) fails to connect
r=darin, sr=dveditz


git-svn-id: svn://10.0.0.236/trunk@113163 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-29 23:15:41 +00:00
igor%mir2.org
041da0a0b6 Stricter enter/exit: enter performs sanity checks on supplied Context and the exit requires previous enter.
git-svn-id: svn://10.0.0.236/trunk@113162 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-29 22:58:22 +00:00
mscott%netscape.com
d02d7f94e3 Bug #122254 --> delay initialing the biff status icon struct until
we really need to use it.
r=bhuvan
sr=sspitzer


git-svn-id: svn://10.0.0.236/trunk@113161 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-29 22:49:42 +00:00
mscott%netscape.com
79356fafcf Bug #122293 --> pass in the correct # of new messages to make
the biff icon titletip for pop show the right number.
r=navin
sr=bienvenu


git-svn-id: svn://10.0.0.236/trunk@113160 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-29 22:47:20 +00:00
oeschger%netscape.com
d94e95eec2 checking in doc fixes in 122245 and 62573 for
matt krai, kraai@alumni.carnegiemellon.edu, r=me and cotter@netscape.com


git-svn-id: svn://10.0.0.236/trunk@113159 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-29 22:43:36 +00:00
chak%netscape.com
c97d80ff4d Updated fix for Bugscape #11939 - JavaScript Fails on CTA Signed Page
r=adamlock, sr=jband(for the branch fix)


git-svn-id: svn://10.0.0.236/trunk@113158 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-29 22:30:12 +00:00
relyea%netscape.com
9ff26f31a1 Restore idempontency to nss_init*
git-svn-id: svn://10.0.0.236/trunk@113157 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-29 22:27:15 +00:00
locka%iol.ie
8398cd7d51 Dead file (not built). Should have been deleted when webbrowserpersist moved to embedding/components
git-svn-id: svn://10.0.0.236/trunk@113156 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-29 22:21:48 +00:00
darin%netscape.com
aa830712ab fixes bug 114125 "nsStandardURL::Clone fails to clone the nsIFile if one
exists" r=dougt,sr=sfraser


git-svn-id: svn://10.0.0.236/trunk@113155 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-29 22:04:16 +00:00
hwaara%chello.se
d3ab9d4155 #72279, "Need visual indicators for Watched, Killed threads"
r=andreww, sr=hewitt on the themes stuff.  r=sspitzer, sr=bienvenu on the mail changes.


git-svn-id: svn://10.0.0.236/trunk@113154 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-29 21:56:44 +00:00
dougt%netscape.com
2dfb45dde3 Backing out nsIFile changes which should not have landed.
git-svn-id: svn://10.0.0.236/trunk@113152 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-29 21:42:38 +00:00
danm%netscape.com
1bc8d80e04 deactivate root focus controller as well as your own while deactivating yourself. bug 122462 / bugscape 11864 code=saari,myself r=bryner,hyatt
git-svn-id: svn://10.0.0.236/trunk@113151 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-29 21:42:07 +00:00
blizzard%redhat.com
83b13ed306 Bug #121279. TestGtkEmbed crash on javascript window.close(). r=jst,sr=shaver
git-svn-id: svn://10.0.0.236/trunk@113150 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-29 21:39:31 +00:00
cavin%netscape.com
8c566f4ff8 Fix for #106534. Check if the fcc folder uri is valid and use the configured one if not valid. r=ducarroz, sr=bienvenu.
git-svn-id: svn://10.0.0.236/trunk@113149 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-29 21:38:16 +00:00
nhotta%netscape.com
b4d63c4658 For Carbon only, changed to use Navigation Services 3.0 for GetLocalFile, GetLocalFolder, PutLocalFile,
bug 95478, r=ccarlen, sr=sfraser.


git-svn-id: svn://10.0.0.236/trunk@113147 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-29 21:34:21 +00:00
naving%netscape.com
9edbb600bf 107029 r=racham sr=mscott. Add Clear button to come out of quick search (mail - 3pane)
git-svn-id: svn://10.0.0.236/trunk@113146 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-29 21:32:05 +00:00
mscott%netscape.com
234c421d85 Bug #122427 --> define a window title string for the add smtp server dialog
box so you can actually bring it up.
rs=sspitzer


git-svn-id: svn://10.0.0.236/trunk@113145 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-29 21:32:03 +00:00
cathleen%netscape.com
3ae7a2346b eliminate nsCRT::memcmp and all callers to use memcmp instead, bug 118135 r=dp sr=brendan
git-svn-id: svn://10.0.0.236/trunk@113144 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-29 21:30:32 +00:00
dougt%netscape.com
011f9b10e5 1. Converts callers of nsIComponentManagerObsolete to use
nsIComponentRegistrar.

2. Converts callers of nsComponentManager::AutoRegister to use
nsIComponentRegistrar's autoRegistrar method.

3. Add nsIComponentRegistrar implmentation to nsComponentManagerImpl.

4. Rearrange nsComponentManager.cpp so that related methods are in the same
place.

5. Added a C-style function NS_GetComponentRegistrar so that getting the
registrar is easier in some places.

6. Added a nsISimpleEnumerator interface on PLDHashTableEnumeratorImpl.  in
this way, the same base class can support both old style and new style
enumerations.

7. Fixed a nasty bug where unregistring factories will leave the contract id
hash with a dangling pointer.  Now, when unregister is called we search the
contract id hash for entries which have the given doomned cid and remove them.


Bug 115853.  r=dp@netscape.com, sr=rpotts@netscape.com


git-svn-id: svn://10.0.0.236/trunk@113143 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-29 21:22:13 +00:00
mscott%netscape.com
c014f42d9a Bug #11926 --> add a pref for disabling the pseudo mailbox box view and force
the imap delete model if psuedo mailbox view is being suppressed
r=sspitzer
sr=bienvenu


git-svn-id: svn://10.0.0.236/trunk@113142 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-29 21:21:43 +00:00
relyea%netscape.com
9b55e3a569 Built-ins set the ulValueLen to -1 to indicate an unknown attribute type.
git-svn-id: svn://10.0.0.236/trunk@113141 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-29 21:12:13 +00:00
kestes%walrus.com
e4389162d5 added some thoughts on how this should work. I still need to debug it.
git-svn-id: svn://10.0.0.236/trunk@113140 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-29 21:11:59 +00:00
pinkerton%netscape.com
a7cee19a47 twisties, upside down tabs, and tree implementation on mac. Also adding constants for window, menu, and dialog backgrounds XP. bug 115747, r=sdagley/sr=hyatt,sfraser.
git-svn-id: svn://10.0.0.236/trunk@113139 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-29 21:10:57 +00:00
relyea%netscape.com
6622f270f8 Token and slot names are already converted to NULL terminated strings in the slot structure
git-svn-id: svn://10.0.0.236/trunk@113138 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-29 21:10:50 +00:00
bnesse%netscape.com
f23dcf9eb5 Fix for bug 104293. Do not bail on applet creation if height and width are 0. r=peterlubczynski, sr=beard.
git-svn-id: svn://10.0.0.236/trunk@113137 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-29 21:08:06 +00:00
naving%netscape.com
207f7c02aa 122314 patch by tingley@sundell.net sr=waterson. decrease the refcnt but not null out rdfService -fixes
future crash on shutdown


git-svn-id: svn://10.0.0.236/trunk@113135 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-29 21:04:03 +00:00
pinkerton%netscape.com
8cfab27071 make control-space send a context-menu event into gecko. r=brade/sr=sfraser. bug# 81727
git-svn-id: svn://10.0.0.236/trunk@113134 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-29 21:01:42 +00:00
pinkerton%netscape.com
b8d6fb4e39 rebuild the parent menu when the title of the parent of a hierarchical menu changes (text-zoom%, for example). the old code would only work if the parent was the menubar. r=sdagley/sr=sfraser. bug#106394
git-svn-id: svn://10.0.0.236/trunk@113133 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-29 21:00:16 +00:00
chak%netscape.com
94decaa0c2 Fix for Bugscape #11939 - JavaScript fails on CTA signed page
r=adamlock, sr=jband


git-svn-id: svn://10.0.0.236/trunk@113132 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-29 20:59:12 +00:00
despotdaemon%netscape.com
65e17de29d Pseudo-automatic update of changes made by cbiesinger@web.de.
git-svn-id: svn://10.0.0.236/trunk@113130 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-29 20:14:08 +00:00
curt%netscape.com
2ce8447b0a Switch to http 1.0 instead of 1.1. Fixes bug #89701.
git-svn-id: svn://10.0.0.236/trunk@113128 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-29 19:08:12 +00:00
despotdaemon%netscape.com
0cb909bdd1 Pseudo-automatic update of changes made by knous@mozilla.org.
git-svn-id: svn://10.0.0.236/trunk@113127 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-29 19:03:35 +00:00
relyea%netscape.com
8fc3bf1fcb Don't leak memory in the arena pool
git-svn-id: svn://10.0.0.236/trunk@113126 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-29 19:00:47 +00:00
igor%mir2.org
316733af9e Few Native* classes are made package private and final. They had been public only for implementation reasons.
git-svn-id: svn://10.0.0.236/trunk@113124 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-29 18:40:13 +00:00
relyea%netscape.com
cd1b6d6069 More 'pretty print' improvements. Decode context specific data a little more.
git-svn-id: svn://10.0.0.236/trunk@113123 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-29 17:50:27 +00:00
ian.mcgreer%sun.com
c1c7114dbe changes related to bug 115660
* fipstoken will only force authentication for object-related functions when the object is a private or secret key
* certutil does not authenticate to token when in FIPS and only doing cert-related operations
* QA does not provide password to certutil when doing cert-related operations in FIPS tests


git-svn-id: svn://10.0.0.236/trunk@113122 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-29 17:30:22 +00:00
timeless%mac.com
00f05b8498 Bug 95986 remove references to nsImageManager
removing obsolete tests
removal for cbiesinger@web.de r=pavlov sr=tor


git-svn-id: svn://10.0.0.236/trunk@113121 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-29 15:15:37 +00:00
timeless%mac.com
1264f3a27e Bug 95986 remove references to nsImageManager
patch by cbiesinger@web.de r=pavlov sr=tor


git-svn-id: svn://10.0.0.236/trunk@113120 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-29 15:01:33 +00:00
hwaara%chello.se
4da32f6549 #120733, "Filters: 'Begins with' criteria treated as 'Contains'".
r=naving, sr=bienvenu


git-svn-id: svn://10.0.0.236/trunk@113119 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-29 15:00:05 +00:00
ian%hixie.ch
2368ac910c Fix duplicate id by manually specifying attributes on one element. Fixes the Paste As Quotation menu item in the compose context menu. Patch by neil@parkwaycc.co.uk, b=121582, r=timeless, sr=blake.
git-svn-id: svn://10.0.0.236/trunk@113118 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-29 14:08:14 +00:00
seawood%netscape.com
962a6e58bb If TOPSRCDIR_MOZ is not set, set it to TOPSRCDIR.
git-svn-id: svn://10.0.0.236/trunk@113117 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-29 13:12:50 +00:00
kestes%walrus.com
8b2e024267 many bug fixes. it still will not work, I need a few more hours to finish
debugging this.


git-svn-id: svn://10.0.0.236/trunk@113116 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-29 11:38:55 +00:00
seawood%netscape.com
2d60f0ef5b use 'alldep' instead of 'depend build'
git-svn-id: svn://10.0.0.236/trunk@113115 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-29 10:25:13 +00:00
igor%mir2.org
b28d6ac14b Use ScriptRuntime.toString(double) to convert double to string. Easier to follow version of getElem/setElem
git-svn-id: svn://10.0.0.236/trunk@113114 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-29 09:44:24 +00:00
rginda%netscape.com
c952bded21 - venkman only -
UI changes for 121318
disable context before calling debugTrap
add dumpcontexts command to venkman-dev.js
remove console._stopLevel


git-svn-id: svn://10.0.0.236/trunk@113113 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-29 09:25:32 +00:00
glazman%netscape.com
3e255304d9 cmanske says that there is no need to get editorShell, it's always here...; b=91548, r=brade, sr=kin
git-svn-id: svn://10.0.0.236/trunk@113112 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-29 09:08:08 +00:00
rginda%netscape.com
482526e770 bug 121318, sr=brendan,r=jst, "Venkman should disable the target window when stopped at a breakpoint".
implement the jsdIContext interface.
create only one jsdValue wrapper per unique jsval.
add executionContext property to jsdIStackFrame.
add enumerateContexts to jsdIDebuggerService.
add jsdIContextEnumerator interface.


git-svn-id: svn://10.0.0.236/trunk@113111 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-29 08:32:23 +00:00
ben%netscape.com
be2e5d36fe [Manticore]
Add license to new file
NOT PART OF BUILD


git-svn-id: svn://10.0.0.236/trunk@113110 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-29 08:22:40 +00:00
ben%netscape.com
ccb9c5381d [Manticore]
Update toolbars (fancy toolbars on hold for now)
add location bar for loading URLs
NOT PART OF BUILD


git-svn-id: svn://10.0.0.236/trunk@113109 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-29 08:21:06 +00:00
rginda%netscape.com
b9406be45a -venkman only-
ui changes for bugs 121192 and 121178.
adds "emode" command, display any expcetions produced by evalInTargetScope


git-svn-id: svn://10.0.0.236/trunk@113108 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-29 08:16:56 +00:00
rginda%netscape.com
cec41f9f3b fixing os/2 bustage, false vs PR_FALSE mixup
git-svn-id: svn://10.0.0.236/trunk@113107 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-29 07:20:59 +00:00
jst%netscape.com
990a6bb073 WIP for an interface for the new frame and iframe loader. Not part of the build yet.
git-svn-id: svn://10.0.0.236/trunk@113103 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-29 06:31:26 +00:00
jst%netscape.com
fbe086cd70 WIP for a new frame and iframe loader. Not part of the build yet.
git-svn-id: svn://10.0.0.236/trunk@113102 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-29 06:27:27 +00:00
rginda%netscape.com
62e2418433 bug 121178, r=jst,sr=brendan, "jsdIStackFrame::eval signature needs to be changed"
return exception from jsdService::Eval if one occurs.


git-svn-id: svn://10.0.0.236/trunk@113101 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-29 06:15:58 +00:00
rginda%netscape.com
65e86f32aa bug 121192, sr=brendan,r=jst, "Add proper errorHook and debugHook to jsdIDebuggerService"
adds jsdIDebugHook interface, change the meaning of jsdIErrorHook.
error hook is called when an error occurs, and is given information about the error report.
debug hook is called when/if the error hook returns false, and is given information about the ececution state.


git-svn-id: svn://10.0.0.236/trunk@113100 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-29 05:56:02 +00:00
mscott%netscape.com
5890cc3f82 Bug #122293 --> add separate localization strings for biff icon tooltips
r/sr=sspitzer


git-svn-id: svn://10.0.0.236/trunk@113098 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-29 03:50:13 +00:00
bryner%netscape.com
0941d7d594 Style and code cleanup. No functional changes. Not part of the build.
git-svn-id: svn://10.0.0.236/trunk@113097 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-29 03:06:44 +00:00
timeless%mac.com
9c991564ac Bug 120967 Scale images with specific scaling factors
patch by Roland.Mainz@informatik.med.uni-giessen.de r=timeless sr=sfraser


git-svn-id: svn://10.0.0.236/trunk@113096 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-29 03:06:19 +00:00
timeless%mac.com
8af239bb2a Bug 121066 Images are dithered in Grayscale mode
patch by Roland.Mainz@informatik.med.uni-giessen.de r=timeless sr=sfraser


git-svn-id: svn://10.0.0.236/trunk@113095 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-29 03:05:19 +00:00
timeless%mac.com
6436523048 Bug 120221 Make |NS_ERROR_GFX_PRINTER_INVALID_ATTRIBUTE| more specific
patch by Roland.Mainz@informatik.med.uni-giessen.de r=rods sr=sfraser


git-svn-id: svn://10.0.0.236/trunk@113094 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-29 03:03:56 +00:00
wtc%netscape.com
10c0c202c1 Bugzilla bug 97485: added support for the magic "nspr_use_zone_allocator"
global variable.


git-svn-id: svn://10.0.0.236/trunk@113093 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-29 03:01:45 +00:00
timeless%mac.com
524c7f9717 Bug 120911 Crash while printing due lousy error checking
patch by Roland.Mainz@informatik.med.uni-giessen.de r=rods sr=jag


git-svn-id: svn://10.0.0.236/trunk@113092 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-29 02:59:12 +00:00
darin%netscape.com
f5daadee46 part one of bug 113163 "Performance problem at downloading"
patch=ak@muc.de, r=gordon@netscape.com, sr=darin@netscape.com


git-svn-id: svn://10.0.0.236/trunk@113091 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-29 02:58:02 +00:00
peterlubczynski%netscape.com
ad9265748e Fix for Plugin paints in the wrong part of the screen when on an absolute Div or scrolled bug 120821 r=kmcclusk@netscape.com sr=beard
git-svn-id: svn://10.0.0.236/trunk@113089 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-29 02:36:54 +00:00
nicolson%netscape.com
6bdaad4ee0 add -sourcepath flag.
git-svn-id: svn://10.0.0.236/trunk@113088 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-29 02:31:01 +00:00
jgaunt%netscape.com
d9e4217f1a bug 121890 bad acc bounds reporting for HTML Select Button
r=aaronl
sr=brendan


git-svn-id: svn://10.0.0.236/trunk@113087 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-29 02:05:22 +00:00
shanjian%netscape.com
b049cb1260 #92817 Simp. Chinese character display as bold face in Page Source
r=nhotta, sr=brendan


git-svn-id: svn://10.0.0.236/trunk@113086 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-29 01:54:51 +00:00
mscott%netscape.com
4d14c1ea0c Bug #122191 --> clear the selection from the attachment tree before
we remove the elements from the tree.
sr=sspitzer


git-svn-id: svn://10.0.0.236/trunk@113085 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-29 01:42:57 +00:00
depstein%netscape.com
34defde189 added indiv cases for index entries and simple enumeration for nsiHistory
git-svn-id: svn://10.0.0.236/trunk@113084 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-29 01:31:15 +00:00
mscott%netscape.com
63f3a30ffc Bug #11922 --> if the redirector already has a password for the account
then set the authenticated state to true. this should cause biff
to start working for accounts using the redirector.
r=bienvenu
sr=sspitzer


git-svn-id: svn://10.0.0.236/trunk@113081 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-29 01:13:55 +00:00
kestes%walrus.com
600694ee91 fix comment.
git-svn-id: svn://10.0.0.236/trunk@113080 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-29 01:11:10 +00:00
kaie%netscape.com
b4dce85cdc b=116417 NSS3.4 build. Directly imported CAs not saved. Introducing a new auto cleanup class for destructing NSS objects.
r=javi sr=alecf


git-svn-id: svn://10.0.0.236/trunk@113079 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-29 01:10:04 +00:00
darin%netscape.com
1c1a37516c another patch for bug 109179 "replace nsStdEscape with nsEscapeURLPart"
r=dougt,gagan sr=alecf,waterson


git-svn-id: svn://10.0.0.236/trunk@113078 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-29 01:09:37 +00:00
kestes%walrus.com
54fa661fc0 regularize $last_cvs_data to be $last_vc_data this is clearer and matches
perforce.pm.  Also fix comments about the function call names to match
new naming system.


git-svn-id: svn://10.0.0.236/trunk@113077 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-29 01:09:15 +00:00
kestes%walrus.com
5658f562ac this is a first draft. I need to debug this before it will work,
but you can see the logic of it and it will not take long to get it
to work.


git-svn-id: svn://10.0.0.236/trunk@113076 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-29 01:06:26 +00:00
cmanske%netscape.com
e9ced7309b Fixed busted 'New' command in Composer, b=121939, r=brade, sr=hewitt
git-svn-id: svn://10.0.0.236/trunk@113075 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-29 00:56:08 +00:00
bienvenu%netscape.com
40e15933fe fix crash playing back offline imap trash emptying r/sr=sspitzer 121799
git-svn-id: svn://10.0.0.236/trunk@113072 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-29 00:39:06 +00:00
nicolson%netscape.com
850ede87f4 fix to test either dist or release builds.
git-svn-id: svn://10.0.0.236/trunk@113070 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-29 00:14:45 +00:00
ashishbhatt%netscape.com
7da37df8a4 Added test cases for interface nsIClipboardCommand
git-svn-id: svn://10.0.0.236/trunk@113069 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-29 00:13:04 +00:00
waterson%netscape.com
3ddde9bd8f Bug 102860. Relatively positioned frames do not have place-holders. r=dbaron, sr=hyatt
git-svn-id: svn://10.0.0.236/trunk@113068 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-29 00:03:31 +00:00
waterson%netscape.com
3229841ba0 Bug 121860. Handle case where block frame is embedded inside a XUL document. r=dbaron, sr=hyatt.
git-svn-id: svn://10.0.0.236/trunk@113067 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-29 00:02:25 +00:00
stephend%netscape.com
1bfbb1a79e Bug 95929. 'Done' should be removed from the Subscribe window's status' r=jglick@netscape.com, sr=sspitzer@netscape.com
git-svn-id: svn://10.0.0.236/trunk@113066 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-28 23:50:28 +00:00
nicolson%netscape.com
01c72457d0 move into org.mozilla.jss.tests package.
git-svn-id: svn://10.0.0.236/trunk@113065 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-28 23:49:38 +00:00
bryner%netscape.com
89e99954e4 Bug 112716 - implement checkbox in XBL. r=jkeiser, sr=jst.
git-svn-id: svn://10.0.0.236/trunk@113064 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-28 23:48:16 +00:00
bryner%netscape.com
04822496de Removing scrollbar tracks from the list of widgets that don't need to be invalidated due to a state change. This fixes the scrollbar "stuck-in-hover" problem. Not part of the build.
git-svn-id: svn://10.0.0.236/trunk@113063 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-28 23:44:16 +00:00
seawood%netscape.com
58c6693820 Ignore build-ordering targets when doing standalone builds.
Bug #122149 r=axel@pike.org


git-svn-id: svn://10.0.0.236/trunk@113062 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-28 23:30:47 +00:00
relyea%netscape.com
2ae1f651be (sigh) not only do we need to find the objects, we need to be able to read
them as well.


git-svn-id: svn://10.0.0.236/trunk@113061 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-28 23:28:29 +00:00
mkaply%us.ibm.com
e5bf74f1f0 OS/2 code only - make it easier to turn off popup asserts if necessary by restructuring code
git-svn-id: svn://10.0.0.236/trunk@113060 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-28 23:26:31 +00:00
mkaply%us.ibm.com
01abf4b33b Add PR_CALLBACK to get MathML building on OS/2
git-svn-id: svn://10.0.0.236/trunk@113059 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-28 23:24:17 +00:00
sfraser%netscape.com
be543daf3c Fix blocker bug 121326 (any SSL transaction causes Mac to freeze) by checking in temporary patch from bug 106188; this reverts Mac to using blocking connects. r=wtc.
git-svn-id: svn://10.0.0.236/trunk@113058 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-28 23:14:42 +00:00
nicolson%netscape.com
8fd7000045 make release_classes target work.
git-svn-id: svn://10.0.0.236/trunk@113057 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-28 23:08:16 +00:00
waterson%netscape.com
4d0ee0832e Bug 122027. Canonify URI before looking it up in the cache. sr=darin.
git-svn-id: svn://10.0.0.236/trunk@113056 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-28 23:07:55 +00:00
jst%netscape.com
ff06deed3f Adding new chrome only window interface. Not part of the build yet.
git-svn-id: svn://10.0.0.236/trunk@113055 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-28 21:52:30 +00:00
sonja.mirtitsch%sun.com
b5fd12a311 fixed typo
git-svn-id: svn://10.0.0.236/trunk@113052 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-28 20:59:23 +00:00
jpierre%netscape.com
3e0d3badd1 Fix for 69556 - remove expired CA "Verisign Class 4 Primary CA"
git-svn-id: svn://10.0.0.236/trunk@113051 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-28 20:43:37 +00:00
sonja.mirtitsch%sun.com
df0c1910f0 attempted fix for bug 115200, tinderbox reports false failures on machines
that run 32 and 63 bit tinderboxes


git-svn-id: svn://10.0.0.236/trunk@113050 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-28 19:35:53 +00:00
mkaply%us.ibm.com
80dd30ec7f More OS/2 bustage
git-svn-id: svn://10.0.0.236/trunk@113049 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-28 19:26:12 +00:00
relyea%netscape.com
53ad9596fc Fix crashing problem when trying two switch from fips to non-fips and back.
bug 119214.


git-svn-id: svn://10.0.0.236/trunk@113048 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-28 19:18:41 +00:00
smeredith%netscape.com
314267c6e7 Added way to delete user-added prefs from the pref editor.
git-svn-id: svn://10.0.0.236/trunk@113047 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-28 19:09:00 +00:00
mscott%netscape.com
2711b450ef Fix smoketest blocker: 122228 by adding a null ptr check in GetHiddenDOMWindow
git-svn-id: svn://10.0.0.236/trunk@113046 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-28 18:52:24 +00:00
bzbarsky%mit.edu
5c982c6130 Fix blocker bug 122217. Use a contractid instead of the classid (which
is no longer registered) for the mime service.  r=brade, sr=jag.


git-svn-id: svn://10.0.0.236/trunk@113045 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-28 18:24:31 +00:00
mkaply%us.ibm.com
a00bb26a22 More OS/2 bustage
git-svn-id: svn://10.0.0.236/trunk@113044 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-28 18:13:56 +00:00
despotdaemon%netscape.com
0cfab0e86e Pseudo-automatic update of changes made by knous@mozilla.org.
git-svn-id: svn://10.0.0.236/trunk@113043 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-28 17:54:37 +00:00
mkaply%us.ibm.com
07c6d2b07b OS/2 bustage
git-svn-id: svn://10.0.0.236/trunk@113042 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-28 17:00:06 +00:00
glazman%netscape.com
d5dadcf26c inline styles were not saved because gElement was outside of document's tree; b=91548, r=brade, sr=kin
git-svn-id: svn://10.0.0.236/trunk@113041 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-28 16:00:12 +00:00
kaie%netscape.com
1f1c0c3523 b=121351 Avoid risk of multiple PK11_FreeSlot calls in GenerateCRMFRequest
r=javi sr=blizzard


git-svn-id: svn://10.0.0.236/trunk@113040 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-28 15:25:47 +00:00
kaie%netscape.com
d806ea955b b=98068 Add PR_CALLBACK for changed interfaces in NSS_3_4
r=javi sr=blizzard


git-svn-id: svn://10.0.0.236/trunk@113039 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-28 15:23:59 +00:00
kin%netscape.com
c9542ea086 Workaround fix for bug #117141 (Composer crashes when loading pages with an HTML Select element [@FrameManager::GetPrimaryFrameFor])
Removed seemingly unnecessary selection UI Style rule for -moz-dropdown-list,
to workaround the crash that happens during the restyling of the HTML Select
element when the EditorOverride.css style sheet is loaded.

r=brade@netscape.com  sr=sfraser@netscape.com


git-svn-id: svn://10.0.0.236/trunk@113038 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-28 15:06:44 +00:00
sicking%bigfoot.com
3f4f453c70 Cleanup BooleanFunctionCall and StringFunctionCall, fixes bugs in lang(), substring() and a few more.
b=104758 r=Pike sr=jag


git-svn-id: svn://10.0.0.236/trunk@113036 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-28 14:46:39 +00:00
jaggernaut%netscape.com
e8761882ab Bug 117015: Text Zoom dialog should round value, not truncate it. r=stephend, sr=smfr
git-svn-id: svn://10.0.0.236/trunk@113035 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-28 12:46:31 +00:00
bryner%netscape.com
1c51cb9b81 Cleaning up checkbox/radio button code, now that I understand how it's supposed to work. Hooked up checkbox/radio containers. Fixed active/hover state problems with buttons. Not part of the build.
git-svn-id: svn://10.0.0.236/trunk@113034 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-28 10:38:01 +00:00
timeless%mac.com
07f9150900 Bug 121720 Save Dialog should be able to be minimized
patch by Matti@epost.de r=caillon@returnzero.com sr=blake


git-svn-id: svn://10.0.0.236/trunk@113033 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-28 09:57:12 +00:00
timeless%mac.com
2764ed254e Bug 115636 javascript strict warnings in nsOutlinerSorting.js
patch by alexey@ihug.com.au r=timeless sr=jst


git-svn-id: svn://10.0.0.236/trunk@113032 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-28 08:46:13 +00:00
blizzard%redhat.com
f3b0cbd059 Add debugging hooks for invalidation. Not part of the build.
git-svn-id: svn://10.0.0.236/trunk@113030 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-28 08:11:50 +00:00
mcafee%netscape.com
ddede4a56a adding mocha to pageload list
git-svn-id: svn://10.0.0.236/trunk@113029 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-28 08:05:46 +00:00
bryner%netscape.com
450ea6c939 turning off focus border for checkboxes. it's causing problems. not part of the build.
git-svn-id: svn://10.0.0.236/trunk@113027 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-28 07:17:39 +00:00
seawood%netscape.com
8eaaa40a4c S_ISSOCK isn't defined on BeOS.
git-svn-id: svn://10.0.0.236/trunk@113026 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-28 07:02:02 +00:00
mcafee%netscape.com
a947b91a39 graph size wasn't preserving average setting
git-svn-id: svn://10.0.0.236/trunk@113025 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-28 06:51:22 +00:00
blizzard%redhat.com
cee05222a4 Bug #121263. Get cursors working with gtk2. Not part of the build.
git-svn-id: svn://10.0.0.236/trunk@113024 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-28 06:47:47 +00:00
bryner%netscape.com
b2a3cef540 Hooking up textfields and dropdown buttons. Not part of the build.
git-svn-id: svn://10.0.0.236/trunk@113023 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-28 06:32:08 +00:00
bryner%netscape.com
ecc3f14a2e Bug 122157 - fixing the autocomplete widget in classic, on linux, to not have an outer border (to look more like gtk's combo box). r=ben, sr=hewitt.
git-svn-id: svn://10.0.0.236/trunk@113022 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-28 06:31:08 +00:00
blizzard%redhat.com
ed6985c02f Bugs #121252,#122120. Get grabs finished on Linux and implement nsWindow::CaptureMouse(). Not part of the build.
git-svn-id: svn://10.0.0.236/trunk@113021 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-28 06:23:27 +00:00
alecf%netscape.com
9416759610 back out my accidental checkin
git-svn-id: svn://10.0.0.236/trunk@113018 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-28 02:47:30 +00:00
nboyd%atg.com
b55ba3f3bb Update implementation version.
git-svn-id: svn://10.0.0.236/trunk@113016 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-28 00:52:12 +00:00
bryner%netscape.com
840144c2da Make sure to look at the select element for onchange handlers, not the anonymous children. Not part of the build.
git-svn-id: svn://10.0.0.236/trunk@113015 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-28 00:32:11 +00:00
seawood%netscape.com
a637516138 Remove unneeded transformiix Makefile. Bogus makefiles can cause problems with cvs pulls when building in the srcdir.
git-svn-id: svn://10.0.0.236/trunk@113014 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-28 00:25:25 +00:00
bienvenu%netscape.com
3036b0f9bb bullet-proof fix for 121876 r/sr=sspitzer
git-svn-id: svn://10.0.0.236/trunk@113013 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-28 00:11:29 +00:00
bhart00%yahoo.com
4252f164b9 Bug 120150 - add tooltip to Send Later button. r=stephend/racham/jglick/robin; sr=sspitzer.
git-svn-id: svn://10.0.0.236/trunk@113012 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-28 00:02:01 +00:00
brendan%mozilla.org
2a9625df7c Fix a warning, clean up whitespace (r=diff -w, sr=gcc).
git-svn-id: svn://10.0.0.236/trunk@113011 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-27 23:56:02 +00:00
sspitzer%netscape.com
79436a9c38 fix for #121566 and #121677. define a default height for the thread pane
(both vertical 3 pane and normal 3 pane layouts) and for the results pane in
the addressbook.  if we don't, it causes the splitter to jump up and down
forever on linux and (because it's so fast) pinging the CPU on windows.
r/sr=bienvenu


git-svn-id: svn://10.0.0.236/trunk@113010 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-27 23:04:13 +00:00
rbs%maths.uq.edu.au
8df8af8ad7 revert an unintended change that crept in
git-svn-id: svn://10.0.0.236/trunk@113009 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-27 22:23:07 +00:00
rbs%maths.uq.edu.au
20005cee47 Another renaming for ease of readability: s/core/coreFrame/g and s/next/nextFrame/g
git-svn-id: svn://10.0.0.236/trunk@113008 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-27 22:10:45 +00:00
alecf%netscape.com
a3f49498a1 fix for bug 121508 - clean up nsStringStream and nsIParser APIs.. r=dougt, sr=jst
git-svn-id: svn://10.0.0.236/trunk@113007 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-27 22:02:00 +00:00
stephend%netscape.com
9291c925a0 Bug 117814. Strict JS warnings in password.js. r=stephend@netscape.com, sr=jaggernaut@netscape.com
git-svn-id: svn://10.0.0.236/trunk@113006 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-27 21:54:53 +00:00
blizzard%redhat.com
5981025c4e Part of bug #121252. Get the rollup listener working properly. Grabs are mostly working now. Not part of the build.
git-svn-id: svn://10.0.0.236/trunk@113005 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-27 20:30:56 +00:00
rbs%maths.uq.edu.au
979dc04ba6 When looking up the real sibling of a cell, use colspan/rowspan (instead of just 1) as the increment to cater for cases of spanning cells in the cellmap
git-svn-id: svn://10.0.0.236/trunk@113004 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-27 19:26:42 +00:00
locka%iol.ie
b528c13d94 Implement ConfirmEx and various Prompt methods on nsIPrompt. b=121931 r=chak@netscape.com a=asa@mozilla.org
git-svn-id: svn://10.0.0.236/trunk@113003 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-27 19:15:07 +00:00
zach%zachlipton.com
063a9d3b5e Fix for bug 121735: Perl warning running checksetup.pl if a module has a
non-numeric version number. Patch sets checksetup.pl to use a string
compare instead of a numeric one.

Patch by Dave Miller. r1=Bradley Baetz and r2=Gerv


git-svn-id: svn://10.0.0.236/trunk@113002 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-27 18:59:38 +00:00
pete%alphanumerica.com
2930306a0e getting rid of -D_USE_BSD
Pulling implementation out of the header file seemed to have fixed the bustage

--pete


git-svn-id: svn://10.0.0.236/trunk@113001 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-27 18:57:41 +00:00
pete%alphanumerica.com
f66db985f6 reverting back to original
define is not needed here

--pete


git-svn-id: svn://10.0.0.236/trunk@113000 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-27 18:56:02 +00:00
pete%alphanumerica.com
a6eeb89003 seeing if this fixes the linux bustage
--pete


git-svn-id: svn://10.0.0.236/trunk@112999 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-27 18:47:17 +00:00
pete%alphanumerica.com
ecfebea9f2 adding -D_USE_BSD to see if lstat will work on these linux flavors
--pete


git-svn-id: svn://10.0.0.236/trunk@112998 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-27 18:32:11 +00:00
pete%alphanumerica.com
2585c334a6 adding -D_BSD_SOURCE to Makefile.in as seawood suggested
to fix linux bustage

--pete


git-svn-id: svn://10.0.0.236/trunk@112997 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-27 18:17:33 +00:00
pete%alphanumerica.com
e39572043e movind implementation of FilleStatCache into nsLocalFileUnix.cpp
where other calls to lstat work fine

This is an attempt to fix bustage on some linux platfroms

--pete


git-svn-id: svn://10.0.0.236/trunk@112996 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-27 18:02:18 +00:00
pete%alphanumerica.com
0945a8d405 moving defs into header file
To fix bustage

--pete


git-svn-id: svn://10.0.0.236/trunk@112995 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-27 17:46:14 +00:00
pete%alphanumerica.com
fee3253b31 adding header files for linux for lstat
seeing if this fixes breakage

--pete


git-svn-id: svn://10.0.0.236/trunk@112994 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-27 17:31:24 +00:00
pete%alphanumerica.com
c7642c235b b=107641, r=blizzard, sr=brendan
fix: CopyTo won't copy read-only files or broken symlinks

Thanks to garths@oeone.com for help on this one.

--pete


git-svn-id: svn://10.0.0.236/trunk@112993 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-27 14:31:25 +00:00
bryner%netscape.com
c2dd55c7e3 Updating wording in debug prefs panel to not discourage people from filing bugs about XBL form control problems.
git-svn-id: svn://10.0.0.236/trunk@112992 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-27 09:08:26 +00:00
roc+%cs.cmu.edu
f52124fa77 Bug 13213. Allow views to extend above and to the left of their owner frames. r=kmcclusk,rs=waterson
git-svn-id: svn://10.0.0.236/trunk@112991 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-27 07:56:23 +00:00
roc+%cs.cmu.edu
9e52ce4c8a Bug 33601. Force REFRAME style hints if views might need to be created in response to opacity or background-attachment style changes. r=dbaron,sr=waterson
git-svn-id: svn://10.0.0.236/trunk@112990 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-27 07:53:27 +00:00
timeless%mac.com
cea26a6b9c Bug 117418 nsWSRunObject.cpp:704: warning: `PRInt32 curStartOffset' might be used uninitialized in this function
r=akkana sr=brendan


git-svn-id: svn://10.0.0.236/trunk@112989 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-27 07:07:10 +00:00
rpotts%netscape.com
8bab5fb6fc bug #120590 (r=mscott@netscape.com, sr=darin@netscape.com). HTTP was using the wrong mime handler...
git-svn-id: svn://10.0.0.236/trunk@112988 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-27 06:03:39 +00:00
wtc%netscape.com
540892388c Implemented GetHiResClock() for HP-UX.
git-svn-id: svn://10.0.0.236/trunk@112987 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-27 05:08:43 +00:00
sspitzer%netscape.com
b48c44be7c fix for #102643. add pref UI for the "confirm send on accel key" UI,
and fix some other UI issues with the mail & newsgroups main pref panel.
r/sr=bienvenu


git-svn-id: svn://10.0.0.236/trunk@112986 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-27 04:55:06 +00:00
wtc%netscape.com
658de28599 Bugzilla bug 113152: do not define or test the macro 'linux'. Thanks to
david@blue-labs.org for the patch.
Modified files: configure configure.in Linux.mk prinet.h


git-svn-id: svn://10.0.0.236/trunk@112985 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-27 04:51:01 +00:00
brendan%mozilla.org
e39800b131 Checking in rogerl's fix for double-reports of compile-time errors (120197, r=brendan, sr=shaver).
git-svn-id: svn://10.0.0.236/trunk@112984 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-27 04:42:37 +00:00
wtc%netscape.com
cc1ec71cfe Backed out the previous checkin. Misunderstood the cause of the problem.
git-svn-id: svn://10.0.0.236/trunk@112983 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-27 04:35:55 +00:00
wtc%netscape.com
b5fc7698f8 Bugzilla bug 121872: define _PR_MD_LISTEN as a function so that we can set
error codes if listen() fails.  The patch is contributed by Javier
Pedemonte <pedemont@us.ibm.com>.
Modified files: _os2.h _os2_errors.h os2sock.c


git-svn-id: svn://10.0.0.236/trunk@112981 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-27 02:59:44 +00:00
ben%netscape.com
574ac8c9fb [Manticore]
Add license to new files
NOT PART OF BUILD


git-svn-id: svn://10.0.0.236/trunk@112980 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-27 02:56:45 +00:00
ben%netscape.com
8574eb192d [Manticore]
More toolbar work...
NOT PART OF BUILD


git-svn-id: svn://10.0.0.236/trunk@112979 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-27 02:55:43 +00:00
bienvenu%netscape.com
e0d0889213 fix mac build bustage
git-svn-id: svn://10.0.0.236/trunk@112978 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-27 02:32:36 +00:00
bienvenu%netscape.com
a6a044efb6 white space fixes
git-svn-id: svn://10.0.0.236/trunk@112977 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-27 02:13:52 +00:00
timeless%mac.com
df30ac6227 Bug 119858 "p3pv1" link in Site Navigation toolbar?
patch by choess@stwing.upenn.edu r=timeless sr=hyatt

prevent stylesheet's, icon's, p3pv*'s and schema.*'s from appearing in the toolbar


git-svn-id: svn://10.0.0.236/trunk@112976 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-27 02:13:12 +00:00
bienvenu%netscape.com
b7c4d1e68e hide column picker for offline folder selector r=stephend,sr=sspitzer 120257
git-svn-id: svn://10.0.0.236/trunk@112975 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-27 02:08:24 +00:00
bienvenu%netscape.com
a00ceb4d40 sharing tab of folder properties r=sspitzer, sr=mscott 112096
git-svn-id: svn://10.0.0.236/trunk@112974 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-27 02:07:44 +00:00
bienvenu%netscape.com
87e9ae8cf2 more work on shared imap folders and acl, sharing tab of folder properties r=sspitzer, sr=mscott 112096
git-svn-id: svn://10.0.0.236/trunk@112973 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-27 02:06:46 +00:00
bienvenu%netscape.com
77ed9303ff add strings for sharing tab r=sspitzer, sr=mscott 112100
git-svn-id: svn://10.0.0.236/trunk@112972 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-27 02:03:44 +00:00
timeless%mac.com
27a75dac73 Bug 105057 images used as form controls doesn't appear on Page Info | Images
patch by db48x@yahoo.com r=bzbarsky@mit.edu sr=jag


git-svn-id: svn://10.0.0.236/trunk@112971 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-27 01:45:58 +00:00
bryner%netscape.com
b5bc1766ea Bug 120974 - fix QI method on nsOutlinerBodyFrame so it doesn't get wrapped in an nsBoxToBlockAdaptor. Move Reflow() logic into GetPrefSize and SetBounds. r=varga, sr=hyatt.
git-svn-id: svn://10.0.0.236/trunk@112970 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-27 00:58:46 +00:00
wtc%netscape.com
1322126cf6 Bugzilla bug 114702: support Linux 2.5.x kernels.
git-svn-id: svn://10.0.0.236/trunk@112969 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-27 00:45:37 +00:00
wtc%netscape.com
2b6f0984fd Bugzilla bug 100447: on BSD/OS 4.2 and 4.3, we have problem calling
safe_popen in a threaded program.  So we don't call safe_popen when
we obtained some entropy from /dev/urandom.  Thanks to lidl@pix.net
for the bug report and the fix.


git-svn-id: svn://10.0.0.236/trunk@112968 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-27 00:14:59 +00:00
hyatt%netscape.com
716a0600e6 Removing some DEBUG_hyatt code.
git-svn-id: svn://10.0.0.236/trunk@112967 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-26 23:42:24 +00:00
bryner%netscape.com
b4d0800861 Bug 101032 - fix nsScrollBoxObject::EnsureElementsVisible in the case where the scrollbox is not at 0,0. Patch from shanec@activestate.com, r=bryner, sr=hyatt.
git-svn-id: svn://10.0.0.236/trunk@112966 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-26 23:27:27 +00:00
bryner%netscape.com
ae907eefc1 Fixing bug 122028 (clearing the entire selection on ctrl+click), also fixing some logic errors where the result of |selection.isSelected()| was incorrectly inverted. Not part of the build.
git-svn-id: svn://10.0.0.236/trunk@112965 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-26 23:06:24 +00:00
ben%netscape.com
d28b32e2b4 [Manticore]
begin work implementing new toolbar widget, 'StripBar'
NOT PART OF BUILD


git-svn-id: svn://10.0.0.236/trunk@112964 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-26 22:25:43 +00:00
sgehani%netscape.com
3463b5a96b Make tooltip pref be honored within same session of browser.
b = 113831; r = morse; sr = hewitt


git-svn-id: svn://10.0.0.236/trunk@112963 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-26 20:15:01 +00:00
sgehani%netscape.com
1a9839a7e9 Fix sidebar contents disappearing on show and hide.
b = 116094; r = morse; sr = alecf


git-svn-id: svn://10.0.0.236/trunk@112962 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-26 20:07:54 +00:00
nboyd%atg.com
cd6b463349 Clean up formatting.
git-svn-id: svn://10.0.0.236/trunk@112961 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-26 20:07:49 +00:00
sgehani%netscape.com
89380bcf32 Fix appearence branch always being open in prefs.
b = 117885; r = sgehani; sr = blake
(checking in for Stephen Walker <walk84@yahoo.com>)


git-svn-id: svn://10.0.0.236/trunk@112960 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-26 20:04:16 +00:00
sgehani%netscape.com
adaf4097dd Make sidebar display in the event that the windows integration dialog appeared.
b = 119975; r = law; sr = dveditz


git-svn-id: svn://10.0.0.236/trunk@112959 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-26 19:59:42 +00:00
nboyd%atg.com
c5eb49df96 Fix bug 121790
git-svn-id: svn://10.0.0.236/trunk@112957 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-26 19:15:06 +00:00
nboyd%atg.com
045cba9433 Fix formatting
git-svn-id: svn://10.0.0.236/trunk@112956 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-26 19:13:22 +00:00
sspitzer%netscape.com
73ee4be75f clean up some string usage. rs=mscott
git-svn-id: svn://10.0.0.236/trunk@112952 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-26 16:36:30 +00:00
oeschger%netscape.com
25fb197b8d doc fix by kraai@alumni.carnegiemellon.edu, r=oeschger, bug=121706
git-svn-id: svn://10.0.0.236/trunk@112951 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-26 16:31:28 +00:00
oeschger%netscape.com
6124589e59 doc update by kraai@alumni.carnegiemellon.edu, r=oeschger, bug=121273
git-svn-id: svn://10.0.0.236/trunk@112950 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-26 16:30:25 +00:00
wtc%netscape.com
a3b315a581 Bugzilla bug 111206: make the Solaris version test flexible so that we
don't need to add a new test for each new Solaris release.


git-svn-id: svn://10.0.0.236/trunk@112949 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-26 16:19:51 +00:00
seawood%netscape.com
58b0318909 Fixing win32 gmake bustage
git-svn-id: svn://10.0.0.236/trunk@112948 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-26 15:25:27 +00:00
bryner%netscape.com
11fe1c8fa0 Fixing XBL form controls in installer builds -- put nsISelectElement into content_html.xpt and include this file in the xpi. r/sr=jag.
git-svn-id: svn://10.0.0.236/trunk@112947 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-26 09:47:25 +00:00
ducarroz%netscape.com
317af6d101 Part of fix for bug 108965. Remove xul emitter from the Mac build. R=mscott, SR=sspitzer
git-svn-id: svn://10.0.0.236/trunk@112946 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-26 03:43:15 +00:00
mscott%netscape.com
218c446117 Bug #119344 --> add windows system tray icon for biff
r=bhuvan
sr=sspitzer


git-svn-id: svn://10.0.0.236/trunk@112945 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-26 03:34:57 +00:00
cltbld%netscape.com
1cde876811 parameterizing pageload server
git-svn-id: svn://10.0.0.236/trunk@112944 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-26 02:46:51 +00:00
sspitzer%netscape.com
e98c27f7fc supplimental fix for #113540, clean up code. rs=mscott
git-svn-id: svn://10.0.0.236/trunk@112943 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-26 02:37:56 +00:00
pete%alphanumerica.com
8fb3979c3c b=121028, r=brendan, sr=jst
fix for crahser using old handler attribute 'type'

--pete


git-svn-id: svn://10.0.0.236/trunk@112940 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-26 02:20:15 +00:00
wtc%netscape.com
a633f807f7 Continue to use the HP shl_load interface on 64-bit HP-UX/PA-RISC for
backward compatibility reasons.


git-svn-id: svn://10.0.0.236/trunk@112939 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-26 02:14:52 +00:00
darin%netscape.com
b86057cf8d partial fix for bug 90004 "proxy reload doesn't work" r=gagan,sr=rpotts
git-svn-id: svn://10.0.0.236/trunk@112937 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-26 02:14:09 +00:00
naving%netscape.com
4665a22500 111368 r=ducarroz sr=bienvenu. free leaking mFileSpec in attachmentHandler
git-svn-id: svn://10.0.0.236/trunk@112935 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-26 02:09:32 +00:00
despotdaemon%netscape.com
fd1a78fc51 Pseudo-automatic update of changes made by blythe@netscape.com.
git-svn-id: svn://10.0.0.236/trunk@112934 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-26 01:53:38 +00:00
sspitzer%netscape.com
97455be591 fix for #117452, get delete of cards after quick search to work.
r=racham, sr=mscott


git-svn-id: svn://10.0.0.236/trunk@112933 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-26 01:42:28 +00:00
despotdaemon%netscape.com
7b105f1125 Pseudo-automatic update of changes made by endico@mozilla.org.
git-svn-id: svn://10.0.0.236/trunk@112932 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-26 01:25:48 +00:00
relyea%netscape.com
c0a2bdbd5f Fix PBE_Context failure by making sure CKM_PBA is it's own keygen type.
git-svn-id: svn://10.0.0.236/trunk@112931 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-26 01:20:50 +00:00
rginda%netscape.com
8c2005fa3a - venkman only -
lineMap no longer required in SourceText records, HelpText doesn't need it.


git-svn-id: svn://10.0.0.236/trunk@112930 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-26 01:11:01 +00:00
rginda%netscape.com
305d514d88 - venkman only -
get default context without complaining for debug and view menus, remove debug dump.


git-svn-id: svn://10.0.0.236/trunk@112929 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-26 01:10:03 +00:00
rginda%netscape.com
73e424cd53 - venkman only -
store commandname attribute on menuitem so we don't need to parse it onpopupshowing, makes for faster menus.


git-svn-id: svn://10.0.0.236/trunk@112928 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-26 01:05:50 +00:00
rginda%netscape.com
a6b8bb92ad - venkman only -
strict fixes


git-svn-id: svn://10.0.0.236/trunk@112927 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-26 01:03:43 +00:00
cmanske%netscape.com
cc500a6380 Save last-used directories as nsILocalFile type in prefs, b=93487, r=law, sr=dveditz
git-svn-id: svn://10.0.0.236/trunk@112925 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-26 00:55:27 +00:00
cotter%netscape.com
15c74b2558 ongoing help content updates to privacy & security sections, r=oeschger
git-svn-id: svn://10.0.0.236/trunk@112924 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-26 00:51:37 +00:00
morse%netscape.com
f1e6b218e3 bug 113540, remove mailnews dependency on password manager, r=mscott,sspitzer,jag,law
git-svn-id: svn://10.0.0.236/trunk@112923 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-26 00:47:26 +00:00
darin%netscape.com
c1b8bccdc3 backing out my changes -- rjc says it causes moz not to startup!
git-svn-id: svn://10.0.0.236/trunk@112922 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-26 00:46:09 +00:00
peterlubczynski%netscape.com
16315d2fb3 Removing ugly shockwave hack bug 115461 r=av sr=beard
git-svn-id: svn://10.0.0.236/trunk@112921 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-26 00:45:45 +00:00
peterlubczynski%netscape.com
8175aa6f6d Fix for using newer pluign if upgraded, bug 119966 r=av sr=darin
git-svn-id: svn://10.0.0.236/trunk@112920 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-26 00:44:47 +00:00
morse%netscape.com
7d3edf79d1 bug 113540, remove mailnews dependency on password manager, r=mscott,sspitzer,jag,law
git-svn-id: svn://10.0.0.236/trunk@112919 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-26 00:44:18 +00:00
peterlubczynski%netscape.com
461edc33ef Fixing cursor flicker with plugins, bug 118877 r=kmcclusk@netscape.com sr=beard
git-svn-id: svn://10.0.0.236/trunk@112918 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-26 00:39:43 +00:00
darin%netscape.com
bbbf7288b3 fixes bug 114778 "formpost temp files not cleaned up when browser exits"
patch=badami@netscape.com, r=rpotts@netscape.com, sr=darin@netscape.com


git-svn-id: svn://10.0.0.236/trunk@112917 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-26 00:38:37 +00:00
relyea%netscape.com
517e6d30a2 Fix 2 memory leaks and a UMR.
(keyhand needs to be initialized before we start xor hashing)
Free item and time elements which are transparently allocated for us.


git-svn-id: svn://10.0.0.236/trunk@112916 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-26 00:16:03 +00:00
leaf%mozilla.org
5554da00eb update user agent string, bug 119973
git-svn-id: svn://10.0.0.236/trunk@112915 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-26 00:13:05 +00:00
leaf%mozilla.org
85a48c5085 update mac version string and copyright year, r=jj bug 119976
git-svn-id: svn://10.0.0.236/trunk@112914 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-26 00:10:43 +00:00
cathleen%netscape.com
3fcee4d2a1 remove memcpy function from nsCRT, eliminate 2 new nsCRT::memcpy callers
and fix up alighment problems from previous patch, bug 118135, sr=brenda r=dp


git-svn-id: svn://10.0.0.236/trunk@112913 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-26 00:04:45 +00:00
radha%netscape.com
3fc0490294 Fix for bug # 119617. sr=alecf r =walk84
git-svn-id: svn://10.0.0.236/trunk@112912 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-26 00:00:18 +00:00
alecf%netscape.com
b83004a7cb oops, we dont' need that!
git-svn-id: svn://10.0.0.236/trunk@112910 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-25 23:53:32 +00:00
pschwartau%netscape.com
8d4455a838 Improving readablity.
git-svn-id: svn://10.0.0.236/trunk@112909 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-25 23:52:24 +00:00
alecf%netscape.com
ab9df62333 ignore generated makefile
git-svn-id: svn://10.0.0.236/trunk@112908 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-25 23:52:11 +00:00
seawood%netscape.com
7285032e77 Sigh. I keep forgetting about this bug. Call export & install separately to build ldap otherwise it may die on some -j builds.
git-svn-id: svn://10.0.0.236/trunk@112907 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-25 23:46:34 +00:00
hwaara%chello.se
4495d874e4 #118275, "Filter name should be selected when opening new filter dialog"
r=naving, sr=sspitzer


git-svn-id: svn://10.0.0.236/trunk@112906 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-25 23:46:24 +00:00
rayw%netscape.com
09b092f539 Fixed handling of conflicting type information.
SOAP is not part of the default build.


git-svn-id: svn://10.0.0.236/trunk@112904 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-25 23:38:57 +00:00
jkeiser%netscape.com
aaa7dec32b Make onChange, reflow system in comboboxes/lists better (bug 112241). r=rods, sr=kin
git-svn-id: svn://10.0.0.236/trunk@112903 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-25 23:35:44 +00:00
smeredith%netscape.com
d4fb37bbc9 Fixed the description entry bug 11892.
git-svn-id: svn://10.0.0.236/trunk@112902 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-25 23:27:57 +00:00
cmanske%netscape.com
c30a6e8fb3 Fixed warnings and exception in Color Picker, b=119772, r=brade, sr=kin
git-svn-id: svn://10.0.0.236/trunk@112901 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-25 23:27:25 +00:00
harishd%netscape.com
c8641ade9a Do not create a new node info with |no name| for userdefined tags. b=113349, r=heikki, sr=jst
git-svn-id: svn://10.0.0.236/trunk@112900 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-25 23:25:09 +00:00
mscott%netscape.com
50ec3face0 Bug #108965 --> remove xul emitter from the build
r=ducarroz
sr=sspitzer


git-svn-id: svn://10.0.0.236/trunk@112899 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-25 23:20:21 +00:00
heikki%netscape.com
d3fe0d3a87 Bug 35984, make an undefined entity always a fatal error; report errors while parsing external entities (regression) and a minor optimization in loading external entities. r=harishd, sr=jst.
git-svn-id: svn://10.0.0.236/trunk@112898 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-25 23:19:23 +00:00
darin%netscape.com
a80ff94504 patch 2 for bug 109179 "replace nsStdEscape with NS_EscapeURL"
r=dougt, sr=alecf


git-svn-id: svn://10.0.0.236/trunk@112896 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-25 23:08:02 +00:00
gerv%gerv.net
e9fcac9dcb Removing new_comment.cgi - all part of quips.cgi now.
git-svn-id: svn://10.0.0.236/trunk@112894 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-25 22:41:37 +00:00
gerv%gerv.net
32d50f0d78 quips.cgi rewrite and templatisation.
git-svn-id: svn://10.0.0.236/trunk@112893 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-25 22:40:04 +00:00
morse%netscape.com
a658b8cbc5 bug 120277, removed js warning message, r=law, sr=ben
git-svn-id: svn://10.0.0.236/trunk@112892 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-25 22:34:50 +00:00
seawood%netscape.com
3cabb82f4e Fix problem of --enable-boehm not building.
Build nspr & ldap as a separate step at the beginning of the default build or at the beginning of the export phase.


git-svn-id: svn://10.0.0.236/trunk@112891 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-25 22:29:51 +00:00
waterson%netscape.com
416a978709 Bug 121833. Fix assertion (and optimize) string-fu in rdf_MakeRelativeRef. Remove unused rdf_MakeRelativeName. r=timeless, sr=shaver.
git-svn-id: svn://10.0.0.236/trunk@112890 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-25 22:28:55 +00:00
morse%netscape.com
59e7cc2f56 bug 121771, isSorted missing in cookie/password manager outliners, r=law, sr=ben
git-svn-id: svn://10.0.0.236/trunk@112889 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-25 22:26:35 +00:00
andreas.otte%debitel.net
42cbc1ef03 second try to fix bug 119071 [Can not ftp files from / on Cobalt web
server], this time working around bad urls generated by the tinderbox
script, r=bbaetz, sr=darin


git-svn-id: svn://10.0.0.236/trunk@112888 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-25 22:19:29 +00:00
morse%netscape.com
76e2805b59 bug 119474, can't remove password if password-manager is disabled, r=law, sr=ben
git-svn-id: svn://10.0.0.236/trunk@112887 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-25 22:17:57 +00:00
mscott%netscape.com
3bb9f6d703 Bug #119344 --> add windows system tray icon for biff
r=bhuvan
sr=sspitzer


git-svn-id: svn://10.0.0.236/trunk@112886 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-25 22:16:01 +00:00
mscott%netscape.com
54a5ee3002 Bug #119344 --> add windows system tray icon for biff
r=bhuvan
sr=sspitzer


git-svn-id: svn://10.0.0.236/trunk@112885 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-25 22:15:11 +00:00
naving%netscape.com
bb2e7870ee 112927 r/sr=sspitzer. add customHeaders pref to mailnews.js and handle this default case to work
git-svn-id: svn://10.0.0.236/trunk@112884 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-25 22:13:28 +00:00
andreas.otte%debitel.net
fc5785fcfb fix bug 120959 [Use of ".." in address causes links to relative URL's
to fail] A regression from the rewrite of the urlparser,
r=dougt@netscape.com, sr=darin@netscape.com


git-svn-id: svn://10.0.0.236/trunk@112883 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-25 22:07:50 +00:00
mscott%netscape.com
9a9af58f44 Bug #43689 --> expose the suggested file name
r=law
sr=sspitzer


git-svn-id: svn://10.0.0.236/trunk@112882 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-25 22:05:16 +00:00
bzbarsky%mit.edu
483c6e5766 Make enter in bookmarks manager reuse existing windows like double-click
does.  Bug 121085, r=doron, sr=blake


git-svn-id: svn://10.0.0.236/trunk@112881 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-25 22:03:21 +00:00
pinkerton%netscape.com
64fdca15fd changes for cocoa product to build and run and coexist in the tree with carbon. r=cls/sr=hyatt, bug# 111230
git-svn-id: svn://10.0.0.236/trunk@112880 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-25 22:01:41 +00:00
rbs%maths.uq.edu.au
0d04e79f72 typos
git-svn-id: svn://10.0.0.236/trunk@112879 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-25 21:57:47 +00:00
jkeiser%netscape.com
b800a9924e Complete bug 112241 backout
git-svn-id: svn://10.0.0.236/trunk@112877 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-25 20:51:41 +00:00
pschwartau%netscape.com
4a19a9a27b Improving readability.
git-svn-id: svn://10.0.0.236/trunk@112876 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-25 20:37:37 +00:00
pschwartau%netscape.com
eacce08adf Improving readability.
git-svn-id: svn://10.0.0.236/trunk@112875 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-25 20:02:31 +00:00
waterson%netscape.com
077c603395 Bug 121888. This should always be built, regardless of whether tests are enabled or not.
git-svn-id: svn://10.0.0.236/trunk@112874 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-25 19:59:56 +00:00
jkeiser%netscape.com
07cd518c43 Backing out bug 112241 changes, tree is closed, sorry
git-svn-id: svn://10.0.0.236/trunk@112873 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-25 19:54:55 +00:00
wtc%netscape.com
0b5aa9d745 Bugzilla bug 106496: fixed the WINNT version of PR_NewTCPSocketPair to
verify the source of the connection.


git-svn-id: svn://10.0.0.236/trunk@112870 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-25 19:16:34 +00:00
relyea%netscape.com
d9934c8ada Change Sha1_hash to a simple XOR hash for building key handles for token
objects.


git-svn-id: svn://10.0.0.236/trunk@112869 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-25 19:09:34 +00:00
relyea%netscape.com
863e2140bf Fix key leak in S/Mime.
git-svn-id: svn://10.0.0.236/trunk@112868 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-25 19:08:19 +00:00
jkeiser%netscape.com
4b4b5ee0ba Make onChange, reflow system in comboboxes/lists better (bug 112241). r=rods, sr=kin
git-svn-id: svn://10.0.0.236/trunk@112867 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-25 19:08:03 +00:00
relyea%netscape.com
61c9862c40 Fix bug 115660. Note that fixing the bugs necessitates fixing the test
cases as well. The test case was depending on the failure to read certs to
detect the failure to read keys. Now certutil returns a failure if no keys
are found. This also means that the FIPS test after the key and cert
has been deleted should expect a failure to list any keys.


git-svn-id: svn://10.0.0.236/trunk@112866 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-25 19:03:17 +00:00
wtc%netscape.com
8d44de2cd4 Bugzilla bug 121872: define _PR_MD_LISTEN as a function so that we can
set error codes if listen() fails.
Modified files: _win95.h w95sock.c


git-svn-id: svn://10.0.0.236/trunk@112865 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-25 18:45:16 +00:00
kaie%netscape.com
b68b7fbe9c b=119810 javascript strict warnings certpicker.js
r=ssaux sr=jag


git-svn-id: svn://10.0.0.236/trunk@112863 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-25 15:39:57 +00:00
ccarlen%netscape.com
86117cc1b5 Bug 121431 - LoadDefaultProfileDir() returns an error when it shouldn't. Returning this error, which isn't really an error, aborts startup when creating a new profile in turbo mode. r=bnesse@netscape.com/sr=alecf@netscape.com
git-svn-id: svn://10.0.0.236/trunk@112862 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-25 15:32:10 +00:00
kaie%netscape.com
a291c1cf5e b=121570 Error code namespace needed for security component
r=dougt sr=jband


git-svn-id: svn://10.0.0.236/trunk@112861 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-25 15:17:25 +00:00
leaf%mozilla.org
881084dd5d Automated update
git-svn-id: svn://10.0.0.236/trunk@112860 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-25 15:12:13 +00:00
jdunn%netscape.com
d63561e2e5 Change certain AIX ifdefs to AIX_XLC_364 since these ifdefs are only
needed for AIX's xlC 3.6.4 compiler.  Add test to configure to check
compiler version.  NOTE: also adding hpux and aix check for keyboardutils.
r=cls@seawood.org
# 119179


git-svn-id: svn://10.0.0.236/trunk@112859 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-25 15:07:38 +00:00
kaie%netscape.com
d9ff601955 b=121289 Make Key Escrow warning dialog work
r=rangansen sr=kin


git-svn-id: svn://10.0.0.236/trunk@112858 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-25 14:58:31 +00:00
rods%netscape.com
fb493821d3 Adding new Frame to clip content area of page for Printing and PrintPreview
Bug 112698 r=dcone sr=waterson


git-svn-id: svn://10.0.0.236/trunk@112856 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-25 14:30:14 +00:00
seawood%netscape.com
151e6f8811 Fix typo in .cc rule
git-svn-id: svn://10.0.0.236/trunk@112855 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-25 11:43:09 +00:00
darin%netscape.com
111b45c759 fixing compiler warning of uninitialized variable resulting from my checkin
for bug 121441


git-svn-id: svn://10.0.0.236/trunk@112854 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-25 10:47:24 +00:00
glazman%netscape.com
0c8e360445 move CSS in Composer stuff from nsEditorShell to nsHTMLEditor; b=121081, r=brade, sr=kin
git-svn-id: svn://10.0.0.236/trunk@112853 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-25 10:20:11 +00:00
glazman%netscape.com
2a28453859 remove CSSisms from nsEditor; b=121092, r=brade, sr=kin
git-svn-id: svn://10.0.0.236/trunk@112852 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-25 10:16:52 +00:00
glazman%netscape.com
cdabdbafcf Pref should have 'Cascading Style Sheets' in the groupbox label (patch by caillon@returnzero.com); b=121125, r=glazman, r=brade, sr=kin
git-svn-id: svn://10.0.0.236/trunk@112851 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-25 09:57:48 +00:00
glazman%netscape.com
0689972d2f Text Color well reverts to black when typing; b=112966, r/sr=kin
git-svn-id: svn://10.0.0.236/trunk@112850 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-25 09:53:58 +00:00
seawood%netscape.com
7226965491 Add build_all_dep & build_all_depend targets which are aliases for the alldep target. Made sure that alldep was passed down to the real Makefiles.
git-svn-id: svn://10.0.0.236/trunk@112849 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-25 08:32:27 +00:00
rbs%maths.uq.edu.au
eb3171a2b2 Remove leftover from debugging
git-svn-id: svn://10.0.0.236/trunk@112848 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-25 07:34:49 +00:00
rbs%maths.uq.edu.au
f498083779 Improvements to <mtable> to fix bug 39411. Here are the additional hooks needed in the frame construction code, (I also left some aliases that I can change later in nsMathMLParts.h), bug 120487, r=karnaze, sr=waterson
git-svn-id: svn://10.0.0.236/trunk@112847 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-25 07:14:07 +00:00
rbs%maths.uq.edu.au
3e1abbf64e Improvements to <mtable>
git-svn-id: svn://10.0.0.236/trunk@112846 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-25 07:03:43 +00:00
rbs%maths.uq.edu.au
d2bc946058 In case of markup errors, provide a more discoverable feedback to users. Drop in the other functions from the nsIFrame APIs that steve.swanson@mackichan.com needs to consolidate his Dynamic JavaScripted MathML editor
git-svn-id: svn://10.0.0.236/trunk@112845 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-25 06:48:30 +00:00
jst%netscape.com
6b1260a9e6 Fixing bug 118933. Speeding up the id and name hash tables in nsHTMLDocument by changing them over from nsHashtable/nsStirngKey to pldhash. Also combining the hashes to optimize performance and memory useage. r=heikki@netscape.com, sr=jband@netscape.com.
git-svn-id: svn://10.0.0.236/trunk@112844 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-25 06:37:35 +00:00
rbs%maths.uq.edu.au
6fdf561c89 Fix MathML bug 121037. Background-color is not showing up in stretchy chars that use additional leaf style contexts. More reliable recovery from the background revamps in bug 116161
git-svn-id: svn://10.0.0.236/trunk@112843 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-25 06:08:03 +00:00
rbs%maths.uq.edu.au
2c9a8320c7 Updated comments to add a reference to bug 69325 which details the 8 possible cases that may arise depending on whether displaystyle, largeop, stretchy are true or false
git-svn-id: svn://10.0.0.236/trunk@112842 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-25 06:02:52 +00:00
rbs%maths.uq.edu.au
37b8b26978 Fix MathML bug 118313 - GetBoundingMetrics is inaccurate in the face of whitespace. Avoid a troublesome whitespace glyph that has zero width
git-svn-id: svn://10.0.0.236/trunk@112841 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-25 05:57:27 +00:00
curt%netscape.com
7774164c65 Adds readme and license files. (Bug #Bug #15901).
git-svn-id: svn://10.0.0.236/trunk@112840 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-25 05:47:09 +00:00
curt%netscape.com
17f6c7d114 Addes readme and license file (Bug #Bug #15901).
git-svn-id: svn://10.0.0.236/trunk@112839 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-25 05:44:21 +00:00
curt%netscape.com
407d30910a Adds readme and license file to install. (Bug #Bug #15901).
git-svn-id: svn://10.0.0.236/trunk@112838 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-25 05:42:47 +00:00
curt%netscape.com
129ef25466 Placeholder readme file.
git-svn-id: svn://10.0.0.236/trunk@112837 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-25 05:39:27 +00:00
curt%netscape.com
7c38cf4036 For the mozilla stub installer xpi.
git-svn-id: svn://10.0.0.236/trunk@112836 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-25 05:30:11 +00:00
mscott%netscape.com
b3c70b6b02 Bug #119344 --> add windows system tray icon for biff
newmail.ico is a TEMPORARY place holder icon for the biff icon in the status bar.
r=bhuvan
sr=sspitzer


git-svn-id: svn://10.0.0.236/trunk@112835 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-25 05:27:50 +00:00
curt%netscape.com
c63a6afb0b Wraps the stub installer into a xpi.
git-svn-id: svn://10.0.0.236/trunk@112834 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-25 05:27:06 +00:00
mscott%netscape.com
a823967547 Bug #119344 --> add ability to deep count new mail messages
r=bhuvan
sr=sspitzer


git-svn-id: svn://10.0.0.236/trunk@112833 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-25 05:19:37 +00:00
mscott%netscape.com
7fe527d2ea Bug #108965 --> remove xul emitter from the build
r=ducarroz
sr=sspitzer


git-svn-id: svn://10.0.0.236/trunk@112832 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-25 05:18:17 +00:00
pschwartau%netscape.com
e11e57825f Skip another SpiderMonkey test generating infinite recursion and catching it as an error.
git-svn-id: svn://10.0.0.236/trunk@112831 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-25 03:39:21 +00:00
seawood%netscape.com
a9bcb311b4 Fixing non-gtk build bustage.
git-svn-id: svn://10.0.0.236/trunk@112830 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-25 03:33:27 +00:00
wtc%netscape.com
bb624d8ea8 Put the warning printfs inside #ifdef DEBUG.
git-svn-id: svn://10.0.0.236/trunk@112829 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-25 03:33:20 +00:00
rods%netscape.com
79189d5997 Adding new Frame to clip content area of page for Printing and PrintPreview
Bug 112698 r=dcone sr=waterson


git-svn-id: svn://10.0.0.236/trunk@112828 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-25 03:32:19 +00:00
bryner%netscape.com
25843bce90 Set -moz-user-select: none so that XBL select boxes don't get text selection applied to them. Not turned on yet.
git-svn-id: svn://10.0.0.236/trunk@112827 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-25 03:29:03 +00:00
seawood%netscape.com
ec756d5c48 Fix "static" build support for win32 gmake builds.
Bug #58981 r=bryner


git-svn-id: svn://10.0.0.236/trunk@112825 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-25 03:20:51 +00:00
ian%hixie.ch
8e82e0ec2a Fix a minor typo in some SQL code which was causing an error during the creation of the user table.
git-svn-id: svn://10.0.0.236/trunk@112824 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-25 03:18:15 +00:00
pschwartau%netscape.com
c14bfa304b Added three more cases to the test.
git-svn-id: svn://10.0.0.236/trunk@112823 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-25 03:17:23 +00:00
ian%hixie.ch
4612fcaf55 Moved the DBI module over to thew new more generic settings getting/saving API and removed the old DBI-specific one. Fixed an assert() call to check for the values being defined and not non-zero/non-blank. Fixed the password field to allow blank values (by making a blank value the default). Also fixed the calls to getArgument to not ever pass an undefined value as the default.
git-svn-id: svn://10.0.0.236/trunk@112822 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-25 03:17:05 +00:00
ian%hixie.ch
26b7d82370 More things that need doing on the long (and not so long) run.
git-svn-id: svn://10.0.0.236/trunk@112821 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-25 03:12:26 +00:00
mkaply%us.ibm.com
6d101e33db OS/2 and AIX bustage
git-svn-id: svn://10.0.0.236/trunk@112820 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-25 03:09:23 +00:00
pschwartau%netscape.com
a321a29d25 Initial add. Regression test for bug 121658.
git-svn-id: svn://10.0.0.236/trunk@112819 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-25 03:04:18 +00:00
dcone%netscape.com
8dd83388c5 bug 112698. For rods checkin. r=dcone sr=waterson
git-svn-id: svn://10.0.0.236/trunk@112818 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-25 02:55:51 +00:00
rods%netscape.com
3f5c6877d0 Get whther we are printing silent from the PrintSettings
76456 r=rods sr=hyatt


git-svn-id: svn://10.0.0.236/trunk@112817 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-25 02:47:01 +00:00
rods%netscape.com
735a7fb99a Removed "free memory read" and change strcpy to strdup
and did some general cleanup and changed how the default printer name was being obtained.
118086 r=dcone sr=waterson


git-svn-id: svn://10.0.0.236/trunk@112816 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-25 02:40:19 +00:00
darin%netscape.com
d46bc6687b fixes bug 121441 "unable to publish via http PUT (nsStorageStream should
support nsISeekableStream)"
r=brade, sr=dveditz


git-svn-id: svn://10.0.0.236/trunk@112813 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-25 02:13:00 +00:00
mscott%netscape.com
adf7bd3193 Bug #119344 --> set the new message count based on the # of headers downloaded
r=racham
sr=sspitzer


git-svn-id: svn://10.0.0.236/trunk@112812 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-25 02:10:51 +00:00
rods%netscape.com
6b7c1e4878 Adding new Frame to clip content area of page for Printing and PrintPreview
Bug 112698 r=dcone sr=waterson


git-svn-id: svn://10.0.0.236/trunk@112811 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-25 02:07:03 +00:00
stephend%netscape.com
fa658b225c bugs 115673 and 110551 news icons for downloaded msgs and new news msgs with attachments r=andreww sr=hewitt
git-svn-id: svn://10.0.0.236/trunk@112810 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-25 02:02:02 +00:00
hyatt%netscape.com
3401c31fe2 Fix type bustage in cocoa view. Not part of build.
git-svn-id: svn://10.0.0.236/trunk@112809 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-25 01:59:11 +00:00
naving%netscape.com
f6eb7e2e8c 120349 r=cavin sr=mscott Add a handy accessor for getting parentMsgFolder
git-svn-id: svn://10.0.0.236/trunk@112808 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-25 01:48:07 +00:00
sspitzer%netscape.com
d733571b2e fix for #121709. Add to Address Book, enter First Name and Display Name overwritten.
r=racham, sr=mscott


git-svn-id: svn://10.0.0.236/trunk@112807 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-25 01:42:32 +00:00
jaggernaut%netscape.com
71851389c0 Bug 121606: H and W attributes are reversed in the new Page Info -> Media. Patch by Christopher Aillon <caillon@returnzero.com>, r=Daniel Brooks <db48x@yahoo.com>, sr=jag
git-svn-id: svn://10.0.0.236/trunk@112806 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-25 01:31:35 +00:00
seawood%netscape.com
f8f41c13ab Fixing SVG static build bustage
git-svn-id: svn://10.0.0.236/trunk@112805 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-25 01:29:35 +00:00
waterson%netscape.com
3428fe537a Add EmbedComponents.cpp to the GARBAGE.
git-svn-id: svn://10.0.0.236/trunk@112804 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-25 01:23:41 +00:00
waterson%netscape.com
703276d255 Bug 108259. Build TestGtkEmbed and friends statically when doing a static build. r=cls, sr=blizzard
git-svn-id: svn://10.0.0.236/trunk@112803 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-25 01:18:55 +00:00
alecf%netscape.com
14a231b9f9 oops didn't mean to check this in (shouldn't cause bustage, but I don't know if it will even work without the other changes.. if it does, then nsCOMPtr<> is busted!)
git-svn-id: svn://10.0.0.236/trunk@112802 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-25 01:13:09 +00:00
dsirnapalli%netscape.com
4484c7a524 *** empty log message ***
git-svn-id: svn://10.0.0.236/trunk@112801 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-25 01:11:03 +00:00
dsirnapalli%netscape.com
9bfbd6133e Test case to test accessibility of html element radio button.
git-svn-id: svn://10.0.0.236/trunk@112800 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-25 01:07:34 +00:00
dsirnapalli%netscape.com
b618eafee2 Test case to test accessibility of html element radio button when checked.
git-svn-id: svn://10.0.0.236/trunk@112799 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-25 01:06:52 +00:00
dsirnapalli%netscape.com
a61bc8ad29 Html page containing html elements to test for accessibility.
git-svn-id: svn://10.0.0.236/trunk@112798 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-25 01:05:47 +00:00
dsirnapalli%netscape.com
7ba65ccf92 test case to test accessibility of html element check box.
git-svn-id: svn://10.0.0.236/trunk@112797 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-25 01:03:35 +00:00
peterlubczynski%netscape.com
5a1f925640 For embedding, always consume context menu clicks for applets, embeds, and objects, bug 118789 r=av sr=alecf
git-svn-id: svn://10.0.0.236/trunk@112796 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-25 01:02:58 +00:00
dsirnapalli%netscape.com
1c853ca32d Test case to test accessibility of html element checkbox when it is checked.
git-svn-id: svn://10.0.0.236/trunk@112795 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-25 01:02:52 +00:00
dsirnapalli%netscape.com
fcc0b43f46 *** empty log message ***
git-svn-id: svn://10.0.0.236/trunk@112794 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-25 01:01:19 +00:00
depstein%netscape.com
092538c43e changed PurgeHistory() text to indicate request for number of removed items.
git-svn-id: svn://10.0.0.236/trunk@112793 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-25 01:00:26 +00:00
hyatt%netscape.com
46b8706d18 Fix cocoa bustage in makefile.in, r=cls, sr=brendan
git-svn-id: svn://10.0.0.236/trunk@112791 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-25 00:53:38 +00:00
brendan%mozilla.org
0f5414ace6 Make 'too much recursion' errors be exceptions #if JS_HASH_ERROR_EXCEPTIONS (121658, r=rogerl, sr=shaver).
git-svn-id: svn://10.0.0.236/trunk@112790 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-25 00:49:52 +00:00
brendan%mozilla.org
c403c777cd Checking in patch from Daniel Bratell <bratell@lysator.liu.se>, r=khanson, sr=me.
git-svn-id: svn://10.0.0.236/trunk@112786 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-25 00:47:11 +00:00
alecf%netscape.com
fd6d75b30f fix for bug 112209 - remove last consumers of nsStr:: routines
r=dbaron, sr=jst


git-svn-id: svn://10.0.0.236/trunk@112785 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-25 00:26:44 +00:00
waterson%netscape.com
366cb45a7b Address 64-bit safety issue brought up by brendan.
git-svn-id: svn://10.0.0.236/trunk@112783 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-25 00:19:54 +00:00
heikki%netscape.com
537f41e4d9 Bug 44458, enable XHTML entities when an XHTML doctype with public id is present in an XML document. r=rbs@maths.uq.edu.au&adamlock, sr=jst.
git-svn-id: svn://10.0.0.236/trunk@112782 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-25 00:08:20 +00:00
heikki%netscape.com
56fb7f80ee Bug 44458, enable XHTML entities when an XHTML doctype with public id is present in an XML document. r=rbs@maths.uq.edu.au, sr=jst.
git-svn-id: svn://10.0.0.236/trunk@112779 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-25 00:07:45 +00:00
mkaply%us.ibm.com
032c515eb5 #116705
r=pedemont, sr=blizzard
OS/2 only - use FM_INVERT for drawing inverted rect


git-svn-id: svn://10.0.0.236/trunk@112777 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-25 00:02:40 +00:00
pavlov%netscape.com
3c8fe72f77 fix for bug 84523 from nivedita@netscape.com. r=pavlov sr=tor@acm.org
git-svn-id: svn://10.0.0.236/trunk@112776 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-25 00:02:20 +00:00
pavlov%netscape.com
c1ba00b8b7 making the gif decoder hand back errors properly and doing some general cleanup. bug 100470. r=bryner sr=mscott
git-svn-id: svn://10.0.0.236/trunk@112775 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 23:59:58 +00:00
waterson%netscape.com
f7927b5818 Bug 121712. Fix inverted logic from bz's string cleanup. r=tingley@sundell.net
git-svn-id: svn://10.0.0.236/trunk@112774 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 23:58:26 +00:00
ccarlen%netscape.com
7f0916f049 Bug 116306 - switching themes by switching profiles doesn't switch theme. r=hyatt@netscape.com/sr=brendan@mozilla.org
git-svn-id: svn://10.0.0.236/trunk@112773 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 23:54:14 +00:00
alecf%netscape.com
496db28aa1 fix for bug 121627 - UTF8ConverterStream should not allocate - now that we've exposed ConvertUTF8toUCS2,
use it to do a conversion into the existing unichar buffer
r=dbaron, sr=jst


git-svn-id: svn://10.0.0.236/trunk@112772 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 23:53:53 +00:00
sfraser%netscape.com
cfef97219a Fix bug 119329 -- change NSPR project to use tree-wide prefix files, for compatibility with other libraries. Also removing obsolete files, and adding a CodeWarrior Pro 7-format XML project file. r=pinkerton, r/a=wtc
git-svn-id: svn://10.0.0.236/trunk@112770 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 23:47:22 +00:00
alecf%netscape.com
ce5f992cb4 bug 108962 - shrink nsStr by 4 bytes by packing mCharSize and mOwnsBuffer into bits of mCapacity
r=dbaron, sr=jst, with an almost-sr=jag


git-svn-id: svn://10.0.0.236/trunk@112769 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 23:46:56 +00:00
danm%netscape.com
9037da04af in Destroy(), call appshellservice->Unregister a little earlier. bug 119549 r=ben,hyatt,law
git-svn-id: svn://10.0.0.236/trunk@112767 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 23:39:00 +00:00
rchen%netscape.com
0a59ba4156 Fix for bug 119279. Force mailnews to reload the page after user turns on the auto detector. r=nhotta,sr=alecf.
git-svn-id: svn://10.0.0.236/trunk@112766 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 23:32:42 +00:00
hyatt%netscape.com
36b246735d Remove debug hyatt code. r=danm, sr=brendan
git-svn-id: svn://10.0.0.236/trunk@112765 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 23:17:14 +00:00
hyatt%netscape.com
4de658d35d More objc fixes to remove id as parameter. r=danm, sr=brendan
git-svn-id: svn://10.0.0.236/trunk@112764 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 23:14:20 +00:00
waterson%netscape.com
1233ea42cf Bug 108259. Build TestGtkEmbed and friends statically when doing a static build. r=cls, sr=blizzard
git-svn-id: svn://10.0.0.236/trunk@112763 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 23:09:31 +00:00
waterson%netscape.com
d489129b30 Be sure to add `.gnu.linkonce.t' objects in the order. Fix warnings.
git-svn-id: svn://10.0.0.236/trunk@112762 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 23:07:46 +00:00
locka%iol.ie
b3fad052c6 Fix to persist object to add state notifications when saving pages containing no saveable links. b=119496 r=brade@netscape.com sr=hyatt@netscape.com a=asa@mozilla.org
git-svn-id: svn://10.0.0.236/trunk@112761 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 23:05:51 +00:00
hyatt%netscape.com
f876797bfb Fix string fragments to compile in Objective C++ (for Cocoa widgets). r=danm, sr=brendan
git-svn-id: svn://10.0.0.236/trunk@112760 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 23:05:18 +00:00
waterson%netscape.com
9342994eff Bug 116328. Add nsIRDFBlob sorting to rdfliner. r=varga@utcru.sk, sr=hyatt.
git-svn-id: svn://10.0.0.236/trunk@112758 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 23:03:01 +00:00
waterson%netscape.com
75c9360046 Bug 105068. Bit-pack mAttributes and mLazyState into a single field in nsXULElement::Slots. r=shaver, sr=hyatt
git-svn-id: svn://10.0.0.236/trunk@112756 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 23:02:03 +00:00
mscott%netscape.com
085a7043eb Use a try / catch clause to avoid a JS error for some timeline code.
git-svn-id: svn://10.0.0.236/trunk@112755 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 22:59:49 +00:00
alecf%netscape.com
24029f9cd3 attempt to fix OS/2 bustage
git-svn-id: svn://10.0.0.236/trunk@112754 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 22:55:41 +00:00
despotdaemon%netscape.com
a557d8e5b1 Pseudo-automatic update of changes made by khanson@netscape.com.
git-svn-id: svn://10.0.0.236/trunk@112753 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 22:48:04 +00:00
blythe%netscape.com
d9d306a1a3 NOT part of normal build.
Fix a small performance problem intruduced yesterday.


git-svn-id: svn://10.0.0.236/trunk@112752 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 22:41:08 +00:00
pavlov%netscape.com
391f749a3a make imagelib listen to the memory-pressure observer. bug #94454. patch from nivedita@netscape.com. r=pavlov sr=brendan
git-svn-id: svn://10.0.0.236/trunk@112751 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 22:37:59 +00:00
waterson%netscape.com
0ba428ed90 Bug 99691. nsBoxToBlockAdaptor shouldn't be creating space managers; instead, fix XUL <label> and <description> elements to create area frames. r=dbaron, sr=hyatt
git-svn-id: svn://10.0.0.236/trunk@112749 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 22:34:25 +00:00
heikki%netscape.com
a506dc6f89 Bug 120615, XmlRpc does HTTP PUT when it should do POST. Patch from axel@pike.org. r=bbaetz@student.usyd.edu.au, sr=darin.
git-svn-id: svn://10.0.0.236/trunk@112748 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 22:31:28 +00:00
danm%netscape.com
a9a981e9b3 center on parent window falls back to centering on the screen if the parent window is being torn down. (crash) bug 120430 r=hyatt,saari
git-svn-id: svn://10.0.0.236/trunk@112747 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 22:30:39 +00:00
despotdaemon%netscape.com
886ac3174f Pseudo-automatic update of changes made by bishakhabanerjee@netscape.com.
git-svn-id: svn://10.0.0.236/trunk@112746 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 22:21:04 +00:00
depstein%netscape.com
9a4b657865 adding nsIObserServ.cpp & .h
git-svn-id: svn://10.0.0.236/trunk@112745 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 22:20:02 +00:00
depstein%netscape.com
3ecfa8deb8 added some code to the listeners
git-svn-id: svn://10.0.0.236/trunk@112744 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 22:18:53 +00:00
harishd%netscape.com
753b76b639 Removed mDoctypeText from nsExpatDriver. This |could| improve Ts/Txul time slightly. b=102345, r=heikki, sr=jst
git-svn-id: svn://10.0.0.236/trunk@112743 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 22:15:58 +00:00
cltbld%netscape.com
4615f53943 updating for mozilla.0.9.8
git-svn-id: svn://10.0.0.236/trunk@112742 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 22:15:06 +00:00
cltbld%netscape.com
8d07b17898 updating for mozilla.0.9.8
git-svn-id: svn://10.0.0.236/trunk@112740 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 22:10:33 +00:00
cmanske%netscape.com
869cc9e60a Update on insert Form widgets dialogs, b=45495, fix by neil, r=cmanske, sr=hewitt
git-svn-id: svn://10.0.0.236/trunk@112739 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 22:01:54 +00:00
cmanske%netscape.com
fa14118009 Update on insert Form widgets dialogs, b=45495, fixes by neil/cmanske, r=neil/cmanske, sr=hewitt
git-svn-id: svn://10.0.0.236/trunk@112738 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 22:01:10 +00:00
cmanske%netscape.com
d357beef0d Fixed JS warning in table dialog, b=120264, r=caillon, sr=kin
git-svn-id: svn://10.0.0.236/trunk@112737 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 21:55:20 +00:00
naving%netscape.com
cb5d5e55cb 119515 r=bienvenu sr=mscott. fix local move/copy messages failures
git-svn-id: svn://10.0.0.236/trunk@112736 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 21:49:15 +00:00
waterson%netscape.com
5b39ccda93 Fix static build bustage.
git-svn-id: svn://10.0.0.236/trunk@112735 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 21:45:46 +00:00
mitchf%netscape.com
4d820442d6 version tagging cfg file, per bug 11897
git-svn-id: svn://10.0.0.236/trunk@112734 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 21:34:58 +00:00
relyea%netscape.com
cbe61129a7 Too agressive on fixing leaks;). This one isn't a leak.
bob


git-svn-id: svn://10.0.0.236/trunk@112733 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 21:33:51 +00:00
waterson%netscape.com
7b6cc766f1 Bug 86755. Get rid of nsIRDFContentModelBuilder interface, move methods to nsIXULTemplateBuilder; rename |SetRootContent| to |init|. nsXULOutlinerBuilder now implements |init|, allowing us to initialize it with a database, so that we don't have to wait around until frames get created. r=varga@utcru.sc, sr=hyatt
git-svn-id: svn://10.0.0.236/trunk@112732 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 21:30:22 +00:00
bzbarsky%mit.edu
ed5639cb0b Make computed border-style and float be "none" by default. Bugs 120982
and 120965, patch by Christopher Aillon <caillon@returnzero.com>,
r=bzbarsky, sr=jst


git-svn-id: svn://10.0.0.236/trunk@112730 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 21:19:21 +00:00
smeredith%netscape.com
ca4dafd62a Fixed bug 11883--added a "manage" checkbox to the pref editor dialog.
git-svn-id: svn://10.0.0.236/trunk@112727 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 21:08:29 +00:00
nhotta%netscape.com
c55fe637dd Fixed the problem of the default chaset was overwritten even when the message has no chaset,
this fixes the reply quoting problem of no MIME messages,
bug 118740, r=ducarroz, sr=sspitzer.


git-svn-id: svn://10.0.0.236/trunk@112726 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 21:07:33 +00:00
despotdaemon%netscape.com
640ea2ee20 Pseudo-automatic update of changes made by knous@mozilla.org.
git-svn-id: svn://10.0.0.236/trunk@112724 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 20:53:53 +00:00
despotdaemon%netscape.com
1767321f4d Pseudo-automatic update of changes made by knous@mozilla.org.
git-svn-id: svn://10.0.0.236/trunk@112723 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 20:50:20 +00:00
nboyd%atg.com
b2a77430fe UPdate implementation version
git-svn-id: svn://10.0.0.236/trunk@112721 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 20:17:05 +00:00
nboyd%atg.com
04382ca085 Fix out-of-date javadoc.
git-svn-id: svn://10.0.0.236/trunk@112720 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 19:57:52 +00:00
nboyd%atg.com
2c5197ddf5 Fix the following problem:
Thanks!

As promised, I tried the debugger this afternoon and I had a problem with the '-f' option.
  We use -f to run a standard "startup" script before executing the "main" script.  For
example, we run the Rhino shell with the options "-f startup.js main.js".

When running the debugger's shell with the same options the debugger exits after the
startup.js completes; i.e., I can single step starting from startup.js but the debugger
exits at the end of startup.js without letting me single step into main.js.  This worked
fine in the 1.5R2 release of Rhino and the debugger.

I have not had a chance to look into the problem closely, but a cursory look at the code
suggests (to me) that the problem can be in either the debugger or the shell (since the
debugger basically runs the shell after creating the right "hooks".)  Of course, it could
also be a problem with my embedding.

So ... my question is, has anyone tried single stepping when the options to the debugger
include a '-f' option.  If so, I'll continue to look for a problem in my embedding.

Any suggestions would be appreciated.

Thanks,

dave


git-svn-id: svn://10.0.0.236/trunk@112719 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 19:57:01 +00:00
ben%netscape.com
094d5acc46 checking back in code by andreww accidentally backed out with my changes last night... see 1.43 comment on this file for details.
git-svn-id: svn://10.0.0.236/trunk@112718 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 19:52:47 +00:00
rogerl%netscape.com
195936b401 Fix bug #104375. Bug in String.replace() with $n where n > # parens.
r=khanson, sr=brendan.


git-svn-id: svn://10.0.0.236/trunk@112716 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 19:27:21 +00:00
wtc%netscape.com
8b97343194 The current zone allocator code does not compile under DCE threads on HP-UX
10.x.


git-svn-id: svn://10.0.0.236/trunk@112715 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 19:20:47 +00:00
alecf%netscape.com
0885d07bf5 fix for bug 114450 - be explicit about string comparison w.r.t. character size - no more hand-rolled vtables!
sr=jag, r=dbaron


git-svn-id: svn://10.0.0.236/trunk@112713 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 19:14:18 +00:00
jkeiser%netscape.com
5fa8540a5e Submit name/value pair for images that have value set (bug 57795, r=alexsavulov, sr=jst)
git-svn-id: svn://10.0.0.236/trunk@112712 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 19:08:57 +00:00
jkeiser%netscape.com
3c0c8fd84c Move checkbox state to content (bug 108307). r=rods, sr=jst
git-svn-id: svn://10.0.0.236/trunk@112711 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 19:04:55 +00:00
oeschger%netscape.com
e7549641f1 b=93553, sr=alecf, r=morse, r=oeschger, author=cotter, updating the UI to reflect the more general password config here (web passwords->passwords)
git-svn-id: svn://10.0.0.236/trunk@112710 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 18:58:40 +00:00
bzbarsky%mit.edu
2c3103bd6c Correct case of some includes so we build on UFS. Bug 108300, patch by
leaf@mozilla.org, r=beard, sr=darin


git-svn-id: svn://10.0.0.236/trunk@112709 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 18:49:11 +00:00
pinkerton%netscape.com
7c1dfda2e0 use progid for scriptable region. r=ducarroz/sr=mscott. bug# 81996
git-svn-id: svn://10.0.0.236/trunk@112708 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 18:47:46 +00:00
blythe%netscape.com
bc94a17a37 Fix bug 120422
r=dbaron,rs=hyatt
Do not delete ref counted object.


git-svn-id: svn://10.0.0.236/trunk@112706 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 18:28:25 +00:00
nicolson%netscape.com
6cab6166f9 use NSS 3.4.
git-svn-id: svn://10.0.0.236/trunk@112705 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 18:21:57 +00:00
wtc%netscape.com
a925976555 Bugzilla bug 97485: fixed a few bugs in the zone allocator. Print warning
messages on memory blocks from ordinary malloc.  Initialize the zone
allocator first during NSPR initialization.
Modified files: prmem.c prinit.c


git-svn-id: svn://10.0.0.236/trunk@112704 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 18:11:30 +00:00
wtc%netscape.com
b489fa89b9 Memory allocated by strdup() should be freed by free(), not PR_Free().
git-svn-id: svn://10.0.0.236/trunk@112703 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 17:46:37 +00:00
rayw%netscape.com
1556a1516c Added code to carefully follow the XMLSchema info when encoding and decoding
xpconnect objects, rejecting errors, and making sure that the child elements
appear in the correct order.

SOAP is not part of the default build.


git-svn-id: svn://10.0.0.236/trunk@112702 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 17:32:04 +00:00
ian.mcgreer%sun.com
d66ce598c6 fix aix issues
git-svn-id: svn://10.0.0.236/trunk@112701 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 15:45:55 +00:00
cmanske%netscape.com
9a54400b16 Use radio buttons for 'Alt text' in Image dialog, b=114531, r=brade, sr=kin
git-svn-id: svn://10.0.0.236/trunk@112700 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 15:41:20 +00:00
cmanske%netscape.com
362293bf87 Support Edit Frame in Composer, simplify Save Frame for browser, and move editor methods in editorApplicationOverlay.js, b=89975, r=hewitt, sr=hewitt
git-svn-id: svn://10.0.0.236/trunk@112699 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 15:36:36 +00:00
pinkerton%netscape.com
8893f6e0f4 add tab theme support. r=sdagley/sr=sfraser.
git-svn-id: svn://10.0.0.236/trunk@112698 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 15:16:56 +00:00
leaf%mozilla.org
6119be076a Automated update
git-svn-id: svn://10.0.0.236/trunk@112697 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 15:12:13 +00:00
pinkerton%netscape.com
435ba291f1 allow --enable-default-toolkit=cocoa in makefiles and default toolkit can now be overridden on platform that don't use X11. r=cls/sr=hyatt. bug#121496
git-svn-id: svn://10.0.0.236/trunk@112696 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 15:11:18 +00:00
timeless%mac.com
a01e477a2f Bug 120766ÿ"radio-check" should not inherit="checked"
patch by neil@parkwaycc.co.uk r=jag sr=hewitt


git-svn-id: svn://10.0.0.236/trunk@112695 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 14:46:11 +00:00
peterv%netscape.com
3ea691c23a Removing duplicate entries to avoid the "Missing files" warning in CodeWarrior. Don't know how this file got mangled so badly.
git-svn-id: svn://10.0.0.236/trunk@112694 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 14:39:40 +00:00
timeless%mac.com
54fd1edf2b Bug 117119ÿBMP and ICO decoders should use ReadSegments, not Read
patch by cbiesinger@web.de r=pavlov sr=tor


git-svn-id: svn://10.0.0.236/trunk@112693 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 14:36:40 +00:00
peterv%netscape.com
e009932107 Correct error in patch for bug 96647. Transformiix standalone only, doesn't affect mozilla build. (Last one, I promise)
git-svn-id: svn://10.0.0.236/trunk@112692 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 14:18:26 +00:00
peterv%netscape.com
bd0f50ceef Correct error in patch for bug 96647. Transformiix standalone only, doesn't affect mozilla build.
git-svn-id: svn://10.0.0.236/trunk@112691 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 14:14:55 +00:00
nboyd%atg.com
33e7eec054 Add new skip.
git-svn-id: svn://10.0.0.236/trunk@112690 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 14:10:35 +00:00
peterv%netscape.com
f0175470e3 Correct error in patch for bug 96647. Transformiix standalone only, doesn't affect mozilla build.
git-svn-id: svn://10.0.0.236/trunk@112689 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 14:03:36 +00:00
peterv%netscape.com
627640cc69 Fix for bug 96647 (Change the way output is constructed in Transformiix). r=sicking, Pike, sr=jst.
git-svn-id: svn://10.0.0.236/trunk@112688 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 13:38:51 +00:00
rginda%netscape.com
630c49474c bug 121171, CallEventHandler ignores mScriptsEnabled, r=brendan, sr=jst
do nothing, but return a positive result from nsJSContext::CallEventHandler if scripts are disabled on this context.


git-svn-id: svn://10.0.0.236/trunk@112687 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 13:25:46 +00:00
rginda%netscape.com
4f7eb8c3f2 bug 119865, crash exiting venkman, r=peterv, sr=brendan
use nsCOMPtr to avoid releasing a final reference via jsdScript::Invalidate()


git-svn-id: svn://10.0.0.236/trunk@112686 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 13:17:04 +00:00
rginda%netscape.com
6f439e9394 - venkman only -
Large landing of new Venkman command structure, also fixes...
Bug 120988 Generalized command manager for Venkman
Bug 103419 hitting a breakpoint should focus debugger
Bug 119867 Should not be possible to hide source code
Bug 118923 Venkman's outliners sometimes don't repaint twisty
Bug 116098 Would be nice with a contextmenu in the functions-pane


git-svn-id: svn://10.0.0.236/trunk@112685 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 12:46:47 +00:00
rayw%netscape.com
498166895d Cleaned up handling of structs into its own encoder / decoder class so
that it will be easier to add all the schema type checking there.  Also
made this handler QI to nsIPropertyBag instead of expecting it to be the
type of the variant.

SOAP is not part of default build.


git-svn-id: svn://10.0.0.236/trunk@112683 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 11:26:35 +00:00
jst%netscape.com
3a4ce5be48 Fixing bug 121485. Un-nsAutoString:ifying nsXULContentSink::NormalizeAttributeString(), ::PushNameSpacesFrom(), and ::ParseTag() in favor of new string iterators n' other neat features. r=nisheeth@netscape.com, sr=waterson@netscape.com
git-svn-id: svn://10.0.0.236/trunk@112682 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 10:23:04 +00:00
jaggernaut%netscape.com
287a4f3e20 Bug 46200: remove dead code from nsBrowserInstance. r=alecf, sr=ben
git-svn-id: svn://10.0.0.236/trunk@112681 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 10:11:01 +00:00
hwaara%chello.se
6483967b67 #119566, "Default Browser" dialog box whenever starting Mozilla"
r=hwaara, sr=alecf

Patch by Darren Stone <astrosmash@home.com>


git-svn-id: svn://10.0.0.236/trunk@112680 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 09:33:17 +00:00
darin%netscape.com
7e7e2926f3 fixes mach-o bustage r=rjc,cls
git-svn-id: svn://10.0.0.236/trunk@112679 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 09:24:01 +00:00
jst%netscape.com
b9772d48fe Fixing bug 120899. Changing the NS_WARN_IF_FALSE() macro so that it can't be mis-used in optimized builds. This change makes the macro not usable in expressions that are supposed to be evaluated in release code since the macro now expands to nothing in non-debug builds. Also eliminate NS_VALIDATE which is equally mis-usable. r=dbaron@fas.harvard.edu, sr=brendan@mozilla.org
git-svn-id: svn://10.0.0.236/trunk@112678 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 09:20:51 +00:00
jst%netscape.com
7af4c8d1f2 Fixing bug 120504. Make QI's on DOM elements only call into the binding manager only if the element itself doesn't implement the interface that the element is being QI'ed to. r=hyatt@netscape.com, sr=brendan@mozilla.org
git-svn-id: svn://10.0.0.236/trunk@112677 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 09:17:00 +00:00
jj%netscape.com
0171750d26 #121494: missing define at the top of the file
git-svn-id: svn://10.0.0.236/trunk@112676 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 08:30:18 +00:00
dp%netscape.com
e2ecc272e6 Adding nsRecyclingAllocator.h for mac export
git-svn-id: svn://10.0.0.236/trunk@112675 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 08:06:45 +00:00
bzbarsky%mit.edu
22790ca5e4 Make "shift" always toggle the sense of the
"browser.tabs.loadInBackground" pref.  Bug 113072, patch by Christopher
Aillon <caillon@returnzero.com>, r=doron, sr=jag


git-svn-id: svn://10.0.0.236/trunk@112674 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 07:51:58 +00:00
bzbarsky%mit.edu
e51eb90700 Landing Daniel Brooks' <db48x@yahoo.com> page info rewrite. Tracking
bug is bug 52730, fixes bugs 53503, 53641, 55713, 60428, 68823, 74530,
74760, 76926, 77408, 81328, 85905, 88537, 91173, 94146, 96994, 97479,
110973, 110981, 112297, 117027. r=fabian,hwaara,bzbarsky,gerv,ksosez.
sr=jag,hewitt.


git-svn-id: svn://10.0.0.236/trunk@112673 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 07:27:59 +00:00
ben%netscape.com
801a386231 backing out earlier changes to fix 121054, to address pageload spike
git-svn-id: svn://10.0.0.236/trunk@112672 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 07:23:21 +00:00
dp%netscape.com
417d53e7e7 Fixing spelling mistake nsRecylingAllocator -> nsRecyclingAllocator
git-svn-id: svn://10.0.0.236/trunk@112671 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 07:16:34 +00:00
mcafee%netscape.com
15d52431ae I'm sorry Dave, I'm afraid I can't allow this checkin. Backing out rjc's change from earlier (121546). r=jrgm
git-svn-id: svn://10.0.0.236/trunk@112670 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 07:16:01 +00:00
dp%netscape.com
24dfb34dae bug 118061 Enabling nsRecyclingAllocator r=dveditz sr=sfraser
git-svn-id: svn://10.0.0.236/trunk@112669 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 07:00:07 +00:00
dp%netscape.com
447c430e80 bug 118061 Enabling nsRecyclingAllocator r=dveditz sr=sfraser
git-svn-id: svn://10.0.0.236/trunk@112668 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 06:48:58 +00:00
dp%netscape.com
09f8fb49b8 bug 118061 First version of nsRecyclingAllocator r=dveditz sr=sfraser
git-svn-id: svn://10.0.0.236/trunk@112667 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 06:41:01 +00:00
dp%netscape.com
826c21e7bc bug 118061 Adding NS_NewTimer r=dveditz sr=sfraser
git-svn-id: svn://10.0.0.236/trunk@112666 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 06:37:38 +00:00
jst%netscape.com
e262b0cb89 Fixing bug 120901. Eliminating unnecessary QI call in XPCWrappedNative::GetNative(). r=dbradley@netscape.com, sr=jband@netscape.com
git-svn-id: svn://10.0.0.236/trunk@112665 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 06:03:25 +00:00
jst%netscape.com
786b4fe53a Fixing bug 120718. Making XPCReadableJSStringWrapper not allocate non-shared buffer handles, this caused a malloc to happen for every XPCReadableJSStringWrapper that was accessed in mozilla, ~400 allocations at startup. r=dbaron@fas.harvard.edu sr=jaggernaut@netscape.com.
git-svn-id: svn://10.0.0.236/trunk@112663 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 05:59:41 +00:00
bzbarsky%mit.edu
56f000a21d Human-readable tooltips for nodetype in inspector. Bug 113793, patch by
Christopher Aillon <caillon@returnzero.com>, r=bzbarsky, sr=hewitt


git-svn-id: svn://10.0.0.236/trunk@112661 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 05:33:46 +00:00
bzbarsky%mit.edu
4dc37cd77e Update the "get new themes" link to point to XULPlanet, which actually
has themes.  Bug 120985, patch by Christopher Aillon
<caillon@returnzero.com>, r=hixie, sr=hyatt


git-svn-id: svn://10.0.0.236/trunk@112660 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 05:27:55 +00:00
bratell%lysator.liu.se
0279313b6e Bug 120990 - make conversion from integer to string faster by not using sprintf. r=khanson, sr=brendan
git-svn-id: svn://10.0.0.236/trunk@112659 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 05:24:39 +00:00
aaronl%netscape.com
fbd4080946 Bug 119301. Implement nsIDOMXULMenuListElement on autocomplete widget. r=jag, sr=hewitt
git-svn-id: svn://10.0.0.236/trunk@112658 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 05:16:31 +00:00
bzbarsky%mit.edu
a040e4e057 Make content-disposition parsing more forgiving. Fixes bug 121509 and a
few existing evang bugs.  r=law, sr=mscott


git-svn-id: svn://10.0.0.236/trunk@112657 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 05:14:49 +00:00
aaronl%netscape.com
8ba45f52db Bug 120813. Active Accessibility: fix bounds of root frame. The root frame's x,y position shouldn't have the current scroll position added to it, unlike it's child elements. r=jgaunt, rs=waterson
git-svn-id: svn://10.0.0.236/trunk@112656 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 05:12:29 +00:00
bzbarsky%mit.edu
2edd5ea947 Fix scrolling to element in inspector to scroll only when really
needed.  Bug 120947, r=doron, sr=hewitt


git-svn-id: svn://10.0.0.236/trunk@112655 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 05:11:20 +00:00
lordpixel%mac.com
d722d45aa6 Fix bustage. bug # is 119118
git-svn-id: svn://10.0.0.236/trunk@112654 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 04:33:01 +00:00
hewitt%netscape.com
336019e38c 120848 - listbox box object component missing, r=jgaunt, sr=bryner
git-svn-id: svn://10.0.0.236/trunk@112653 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 04:26:28 +00:00
hewitt%netscape.com
0c9f2ed0d1 120609 - Autocomplete drop down list has white vertical borders on left and right side, r=blake, sr=hyatt
git-svn-id: svn://10.0.0.236/trunk@112652 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 04:24:15 +00:00
bzbarsky%mit.edu
5c0d8738e5 computed list-style-image should be "none" if there is no image. Bug
120719, r=hixie, sr=attinasi


git-svn-id: svn://10.0.0.236/trunk@112651 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 04:22:59 +00:00
hewitt%netscape.com
60d5ef4b74 121278 - Okay &amp; Cancel buttons missing from various dialogs, r=pinkerton, sr=smfr
git-svn-id: svn://10.0.0.236/trunk@112650 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 04:21:56 +00:00
sspitzer%netscape.com
1afa9a8afe fix for #118744. r=racham, sr=sspitzer. outlook express addresses
not displayed correctly in non US-ASCII locales.
thanks to john.marmion@ireland.sun.com for the patch.


git-svn-id: svn://10.0.0.236/trunk@112649 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 04:17:47 +00:00
sspitzer%netscape.com
e3624fae29 fix for #119331. prefer html problems with LDAP servers.
r=dmose, sr=sspitzer.  thanks for john.marmion@ireland.sun.com for the patch
and to Roland Felnhofer for the feedback in the bug.


git-svn-id: svn://10.0.0.236/trunk@112648 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 04:16:03 +00:00
ben%netscape.com
51c028a06c bug 121054 - adding history to go menu.
r=jag, sr=hewitt


git-svn-id: svn://10.0.0.236/trunk@112647 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 04:02:35 +00:00
danm%netscape.com
e63bd2182b removing unused ShowModally method. code=mbosch@lorentz.leidenuniv.nl r=me
git-svn-id: svn://10.0.0.236/trunk@112646 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 03:54:49 +00:00
lordpixel%mac.com
41a7304d35 Fix for bug 119118 Issue with calculating rowBytes. r=sdagley, sr=smfr
git-svn-id: svn://10.0.0.236/trunk@112645 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 03:48:54 +00:00
danm%netscape.com
bf8e12030a set docshell current URI after creating a synchronous about:blank Frankendocument. bug 104361 r=brendan,jst
git-svn-id: svn://10.0.0.236/trunk@112644 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 03:38:53 +00:00
sspitzer%netscape.com
168839885d suplimental fix for #120755. instead of using .rootFolder and QI to nsIMsgFolder,
we should use what bienvenu added:  .rootMsgFolder.


git-svn-id: svn://10.0.0.236/trunk@112643 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 03:38:18 +00:00
mscott%netscape.com
d7604870f5 Bug #106018 --> when auto completing put matches which share
the default domain FIRST when there are multiple matches of the
same type.

r=ducarroz
sr=sspitzer


git-svn-id: svn://10.0.0.236/trunk@112642 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 03:09:27 +00:00
mscott%netscape.com
776d5ef50a Bug #111140 --> disable open and save in the attachment context menu
if we don't have any attachments selected.
r=ssu
sr=sspitzer


git-svn-id: svn://10.0.0.236/trunk@112641 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 03:06:38 +00:00
gordon%netscape.com
b983639064 fix bug 120833 "default value of nsICacheEntryInfo::expirationTime should be PRUint32(-1)". r=gagan, sr=darin.
git-svn-id: svn://10.0.0.236/trunk@112640 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 03:06:28 +00:00
mscott%netscape.com
2dd996e15c Bug #115772 --> remove borders and shading to the headers
because this is messing up printing of messages.
r=ssu
sr=sspitzer


git-svn-id: svn://10.0.0.236/trunk@112639 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 03:04:06 +00:00
sspitzer%netscape.com
788e023aac fix for #57661. fix some icon / twisty alignment issues.
r=shliang, sr=sspitzer.  patch by andreas.premstaller@uibk.ac.at (Andreas Premstaller)


git-svn-id: svn://10.0.0.236/trunk@112638 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 03:02:05 +00:00
mscott%netscape.com
408544e2ed Bug #117962--> add a null ptr check on aURI and fall out if we don't
have one to avoid a crash.
r/sr=sspitzer


git-svn-id: svn://10.0.0.236/trunk@112637 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 03:01:01 +00:00
rayw%netscape.com
31553bcbdc Handle decoding of simple unknown types as strings, otherwise as variants
within arrays.

SOAP is not part of default build.


git-svn-id: svn://10.0.0.236/trunk@112636 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 02:57:31 +00:00
nicolson%netscape.com
b2adda4233 New build script for Java classes.
git-svn-id: svn://10.0.0.236/trunk@112635 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 02:57:12 +00:00
bzbarsky%mit.edu
00718bfc1b Ignore anchors without href attrs in contentAreaClick. Bug 120973,
r=caillon, sr=blake


git-svn-id: svn://10.0.0.236/trunk@112634 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 02:54:18 +00:00
bzbarsky%mit.edu
52ea69e77c Bug 117228 -- error alert for XP filepicker when the file user wants
opened is not readable.
Bug 121035 -- "Save" button gets disabled when scrolling dir view.  Both
r=bryner, sr=jag


git-svn-id: svn://10.0.0.236/trunk@112633 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 02:46:11 +00:00
relyea%netscape.com
f1b9f47094 Fix NT crash on startup. (load builtins after trust domain gets initialized).
git-svn-id: svn://10.0.0.236/trunk@112632 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 02:46:07 +00:00
cavin%netscape.com
3c8128d48f Fix for bug 114060. Added two new error msgs for smtp and nntp send/post errors. r=ducarroz, sr=mscott.
git-svn-id: svn://10.0.0.236/trunk@112631 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 02:41:52 +00:00
bzbarsky%mit.edu
847e4b27ed Make new tabs _not_ open for just enter if the "open new tab for
ctrl-enter" pref is set.  Bug 105537, r=timeless, sr=hyatt


git-svn-id: svn://10.0.0.236/trunk@112630 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 02:39:26 +00:00
rayw%netscape.com
b2de4c6dd7 Added more array support for nested types in arrays.
SOAP is not part of default build.


git-svn-id: svn://10.0.0.236/trunk@112629 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 02:39:08 +00:00
bzbarsky%mit.edu
e8f9ff7e9c Make "Open in new Window" and "Open in new Tab" set referrer correctly.
Bug 48902, r=doron, sr=hyatt


git-svn-id: svn://10.0.0.236/trunk@112628 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 02:35:16 +00:00
pschwartau%netscape.com
f76a6c959b Correcting typo.
git-svn-id: svn://10.0.0.236/trunk@112627 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 02:31:51 +00:00
pschwartau%netscape.com
9ed1dffe05 Initial add. Regression test for bug 96526.
git-svn-id: svn://10.0.0.236/trunk@112626 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 02:25:05 +00:00
rjc%netscape.com
7ac4a84b92 Fix build bustage. (Missing #ifdef)
git-svn-id: svn://10.0.0.236/trunk@112625 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 02:08:30 +00:00
naving%netscape.com
02f422ffb1 84988 r=cavin sr=mscott. fix imap copy folder to local folders
for folders(children) not selected.


git-svn-id: svn://10.0.0.236/trunk@112624 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 02:03:57 +00:00
bzbarsky%mit.edu
ad1fb22926 Change users of Length() to IsEmpty() where the code really cares about
the latter in content/.  Bug 100649, r=jag, sr=jst


git-svn-id: svn://10.0.0.236/trunk@112623 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 02:03:19 +00:00
morse%netscape.com
4aa4dc93f3 bug 109593, remove full-screen mode, rsgehani, sr=ben
git-svn-id: svn://10.0.0.236/trunk@112622 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 01:57:51 +00:00
andreww%netscape.com
bdff9e5c37 bug 44892 - mnemonics for tasks menu window items. r=alecf sr=hewitt
git-svn-id: svn://10.0.0.236/trunk@112621 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 01:52:18 +00:00
dougt%netscape.com
5d273d8abe Adding nsIComponentRegistrar interface to the build. See 115853. r=dp@netscape.com, sr=jband@netscape.com
git-svn-id: svn://10.0.0.236/trunk@112620 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 01:50:35 +00:00
morse%netscape.com
fe9782a60e 113158, reduce wallet footprint, r=alecf,jag,bryner
git-svn-id: svn://10.0.0.236/trunk@112619 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 01:49:43 +00:00
andreww%netscape.com
e8db5c2378 bugzilla bug 91753 - r=hwaara sr=sspitzer Search Button in search messages window relocation + other changes to match spec.
git-svn-id: svn://10.0.0.236/trunk@112618 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 01:47:14 +00:00
jaggernaut%netscape.com
b8e0eea789 Bug 66034: Undo work-around put in for this bug, the underlying bug was fixed a while ago. r=alecf, sr=ben.
git-svn-id: svn://10.0.0.236/trunk@112617 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 01:44:35 +00:00
stephend%netscape.com
86b75e03a6 Cleaning up function/method/variable names in the Account Manager to reflect their labels in the .dtds. r=bhuvan@netscape.com, sr=sspitzer@netscape.com. Bug 81043.
git-svn-id: svn://10.0.0.236/trunk@112616 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 01:38:23 +00:00
jaggernaut%netscape.com
5020696994 Bug 120993: URL bar is cleared when a page is loaded in a new tab. r=bzbarsky, sr=ben
git-svn-id: svn://10.0.0.236/trunk@112615 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 01:36:01 +00:00
alexsavulov%netscape.com
60208b116d fix for bug 70972 (object element does not respect CSS width and height
for non-plugins) r= peter lubczynski sr= attinasi


git-svn-id: svn://10.0.0.236/trunk@112614 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 01:30:50 +00:00
dougt%netscape.com
d383a669af Cleanup of nsIModule. See 99154. r=dp@netscape.com, sr=jband@netscape.com
git-svn-id: svn://10.0.0.236/trunk@112613 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 01:29:40 +00:00
rjc%netscape.com
1e20881de4 Fix bug # 113894 (and 36972 and 79013 and probably others): get nsFileSpec usage out of RDF, and fix RDF persistence on Mac if there is a slash in the path. Various code from myself, darin, waterson and tingley. Various r/sr include darin, waterson
git-svn-id: svn://10.0.0.236/trunk@112612 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 01:29:39 +00:00
gordon%netscape.com
8c95eeda39 Fix bug 119117 "nsDiskCacheMap.h compiler warning". sr=darin.
git-svn-id: svn://10.0.0.236/trunk@112611 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 01:27:32 +00:00
naving%netscape.com
214790416e 119965 r=bienvenu sr=sspitzer. Make selection work on returning from quick search view to folder view.
110860 r=bienvenu sr=sspitzer. fix sorting in folder view on returning from quick search
110320 sr=bienvenu. Sort the quick search results after search is over.
fix several other msg selection bugs on going into / coming out of quick search


git-svn-id: svn://10.0.0.236/trunk@112610 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 01:25:59 +00:00
gordon%netscape.com
0c5bd606b5 Fix bug 111049 "add attribute to nsICacheSession to detect device availability". sr=darin.
git-svn-id: svn://10.0.0.236/trunk@112609 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 01:25:25 +00:00
gordon%netscape.com
eadf926bb1 Fix bug 119085 "cache entries corrupted if size of metadata is zero". sr=darin.
git-svn-id: svn://10.0.0.236/trunk@112608 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 01:24:20 +00:00
nicolson%netscape.com
c34340b099 Switch the default on removeSunProvider. The default is now "false".
git-svn-id: svn://10.0.0.236/trunk@112607 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 01:24:01 +00:00
ducarroz%netscape.com
f4be81c212 Fix for bug 71090. Patch provided by Denis Antrushin <adu@sparc.spb.su>
Skip over invalid empty encoded-words. R=ducarroz, SR=mscott


git-svn-id: svn://10.0.0.236/trunk@112606 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 01:22:44 +00:00
bryner%netscape.com
ecf9539ee3 Bug 120189 - fix selection crash with xbl select widget. Move content node updating to the XBL event handlers. r=varga, sr=jag.
git-svn-id: svn://10.0.0.236/trunk@112605 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 01:22:33 +00:00
stephend%netscape.com
2bbf59b994 Bug 119148 and bug 119149. Caps issues in dialogs for mail. r=hwaara/robinf sr=brendan
git-svn-id: svn://10.0.0.236/trunk@112604 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 01:20:50 +00:00
bryner%netscape.com
5628d66031 Bug 120252 - paint flashing broken on gtk. Also removed a lot of old cruft, changed #ifdef NS_DEBUG (which we don't define any more) to #ifdef DEBUG. r=waterson, sr=blizzard.
git-svn-id: svn://10.0.0.236/trunk@112603 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 01:18:36 +00:00
rjc%netscape.com
b821e260fb Fix bug # 83643: Mac OS X sheets. r=pinkerton sr=ben
git-svn-id: svn://10.0.0.236/trunk@112602 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 01:17:48 +00:00
bryner%netscape.com
b286121668 Part of fix for bug 91184, checked in on the 0.9.4 branch but forgot to check it in on the trunk. r=saari, sr=hyatt.
git-svn-id: svn://10.0.0.236/trunk@112601 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 01:17:04 +00:00
nicolson%netscape.com
2d322d5edb Document the necessity of setting the password on the key database before
using the SecretDecoderRing.


git-svn-id: svn://10.0.0.236/trunk@112600 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 01:16:12 +00:00
rayw%netscape.com
4213779178 Added encoding of untyped arrays. Fixed test html.
SOAP is not part of default build.


git-svn-id: svn://10.0.0.236/trunk@112599 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 01:14:25 +00:00
nicolson%netscape.com
73e004d9c4 Fix 118679: PK11SDR_Encrypt fails if not logged into token.
git-svn-id: svn://10.0.0.236/trunk@112598 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 01:06:22 +00:00
blythe%netscape.com
cbc42dd680 NOT part of normal build.
Fix bug 119065
Better filtering via spacetrace footprint tool.


git-svn-id: svn://10.0.0.236/trunk@112597 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 00:58:33 +00:00
ian.mcgreer%sun.com
cf10eb186e implement istemp and isperm in case clients depend on it, make sure certs own a reference to their slot and then free it
git-svn-id: svn://10.0.0.236/trunk@112596 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 00:58:02 +00:00
wtc%netscape.com
0da95573c9 Added $(topsrcdir) prefix to config/prmkdir.bat.
git-svn-id: svn://10.0.0.236/trunk@112593 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 00:50:32 +00:00
ian.mcgreer%sun.com
f8e7451012 fix leakage in traversal functions that convert certs to CERTCertificates
git-svn-id: svn://10.0.0.236/trunk@112592 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 00:34:03 +00:00
relyea%netscape.com
ae3fbdd717 Fix memory leaks.
git-svn-id: svn://10.0.0.236/trunk@112591 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 00:26:29 +00:00
ian.mcgreer%sun.com
d6eac2bdae make sure path string has terminator
git-svn-id: svn://10.0.0.236/trunk@112590 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 00:25:32 +00:00
beard%netscape.com
fa14f6b3d4 [not part of build] Fix for bug #119352, r=bnesse, sr=sfraser
git-svn-id: svn://10.0.0.236/trunk@112589 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-23 22:29:17 +00:00
ian.mcgreer%sun.com
767d61d31e restore function CERT_SaveImportedCert, used to set the trust bits of a cert on import. Fixes bug 121487
git-svn-id: svn://10.0.0.236/trunk@112588 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-23 21:43:30 +00:00
ian.mcgreer%sun.com
272d51c4bd traverse functions need to cache as they run in order to catch multiple instances of certs correctly
git-svn-id: svn://10.0.0.236/trunk@112587 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-23 20:35:18 +00:00
ian.mcgreer%sun.com
8ccf2fc960 traversed certs also need to be cached
git-svn-id: svn://10.0.0.236/trunk@112586 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-23 18:24:29 +00:00
ian.mcgreer%sun.com
b34e37b27f fix core when token list is emptied (caused by switch to fips mode)
git-svn-id: svn://10.0.0.236/trunk@112585 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-23 17:39:29 +00:00
ian.mcgreer%sun.com
6cebd8d49a * keep stan in sync with both addition and removal of modules
* clean up compatibilty issues with PKCS#11 serial numbers.  Need to search both encoded and decoded values, while making sure stan code only deals with DER value


git-svn-id: svn://10.0.0.236/trunk@112584 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-23 17:00:39 +00:00
ian.mcgreer%sun.com
57a6e93f05 make the load function for the root token work
git-svn-id: svn://10.0.0.236/trunk@112583 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-23 15:36:54 +00:00
bstell%ix.netcom.com
4d258f98f6 bug 119042, crash when dividing 0 by 1
r=bstell@ix.netcom.com, sr/a=brendan@mozilla.org,


git-svn-id: svn://10.0.0.236/trunk@112580 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-23 15:07:15 +00:00
ian.mcgreer%sun.com
b759894bd4 fix breakage caused by yesterday's checkins; since softoken no longer returns terminating NULL for strings must add it above PKCS#11
also fixes bug 121384


git-svn-id: svn://10.0.0.236/trunk@112579 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-23 14:37:48 +00:00
blizzard%redhat.com
a2989b40c6 Part of bug #121252. Start work on getting grabs implemented. Rollup isn't happening yet. Not part of the build.
git-svn-id: svn://10.0.0.236/trunk@112578 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-23 06:39:48 +00:00
bryner%netscape.com
56a3c82cef Fixing selected state for radio buttons. Not part of the build.
git-svn-id: svn://10.0.0.236/trunk@112577 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-23 06:00:03 +00:00
relyea%netscape.com
eaf5a8bae2 Restore code automatic Built-in loading code.
git-svn-id: svn://10.0.0.236/trunk@112576 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-23 04:42:21 +00:00
relyea%netscape.com
4709d9db1c Function to return if any builtins have been loaded yet.
git-svn-id: svn://10.0.0.236/trunk@112575 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-23 04:41:25 +00:00
ian.mcgreer%sun.com
8d87d7c1ca fix PSM crash described in bug 120647
git-svn-id: svn://10.0.0.236/trunk@112574 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-23 03:53:16 +00:00
roc+%cs.cmu.edu
b4249b6891 Bug 120934. Deal with nonzero (x,y) in the aCombinedRect passed into nsViewManager::RefreshView(). r=kmcclusk,sr=waterson,a=asa
git-svn-id: svn://10.0.0.236/trunk@112573 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-23 03:32:45 +00:00
wtc%netscape.com
6fd02510af Bugzilla bug 119340: an inelegant but more reliable way to kill the
multithreaded 'selfserv' process on Linux.
Modified files:
    cmd/selfserv/selfserv.c tests/common/init.sh tests/ssl/ssl.sh


git-svn-id: svn://10.0.0.236/trunk@112572 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-23 03:18:57 +00:00
wtc%netscape.com
5f4f7f813d Run the test on both the primordial thread and another thread.
git-svn-id: svn://10.0.0.236/trunk@112571 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-23 03:05:01 +00:00
wtc%netscape.com
57008423af Added support for new HP-UX platform.
Modified files: configure configure.in _hpux.h _hpux64.cfg uxrng.c
prsystem.c pr/tests/Makefile.in


git-svn-id: svn://10.0.0.236/trunk@112570 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-23 02:56:36 +00:00
rods%netscape.com
ccd0e3e698 Fixes the problem where PrintPreview is getting multiple Initial reflows
and includes a minor optimization when resizing the view during box layout
Bug 118968 r=attinasi sr=hyatt a=brendan


git-svn-id: svn://10.0.0.236/trunk@112569 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-23 02:53:02 +00:00
wtc%netscape.com
c863ba7cc4 Bugzilla bug 106496: PR_NewTCPSocketPair should check the source of the
connection.


git-svn-id: svn://10.0.0.236/trunk@112568 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-23 02:41:13 +00:00
wtc%netscape.com
a23a9b6f32 Bugzilla bug 119935: we need to set the priority of the new thread only if
the priority is not PR_PRIORITY_NORMAL.  (Windows creates new threads with
the normal priority.)  Thanks to Michael Kaply <mkaply@us.ibm.com> for
reporting this bug.
Modified files: ntthread.c w95thred.c


git-svn-id: svn://10.0.0.236/trunk@112567 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-23 02:32:28 +00:00
pschwartau%netscape.com
db70a07962 Initial add; testing Error.prototype.toString()
git-svn-id: svn://10.0.0.236/trunk@112566 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-23 02:24:32 +00:00
relyea%netscape.com
c410a92b91 Fix wrong polarity on if statement (should check for success, not failure).
git-svn-id: svn://10.0.0.236/trunk@112565 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-23 02:10:31 +00:00
sonja.mirtitsch%sun.com
e1ea64554e added the TCP connection aborted to the lines that are OK in the log
git-svn-id: svn://10.0.0.236/trunk@112564 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-23 02:07:08 +00:00
jband%netscape.com
7432f04958 fix Windows bustage -- NOT PART OF DEFAULT BUILD --
git-svn-id: svn://10.0.0.236/trunk@112563 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-23 02:06:06 +00:00
jj%netscape.com
09502888e9 bug #120858: adding talkback to daily mozilla build on MacOS 9. r=leaf, sr=granrose, a=asa
git-svn-id: svn://10.0.0.236/trunk@112562 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-23 01:55:48 +00:00
wtc%netscape.com
fde61ab4cb Bugzilla bug 119384: deleted two assertions that contained illegal type
casts.  The two functions that contained the assertions are very simple
so they can do without the assertions.  Thanks to Nick Blievers
<nickb@adacel.com.au> for reporting this bug and suggesting a fix.


git-svn-id: svn://10.0.0.236/trunk@112561 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-23 01:49:25 +00:00
relyea%netscape.com
a9049ce9b3 Fix memory like in readSMimeEntry
git-svn-id: svn://10.0.0.236/trunk@112560 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-23 01:44:22 +00:00
naving%netscape.com
940c288794 120203 r=bienvenu sr=sspitzer. fix notification to rdf/outliner so
that we notify move/rename/delete/copy folder for the parent folder
only (no need for children).


git-svn-id: svn://10.0.0.236/trunk@112559 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-23 01:40:26 +00:00
rogerl%netscape.com
f98ea16ee1 Added 'quit' to shell.
git-svn-id: svn://10.0.0.236/trunk@112558 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-23 01:32:23 +00:00
rogerl%netscape.com
9aed1eb7d5 Began switch to regexp bytecode.
git-svn-id: svn://10.0.0.236/trunk@112557 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-23 01:31:39 +00:00
relyea%netscape.com
f29e33a844 Fix label stuff.
git-svn-id: svn://10.0.0.236/trunk@112556 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-23 01:20:32 +00:00
naving%netscape.com
0a2a5d2f95 115228 r/sr=sspitzer a=asa. Create the local folders even if the "Local Folders"
is closed.


git-svn-id: svn://10.0.0.236/trunk@112555 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-23 01:14:43 +00:00
wtc%netscape.com
9e0f260652 Fixed compiler warnings.
git-svn-id: svn://10.0.0.236/trunk@112554 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-23 01:10:51 +00:00
relyea%netscape.com
3a74953b5a Labels don't have NULL's by default.
git-svn-id: svn://10.0.0.236/trunk@112552 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-23 00:53:53 +00:00
ian.mcgreer%sun.com
6f2350c744 PSM bug 119359, NSS 3.4 also needs to recognize valid CA trust in order for cert download to work correctly
git-svn-id: svn://10.0.0.236/trunk@112551 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-23 00:49:23 +00:00
sfraser%netscape.com
640467f11a Fix for bug 107827 -- avoid excess repainting on Mac when the paint-suppressed page is loading by ignoring widgets belonging to a widget hierarchy whose root is hidden. Improves page load time by 16-20%. r=pinkerton, sr=hyatt, a=asa
git-svn-id: svn://10.0.0.236/trunk@112550 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-23 00:48:19 +00:00
sfraser%netscape.com
1c708ad809 Fix for bug 120228. The rendering context made for the caret was interferring with the origin and clipping of the drawing port. To fix this, we have to reset these before reach drawing call. r=pinkerton, sr=kin, a=asa
git-svn-id: svn://10.0.0.236/trunk@112549 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-23 00:44:39 +00:00
shrutiv%netscape.com
2872950324 Fix for bugscape 11860: Can't write in the javascript editor
git-svn-id: svn://10.0.0.236/trunk@112548 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-23 00:32:25 +00:00
sonja.mirtitsch%sun.com
f9cba0ff1e added comments
git-svn-id: svn://10.0.0.236/trunk@112547 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-23 00:27:10 +00:00
bbaetz%student.usyd.edu.au
4deb648921 Bug 93037 - use YYYY-MM-DD HH:MM formatting for attachment dates
r=gerv,myk


git-svn-id: svn://10.0.0.236/trunk@112546 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-23 00:24:31 +00:00
sonja.mirtitsch%sun.com
09d07a30ba removing tmpfiles on tinderboxes
git-svn-id: svn://10.0.0.236/trunk@112545 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-23 00:21:01 +00:00
sonja.mirtitsch%sun.com
8a5e627184 changes so nssqa will run on netscape's daily builds as well
git-svn-id: svn://10.0.0.236/trunk@112544 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-23 00:19:32 +00:00
wtc%netscape.com
b485eb5684 Fixed if-else indentation style.
Modified files: macio.c macsockotpt.c


git-svn-id: svn://10.0.0.236/trunk@112543 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-22 23:57:41 +00:00
stephend%netscape.com
0c18dc7c49 bug 117781 - tab components out of alignment. r=andreww, sr=hewitt.
git-svn-id: svn://10.0.0.236/trunk@112542 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-22 23:21:51 +00:00
stephend%netscape.com
e4e39451fb bug 117781 - tab components out of alignment. r=andreww, sr=hewitt.
git-svn-id: svn://10.0.0.236/trunk@112540 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-22 23:07:59 +00:00
ccarlen%netscape.com
836c87ad5d Bug 116435 - The provider in nsAppFileLocationProvider.cpp should always be registered. r=dougt/sr=rpotts/a=dbaron
git-svn-id: svn://10.0.0.236/trunk@112539 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-22 23:00:44 +00:00
ian.mcgreer%sun.com
0cf0e70db5 last change to INTEGER encoding, strip extraneous leading zeros from integer values passed to encoder
git-svn-id: svn://10.0.0.236/trunk@112538 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-22 22:48:26 +00:00
pinkerton%netscape.com
2056017dd4 ensure that mPixelsToTwips is always integral. r=dbaron/sr=sfraser/a=asa. bug#120779
git-svn-id: svn://10.0.0.236/trunk@112537 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-22 22:26:22 +00:00
bbaetz%student.usyd.edu.au
c53115e19f Bug 120543 - Software error when entering a bug when not logged in & only
one product.
r=caillon,jake


git-svn-id: svn://10.0.0.236/trunk@112535 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-22 22:23:21 +00:00
sdagley%netscape.com
a0015fd8cb Fix #99561 (on NSPR tip). Use MPSemaphore calls rather than WaitNextEvent to pause CPU under Mac OS X - fixes thread deadlock and improves performance. r=wtc,sr=sfraser,a=dbaron
git-svn-id: svn://10.0.0.236/trunk@112534 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-22 22:13:03 +00:00
leaf%mozilla.org
56d662bff2 Automated update
git-svn-id: svn://10.0.0.236/trunk@112533 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-22 22:12:14 +00:00
brendan%mozilla.org
b0099ec3f6 Inline-eliminate js_Emit{Break,Continue} and move SRC_CONTINUE generation to the right place (120571, r=rogerl, sr=jst&jband, a=asa).
git-svn-id: svn://10.0.0.236/trunk@112531 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-22 22:06:10 +00:00
wtc%netscape.com
d6abff9e43 Bugzilla bug 100776: checked in a patch from Javier Pedemonte
<pedemont@us.ibm.com>.  r=cls. a=brendan.
Modified file: configure.in


git-svn-id: svn://10.0.0.236/trunk@112530 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-22 22:01:18 +00:00
ian.mcgreer%sun.com
71e89f46e5 fix for bug 120824; functions which collect certs based on subject need to examine *both* the temp and perm stores
git-svn-id: svn://10.0.0.236/trunk@112528 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-22 21:56:19 +00:00
rogerl%netscape.com
0f43f1c0be Cleaning up types.
git-svn-id: svn://10.0.0.236/trunk@112527 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-22 21:39:00 +00:00
rogerl%netscape.com
babbb97ac2 Cleaned up match vs. execute
git-svn-id: svn://10.0.0.236/trunk@112525 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-22 20:01:02 +00:00
rogerl%netscape.com
3fe3d6616f Fixes for wacky extra blank lines from cvs. Fixes for __proto__ and to
string.split.


git-svn-id: svn://10.0.0.236/trunk@112524 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-22 19:51:22 +00:00
rogerl%netscape.com
290e368dd4 Trying to remove extra blank lines from wacky cvs usage.
git-svn-id: svn://10.0.0.236/trunk@112523 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-22 19:47:18 +00:00
shrutiv%netscape.com
5f798a8469 Fix for bug 11279: Change CCK directory structure to support different
plaltforms and languages (r=smeredith)


git-svn-id: svn://10.0.0.236/trunk@112522 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-22 18:37:26 +00:00
shrutiv%netscape.com
1da861fce2 Fix for bugscape 11279: Change CCK directory structure to support
different plaltforms and languages (r=smeredith)


git-svn-id: svn://10.0.0.236/trunk@112521 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-22 17:20:08 +00:00
mkaply%us.ibm.com
b5f15cc499 #120431
a=brendan for drivers
OS/2 only - temp fix to workaround optimizer bug


git-svn-id: svn://10.0.0.236/trunk@112520 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-22 15:54:36 +00:00
timeless%mac.com
4d0b2e23f0 Bug 121057 Prefs panel "Advanced|Scripts & Windows" can only be visited once per session
patch by jrgm r=caillon@returnzero.com sr=blake a=brendan


git-svn-id: svn://10.0.0.236/trunk@112519 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-22 15:26:38 +00:00
bbaetz%student.usyd.edu.au
7f8c1e8eec Bug 121074 - taint error after changing bug
r=daa@distributed.net,jake


git-svn-id: svn://10.0.0.236/trunk@112518 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-22 15:12:11 +00:00
bbaetz%student.usyd.edu.au
34d34e045d Bug 98368 - dbi connect doesn't use db_port option.
Patch by gene.stuckey@tellabs.com, r=bbaetz,justdave


git-svn-id: svn://10.0.0.236/trunk@112517 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-22 06:49:22 +00:00
blizzard%redhat.com
6d4ed87e23 Fix minor gtk2 bug with focus. Not part of the build.
git-svn-id: svn://10.0.0.236/trunk@112516 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-22 06:21:09 +00:00
bzbarsky%mit.edu
17d694be78 Checking in fixed icons for the link toolbar in modern. Bug 113100,
images provided by Karl Guertin <mysteryisman@yahoo.com>, r=bzbarsky,
sr=hewitt, a=brendan


git-svn-id: svn://10.0.0.236/trunk@112515 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-22 05:55:00 +00:00
hyatt%netscape.com
a86f57efd9 Fix for 115919, r=dbaron for me, r=hyatt for dbaron, sr=brendan, a=brendan
git-svn-id: svn://10.0.0.236/trunk@112514 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-22 05:36:50 +00:00
hyatt%netscape.com
3f1f498838 Fix for 115919, r=dbaron for me, r=hyatt for dbaron, sr=brendan, a=brendan
git-svn-id: svn://10.0.0.236/trunk@112513 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-22 05:30:28 +00:00
bbaetz%student.usyd.edu.au
aa693e532f Bug 121170 - template outputs empty <style> tag
r=justdave,timeless


git-svn-id: svn://10.0.0.236/trunk@112512 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-22 05:08:09 +00:00
ben%netscape.com
96b6cf8e8e [Manticore]
Add support for Windows XP Themes, move Description/Extension setting code based on content type into MIME utility.

NOT PART OF BUILD.


git-svn-id: svn://10.0.0.236/trunk@112511 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-22 05:01:25 +00:00
kaie%netscape.com
a4275db9c3 b=106188 fix whitespace
a=brendan


git-svn-id: svn://10.0.0.236/trunk@112510 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-22 02:20:13 +00:00
ben%netscape.com
55b1b87b51 [Manticore]
Save Page As dialog stuff, beginning to enhance Toolbar generation code
NOT PART OF BUILD.


git-svn-id: svn://10.0.0.236/trunk@112509 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-22 00:45:37 +00:00
bryner%netscape.com
8c8ea7b2fd Hooking up radio buttons, clean up debugging printf's. Not part of the build.
git-svn-id: svn://10.0.0.236/trunk@112504 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-21 21:51:57 +00:00
bzbarsky%mit.edu
ab57fc530d Make sure we always use "browser.download.dir" for the download dir
pref.  Bug 120997, r=timeless, sr=hyatt, a=asa


git-svn-id: svn://10.0.0.236/trunk@112503 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-21 21:38:35 +00:00
timeless%mac.com
b623a65319 Bug 117472 [Xlib] Crash in HandleQueueXtProc()
patch by Roland.Mainz@informatik.med.uni-giessen.de r=timeless a=asa


git-svn-id: svn://10.0.0.236/trunk@112501 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-21 21:05:54 +00:00
timeless%mac.com
e6d4d33306 Bug 120444 packager/packages-unix does not contain libgfxxprint.so for Xprint
patch by Roland.Mainz@informatik.med.uni-giessen.de r=andre.dahlqvist@telia.com sr=jag a=asa


git-svn-id: svn://10.0.0.236/trunk@112500 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-21 21:03:59 +00:00
jband%netscape.com
70211c9a03 New file to test scriptable interface info wrapper and idl generator stuff. -- NOT PART OF THE BUILD --
git-svn-id: svn://10.0.0.236/trunk@112496 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-21 18:43:32 +00:00
jband%netscape.com
05fdc88cca Don't assume that GetInfoForParam can't fail. see bug 121118. -- NOT PART OF THE BUILD --
git-svn-id: svn://10.0.0.236/trunk@112495 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-21 18:41:37 +00:00
jake%acutex.net
186ffc081a Bug 113438 - The DTD from Bugzilla's XML output was not correct, so any attempts to validate the output were futile.
Patch by Jan <tamino_xml@yahoo.com>
r= jake


git-svn-id: svn://10.0.0.236/trunk@112494 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-21 13:39:54 +00:00
glazman%netscape.com
830115b4df composer background image broken source code; b=120662, r=brade, sr=kin, a=blizzard
git-svn-id: svn://10.0.0.236/trunk@112493 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-21 09:30:02 +00:00
timeless%mac.com
8dbb68cadb [Bug 121003] Silly code checks for if (interfaceName) instead of if (instanceName)
r=bzbarsky sr=brendan@mozilla.org a=brendan@mozilla.org


git-svn-id: svn://10.0.0.236/trunk@112492 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-20 23:15:31 +00:00
justdave%syndicomm.com
c148fadef8 Fix for bug 108982: enable taint mode for all user-facing CGI files.
Patch by Brad Baetz <bbaetz@student.usyd.edu.au>
r= jake, justdave


git-svn-id: svn://10.0.0.236/trunk@112490 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-20 01:44:52 +00:00
darin%netscape.com
937c54dca0 fixes bug 115252 "going to http://orange.dk produces redirection error"
patch=badami@netscape.com,darin@netscape.com
r=gordon@netscape.com,blizzard@mozilla.org
sr=mscott@netscape.com
a=dbaron@fas.harvard.edu


git-svn-id: svn://10.0.0.236/trunk@112489 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-20 00:43:04 +00:00
hyatt%netscape.com
8996016a77 Bug 120949, disable favicons for moz1.0, r=pav, sr=blake
git-svn-id: svn://10.0.0.236/trunk@112488 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-19 21:53:59 +00:00
jband%netscape.com
a18fd3f598 Convert nsInterfaceInfoToIDL into a JS component. -- NOT PART OF BUILD --
git-svn-id: svn://10.0.0.236/trunk@112487 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-19 21:53:51 +00:00
hyatt%netscape.com
09f3c7b8a9 Fix for 116306, r=dbaron, sr=blake
git-svn-id: svn://10.0.0.236/trunk@112486 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-19 20:15:17 +00:00
nboyd%atg.com
6e634bb933 Fix bug:
Norris,

I realize this is probably a nuisance, but the following problem causes our
regression test suite to fail:

    js> foo = new Error("bar")
    undefined: bar
    js> foo.name Error
    js> foo.toString()
    undefined: bar

Our test suite expects:

    js> foo = new Error("bar")
    Error: bar
    js> foo.name Error
    js> foo.toString()
    Error: bar

I have not yet tried the debugger with the RC2 release, but I expect to get
to that later today.

I hope I'm not to late to influence the 1.5R3 release.

Thanks,

dave


git-svn-id: svn://10.0.0.236/trunk@112485 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-19 17:43:26 +00:00
jake%acutex.net
664c6941a1 Remove files no longer needed after the latest changes to the docs
git-svn-id: svn://10.0.0.236/trunk@112484 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-19 14:34:40 +00:00
mcafee%netscape.com
fc3a5b69c0 Adding facedown to query list
git-svn-id: svn://10.0.0.236/trunk@112483 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-19 12:42:22 +00:00
ben%netscape.com
3aa22b2d35 Fix 116263, part of earlier patch reviewed by law & hewitt, but forgot to land as part of landing prior to .9.8 close.
Make the windows file picker use the specified file type index rather than hardcoded '1'.

a=asa@mozilla.org


git-svn-id: svn://10.0.0.236/trunk@112482 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-19 07:52:23 +00:00
bbaetz%student.usyd.edu.au
115450f895 Bug 120891. TestProtocols was including a cookies header file it didn't
need, breaking no-extentions builds.
r=bryner, sr=jst, a=dbaron


git-svn-id: svn://10.0.0.236/trunk@112481 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-19 04:04:51 +00:00
bryner%netscape.com
f8c19befe8 Bug 97708 - copying text to another application can cause a crash. Need to divide the size of the data in the nsTransferable by 2 to get the number of characters, since they are unicode. r=bbaetz, sr=jst, a=dbaron.
git-svn-id: svn://10.0.0.236/trunk@112480 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-19 04:00:53 +00:00
pschwartau%netscape.com
bd88828901 Made sections 13 and 14 more precise.
git-svn-id: svn://10.0.0.236/trunk@112479 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-19 03:34:50 +00:00
rjc%netscape.com
3833d06c16 Shame on alecf for not updating to the tip before checking in! Re-backing out these two lines which were originally backed out last night. a=sheriff trudelle
git-svn-id: svn://10.0.0.236/trunk@112478 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-19 01:58:03 +00:00
jake%acutex.net
d84d21016e Latest version of compiled docs (picking up recent SGML changes).
git-svn-id: svn://10.0.0.236/trunk@112476 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-18 23:27:01 +00:00
hewitt%netscape.com
b3500ab834 114580 - dialog alignment issues, r=jag, sr=bryner, a=blizzard
git-svn-id: svn://10.0.0.236/trunk@112475 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-18 23:11:54 +00:00
rayw%netscape.com
6f1df8ddf5 Fixed infinite loop in struct decoding, added test case for struct decoding.
SOAP is not part of default build.


git-svn-id: svn://10.0.0.236/trunk@112474 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-18 23:09:15 +00:00
jaggernaut%netscape.com
74ec262957 Bug 117857: window.status overwrites URL of link you are hovering over
Bug  99009: setting window.status from onmouseover doesn't work for links

r=bryner, timeless, sr=jst, a=asa


git-svn-id: svn://10.0.0.236/trunk@112472 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-18 22:52:23 +00:00
sspitzer%netscape.com
74b3421d14 fix for #119404 (mail folders come up empty the first time that you open them).
fix by bienvenu.  r=naving,blizzard, sr=sspitzer, a=blizzard


git-svn-id: svn://10.0.0.236/trunk@112471 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-18 22:48:24 +00:00
rods%netscape.com
d2614abdf5 mPrintSettings wasn't be properly set and therefore it wasn't getting the margins correctly
BUg 120621 r=dcone sr=attinasi a=blizzard


git-svn-id: svn://10.0.0.236/trunk@112470 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-18 22:45:06 +00:00
gordon%netscape.com
63bcb0a760 Fix bug 114292 (top crash in cache code). Patch prevents cache devices from evicting entries while they are being "bound". r=brendan, sr=darin, a=blizzard.
git-svn-id: svn://10.0.0.236/trunk@112469 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-18 22:18:28 +00:00
attinasi%netscape.com
95bad745a0 Loading and Broken image icons will no longer be drawn if the image size is smaller than the icon size. This fixes a problem where garbage was being left on the screen after the image loaded, because the Linux RenderingContext does not corectly clip image drawing. b=109418, r=pavlov, sr=blizzard, a=blizard on behalf of drivers
git-svn-id: svn://10.0.0.236/trunk@112467 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-18 22:17:12 +00:00
srilatha%netscape.com
30ef853073 Fix for bug # 120438. Properly register messenger-mapi package
r=ssu@netscape.com, sr=dveditz@netscape.com, a=blizzard


git-svn-id: svn://10.0.0.236/trunk@112466 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-18 21:48:03 +00:00
sfraser%netscape.com
57420a32ce Fix for bug 120451 -- clean up the sleep Q entry on quit, so that we don't leave a bad entry there and hose the machine some time later. r=sdagley, sr=beard, a=blizzard
git-svn-id: svn://10.0.0.236/trunk@112464 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-18 21:40:13 +00:00
naving%netscape.com
d023732c18 120755 r=racham sr=mscott a=blizzard. make msgNavigation work across servers.
git-svn-id: svn://10.0.0.236/trunk@112463 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-18 21:14:24 +00:00
alecf%netscape.com
0c0ffbf144 fix for bug 119902 - assertions in nsIOService when saving files, plus a minor performance optimization from dougt
r=adamlock, sr=darin


git-svn-id: svn://10.0.0.236/trunk@112462 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-18 21:08:07 +00:00
640 changed files with 72385 additions and 188134 deletions

View File

@@ -1,36 +0,0 @@
#
# The contents of this file are subject to the Netscape Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/NPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
#
DEPTH = ..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
DIRS = public idl src
ifdef ENABLE_TESTS
DIRS += tests
endif
include $(topsrcdir)/config/rules.mk

View File

@@ -1,11 +0,0 @@
#
# This is a list of local files which get copied to the mozilla:dist:widget directory
#
nsIFontEnumerator.idl
nsIFontList.idl
nsIScriptableRegion.idl
nsIScreen.idl
nsIScreenManager.idl
nsIPrintOptions.idl
nsIPrintSettings.idl

View File

@@ -1,44 +0,0 @@
#
# The contents of this file are subject to the Netscape Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/NPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
#
DEPTH = ../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
MODULE = gfx
XPIDL_MODULE = gfx
XPIDLSRCS = \
nsIFontEnumerator.idl \
nsIFontList.idl \
nsIScriptableRegion.idl \
nsIGraphics.idl \
nsIScreen.idl \
nsIScreenManager.idl \
nsIPrintOptions.idl \
nsIPrintSettings.idl \
$(NULL)
include $(topsrcdir)/config/rules.mk

View File

@@ -1,89 +0,0 @@
#!/usr/local/bin/perl
require "find.pl";
$uuid = 0x6f7652e0;
$format = "{ 0x%x, 0xee43, 0x11d1, \\\
{ 0x9c, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } }";
$pattern = "--- IID GOES HERE ---";
$mydir = cwd();
sub replaceText {
local ($oldname) = $_;
local ($newname) = $_;
local ($found) = 0;
local ($tempname) = $oldname.'.orig';
local ($replacement);
if (-T $oldname && -s $oldname) {
open(FILE, "<$oldname")
|| die "Unable to open $oldname\n";
while (<FILE>) {
if (/$pattern/) {
$found = 1;
last;
}
}
close(FILE);
if ($found) {
print "Setting IID for file: ", $oldname, "\n";
rename($oldname, $tempname)
|| die "Unable to rename $oldname as $tempname";
open(REPLACEFILE, ">$newname")
|| die "Unable to open $newname for writing\n";
open(SEARCHFILE, "<$tempname")
|| die "Unable to open $tempname\n";
while (<SEARCHFILE>) {
if (/$pattern/) {
$replacement = sprintf($format, $uuid++);
s/$pattern/$replacement /g;
}
print REPLACEFILE;
}
close(SEARCHFILE);
close(REPLACEFILE);
if (-z $newname) {
die "$newname has zero size\n."
."Restore manually from $tempname\n";
} else {
unlink($tempname);
}
warn "$name: Renaming as $newname\n" if $newname ne $oldname;
$_ = $oldname;
return;
}
}
if ($newname ne $oldname) {
warn "$name: Renaming as $newname\n";
rename($oldname, $newname) || warn "Unable to rename $oldname\n";
}
$_ = $oldname;
}
eval 'exec /usr/local/bin/perl -S $0 ${1+"$@"}'
if $running_under_some_shell;
# Traverse desired filesystems
$dont_use_nlink = 1;
if (!$ARGV[0]) {
&find('.');
}
else {
foreach $file (@ARGV) {
chdir $mydir
&find($file);
}
}
exit;
sub wanted {
/^nsIDOM.*\.h$/ &&
&replaceText($name);
}

View File

@@ -1,42 +0,0 @@
#!nmake
#
# The contents of this file are subject to the Netscape Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/NPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
DEPTH=..\..
DEFINES=-D_IMPL_NS_UI
MODULE=gfx
XPIDLSRCS = \
.\nsIFontEnumerator.idl \
.\nsIFontList.idl \
.\nsIScriptableRegion.idl \
.\nsIScreen.idl \
.\nsIScreenManager.idl \
.\nsIPrintOptions.idl \
.\nsIPrintSettings.idl \
$(NULL)
EXPORTS= \
$(NULL)
include <$(DEPTH)\config\rules.mak>

View File

@@ -1,61 +0,0 @@
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Mozilla Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Mozilla Communicator.
*
* The Initial Developer of the Original Code is Netscape Communications
* Corp. Portions created by Netscape are Copyright (C) 1999 Netscape
* Communications Corp. All Rights Reserved.
*
* Contributor(s):
* Erik van der Poel
*/
#include "nsISupports.idl"
[scriptable, uuid(a6cf9114-15b3-11d2-932e-00805f8add32)]
interface nsIFontEnumerator : nsISupports
{
/**
* Return a sorted array of the names of all installed fonts.
*
* @param aCount returns number of names returned
* @param aResult returns array of names
* @return void
*/
void EnumerateAllFonts(out PRUint32 aCount,
[retval, array, size_is(aCount)] out wstring aResult);
/**
* Return a sorted array of names of fonts that support the given language
* group and are suitable for use as the given CSS generic font.
*
* @param aLangGroup language group
* @param aGeneric CSS generic font
* @param aCount returns number of names returned
* @param aResult returns array of names
* @return void
*/
void EnumerateFonts(in string aLangGroup, in string aGeneric,
out PRUint32 aCount, [retval, array, size_is(aCount)] out wstring aResult);
/*
@param aLangGroup language group
@return bool do we have a font for this language group
*/
void HaveFontFor(in string aLangGroup, [retval] out boolean aResult);
/*
* update the global font list
* return true if font list is changed
*/
boolean updateFontList();
};

View File

@@ -1,80 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 2001
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Brian Stell <bstell@netscape.com>
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "nsISupports.idl"
interface nsISimpleEnumerator;
/**
* The nsIFontList interface provides an application the
* necessary information so that the user can select the font to use
* as the default style sheet. This is used if the style sheet is
* missing or does not specify a font.
* <P>Font lists are specified per language group.
*
*/
[scriptable, uuid(702909c6-1dd2-11b2-b833-8a740f643539)]
interface nsIFontList : nsISupports
{
/**
* Get the list of available fonts for a language group
* and for use as the given CSS generic font.
*
* @param aLangGroup limits the fonts to fonts in a language
* group; eg: x-western (American/Western European),
* ar (Arabic), el (Greek), he (Hebrew), ja (Japanese),
* ko (Korean), th (Thai), tr (Turkish),
* x-baltic (Baltic), x-central-euro (Eastern European),
* x-cyrillic (Russian), zh-CN (China), zh-TW (Taiwan)
*
* @param aFontType limits the fonts to the fonts with this CSS
* generic font type; eg: serif, sans-serif, cursive,
* fantasy, monospace.
*
* @return a simple enumerator of the available fonts for a
* language group / generic type. These strings are
* the text supplied by the operating system's font
* system.
*/
nsISimpleEnumerator availableFonts(in wstring aLangGroup,
in wstring aFontType);
};

View File

@@ -1,92 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Patrick C. Beard <beard@netscape.com>
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "nsISupports.idl"
typedef unsigned long nscolor;
typedef long nscoord;
/**
* Simplified graphics interface for JS rendering.
*/
[scriptable, uuid(812EAE54-1DD2-11B2-B17B-D0ACC700F975)]
interface nsIGraphics : nsISupports
{
/**
* The color used to paint with.
*/
attribute nscolor color;
/**
* Clipping.
*/
void clipRect(in nscoord x, in nscoord y, in nscoord width, in nscoord height);
/**
* Primitives.
*/
void drawLine(in nscoord x1, in nscoord y1, in nscoord x2, in nscoord y2);
void drawRect(in nscoord x, in nscoord y, in nscoord width, in nscoord height);
void fillRect(in nscoord x, in nscoord y, in nscoord width, in nscoord height);
void invertRect(in nscoord x, in nscoord y, in nscoord width, in nscoord height);
void drawEllipse(in nscoord x, in nscoord y, in nscoord width, in nscoord height);
void fillEllipse(in nscoord x, in nscoord y, in nscoord width, in nscoord height);
void invertEllipse(in nscoord x, in nscoord y, in nscoord width, in nscoord height);
void drawArc(in nscoord x, in nscoord y, in nscoord width, in nscoord height, in float startAngle, in float endAngle);
void fillArc(in nscoord x, in nscoord y, in nscoord width, in nscoord height, in float startAngle, in float endAngle);
void invertArc(in nscoord x, in nscoord y, in nscoord width, in nscoord height, in float startAngle, in float endAngle);
void drawPolygon(in unsigned long count, [array, size_is(count)] in long points);
void fillPolygon(in unsigned long count, [array, size_is(count)] in long points);
void invertPolygon(in unsigned long count, [array, size_is(count)] in long points);
void drawString(in wstring text, in nscoord x, in nscoord y);
void setFont(in wstring name, in nscoord size);
/**
* Stack of graphics states.
*/
void gsave();
void grestore();
};

View File

@@ -1,284 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 2000
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Don Cone <dcone@netscape.com>
* Jessica Blanco <jblanco@us.ibm.com>
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "nsISupports.idl"
#include "nsIPrintSettings.idl"
%{ C++
#include "nsFont.h"
%}
interface nsISimpleEnumerator;
/**
* Native types
*/
[ref] native nsNativeFontRef(nsFont);
[ref] native nsNativeStringRef(nsString);
/**
* Simplified graphics interface for JS rendering.
*
* @status UNDER_REVIEW
*/
[scriptable, uuid(CAE87E20-479E-11d4-A856-00105A183419)]
interface nsIPrintOptions : nsISupports
{
/* Print Option Flags for Bit Field*/
const long kOptPrintOddPages = 0x00000001;
const long kOptPrintEvenPages = 0x00000002;
const long kPrintOptionsEnableSelectionRB = 0x00000004;
/* Print Range Enums */
const long kRangeAllPages = 0;
const long kRangeSpecifiedPageRange = 1;
const long kRangeSelection = 2;
const long kRangeFocusFrame = 3;
/* Justification Enums */
const long kJustLeft = 0;
const long kJustCenter = 1;
const long kJustRight = 2;
/**
* Page Size Constants (NOTE: These have been deprecated!);
*/
const short kLetterPaperSize = 0;
const short kLegalPaperSize = 1;
const short kExecutivePaperSize = 2;
const short kA4PaperSize = 3;
const short kA3PaperSize = 4;
/**
* FrameSet Default Type Constants
*/
const short kUseInternalDefault = 0;
const short kUseSettingWhenPossible = 1;
/**
* Page Size Type Constants
*/
const short kPaperSizeNativeData = 0;
const short kPaperSizeDefined = 1;
/**
* Page Size Unit Constants
*/
const short kPaperSizeInches = 0;
const short kPaperSizeMillimeters = 1;
/**
* Orientation Constants
*/
const short kPortraitOrientation = 0;
const short kLandscapeOrientation = 1;
/**
* Print Frame Constants
*/
const short kNoFrames = 0;
const short kFramesAsIs = 1;
const short kSelectedFrame = 2;
const short kEachFrameSep = 3;
/**
* How to Enable Frame Set Printing Constants
*/
const short kFrameEnableNone = 0;
const short kFrameEnableAll = 1;
const short kFrameEnableAsIsAndEach = 2;
/**
* Show Native Print Options dialog, this may not be supported on all platforms
*/
void ShowNativeDialog();
/**
* Set PrintOptions
*/
void SetPrintOptions(in PRInt32 aType, in PRBool aTurnOnOff);
/**
* Get PrintOptions
*/
PRBool GetPrintOptions(in PRInt32 aType);
/**
* Set PrintOptions Bit field
*/
PRInt32 GetPrintOptionsBits();
/**
* Read Prefs
*/
void ReadPrefs();
/**
* Write Prefs
*/
void WritePrefs();
/**
* Creates a new PrintSettnigs Object
* and initializes it from prefs
*/
nsIPrintSettings CreatePrintSettings();
/**
* Creates a new PrintSettnigs Object if it doesn't exist
* otherwise it always hand back the same one.
* This is THE global PrintSettings
*/
readonly attribute nsIPrintSettings globalPrintSettings;
/**
* Initialize the values in the PrintSettings from Prefs
*/
void InitPrintSettingsFromPrefs(in nsIPrintSettings aPO);
/**
* Data Members
*/
attribute long startPageRange;
attribute long endPageRange;
attribute double marginTop; /* these are in inches */
attribute double marginLeft;
attribute double marginBottom;
attribute double marginRight;
attribute double scaling; /* values 0.0 - 1.0 */
attribute boolean printBGColors; /* Print Background Colors */
attribute boolean printBGImages; /* Print Background Images */
attribute short printRange;
attribute wstring title;
attribute wstring docURL;
attribute wstring headerStrLeft;
attribute wstring headerStrCenter;
attribute wstring headerStrRight;
attribute wstring footerStrLeft;
attribute wstring footerStrCenter;
attribute wstring footerStrRight;
attribute short howToEnableFrameUI;
attribute boolean isCancelled;
attribute short printFrameTypeUsage; /* indicates whether to use the interal value or not*/
attribute short printFrameType;
attribute boolean printSilent; /* print without putting up the dialog */
attribute nsIPrintSettings printSettingsValues; /* used copy the values to/from the settings obj*/
attribute nsIPrintSettings printSettings; /* used to set and get the current object */
/* Additional XP Related */
attribute short paperSizeType; /* use native data or is defined here */
attribute short paperData; /* native data value */
attribute double paperWidth; /* width of the paper in inches or mm */
attribute double paperHeight; /* height of the paper in inches or mm */
attribute short paperSizeUnit; /* paper is in inches or mm */
attribute long paperSize; /* This has been deprecated */
attribute boolean printReversed;
attribute boolean printInColor; /* a false means grayscale */
attribute long orientation; /* see orientation consts */
attribute wstring printCommand;
attribute long numCopies;
attribute wstring printerName;
attribute boolean printToFile;
attribute wstring toFileName;
attribute long printPageDelay; /* in milliseconds */
/* No Script Methods */
[noscript] void SetFontNamePointSize(in nsNativeStringRef aName, in PRInt32 aPointSize);
[noscript] void SetMarginInTwips(in nsNativeMarginRef aMargin);
/* Purposely made this an "in" arg */
[noscript] void GetMarginInTwips(in nsNativeMarginRef aMargin);
[noscript] void SetDefaultFont(in nsNativeFontRef aMargin);
/* Purposely made this an "in" arg */
[noscript] void GetDefaultFont(in nsNativeFontRef aMargin);
[noscript] void GetPageSizeInTwips(out long aWidth, out long aHeight);
/**
* available Printers
*/
nsISimpleEnumerator availablePrinters ();
/**
* display Printer Job Properties dialog
*/
void displayJobProperties (in wstring aPrinter, in nsIPrintSettings aPrintSettings, out boolean aDisplayed);
/**
* Native data constants
*/
const short kNativeDataPrintRecord = 0;
[noscript] voidPtr GetNativeData(in short aDataType);
};
[scriptable, uuid(a6cf9128-15b3-11d2-932e-00805f8add32)]
interface nsIPrinterEnumerator : nsISupports
{
/**
* Returns an array of the names of all installed printers.
*
* @param aCount returns number of printers returned
* @param aResult returns array of names
* @return void
*/
void enumeratePrinters(out PRUint32 aCount,[retval, array, size_is(aCount)] out wstring aResult);
/* takes printer selected and will display job properties dlg for that printer
* returns true if dialog displays
*/
void displayPropertiesDlg(in wstring aPrinter, in nsIPrintSettings aPrintSettings);
};

View File

@@ -1,196 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 2000
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Don Cone <dcone@netscape.com>
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "nsISupports.idl"
%{ C++
#include "nsMargin.h"
#include "nsFont.h"
%}
/**
* Native types
*/
[ref] native nsNativeMarginRef(nsMargin);
/**
* Simplified graphics interface for JS rendering.
*
* @status UNDER_REVIEW
*/
[scriptable, uuid(83427530-F790-11d4-A869-00105A183419)]
interface nsIPrintSettings : nsISupports
{
/* Print Option Flags for Bit Field*/
const long kPrintOddPages = 0x00000001;
const long kPrintEvenPages = 0x00000002;
const long kEnableSelectionRB = 0x00000004;
/* Print Range Enums */
const long kRangeAllPages = 0;
const long kRangeSpecifiedPageRange = 1;
const long kRangeSelection = 2;
const long kRangeFocusFrame = 3;
/* Justification Enums */
const long kJustLeft = 0;
const long kJustCenter = 1;
const long kJustRight = 2;
/**
* FrameSet Default Type Constants
*/
const short kUseInternalDefault = 0;
const short kUseSettingWhenPossible = 1;
/**
* Page Size Type Constants
*/
const short kPaperSizeNativeData = 0;
const short kPaperSizeDefined = 1;
/**
* Page Size Unit Constants
*/
const short kPaperSizeInches = 0;
const short kPaperSizeMillimeters = 1;
/**
* Orientation Constants
*/
const short kPortraitOrientation = 0;
const short kLandscapeOrientation = 1;
/**
* Print Frame Constants
*/
const short kNoFrames = 0;
const short kFramesAsIs = 1;
const short kSelectedFrame = 2;
const short kEachFrameSep = 3;
/**
* How to Enable Frame Set Printing Constants
*/
const short kFrameEnableNone = 0;
const short kFrameEnableAll = 1;
const short kFrameEnableAsIsAndEach = 2;
/**
* Set PrintOptions
*/
void SetPrintOptions(in PRInt32 aType, in PRBool aTurnOnOff);
/**
* Get PrintOptions
*/
PRBool GetPrintOptions(in PRInt32 aType);
/**
* Set PrintOptions Bit field
*/
PRInt32 GetPrintOptionsBits();
/**
* Returns W/H in Twips from Paper Size H/W
*/
void GetPageSizeInTwips(out long aWidth, out long aHeight);
/**
* Data Members
*/
attribute long startPageRange;
attribute long endPageRange;
attribute double marginTop; /* these are in inches */
attribute double marginLeft;
attribute double marginBottom;
attribute double marginRight;
attribute double scaling; /* values 0.0 - 1.0 */
attribute boolean printBGColors; /* Print Background Colors */
attribute boolean printBGImages; /* Print Background Images */
attribute short printRange;
attribute wstring title;
attribute wstring docURL;
attribute wstring headerStrLeft;
attribute wstring headerStrCenter;
attribute wstring headerStrRight;
attribute wstring footerStrLeft;
attribute wstring footerStrCenter;
attribute wstring footerStrRight;
attribute short howToEnableFrameUI; /* indicates how to enable the frameset UI */
attribute boolean isCancelled; /* indicates whether the print job has been cancelled */
attribute short printFrameTypeUsage; /* indicates whether to use the interal value or not */
attribute short printFrameType;
attribute boolean printSilent; /* print without putting up the dialog */
/* Additional XP Related */
attribute short paperSizeType; /* use native data or is defined here */
attribute short paperData; /* native data value */
attribute double paperWidth; /* width of the paper in inches or mm */
attribute double paperHeight; /* height of the paper in inches or mm */
attribute short paperSizeUnit; /* paper is in inches or mm */
attribute boolean printReversed;
attribute boolean printInColor; /* a false means grayscale */
attribute long paperSize; /* see page size consts */
attribute long orientation; /* see orientation consts */
attribute wstring printCommand;
attribute long numCopies;
attribute wstring printerName;
attribute boolean printToFile;
attribute wstring toFileName;
attribute long printPageDelay; /* in milliseconds */
/* C++ Helper Functions */
[noscript] void SetMarginInTwips(in nsNativeMarginRef aMargin);
/* Purposely made this an "in" arg */
[noscript] void GetMarginInTwips(in nsNativeMarginRef aMargin);
};

View File

@@ -1,38 +0,0 @@
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Mozilla Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Mozilla Communicator.
*
* The Initial Developer of the Original Code is Netscape Communications
* Corp. Portions created by Netscape are Copyright (C) 2000 Netscape
* Communications Corp. All Rights Reserved.
*
* Contributor(s):
*/
#include "nsISupports.idl"
[scriptable, uuid(f728830e-1dd1-11b2-9598-fb9f414f2465)]
interface nsIScreen : nsISupports
{
void GetRect ( out long left, out long top, out long width, out long height );
void GetAvailRect ( out long left, out long top, out long width, out long height );
readonly attribute long pixelDepth;
readonly attribute long colorDepth;
};
%{ C++
%}

View File

@@ -1,49 +0,0 @@
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Mozilla Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Mozilla Communicator.
*
* The Initial Developer of the Original Code is Netscape Communications
* Corp. Portions created by Netscape are Copyright (C) 2000 Netscape
* Communications Corp. All Rights Reserved.
*
* Contributor(s):
*/
#include "nsISupports.idl"
#include "nsIScreen.idl"
[scriptable, uuid(662e7b78-1dd2-11b2-a3d3-fc1e5f5fb9d4)]
interface nsIScreenManager : nsISupports
{
//
// Returns the screen that contains the rectangle. If the rect overlaps
// multiple screens, it picks the screen with the greatest area of intersection.
//
// The coordinates are in pixels (not twips) and in screen coordinates.
//
nsIScreen screenForRect ( in long left, in long top, in long width, in long height ) ;
// The screen with the menubar/taskbar. This shouldn't be needed very
// often.
readonly attribute nsIScreen primaryScreen;
// Holds the number of screens that are available
readonly attribute unsigned long numberOfScreens;
};
%{ C++
%}

View File

@@ -1,190 +0,0 @@
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Mozilla Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Mozilla Communicator.
*
* The Initial Developer of the Original Code is Netscape Communications
* Corp. Portions created by Netscape are Copyright (C) 1999 Netscape
* Communications Corp. All Rights Reserved.
*
* Contributor(s):
* Mike Pinkerton
*/
#include "nsISupports.idl"
%{C++
class nsIRegion;
%}
[ptr] native nsIRegion(nsIRegion);
[scriptable, uuid(82d8f400-5bde-11d3-b033-b27a62766bbc)]
interface nsIScriptableRegion : nsISupports
{
void init ( ) ;
/**
* copy operator equivalent that takes another region
*
* @param region to copy
* @return void
*
**/
void setToRegion ( in nsIScriptableRegion aRegion );
/**
* copy operator equivalent that takes a rect
*
* @param aX xoffset of rect to set region to
* @param aY yoffset of rect to set region to
* @param aWidth width of rect to set region to
* @param aHeight height of rect to set region to
* @return void
*
**/
void setToRect ( in long aX, in long aY, in long aWidth, in long aHeight );
/**
* destructively intersect another region with this one
*
* @param region to intersect
* @return void
*
**/
void intersectRegion ( in nsIScriptableRegion aRegion ) ;
/**
* destructively intersect a rect with this region
*
* @param aX xoffset of rect to intersect with region
* @param aY yoffset of rect to intersect with region
* @param aWidth width of rect to intersect with region
* @param aHeight height of rect to intersect with region
* @return void
*
**/
void intersectRect ( in long aX, in long aY, in long aWidth, in long aHeight ) ;
/**
* destructively union another region with this one
*
* @param region to union
* @return void
*
**/
void unionRegion ( in nsIScriptableRegion aRegion ) ;
/**
* destructively union a rect with this region
*
* @param aX xoffset of rect to union with region
* @param aY yoffset of rect to union with region
* @param aWidth width of rect to union with region
* @param aHeight height of rect to union with region
* @return void
*
**/
void unionRect ( in long aX, in long aY, in long aWidth, in long aHeight ) ;
/**
* destructively subtract another region with this one
*
* @param region to subtract
* @return void
*
**/
void subtractRegion ( in nsIScriptableRegion aRegion ) ;
/**
* destructively subtract a rect from this region
*
* @param aX xoffset of rect to subtract with region
* @param aY yoffset of rect to subtract with region
* @param aWidth width of rect to subtract with region
* @param aHeight height of rect to subtract with region
* @return void
*
**/
void subtractRect ( in long aX, in long aY, in long aWidth, in long aHeight ) ;
/**
* is this region empty? i.e. does it contain any pixels
*
* @param none
* @return returns whether the region is empty
*
**/
boolean isEmpty ( ) ;
/**
* == operator equivalent i.e. do the regions contain exactly
* the same pixels
*
* @param region to compare
* @return whether the regions are identical
*
**/
boolean isEqualRegion ( in nsIScriptableRegion aRegion ) ;
/**
* returns the bounding box of the region i.e. the smallest
* rectangle that completely contains the region.
*
* @param aX out parameter for xoffset of bounding rect for region
* @param aY out parameter for yoffset of bounding rect for region
* @param aWidth out parameter for width of bounding rect for region
* @param aHeight out parameter for height of bounding rect for region
* @return void
*
**/
void getBoundingBox ( out long aX, out long aY, out long aWidth, out long aHeight ) ;
/**
* offsets the region in x and y
*
* @param xoffset pixel offset in x
* @param yoffset pixel offset in y
* @return void
*
**/
void offset ( in long aXOffset, in long aYOffset ) ;
/**
* does the region intersect the rectangle?
*
* @param rect to check for containment
* @return true if the region intersects the rect
*
**/
boolean containsRect ( in long aX, in long aY, in long aWidth, in long aHeight ) ;
[noscript] readonly attribute nsIRegion region;
};
%{ C++
%}

View File

@@ -1,26 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
*/
#if TARGET_CARBON
// we can't use the carbon printing session APIs
#define PM_USE_SESSION_APIS 0
#endif

View File

@@ -1,24 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
*/
#include "MacPrefix_debug.h"
#include "GFXComponentConfig.h"

View File

@@ -1,24 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
*/
#include "MacSharedPrefix.h"
#include "GFXComponentConfig.h"

View File

@@ -1,23 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
*/
#define _IMPL_NS_GFX 1

View File

@@ -1,24 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
*/
#include "GFXConfig.h"
#include "MacPrefix.h"

View File

@@ -1,25 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
*/
#include "GFXConfig.h"
#include "MacPrefix_debug.h"

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,30 +0,0 @@
#!nmake
#
# The contents of this file are subject to the Netscape Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/NPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
DEPTH=..
DIRS= public src \
!if !defined(DISABLE_TESTS)
tests \
!endif
idl
include <$(DEPTH)\config\rules.mak>

View File

@@ -1,30 +0,0 @@
#
# This is a list of local files which get copied to the mozilla:dist:widget directory
#
nsColor.h
nsColorNames.h
nsColorNameList.h
nsCoord.h
nsFont.h
nsRect.h
nsPoint.h
nsSize.h
nsMargin.h
nsTransform2D.h
nsIRenderingContext.h
nsIFontMetrics.h
nsIDeviceContext.h
nsIImage.h
nsIBlender.h
nsGfxCIID.h
nsIRegion.h
nsDeviceContext.h
nsRenderingContextImpl.h
nsIDeviceContextSpec.h
nsIDeviceContextSpecFactory.h
nsIDrawingSurface.h
nsRepeater.h
nsThemeConstants.h
nsITheme.h

View File

@@ -1,66 +0,0 @@
#
# The contents of this file are subject to the Netscape Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/NPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
#
DEPTH = ../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
MODULE = gfx
EXPORTS = \
imgScaler.h \
nsColor.h \
nsColorNames.h \
nsColorNameList.h \
nsCompressedCharMap.h \
nsCoord.h \
nsFont.h \
nsRect.h \
nsRepeater.h \
nsPoint.h \
nsSize.h \
nsMargin.h \
nsTransform2D.h \
nsIRenderingContext.h \
nsRenderingContextImpl.h \
nsIFontMetrics.h \
nsIDeviceContext.h \
nsIImage.h \
nsIBlender.h \
nsGfxCIID.h \
nsIRegion.h \
nsDeviceContext.h \
nsIDeviceContextSpec.h \
nsIDeviceContextSpecFactory.h \
nsIDrawingSurface.h \
nsITheme.h \
nsThemeConstants.h \
$(NULL)
ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
EXPORTS += nsIPrintingContext.h
endif
include $(topsrcdir)/config/rules.mk

View File

@@ -1,27 +0,0 @@
/*
* The contents of this file are subject to the Mozilla Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is Tomas Mšller
* Portions created by Tomas Mšller are
* Copyright (C) 2001 Tomas Mšller. Rights Reserved.
*
* Contributor(s):
* Tomas Mšller
* Tim Rowley <tor@cs.brown.edu>
*/
void RectStretch(long xs1,long ys1,long xs2,long ys2,
long xd1,long yd1,long xd2,long yd2,
unsigned char *aSrcImage, unsigned aSrcStride,
unsigned char *aDstImage, unsigned aDstStride,
unsigned aDepth);

View File

@@ -1,56 +0,0 @@
#!nmake
#
# The contents of this file are subject to the Netscape Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/NPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
DEPTH=..\..
EXPORTS = \
nsColor.h \
nsColorNames.h \
nsColorNameList.h \
nsCoord.h \
nsFont.h \
nsRect.h \
nsPoint.h \
nsSize.h \
nsMargin.h \
nsTransform2D.h \
nsIRenderingContext.h \
nsRenderingContextImpl.h \
nsIFontMetrics.h \
nsIDeviceContext.h \
nsIImage.h \
nsIBlender.h \
nsGfxCIID.h \
nsIRegion.h \
nsDeviceContext.h \
nsIDeviceContextSpec.h \
nsIDeviceContextSpecFactory.h \
nsIDrawingSurface.h \
nsCompressedCharMap.h \
nsThemeConstants.h \
nsITheme.h \
$(NULL)
MODULE=gfx
include <$(DEPTH)\config\rules.mak>

View File

@@ -1,119 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef nsColor_h___
#define nsColor_h___
#include "nscore.h"
class nsString;
class nsAString;
// A color is a 32 bit unsigned integer with four components: R, G, B
// and A.
typedef PRUint32 nscolor;
// Make a color out of r,g,b values. This assumes that the r,g,b values are
// properly constrained to 0-255. This also assumes that a is 255.
#define NS_RGB(_r,_g,_b) \
((nscolor) ((255 << 24) | ((_b)<<16) | ((_g)<<8) | (_r)))
// Make a color out of r,g,b,a values. This assumes that the r,g,b,a
// values are properly constrained to 0-255.
#define NS_RGBA(_r,_g,_b,_a) \
((nscolor) (((_a) << 24) | ((_b)<<16) | ((_g)<<8) | (_r)))
// Extract color components from nscolor
#define NS_GET_R(_rgba) ((PRUint8) ((_rgba) & 0xff))
#define NS_GET_G(_rgba) ((PRUint8) (((_rgba) >> 8) & 0xff))
#define NS_GET_B(_rgba) ((PRUint8) (((_rgba) >> 16) & 0xff))
#define NS_GET_A(_rgba) ((PRUint8) (((_rgba) >> 24) & 0xff))
// Fast approximate division by 255. It has the property that
// for all 0 <= n <= 255*255, FAST_DIVIDE_BY_255(n) == n/255.
// But it only uses two adds and two shifts instead of an
// integer division (which is expensive on many processors).
//
// equivalent to target=v/255
#define FAST_DIVIDE_BY_255(target,v) \
PR_BEGIN_MACRO \
unsigned tmp_ = v; \
target = ((tmp_ << 8) + tmp_ + 255) >> 16; \
PR_END_MACRO
// Blending macro
//
// equivalent to target=(bg*(255-alpha)+fg*alpha)/255
#define MOZ_BLEND(target, bg, fg, alpha) \
FAST_DIVIDE_BY_255(target, (bg)*(255-(alpha)) + (fg)*(alpha))
// Translate a hex string to a color. Return true if it parses ok,
// otherwise return false.
// This accepts only 3, 6 or 9 digits
extern "C" NS_GFX_(PRBool) NS_HexToRGB(const nsString& aBuf, nscolor* aResult);
// Translate a hex string to a color. Return true if it parses ok,
// otherwise return false.
// This version accepts 1 to 9 digits (missing digits are 0)
extern "C" NS_GFX_(PRBool) NS_LooseHexToRGB(const nsString& aBuf, nscolor* aResult);
// Translate a color name to a color. Return true if it parses ok,
// otherwise return false.
extern "C" NS_GFX_(PRBool) NS_ColorNameToRGB(const nsAString& aBuf, nscolor* aResult);
// Weird color computing code stolen from winfe which was stolen
// from the xfe which was written originally by Eric Bina. So there.
extern "C" NS_GFX_(void) NS_Get3DColors(nscolor aResult[2], nscolor aColor);
// To determin colors based on the background brightness
extern "C" NS_GFX_(void) NS_GetSpecial3DColors(nscolor aResult[2],
nscolor aBackgroundColor,
nscolor aBorderColor);
// Special method to brighten a Color and have it shift to white when
// fully saturated.
extern "C" NS_GFX_(nscolor) NS_BrightenColor(nscolor inColor);
// Special method to darken a Color and have it shift to black when
// darkest component underflows
extern "C" NS_GFX_(nscolor) NS_DarkenColor(nscolor inColor);
// Determins brightness for a specific color
extern "C" NS_GFX_(int) NS_GetBrightness(PRUint8 aRed, PRUint8 aGreen, PRUint8 aBlue);
#endif /* nsColor_h___ */

View File

@@ -1,212 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1999
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
/******
This file contains the list of all named colors
See nsCSSColorNames.h for access to the enum values for colors
It is designed to be used as inline input to nsCSSColorNames.cpp *only*
through the magic of C preprocessing.
All entires must be enclosed in the macro GFX_COLOR which will have cruel
and unusual things done to it
It is recommended (but not strictly necessary) to keep all entries
in alphabetical order
The first argument to GFX_COLOR is both the enum identifier of the color
and the string value
The second argument is the sRGBA value for the named color
'name' entries *must* use only lowercase characters.
** Break these invarient and bad things will happen. **
******/
GFX_COLOR(aliceblue, NS_RGB(240, 248, 255))
GFX_COLOR(antiquewhite, NS_RGB(250, 235, 215))
GFX_COLOR(aqua, NS_RGB( 0, 255, 255))
GFX_COLOR(aquamarine, NS_RGB(127, 255, 212))
GFX_COLOR(azure, NS_RGB(240, 255, 255))
GFX_COLOR(beige, NS_RGB(245, 245, 220))
GFX_COLOR(bisque, NS_RGB(255, 228, 196))
GFX_COLOR(black, NS_RGB( 0, 0, 0))
GFX_COLOR(blanchedalmond, NS_RGB(255, 235, 205))
GFX_COLOR(blue, NS_RGB( 0, 0, 255))
GFX_COLOR(blueviolet, NS_RGB(138, 43, 226))
GFX_COLOR(brown, NS_RGB(165, 42, 42))
GFX_COLOR(burlywood, NS_RGB(222, 184, 135))
GFX_COLOR(cadetblue, NS_RGB( 95, 158, 160))
GFX_COLOR(chartreuse, NS_RGB(127, 255, 0))
GFX_COLOR(chocolate, NS_RGB(210, 105, 30))
GFX_COLOR(coral, NS_RGB(255, 127, 80))
GFX_COLOR(cornflowerblue, NS_RGB(100, 149, 237))
GFX_COLOR(cornsilk, NS_RGB(255, 248, 220))
GFX_COLOR(crimson, NS_RGB(220, 20, 60))
GFX_COLOR(cyan, NS_RGB( 0, 255, 255))
GFX_COLOR(darkblue, NS_RGB( 0, 0, 139))
GFX_COLOR(darkcyan, NS_RGB( 0, 139, 139))
GFX_COLOR(darkgoldenrod, NS_RGB(184, 134, 11))
GFX_COLOR(darkgray, NS_RGB(169, 169, 169))
GFX_COLOR(darkgreen, NS_RGB( 0, 100, 0))
GFX_COLOR(darkgrey, NS_RGB(169, 169, 169))
GFX_COLOR(darkkhaki, NS_RGB(189, 183, 107))
GFX_COLOR(darkmagenta, NS_RGB(139, 0, 139))
GFX_COLOR(darkolivegreen, NS_RGB( 85, 107, 47))
GFX_COLOR(darkorange, NS_RGB(255, 140, 0))
GFX_COLOR(darkorchid, NS_RGB(153, 50, 204))
GFX_COLOR(darkred, NS_RGB(139, 0, 0))
GFX_COLOR(darksalmon, NS_RGB(233, 150, 122))
GFX_COLOR(darkseagreen, NS_RGB(143, 188, 143))
GFX_COLOR(darkslateblue, NS_RGB( 72, 61, 139))
GFX_COLOR(darkslategray, NS_RGB( 47, 79, 79))
GFX_COLOR(darkslategrey, NS_RGB( 47, 79, 79))
GFX_COLOR(darkturquoise, NS_RGB( 0, 206, 209))
GFX_COLOR(darkviolet, NS_RGB(148, 0, 211))
GFX_COLOR(deeppink, NS_RGB(255, 20, 147))
GFX_COLOR(deepskyblue, NS_RGB( 0, 191, 255))
GFX_COLOR(dimgray, NS_RGB(105, 105, 105))
GFX_COLOR(dimgrey, NS_RGB(105, 105, 105))
GFX_COLOR(dodgerblue, NS_RGB( 30, 144, 255))
GFX_COLOR(firebrick, NS_RGB(178, 34, 34))
GFX_COLOR(floralwhite, NS_RGB(255, 250, 240))
GFX_COLOR(forestgreen, NS_RGB( 34, 139, 34))
GFX_COLOR(fuchsia, NS_RGB(255, 0, 255))
GFX_COLOR(gainsboro, NS_RGB(220, 220, 220))
GFX_COLOR(ghostwhite, NS_RGB(248, 248, 255))
GFX_COLOR(gold, NS_RGB(255, 215, 0))
GFX_COLOR(goldenrod, NS_RGB(218, 165, 32))
GFX_COLOR(gray, NS_RGB(128, 128, 128))
GFX_COLOR(grey, NS_RGB(128, 128, 128))
GFX_COLOR(green, NS_RGB( 0, 128, 0))
GFX_COLOR(greenyellow, NS_RGB(173, 255, 47))
GFX_COLOR(honeydew, NS_RGB(240, 255, 240))
GFX_COLOR(hotpink, NS_RGB(255, 105, 180))
GFX_COLOR(indianred, NS_RGB(205, 92, 92))
GFX_COLOR(indigo, NS_RGB( 75, 0, 130))
GFX_COLOR(ivory, NS_RGB(255, 255, 240))
GFX_COLOR(khaki, NS_RGB(240, 230, 140))
GFX_COLOR(lavender, NS_RGB(230, 230, 250))
GFX_COLOR(lavenderblush, NS_RGB(255, 240, 245))
GFX_COLOR(lawngreen, NS_RGB(124, 252, 0))
GFX_COLOR(lemonchiffon, NS_RGB(255, 250, 205))
GFX_COLOR(lightblue, NS_RGB(173, 216, 230))
GFX_COLOR(lightcoral, NS_RGB(240, 128, 128))
GFX_COLOR(lightcyan, NS_RGB(224, 255, 255))
GFX_COLOR(lightgoldenrodyellow, NS_RGB(250, 250, 210))
GFX_COLOR(lightgray, NS_RGB(211, 211, 211))
GFX_COLOR(lightgreen, NS_RGB(144, 238, 144))
GFX_COLOR(lightgrey, NS_RGB(211, 211, 211))
GFX_COLOR(lightpink, NS_RGB(255, 182, 193))
GFX_COLOR(lightsalmon, NS_RGB(255, 160, 122))
GFX_COLOR(lightseagreen, NS_RGB( 32, 178, 170))
GFX_COLOR(lightskyblue, NS_RGB(135, 206, 250))
GFX_COLOR(lightslategray, NS_RGB(119, 136, 153))
GFX_COLOR(lightslategrey, NS_RGB(119, 136, 153))
GFX_COLOR(lightsteelblue, NS_RGB(176, 196, 222))
GFX_COLOR(lightyellow, NS_RGB(255, 255, 224))
GFX_COLOR(lime, NS_RGB( 0, 255, 0))
GFX_COLOR(limegreen, NS_RGB( 50, 205, 50))
GFX_COLOR(linen, NS_RGB(250, 240, 230))
GFX_COLOR(magenta, NS_RGB(255, 0, 255))
GFX_COLOR(maroon, NS_RGB(128, 0, 0))
GFX_COLOR(mediumaquamarine, NS_RGB(102, 205, 170))
GFX_COLOR(mediumblue, NS_RGB( 0, 0, 205))
GFX_COLOR(mediumorchid, NS_RGB(186, 85, 211))
GFX_COLOR(mediumpurple, NS_RGB(147, 112, 219))
GFX_COLOR(mediumseagreen, NS_RGB( 60, 179, 113))
GFX_COLOR(mediumslateblue, NS_RGB(123, 104, 238))
GFX_COLOR(mediumspringgreen, NS_RGB( 0, 250, 154))
GFX_COLOR(mediumturquoise, NS_RGB( 72, 209, 204))
GFX_COLOR(mediumvioletred, NS_RGB(199, 21, 133))
GFX_COLOR(midnightblue, NS_RGB( 25, 25, 112))
GFX_COLOR(mintcream, NS_RGB(245, 255, 250))
GFX_COLOR(mistyrose, NS_RGB(255, 228, 225))
GFX_COLOR(moccasin, NS_RGB(255, 228, 181))
GFX_COLOR(navajowhite, NS_RGB(255, 222, 173))
GFX_COLOR(navy, NS_RGB( 0, 0, 128))
GFX_COLOR(oldlace, NS_RGB(253, 245, 230))
GFX_COLOR(olive, NS_RGB(128, 128, 0))
GFX_COLOR(olivedrab, NS_RGB(107, 142, 35))
GFX_COLOR(orange, NS_RGB(255, 165, 0))
GFX_COLOR(orangered, NS_RGB(255, 69, 0))
GFX_COLOR(orchid, NS_RGB(218, 112, 214))
GFX_COLOR(palegoldenrod, NS_RGB(238, 232, 170))
GFX_COLOR(palegreen, NS_RGB(152, 251, 152))
GFX_COLOR(paleturquoise, NS_RGB(175, 238, 238))
GFX_COLOR(palevioletred, NS_RGB(219, 112, 147))
GFX_COLOR(papayawhip, NS_RGB(255, 239, 213))
GFX_COLOR(peachpuff, NS_RGB(255, 218, 185))
GFX_COLOR(peru, NS_RGB(205, 133, 63))
GFX_COLOR(pink, NS_RGB(255, 192, 203))
GFX_COLOR(plum, NS_RGB(221, 160, 221))
GFX_COLOR(powderblue, NS_RGB(176, 224, 230))
GFX_COLOR(purple, NS_RGB(128, 0, 128))
GFX_COLOR(red, NS_RGB(255, 0, 0))
GFX_COLOR(rosybrown, NS_RGB(188, 143, 143))
GFX_COLOR(royalblue, NS_RGB( 65, 105, 225))
GFX_COLOR(saddlebrown, NS_RGB(139, 69, 19))
GFX_COLOR(salmon, NS_RGB(250, 128, 114))
GFX_COLOR(sandybrown, NS_RGB(244, 164, 96))
GFX_COLOR(seagreen, NS_RGB( 46, 139, 87))
GFX_COLOR(seashell, NS_RGB(255, 245, 238))
GFX_COLOR(sienna, NS_RGB(160, 82, 45))
GFX_COLOR(silver, NS_RGB(192, 192, 192))
GFX_COLOR(skyblue, NS_RGB(135, 206, 235))
GFX_COLOR(slateblue, NS_RGB(106, 90, 205))
GFX_COLOR(slategray, NS_RGB(112, 128, 144))
GFX_COLOR(slategrey, NS_RGB(112, 128, 144))
GFX_COLOR(snow, NS_RGB(255, 250, 250))
GFX_COLOR(springgreen, NS_RGB( 0, 255, 127))
GFX_COLOR(steelblue, NS_RGB( 70, 130, 180))
GFX_COLOR(tan, NS_RGB(210, 180, 140))
GFX_COLOR(teal, NS_RGB( 0, 128, 128))
GFX_COLOR(thistle, NS_RGB(216, 191, 216))
GFX_COLOR(tomato, NS_RGB(255, 99, 71))
GFX_COLOR(turquoise, NS_RGB( 64, 224, 208))
GFX_COLOR(violet, NS_RGB(238, 130, 238))
GFX_COLOR(wheat, NS_RGB(245, 222, 179))
GFX_COLOR(white, NS_RGB(255, 255, 255))
GFX_COLOR(whitesmoke, NS_RGB(245, 245, 245))
GFX_COLOR(yellow, NS_RGB(255, 255, 0))
GFX_COLOR(yellowgreen, NS_RGB(154, 205, 50))

View File

@@ -1,80 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef nsColorNames_h___
#define nsColorNames_h___
#include "nsColor.h"
struct nsStr;
class nsAFlatCString;
class nsAString;
class nsACString;
/*
Declare the enum list using the magic of preprocessing
enum values are "eColorName_foo" (where foo is the color name)
To change the list of colors, see nsColorNameList.h
*/
#define GFX_COLOR(_name, _value) eColorName_##_name,
enum nsColorName {
eColorName_UNKNOWN = -1,
#include "nsColorNameList.h"
eColorName_COUNT
};
#undef GFX_COLOR
class NS_GFX nsColorNames {
public:
static void AddRefTable(void);
static void ReleaseTable(void);
// Given a color name, return the color enum value
// This only functions provided a valid ref on the table
static nsColorName LookupName(const nsAString& aName);
static nsColorName LookupName(const nsACString& aName);
static const nsAFlatCString& GetStringValue(nsColorName aColorName);
// Color id to rgb value table
static const nscolor kColors[];
};
#endif /* nsColorNames_h___ */

View File

@@ -1,348 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is Mozilla Communicator client code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 2001
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Brian Stell <bstell@netscape.com>
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef NSCOMPRESSEDCHARMAP_H
#define NSCOMPRESSEDCHARMAP_H
#include "prtypes.h"
#define ALU_SIZE PR_BITS_PER_LONG
//#define ALU_SIZE 16
//#define ALU_SIZE 32
//#define ALU_SIZE 64
#if (ALU_SIZE==32)
# define ALU_TYPE PRUint32
# define CCMAP_POW2(n) (1L<<(n))
# define CCMAP_BITS_PER_ALU_LOG2 5
#elif (ALU_SIZE==64)
# define ALU_TYPE PRUint64
# define CCMAP_POW2(n) (1LL<<(n))
# define CCMAP_BITS_PER_ALU_LOG2 6
#else
# define ALU_TYPE PRUint16
# define CCMAP_POW2(n) (1<<(n))
# define CCMAP_BITS_PER_ALU_LOG2 4
#endif
class nsICharRepresentable;
extern PRUint16* CreateEmptyCCMap();
extern PRUint16* MapToCCMap(PRUint32* aMap);
extern PRUint16* MapperToCCMap(nsICharRepresentable *aMapper);
extern void FreeCCMap(PRUint16* &aMap);
extern PRBool NextNonEmptyCCMapPage(PRUint16 *, PRUint16 *);
extern PRBool IsSameCCMap(PRUint16* ccmap1, PRUint16* ccmap2);
#ifdef DEBUG
void printCCMap(PRUint16* aCCMap);
#endif
// surrogate support extension
extern PRUint16*
MapToCCMapExt(PRUint32* aBmpPlaneMap, PRUint32** aOtherPlaneMaps, PRUint32 aOtherPlaneNum);
//
// nsCompressedCharMap
//
// A Compressed Char Map (CCMap) saves memory by folding all
// the empty portions of the map on top of each other.
//
// Building a Compressed Char Map (CCMap) is more complex than
// accessing it. We use the nsCompressedCharMap object to
// build the CCMap. Once nsCompressedCharMap has built the CCMap
// we get a copy of the CCMap and discard the nsCompressedCharMap
// object. The CCMap is an array of PRUint16 and is accessed by
// a macro.
//
// See "Character Map Compression" below for a discussion of
// what the array looks like.
//
// The maximum size a CCMap:
// (16 upper pointers) + (16 empty mid pointers) +
// (16 empty page) + (16*16 max mid pointers) +
// (256*16 max pages) = 4400 PRUint16
#define CCMAP_MAX_LEN (16+16+16+256+4096)
class nsCompressedCharMap {
public:
nsCompressedCharMap();
PRUint16* NewCCMap();
PRUint16* FillCCMap(PRUint16* aCCMap);
PRUint16 GetSize() {return mUsedLen;};
void SetChar(PRUint16);
void SetChars(PRUint16*);
void SetChars(PRUint16, ALU_TYPE*);
void SetChars(PRUint32*);
protected:
union {
PRUint16 mCCMap[CCMAP_MAX_LEN];
ALU_TYPE used_for_align; // do not use; only here to cause
// alignment
} u;
PRUint16 mUsedLen; // in PRUint16
PRUint16 mAllOnesPage;
};
//
// Character Map Compression
//
// Each font requires its own 8k charmap. On a system with 200
// fonts this would take: 200 * 8K = 1600K memory.
//
// Since most char maps are mostly empty a significant amount
// of memory can be saved by not allocating the unused sections.
//
// If the map has one or more levels of indirection then the
// the empty sections of the map can all be folded to a single
// common empty element. In this way only the non-empty sections
// need space. Because the empty sections actually point to a
// common empty section every entry in the map can be valid
// without requiring actually allocating space.
// Some larger CJK fonts have large sections where every bit
// is set. In the same way that the empty sections are folded
// onto one "empty page", the sections where all bits are set are
// folded on to one "all bits set page" .
//
// Break up the Unicode range bits 0x0000 - 0xFFFF
// into 3 bit ranges:
//
// upper bits: bit15 - bit12
// mid bits: bit11 - bit8
// page bits: bit7 - bit0
//
// within a page, (assumming a 4 byte ALU)
// bits 7-5 select one of the 8 longs
// bits 4-0 select one of the 32 bits within the long
//
// There is exactly one upper "pointers" array.
//
// The upper pointers each point to a mid array. If there are no chars
// in an upper pointer's block that pointer points to the empty mid.
// Thus all upper pointers are "valid" even if they do not have space
// allocated; eg: the accessor macro does not need to test if the
// pointer is zero.
//
// Each mid pointer in the mid array points to a page. If there are no
// chars in a mid pointer's page that pointer points to the empty page.
// Thus all mid pointers are "valid" even if they do not have space
// allocated; eg: the accessor macro does not need to test if the
// pointer is zero.
//
// Since the array will be less than 5K PRUint16 the "pointers" can
// be implemented as 2 byte offsets from the base instead of
// real pointers.
//
// the format of the CCMap is
// the upper pointers (16 PRUint16)
// the empty mid pointers (16 PRUint16)
// the empty page (16 PRUint16)
// non-empty mid pointers and pages as needed
// One minor note: for a completely empty map it is actually
// possible to fold the upper, empty mid, and empty page
// on top of each other and make a map of only 32 bytes.
#define CCMAP_EMPTY_SIZE_PER_INT16 16
// offsets to the empty mid and empty page
#define CCMAP_EMPTY_MID CCMAP_NUM_UPPER_POINTERS
#define CCMAP_EMPTY_PAGE CCMAP_EMPTY_MID+CCMAP_NUM_MID_POINTERS
//
// Because the table is offset based the code can build the table in a
// temp space (max table size on the stack) and then do one alloc of
// the actual needed size and simply copy over the data.
//
//
// Compressed Char map surrogate extension
//
// The design goal of surrogate support extension is to keep efficiency
// and compatibility of existing compressed charmap operations. Most of
// existing operation are untouched. For BMP support, very little memory
// overhead (4 bytes) is added. Runtime efficiency of BMP support is
// unchanged.
//
// structure of extended charmap:
// ccmap flag 1 PRUint16 , indication if this is extended one or not
// bmp ccmap size 1 PRUint16 , the size of BMP ccmap,
// BMP ccmap size varies,
// plane index 16 PRUint32, use to index ccmap for non-BMP plane
// empty ccmap 16 PRUint16, a total empty ccmap
// non-BMP ccmaps size varies, other non-empty, non-BMP ccmap
//
// Changes to basic ccmap
// 2 PRUint16 are added in the very beginning. One is used to descript the size
// of the ccmap, the other is used as a flag. But these 2 fields are indexed
// negatively so that all other operation remain unchanged to keep efficiency.
// ccmap memory allocation is moved from nsCompressedCharMap::NewCCMap to
// MapToCCMap.
//
// Extended ccmap
// A 16*PRUint32 array was put at the end of basic ccmap, each PRUint32 either
// pointed to the empty ccmap or a independent plane ccmap. Directly after this
// array is a empty ccmap. All planes that has no character will share this ccmap.
// All non-empty plane will have a ccmap.
// "MapToCCMapExt" is added to created an extended ccmap, each plane ccmap is
// created the same as basic one, but without 2 additional fields.
// "HasGlyphExt" is used to access extended ccmap, it first need to locate the
// plane ccmap, and then operated the same way as "HasGlyph".
//
// Compatibility between old and new one
// Because extended ccmap include an exactly identical basic ccmap in its head,
// basic ccmap operation (HasGlyph) can be applied on extended ccmap without
// problem.
// Because basic ccmap is now have a flag to indicate if it is a extended one,
// Extended ccmap operation (HasGlyphExt) can check the flag before it does
// extended ccmap specific operation. So HasGlyphExt can be applied to basic ccmap
// too.
//
// Page bits
//
#define CCMAP_BITS_PER_PAGE_LOG2 8
#define CCMAP_BITS_PER_PAGE CCMAP_POW2(CCMAP_BITS_PER_PAGE_LOG2)
#define CCMAP_BIT_INDEX(c) ((c) & PR_BITMASK(CCMAP_BITS_PER_ALU_LOG2))
#define CCMAP_ALU_INDEX(c) (((c)>>CCMAP_BITS_PER_ALU_LOG2) \
& PR_BITMASK(CCMAP_BITS_PER_PAGE_LOG2 - CCMAP_BITS_PER_ALU_LOG2))
#define CCMAP_PAGE_MASK PR_BITMASK(CCMAP_BITS_PER_PAGE_LOG2)
#define CCMAP_NUM_PRUINT16S_PER_PAGE \
(CCMAP_BITS_PER_PAGE/CCMAP_BITS_PER_PRUINT16)
// one bit per char
#define CCMAP_NUM_ALUS_PER_PAGE (CCMAP_BITS_PER_PAGE/CCMAP_BITS_PER_ALU)
#define CCMAP_NUM_UCHARS_PER_PAGE CCMAP_BITS_PER_PAGE
//
// Mid bits
//
#define CCMAP_BITS_PER_MID_LOG2 4
#define CCMAP_MID_INDEX(c) \
(((c)>>CCMAP_BITS_PER_PAGE_LOG2) & PR_BITMASK(CCMAP_BITS_PER_MID_LOG2))
#define CCMAP_NUM_MID_POINTERS CCMAP_POW2(CCMAP_BITS_PER_MID_LOG2)
#define CCMAP_NUM_UCHARS_PER_MID \
CCMAP_POW2(CCMAP_BITS_PER_MID_LOG2+CCMAP_BITS_PER_PAGE_LOG2)
//
// Upper bits
//
#define CCMAP_BITS_PER_UPPER_LOG2 4
#define CCMAP_UPPER_INDEX(c) \
(((c)>>(CCMAP_BITS_PER_MID_LOG2+CCMAP_BITS_PER_PAGE_LOG2)) \
& PR_BITMASK(CCMAP_BITS_PER_UPPER_LOG2))
#define CCMAP_NUM_UPPER_POINTERS CCMAP_POW2(CCMAP_BITS_PER_UPPER_LOG2)
//
// Misc
//
#define CCMAP_BITS_PER_PRUINT16_LOG2 4
#define CCMAP_BITS_PER_PRUINT32_LOG2 5
#define CCMAP_BITS_PER_PRUINT16 CCMAP_POW2(CCMAP_BITS_PER_PRUINT16_LOG2)
#define CCMAP_BITS_PER_PRUINT32 CCMAP_POW2(CCMAP_BITS_PER_PRUINT32_LOG2)
#define CCMAP_BITS_PER_ALU CCMAP_POW2(CCMAP_BITS_PER_ALU_LOG2)
#define CCMAP_ALUS_PER_PRUINT32 (CCMAP_BITS_PER_PRUINT32/CCMAP_BITS_PER_ALU)
#define CCMAP_PRUINT32S_PER_ALU (CCMAP_BITS_PER_ALU/CCMAP_BITS_PER_PRUINT32)
#define CCMAP_PRUINT32S_PER_PAGE (CCMAP_BITS_PER_PAGE/CCMAP_BITS_PER_PRUINT32)
#define CCMAP_ALU_MASK PR_BITMASK(CCMAP_BITS_PER_ALU)
#define CCMAP_ALUS_PER_PAGE CCMAP_POW2(CCMAP_BITS_PER_PAGE_LOG2 \
- CCMAP_BITS_PER_ALU_LOG2)
#define NUM_UNICODE_CHARS CCMAP_POW2(CCMAP_BITS_PER_UPPER_LOG2 \
+CCMAP_BITS_PER_MID_LOG2 \
+CCMAP_BITS_PER_PAGE_LOG2)
#define CCMAP_TOTAL_PAGES CCMAP_POW2(CCMAP_BITS_PER_UPPER_LOG2 \
+CCMAP_BITS_PER_MID_LOG2)
#define CCMAP_BEGIN_AT_START_OF_MAP 0xFFFF
//
// Finally, build up the macro to test the bit for a given char
//
// offset from base to mid array
#define CCMAP_TO_MID(m,c) ((m)[CCMAP_UPPER_INDEX(c)])
// offset from base to page
#define CCMAP_TO_PAGE(m,c) ((m)[CCMAP_TO_MID((m),(c)) + CCMAP_MID_INDEX(c)])
// offset from base to alu
#define CCMAP_TO_ALU(m,c) \
(*((ALU_TYPE*)(&((m)[CCMAP_TO_PAGE((m),(c))])) + CCMAP_ALU_INDEX(c)))
// test the bit
#define CCMAP_HAS_CHAR(m,c) (((CCMAP_TO_ALU(m,c))>>CCMAP_BIT_INDEX(c)) & 1)
// unset the bit
#define CCMAP_UNSET_CHAR(m,c) (CCMAP_TO_ALU(m,c) &= ~(CCMAP_POW2(CCMAP_BIT_INDEX(c))))
#define CCMAP_SIZE(m) (*((m)-1))
#define CCMAP_FLAG(m) (*((m)-2))
#define CCMAP_EXTRA (sizeof(ALU_TYPE)/sizeof(PRUint16)>2? sizeof(ALU_TYPE)/sizeof(PRUint16): 2)
#define CCMAP_SURROGATE_FLAG 0X0001
#define CCMAP_NONE_FLAG 0x0000
// non-bmp unicode support extension
#define EXTENDED_UNICODE_PLANES 16
// get plane number from ccmap, bmp excluded, so plane 1's number is 0.
#define CCMAP_PLANE_FROM_SURROGATE(h) ((((PRUint16)(h) - (PRUint16)0xd800) >> 6) + 1)
// same as above, but get plane number from a ucs4 char
#define CCMAP_PLANE(u) ((((PRUint32)(u))>>16))
// scalar value inside the plane
#define CCMAP_INPLANE_OFFSET(h, l) (((((PRUint16)(h) - (PRUint16)0xd800) & 0x3f) << 10) + ((PRUint16)(l) - (PRUint16)0xdc00))
// get ccmap for that plane
#define CCMAP_FOR_PLANE_EXT(m, i) ((m) + ((PRUint32*)((m) + CCMAP_SIZE(m)))[(i)-1])
// test the bit for surrogate pair
#define CCMAP_HAS_CHAR_EXT2(m, h, l) (CCMAP_FLAG(m)&CCMAP_SURROGATE_FLAG && \
CCMAP_HAS_CHAR(CCMAP_FOR_PLANE_EXT((m), CCMAP_PLANE_FROM_SURROGATE(h)), CCMAP_INPLANE_OFFSET(h, l)))
// test the bit for a character in UCS4
#define CCMAP_HAS_CHAR_EXT(m, ucs4) (!((ucs4)&0xffff0000) && CCMAP_HAS_CHAR(m, (PRUnichar)(ucs4)) || \
CCMAP_FLAG(m)&CCMAP_SURROGATE_FLAG && CCMAP_HAS_CHAR(CCMAP_FOR_PLANE_EXT((m), CCMAP_PLANE(ucs4)), (ucs4)&0xffff))
#endif // NSCOMPRESSEDCHARMAP_H

View File

@@ -1,58 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef NSCOORD_H
#define NSCOORD_H
#include "nscore.h"
/*
* Basic type used for the geometry classes. By making it a typedef we can
* easily change it in the future.
*
* All coordinates are maintained as signed 32-bit integers in the twips
* coordinate space. A twip is 1/20th of a point, and there are 72 points per
* inch.
*
* Twips are used because they are a device-independent unit of measure. See
* header file nsUnitConversion.h for many useful macros to convert between
* different units of measure.
*/
typedef PRInt32 nscoord;
#endif /* NSCOORD_H */

View File

@@ -1,184 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Roland Mainz <Roland.Mainz@informatik.med.uni-giessen.de>
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef nsDeviceContext_h___
#define nsDeviceContext_h___
#include "nsIDeviceContext.h"
#include "nsIDeviceContextSpec.h"
#include "nsCOMPtr.h"
#include "nsIAtom.h"
#include "nsVoidArray.h"
#include "nsIObserver.h"
#include "nsIObserverService.h"
#include "nsWeakReference.h"
class nsIImageRequest;
class nsHashtable;
class nsFontCache
{
public:
nsFontCache();
virtual ~nsFontCache();
NS_IMETHOD Init(nsIDeviceContext* aContext);
NS_IMETHOD GetDeviceContext(nsIDeviceContext *&aContext) const;
NS_IMETHOD GetMetricsFor(const nsFont& aFont, nsIAtom* aLangGroup,
nsIFontMetrics *&aMetrics);
nsresult FontMetricsDeleted(const nsIFontMetrics* aFontMetrics);
nsresult Compact();
nsresult Flush();
/* printer device context classes may create their own
* subclasses of nsFontCache (and override this method) and override
* DeviceContextImpl::CreateFontCache (see bug 81311).
*/
NS_IMETHOD CreateFontMetricsInstance(nsIFontMetrics** fm);
protected:
nsVoidArray mFontMetrics;
nsIDeviceContext *mContext; // we do not addref this since
// ownership is implied. MMP.
};
class NS_GFX DeviceContextImpl : public nsIDeviceContext,
public nsIObserver,
public nsSupportsWeakReference
{
public:
DeviceContextImpl();
NS_DECL_ISUPPORTS
NS_DECL_NSIOBSERVER
NS_IMETHOD Init(nsNativeWidget aWidget);
NS_IMETHOD CreateRenderingContext(nsIView *aView, nsIRenderingContext *&aContext);
NS_IMETHOD CreateRenderingContext(nsIWidget *aWidget, nsIRenderingContext *&aContext);
NS_IMETHOD CreateRenderingContext(nsIRenderingContext *&aContext){return NS_ERROR_NOT_IMPLEMENTED;}
NS_IMETHOD InitRenderingContext(nsIRenderingContext *aContext, nsIWidget *aWindow);
NS_IMETHOD GetDevUnitsToTwips(float &aDevUnitsToTwips) const;
NS_IMETHOD GetTwipsToDevUnits(float &aTwipsToDevUnits) const;
NS_IMETHOD SetAppUnitsToDevUnits(float aAppUnits);
NS_IMETHOD SetDevUnitsToAppUnits(float aDevUnits);
NS_IMETHOD GetAppUnitsToDevUnits(float &aAppUnits) const;
NS_IMETHOD GetDevUnitsToAppUnits(float &aDevUnits) const;
NS_IMETHOD GetCanonicalPixelScale(float &aScale) const;
NS_IMETHOD SetCanonicalPixelScale(float aScale);
NS_IMETHOD GetMetricsFor(const nsFont& aFont, nsIAtom* aLangGroup,
nsIFontMetrics*& aMetrics);
NS_IMETHOD GetMetricsFor(const nsFont& aFont, nsIFontMetrics*& aMetrics);
NS_IMETHOD SetZoom(float aZoom);
NS_IMETHOD GetZoom(float &aZoom) const;
NS_IMETHOD SetTextZoom(float aTextZoom);
NS_IMETHOD GetTextZoom(float &aTextZoom) const;
NS_IMETHOD GetGamma(float &aGamma);
NS_IMETHOD SetGamma(float aGamma);
NS_IMETHOD GetGammaTable(PRUint8 *&aGammaTable);
NS_IMETHOD FirstExistingFont(const nsFont& aFont, nsString& aFaceName);
NS_IMETHOD GetLocalFontName(const nsString& aFaceName, nsString& aLocalName,
PRBool& aAliased);
NS_IMETHOD CreateFontCache();
NS_IMETHOD FontMetricsDeleted(const nsIFontMetrics* aFontMetrics);
NS_IMETHOD FlushFontCache(void);
NS_IMETHOD GetDepth(PRUint32& aDepth);
NS_IMETHOD GetPaletteInfo(nsPaletteInfo& aPaletteInfo);
#ifdef NS_PRINT_PREVIEW
NS_IMETHOD SetAltDevice(nsIDeviceContext* aAltDC);
NS_IMETHOD GetAltDevice(nsIDeviceContext** aAltDC) { *aAltDC = mAltDC.get(); NS_IF_ADDREF(*aAltDC); return NS_OK;}
NS_IMETHOD SetUseAltDC(PRUint8 aValue, PRBool aOn);
#else
#endif
protected:
virtual ~DeviceContextImpl();
void CommonInit(void);
void SetGammaTable(PRUint8 * aTable, float aCurrentGamma, float aNewGamma);
nsresult CreateIconILGroupContext();
virtual nsresult CreateFontAliasTable();
nsresult AliasFont(const nsString& aFont,
const nsString& aAlias, const nsString& aAltAlias,
PRBool aForceAlias);
void GetLocaleLangGroup(void);
float mTwipsToPixels;
float mPixelsToTwips;
float mAppUnitsToDevUnits;
float mDevUnitsToAppUnits;
nsFontCache *mFontCache;
nsCOMPtr<nsIAtom> mLocaleLangGroup; // XXX temp fix for performance bug - erik
float mZoom;
float mTextZoom;
float mGammaValue;
PRUint8 *mGammaTable;
nsHashtable* mFontAliasTable;
float mCPixelScale;
#ifdef NS_PRINT_PREVIEW
nsCOMPtr<nsIDeviceContext> mAltDC;
PRUint8 mUseAltDC;
#endif
public:
nsNativeWidget mWidget;
#ifdef NS_DEBUG
PRBool mInitialized;
#endif
};
#endif /* nsDeviceContext_h___ */

View File

@@ -1,143 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef nsFont_h___
#define nsFont_h___
#include "nscore.h"
#include "nsCoord.h"
#include "nsString.h"
// XXX we need a method to enumerate all of the possible fonts on the
// system across family, weight, style, size, etc. But not here!
// Enumerator callback function. Return PR_FALSE to stop
typedef PRBool (*nsFontFamilyEnumFunc)(const nsString& aFamily, PRBool aGeneric, void *aData);
// IDs for generic fonts
// NOTE: 0, 1 are reserved for the special IDs of the default variable
// and fixed fonts in the presentation context, see nsIPresContext.h
const PRUint8 kGenericFont_NONE = 0x00;
// Special
const PRUint8 kGenericFont_moz_variable = 0x00; // for the default variable width font
const PRUint8 kGenericFont_moz_fixed = 0x01; // our special "use the user's fixed font"
// CSS
const PRUint8 kGenericFont_serif = 0x02;
const PRUint8 kGenericFont_sans_serif = 0x04;
const PRUint8 kGenericFont_monospace = 0x08;
const PRUint8 kGenericFont_cursive = 0x10;
const PRUint8 kGenericFont_fantasy = 0x20;
// Font structure.
struct NS_GFX nsFont {
// The family name of the font
nsString name;
// The style of font (normal, italic, oblique)
PRUint8 style;
// The variant of the font (normal, small-caps)
PRUint8 variant;
// The weight of the font (0-999)
PRUint16 weight;
// The decorations on the font (underline, overline,
// line-through). The decorations can be binary or'd together.
PRUint8 decorations;
// The logical size of the font, in nscoord units
nscoord size;
// The aspect-value (ie., the ratio actualsize:actualxheight) that any
// actual physical font created from this font structure must have when
// rendering or measuring a string. A value of 0 means no adjustment
// needs to be done.
float sizeAdjust;
// Initialize the font struct with an iso-latin1 name
nsFont(const char* aName, PRUint8 aStyle, PRUint8 aVariant,
PRUint16 aWeight, PRUint8 aDecoration, nscoord aSize,
float aSizeAdjust=0.0f);
// Initialize the font struct with a (potentially) unicode name
nsFont(const nsString& aName, PRUint8 aStyle, PRUint8 aVariant,
PRUint16 aWeight, PRUint8 aDecoration, nscoord aSize,
float aSizeAdjust=0.0f);
// Make a copy of the given font
nsFont(const nsFont& aFont);
nsFont();
~nsFont();
PRBool operator==(const nsFont& aOther) const {
return Equals(aOther);
}
PRBool Equals(const nsFont& aOther) const ;
nsFont& operator=(const nsFont& aOther);
// Utility method to interpret name string
// enumerates all families specified by this font only
// returns PR_TRUE if completed, PR_FALSE if stopped
// enclosing quotes will be removed, and whitespace compressed (as needed)
PRBool EnumerateFamilies(nsFontFamilyEnumFunc aFunc, void* aData) const;
void GetFirstFamily(nsString& aFamily) const;
// Utility method to return the ID of a generic font
static void GetGenericID(const nsString& aGeneric, PRUint8* aID);
};
#define NS_FONT_STYLE_NORMAL 0
#define NS_FONT_STYLE_ITALIC 1
#define NS_FONT_STYLE_OBLIQUE 2
#define NS_FONT_VARIANT_NORMAL 0
#define NS_FONT_VARIANT_SMALL_CAPS 1
#define NS_FONT_DECORATION_NONE 0x0
#define NS_FONT_DECORATION_UNDERLINE 0x1
#define NS_FONT_DECORATION_OVERLINE 0x2
#define NS_FONT_DECORATION_LINE_THROUGH 0x4
#define NS_FONT_WEIGHT_NORMAL 400
#define NS_FONT_WEIGHT_BOLD 700
#endif /* nsFont_h___ */

View File

@@ -1,106 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef nsGfxCIID_h__
#define nsGfxCIID_h__
#include "nsISupports.h"
#include "nsIFactory.h"
#include "nsIComponentManager.h"
#define NS_IMAGE_CID \
{ 0x6049b260, 0xc1e6, 0x11d1, \
{ 0xa8, 0x27, 0x00, 0x40, 0x95, 0x9a, 0x28, 0xc9 } }
#define NS_RENDERING_CONTEXT_CID \
{ 0x6049b261, 0xc1e6, 0x11d1, \
{ 0xa8, 0x27, 0x00, 0x40, 0x95, 0x9a, 0x28, 0xc9 } }
#define NS_DEVICE_CONTEXT_CID \
{ 0x6049b262, 0xc1e6, 0x11d1, \
{ 0xa8, 0x27, 0x00, 0x40, 0x95, 0x9a, 0x28, 0xc9 } }
#define NS_FONT_METRICS_CID \
{ 0x6049b263, 0xc1e6, 0x11d1, \
{ 0xa8, 0x27, 0x00, 0x40, 0x95, 0x9a, 0x28, 0xc9 } }
#define NS_FONT_ENUMERATOR_CID \
{ 0xa6cf9115, 0x15b3, 0x11d2, \
{ 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } }
#define NS_FONTLIST_CID \
{ 0x6a8c0dd4, 0x1dd2, 0x11b2, \
{ 0x9a, 0x8f, 0xf8, 0x2f, 0x9d, 0xf2, 0x5b, 0x07 } }
#define NS_REGION_CID \
{ 0xe12752f0, 0xee9a, 0x11d1, \
{ 0xa8, 0x2a, 0x00, 0x40, 0x95, 0x9a, 0x28, 0xc9 } }
#define NS_SCRIPTABLE_REGION_CID \
{ 0xda5b130a, 0x1dd1, 0x11b2, \
{ 0xad, 0x47, 0xf4, 0x55, 0xb1, 0x81, 0x4a, 0x78 } }
#define NS_BLENDER_CID \
{ 0x6049b264, 0xc1e6, 0x11d1, \
{ 0xa8, 0x27, 0x00, 0x40, 0x95, 0x9a, 0x28, 0xc9 } }
#define NS_DEVICE_CONTEXT_SPEC_CID \
{ 0xd7193600, 0x78e0, 0x11d2, \
{ 0xa8, 0x46, 0x00, 0x40, 0x95, 0x9a, 0x28, 0xc9 } }
#define NS_DEVICE_CONTEXT_SPEC_FACTORY_CID \
{ 0xec5bebb0, 0x7b51, 0x11d2, \
{ 0xa8, 0x48, 0x00, 0x40, 0x95, 0x9a, 0x28, 0xc9 } }
#define NS_DRAWING_SURFACE_CID \
{ 0x199c7040, 0xcab0, 0x11d2, \
{ 0xa8, 0x49, 0x00, 0x40, 0x95, 0x9a, 0x28, 0xc9 } }
#define NS_SCREENMANAGER_CID \
{ 0xc401eb80, 0xf9ea, 0x11d3, \
{ 0xbb, 0x6f, 0xe7, 0x32, 0xb7, 0x3e, 0xbe, 0x7c } }
#define NS_PRINTOPTIONS_CID \
{ 0x30a3b080, 0x4867, 0x11d4, \
{ 0xa8, 0x56, 0x0, 0x10, 0x5a, 0x18, 0x34, 0x19 } }
#define NS_PRINTER_ENUMERATOR_CID \
{ 0xa6cf9129, 0x15b3, 0x11d2, \
{ 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }
#endif

View File

@@ -1,100 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef nsIBlender_h___
#define nsIBlender_h___
#include "nscore.h"
#include "nsISupports.h"
#include "nsIRenderingContext.h"
// IID for the nsIBlender interface
#define NS_IBLENDER_IID \
{ 0xbdb4b5b0, 0xf0db, 0x11d1, \
{ 0xa8, 0x2a, 0x00, 0x40, 0x95, 0x9a, 0x28, 0xc9 } }
//----------------------------------------------------------------------
// Blender interface
class nsIBlender : public nsISupports
{
public:
NS_DEFINE_STATIC_IID_ACCESSOR(NS_IBLENDER_IID)
/**
* Initialize the Blender
* @update dc 11/4/98
* @param aContext is where the blender can get info about the device its blending on
* @result The result of the initialization, NS_OK if no errors
*/
NS_IMETHOD Init(nsIDeviceContext *aContext) = 0;
/**
* NOTE: if we can make this static, that would be great. I don't think we can.
* Blend source and destination nsDrawingSurfaces. Both drawing surfaces
* will have bitmaps associated with them.
* @param aSX x offset into source drawing surface of blend area
* @param aSY y offset into source drawing surface of blend area
* @param aWidth width of blend area
* @param aHeight width of blend area
* @param aSrc source for the blending
* @param aDest destination for blending
* @param aDX x offset into destination drawing surface of blend area
* @param aDY y offset into destination drawing surface of blend area
* @param aSrcOpacity 0.0f -> 1.0f opacity value of source area. 1.0f indicates
* complete opacity.
* @param aSecondSrc an optional second source drawing surface which is used in
* conjunction with the background color parameters to determine
* which pixels to blend
* @param aSrcBackColor color of pixels in aSrc that should be
* considered "background" color
* @param aSecondSrcBackColor color of pixels in aSrc that should be
* considered "background" color
*/
NS_IMETHOD Blend(PRInt32 aSX, PRInt32 aSY, PRInt32 aWidth, PRInt32 aHeight,nsDrawingSurface aSrc,
nsDrawingSurface aDest, PRInt32 aDX, PRInt32 aDY, float aSrcOpacity,
nsDrawingSurface aSecondSrc = nsnull, nscolor aSrcBackColor = NS_RGB(0, 0, 0),
nscolor aSecondSrcBackColor = NS_RGB(0, 0, 0)) = 0;
NS_IMETHOD Blend(PRInt32 aSX, PRInt32 aSY, PRInt32 aWidth, PRInt32 aHeight, nsIRenderingContext *aSrc,
nsIRenderingContext *aDest, PRInt32 aDX, PRInt32 aDY, float aSrcOpacity,
nsIRenderingContext *aSecondSrc = nsnull, nscolor aSrcBackColor = NS_RGB(0, 0, 0),
nscolor aSecondSrcBackColor = NS_RGB(0, 0, 0)) = 0;
};
#endif

View File

@@ -1,513 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Roland Mainz <roland.mainz@informatik.med.uni-giessen.de>
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef nsIDeviceContext_h___
#define nsIDeviceContext_h___
#include "nsISupports.h"
#include "nsCoord.h"
#include "nsRect.h"
#include "nsIWidget.h"
#include "nsIRenderingContext.h"
class nsIView;
class nsIFontMetrics;
class nsIWidget;
class nsIDeviceContextSpec;
class nsIAtom;
struct nsFont;
struct nsColor;
//a cross platform way of specifying a native device context
typedef void * nsNativeDeviceContext;
/* error codes for printer device contexts */
#define NS_ERROR_GFX_PRINTER_BASE (1) /* adjustable :-) */
/* Unix: print command (lp/lpr) not found */
#define NS_ERROR_GFX_PRINTER_CMD_NOT_FOUND \
NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_GFX,NS_ERROR_GFX_PRINTER_BASE+1)
/* Unix: print command returned an error */
#define NS_ERROR_GFX_PRINTER_CMD_FAILURE \
NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_GFX,NS_ERROR_GFX_PRINTER_BASE+2)
/* no printer available (e.g. cannot find _any_ printer) */
#define NS_ERROR_GFX_PRINTER_NO_PRINTER_AVAILABLE \
NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_GFX,NS_ERROR_GFX_PRINTER_BASE+3)
/* _specified_ (by name) printer not found */
#define NS_ERROR_GFX_PRINTER_NAME_NOT_FOUND \
NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_GFX,NS_ERROR_GFX_PRINTER_BASE+4)
/* access to printer denied */
#define NS_ERROR_GFX_PRINTER_ACCESS_DENIED \
NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_GFX,NS_ERROR_GFX_PRINTER_BASE+5)
/* invalid printer attribute (for example: unsupported paper size etc.) */
#define NS_ERROR_GFX_PRINTER_INVALID_ATTRIBUTE \
NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_GFX,NS_ERROR_GFX_PRINTER_BASE+6)
/* printer not "ready" (offline ?) */
#define NS_ERROR_GFX_PRINTER_PRINTER_NOT_READY \
NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_GFX,NS_ERROR_GFX_PRINTER_BASE+8)
/* printer out of paper */
#define NS_ERROR_GFX_PRINTER_OUT_OF_PAPER \
NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_GFX,NS_ERROR_GFX_PRINTER_BASE+9)
/* generic printer I/O error */
#define NS_ERROR_GFX_PRINTER_PRINTER_IO_ERROR \
NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_GFX,NS_ERROR_GFX_PRINTER_BASE+10)
/* print-to-file: could not open output file */
#define NS_ERROR_GFX_PRINTER_COULD_NOT_OPEN_FILE \
NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_GFX,NS_ERROR_GFX_PRINTER_BASE+11)
/* print-to-file: I/O error while printing to file */
#define NS_ERROR_GFX_PRINTER_FILE_IO_ERROR \
NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_GFX,NS_ERROR_GFX_PRINTER_BASE+12)
/* print preview: needs at least one printer */
#define NS_ERROR_GFX_PRINTER_PRINTPREVIEW \
NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_GFX,NS_ERROR_GFX_PRINTER_BASE+13)
/* print: starting document */
#define NS_ERROR_GFX_PRINTER_STARTDOC \
NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_GFX,NS_ERROR_GFX_PRINTER_BASE+14)
/* print: ending document */
#define NS_ERROR_GFX_PRINTER_ENDDOC \
NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_GFX,NS_ERROR_GFX_PRINTER_BASE+15)
/* print: starting page */
#define NS_ERROR_GFX_PRINTER_STARTPAGE \
NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_GFX,NS_ERROR_GFX_PRINTER_BASE+16)
/* print: ending page */
#define NS_ERROR_GFX_PRINTER_ENDPAGE \
NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_GFX,NS_ERROR_GFX_PRINTER_BASE+17)
/* print: print while in print preview */
#define NS_ERROR_GFX_PRINTER_PRINT_WHILE_PREVIEW \
NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_GFX,NS_ERROR_GFX_PRINTER_BASE+18)
/* requested page size not supported by printer */
#define NS_ERROR_GFX_PRINTER_PAPER_SIZE_NOT_SUPPORTED \
NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_GFX,NS_ERROR_GFX_PRINTER_BASE+19)
/* requested page orientation not supported */
#define NS_ERROR_GFX_PRINTER_ORIENTATION_NOT_SUPPORTED \
NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_GFX,NS_ERROR_GFX_PRINTER_BASE+20)
/* requested colorspace not supported (like printing "color" on a "grayscale"-only printer) */
#define NS_ERROR_GFX_PRINTER_COLORSPACE_NOT_SUPPORTED \
NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_GFX,NS_ERROR_GFX_PRINTER_BASE+21)
/* too many copies requested */
#define NS_ERROR_GFX_PRINTER_TOO_MANY_COPIES \
NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_GFX,NS_ERROR_GFX_PRINTER_BASE+22)
/**
* Conts need for Print Preview
*/
#ifdef NS_PRINT_PREVIEW
const PRUint8 kUseAltDCFor_NONE = 0x00; // Do not use the AltDC for anything
const PRUint8 kUseAltDCFor_FONTMETRICS = 0x01; // Use it for only getting the font metrics
const PRUint8 kUseAltDCFor_CREATERC_REFLOW = 0x02; // Use when creating RenderingContexts for Reflow
const PRUint8 kUseAltDCFor_CREATERC_PAINT = 0x04; // Use when creating RenderingContexts for Painting
const PRUint8 kUseAltDCFor_SURFACE_DIM = 0x08; // Use it for getting the Surface Dimensions
#endif
#define NS_IDEVICE_CONTEXT_IID \
{ 0x5931c580, 0xb917, 0x11d1, \
{ 0xa8, 0x24, 0x00, 0x40, 0x95, 0x9a, 0x28, 0xc9 } }
//a cross platform way of specifying a native palette handle
typedef void * nsPalette;
//structure used to return information about a device's palette capabilities
struct nsPaletteInfo {
PRPackedBool isPaletteDevice;
PRUint16 sizePalette; // number of entries in the palette
PRUint16 numReserved; // number of reserved palette entries
nsPalette palette; // native palette handle
};
typedef enum {
eSystemFont_Caption, // css2
eSystemFont_Icon,
eSystemFont_Menu,
eSystemFont_MessageBox,
eSystemFont_SmallCaption,
eSystemFont_StatusBar,
eSystemFont_Window, // css3
eSystemFont_Document,
eSystemFont_Workspace,
eSystemFont_Desktop,
eSystemFont_Info,
eSystemFont_Dialog,
eSystemFont_Button,
eSystemFont_PullDownMenu,
eSystemFont_List,
eSystemFont_Field,
eSystemFont_Tooltips, // moz
eSystemFont_Widget,
eSystemFont_Theme
} nsSystemFontID;
class nsIDeviceContext : public nsISupports
{
public:
NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDEVICE_CONTEXT_IID)
/**
* Initialize the device context from a widget
* @param aWidget a native widget to initialize the device context from
* @return error status
*/
NS_IMETHOD Init(nsNativeWidget aWidget) = 0;
/**
* Create a rendering context and initialize it from an nsIView
* @param aView view to initialize context from
* @param aContext out parameter for new rendering context
* @return error status
*/
NS_IMETHOD CreateRenderingContext(nsIView *aView, nsIRenderingContext *&aContext) = 0;
/**
* Create a rendering context and initialize it from an nsIWidget
* @param aWidget widget to initialize context from
* @param aContext out parameter for new rendering context
* @return error status
*/
NS_IMETHOD CreateRenderingContext(nsIWidget *aWidget, nsIRenderingContext *&aContext) = 0;
/**
* Create a rendering context and initialize it. This API should *only* be called
* on device contexts whose SupportsNativeWidgets() method return PR_FALSE.
* @param aContext out parameter for new rendering context
* @return error status
*/
NS_IMETHOD CreateRenderingContext(nsIRenderingContext *&aContext) = 0;
/**
* Initialize a rendering context from a widget. This method is only for use
* when a rendering context was obtained directly from a factory rather than
* through one of the Create* methods above.
* @param aContext rendering context to initialize
* @param aWindow widget to initialize context from
* @return error status
*/
NS_IMETHOD InitRenderingContext(nsIRenderingContext *aContext, nsIWidget *aWindow) = 0;
/**
* Query the device to see if it supports native widgets. If not, then
* nsIWidget->Create() calls should be avoided.
* @param aSupportsWidgets out paramater. If PR_TRUE, then native widgets
* can be created.
* @return error status
*/
NS_IMETHOD SupportsNativeWidgets(PRBool &aSupportsWidgets) = 0;
/**
* Obtain the size of a device unit relative to a Twip. A twip is 1/20 of
* a point (which is 1/72 of an inch).
* @param aDevUnitsToTwips out parameter for conversion value
* @return error status
*/
NS_IMETHOD GetDevUnitsToTwips(float &aDevUnitsToTwips) const = 0;
/**
* Obtain the size of a Twip relative to a device unit.
* @param aTwipsToDevUnits out parameter for conversion value
* @return error status
*/
NS_IMETHOD GetTwipsToDevUnits(float &aTwipsToDevUnits) const = 0;
/**
* Set the scale factor to convert units used by the application
* to device units. Typically, an application will query the device
* for twips to device units scale and then set the scale
* to convert from whatever unit the application wants to use
* to device units. From that point on, all other parts of the
* app can use the Get* methods below to figure out how
* to convert device units <-> app units.
* @param aAppUnits scale value to convert from application defined
* units to device units.
* @return error status
*/
NS_IMETHOD SetAppUnitsToDevUnits(float aAppUnits) = 0;
/**
* Set the scale factor to convert device units to units
* used by the application. This should generally be
* 1.0f / the value passed into SetAppUnitsToDevUnits().
* @param aDevUnits scale value to convert from device units to
* application defined units
* @return error status
*/
NS_IMETHOD SetDevUnitsToAppUnits(float aDevUnits) = 0;
/**
* Get the scale factor to convert from application defined
* units to device units.
* @param aAppUnits out paramater for scale value
* @return error status
*/
NS_IMETHOD GetAppUnitsToDevUnits(float &aAppUnits) const = 0;
/**
* Get the scale factor to convert from device units to
* application defined units.
* @param aDevUnits out paramater for scale value
* @return error status
*/
NS_IMETHOD GetDevUnitsToAppUnits(float &aDevUnits) const = 0;
/**
* Get the value used to scale a "standard" pixel to a pixel
* of the same physical size for this device. a standard pixel
* is defined as a pixel on display 0. this is used to make
* sure that entities defined in pixel dimensions maintain a
* constant relative size when displayed from one output
* device to another.
* @param aScale out parameter for scale value
* @return error status
*/
NS_IMETHOD GetCanonicalPixelScale(float &aScale) const = 0;
/**
* Get the value used to scale a "standard" pixel to a pixel
* of the same physical size for this device. a standard pixel
* is defined as a pixel on display 0. this is used to make
* sure that entities defined in pixel dimensions maintain a
* constant relative size when displayed from one output
* device to another.
* @param aScale in parameter for scale value
* @return error status
*/
NS_IMETHOD SetCanonicalPixelScale(float aScale) = 0;
/**
* Get the width of a vertical scroll bar and the height
* of a horizontal scrollbar in application units.
* @param aWidth out parameter for width
* @param aHeight out parameter for height
* @return error status
*/
NS_IMETHOD GetScrollBarDimensions(float &aWidth, float &aHeight) const = 0;
/**
* Fill in an nsFont based on the ID of a system font. This function
* may or may not fill in the size, so the size should be set to a
* reasonable default before calling.
*
* @param aID The system font ID.
* @param aInfo The font structure to be filled in.
* @return error status
*/
NS_IMETHOD GetSystemFont(nsSystemFontID aID, nsFont *aFont) const = 0;
/**
* Get the nsIFontMetrics that describe the properties of
* an nsFont.
* @param aFont font description to obtain metrics for
* @param aLangGroup the language group of the document
* @param aMetrics out parameter for font metrics
* @return error status
*/
NS_IMETHOD GetMetricsFor(const nsFont& aFont, nsIAtom* aLangGroup,
nsIFontMetrics*& aMetrics) = 0;
/**
* Get the nsIFontMetrics that describe the properties of
* an nsFont.
* @param aFont font description to obtain metrics for
* @param aMetrics out parameter for font metrics
* @return error status
*/
NS_IMETHOD GetMetricsFor(const nsFont& aFont, nsIFontMetrics*& aMetrics) = 0;
//get and set the document zoom value used for display-time
//scaling. default is 1.0 (no zoom)
NS_IMETHOD SetZoom(float aZoom) = 0;
NS_IMETHOD GetZoom(float &aZoom) const = 0;
//get and set the text zoom value used for display-time
//scaling. default is 1.0 (no zoom)
NS_IMETHOD SetTextZoom(float aTextZoom) = 0;
NS_IMETHOD GetTextZoom(float &aTextZoom) const = 0;
//get a low level drawing surface for rendering. the rendering context
//that is passed in is used to create the drawing surface if there isn't
//already one in the device context. the drawing surface is then cached
//in the device context for re-use.
NS_IMETHOD GetDrawingSurface(nsIRenderingContext &aContext, nsDrawingSurface &aSurface) = 0;
//functions for handling gamma correction of output device
NS_IMETHOD GetGamma(float &aGamms) = 0;
NS_IMETHOD SetGamma(float aGamma) = 0;
//XXX the return from this really needs to be ref counted somehow. MMP
NS_IMETHOD GetGammaTable(PRUint8 *&aGammaTable) = 0;
/**
* Check to see if a particular named font exists.
* @param aFontName character string of font face name
* @return NS_OK if font is available, else font is unavailable
*/
NS_IMETHOD CheckFontExistence(const nsString& aFaceName) = 0;
NS_IMETHOD FirstExistingFont(const nsFont& aFont, nsString& aFaceName) = 0;
NS_IMETHOD GetLocalFontName(const nsString& aFaceName, nsString& aLocalName,
PRBool& aAliased) = 0;
/**
* Notification when a font metrics instance created for this device is
* about to be deleted
*/
NS_IMETHOD FontMetricsDeleted(const nsIFontMetrics* aFontMetrics) = 0;
/**
* Attempt to free up resoruces by flushing out any fonts no longer
* referenced by anything other than the font cache itself.
* @return error status
*/
NS_IMETHOD FlushFontCache(void) = 0;
/**
* Return the bit depth of the device.
*/
NS_IMETHOD GetDepth(PRUint32& aDepth) = 0;
/**
* Returns information about the device's palette capabilities.
*/
NS_IMETHOD GetPaletteInfo(nsPaletteInfo& aPaletteInfo) = 0;
/**
* Returns Platform specific pixel value for an RGB value
*/
NS_IMETHOD ConvertPixel(nscolor aColor, PRUint32 & aPixel) = 0;
/**
* Get the size of the displayable area of the output device
* in app units.
* @param aWidth out parameter for width
* @param aHeight out parameter for height
* @return error status
*/
NS_IMETHOD GetDeviceSurfaceDimensions(PRInt32 &aWidth, PRInt32 &aHeight) = 0;
/**
* Get the size of the content area of the output device in app units.
* This corresponds on a screen device, for instance, to the entire screen.
* @param aRect out parameter for full rect. Position (x,y) will be (0,0) or
* relative to the primary monitor if this is not the primary.
* @return error status
*/
NS_IMETHOD GetRect ( nsRect &aRect ) = 0;
/**
* Get the size of the content area of the output device in app units.
* This corresponds on a screen device, for instance, to the area reported
* by GetDeviceSurfaceDimensions, minus the taskbar (Windows) or menubar
* (Macintosh).
* @param aRect out parameter for client rect. Position (x,y) will be (0,0)
* adjusted for any upper/left non-client space if present or
* relative to the primary monitor if this is not the primary.
* @return error status
*/
NS_IMETHOD GetClientRect(nsRect &aRect) = 0;
/**
* Returns a new nsIDeviceContext suitable for the device context
* specification passed in.
* @param aDevice a device context specification. this is a platform
* specific structure that only a platform specific device
* context can interpret.
* @param aContext out parameter for new device context. nsnull on
* failure to create new device context.
* @return error status
*/
NS_IMETHOD GetDeviceContextFor(nsIDeviceContextSpec *aDevice,
nsIDeviceContext *&aContext) = 0;
//XXX need to work out re-entrancy issues for these APIs... MMP
/**
* Inform the output device that output of a document is beginning
* Used for print related device contexts. Must be matched 1:1 with
* EndDocument().
* XXX needs to take parameters so that feedback can be given to the
* app regarding pagination progress and aborting print operations?
* @return error status
*/
NS_IMETHOD BeginDocument(PRUnichar * aTitle) = 0;
/**
* Inform the output device that output of a document is ending.
* Used for print related device contexts. Must be matched 1:1 with
* BeginDocument()
* @return error status
*/
NS_IMETHOD EndDocument(void) = 0;
/**
* Inform the output device that output of a page is beginning
* Used for print related device contexts. Must be matched 1:1 with
* EndPage() and within a BeginDocument()/EndDocument() pair.
* @return error status
*/
NS_IMETHOD BeginPage(void) = 0;
/**
* Inform the output device that output of a page is ending
* Used for print related device contexts. Must be matched 1:1 with
* BeginPage() and within a BeginDocument()/EndDocument() pair.
* @return error status
*/
NS_IMETHOD EndPage(void) = 0;
#ifdef NS_PRINT_PREVIEW
/**
* Set an Alternative Device Context where some of the calls
* are deferred to it
*/
NS_IMETHOD SetAltDevice(nsIDeviceContext* aAltDC) = 0;
/**
* Get the Alternate Device Context
*/
NS_IMETHOD GetAltDevice(nsIDeviceContext** aAltDC) = 0;
/**
* Turn on/off which types of information is retrived
* via the alt device context
*/
NS_IMETHOD SetUseAltDC(PRUint8 aValue, PRBool aOn) = 0;
#endif
};
#endif /* nsIDeviceContext_h___ */

View File

@@ -1,54 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef nsIDeviceContextSpec_h___
#define nsIDeviceContextSpec_h___
#include "nsIDeviceContext.h"
#define NS_IDEVICE_CONTEXT_SPEC_IID \
{ 0x9951f910, 0x78d7, 0x11d2, \
{ 0xa8, 0x46, 0x00, 0x40, 0x95, 0x9a, 0x28, 0xc9 } }
class nsIDeviceContextSpec : public nsISupports
{
public:
NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDEVICE_CONTEXT_SPEC_IID)
};
#endif

View File

@@ -1,87 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef nsIDeviceContextSpecFactory_h___
#define nsIDeviceContextSpecFactory_h___
#include "nsISupports.h"
class nsIDeviceContextSpec;
class nsIWidget;
class nsIPrintSettings;
#define NS_IDEVICE_CONTEXT_SPEC_FACTORY_IID \
{ 0xf6669570, 0x7b3d, 0x11d2, \
{ 0xa8, 0x48, 0x00, 0x40, 0x95, 0x9a, 0x28, 0xc9 } }
class nsIDeviceContextSpecFactory : public nsISupports
{
public:
NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDEVICE_CONTEXT_SPEC_FACTORY_IID)
/**
* Initialize the device context spec factory
* @return error status
*/
NS_IMETHOD Init(void) = 0;
/**
* Get a device context specification. Typically, this
* means getting information about a printer. A previously
* returned device context spec can be passed in and used as
* a starting point for getting a new spec (or simply returning
* the old spec again). Additionally, if it is desirable to
* get the device context spec without user intervention, any
* dialog boxes can be supressed by passing in PR_TRUE for the
* aQuiet parameter.
* @param aWidget.. this is a widget a dialog can be hosted in
* @param aNewSpec out parameter for device context spec returned. the
* aOldSpec may be returned if the object is recyclable.
* @param aQuiet if PR_TRUE, prevent the need for user intervention
* in obtaining device context spec. if nsnull is passed in for
* the aOldSpec, this will typically result in getting a device
* context spec for the default output device (i.e. default
* printer).
* @return error status
*/
NS_IMETHOD CreateDeviceContextSpec(nsIWidget *aWidget,
nsIPrintSettings* aPrintSettings,
nsIDeviceContextSpec *&aNewSpec,
PRBool aQuiet) = 0;
};
#endif

View File

@@ -1,168 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef nsIDrawingSurface_h___
#define nsIDrawingSurface_h___
#include "nscore.h"
#include "nsISupports.h"
// a memory area that can be rendered to
typedef struct
{
PRUint32 mRedZeroMask; //red color mask in zero position
PRUint32 mGreenZeroMask; //green color mask in zero position
PRUint32 mBlueZeroMask; //blue color mask in zero position
PRUint32 mAlphaZeroMask; //alpha data mask in zero position
PRUint32 mRedMask; //red color mask
PRUint32 mGreenMask; //green color mask
PRUint32 mBlueMask; //blue color mask
PRUint32 mAlphaMask; //alpha data mask
PRUint8 mRedCount; //number of red color bits
PRUint8 mGreenCount; //number of green color bits
PRUint8 mBlueCount; //number of blue color bits
PRUint8 mAlphaCount; //number of alpha data bits
PRUint8 mRedShift; //number to shift value into red position
PRUint8 mGreenShift; //number to shift value into green position
PRUint8 mBlueShift; //number to shift value into blue position
PRUint8 mAlphaShift; //number to shift value into alpha position
} nsPixelFormat;
#define RASWIDTH(width, bpp) ((((width) * (bpp) + 31) >> 5) << 2)
#define NS_IDRAWING_SURFACE_IID \
{ 0x61cc77e0, 0xcaac, 0x11d2, \
{ 0xa8, 0x49, 0x00, 0x40, 0x95, 0x9a, 0x28, 0xc9 } }
class nsIDrawingSurface : public nsISupports
{
public:
NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDRAWING_SURFACE_IID)
/**
* Lock a rect of a drawing surface and return a
* pointer to the upper left hand corner of the
* bitmap.
* @param aX x position of subrect of bitmap
* @param aY y position of subrect of bitmap
* @param aWidth width of subrect of bitmap
* @param aHeight height of subrect of bitmap
* @param aBits out parameter for upper left hand
* corner of bitmap
* @param aStride out parameter for number of bytes
* to add to aBits to go from scanline to scanline
* @param aWidthBytes out parameter for number of
* bytes per line in aBits to process aWidth pixels
* @return error status
*
**/
NS_IMETHOD Lock(PRInt32 aX, PRInt32 aY, PRUint32 aWidth, PRUint32 aHeight,
void **aBits, PRInt32 *aStride, PRInt32 *aWidthBytes,
PRUint32 aFlags) = 0;
/**
* Unlock a rect of a drawing surface. must be preceded
* by a call to Lock(). Lock()/Unlock() pairs do not nest.
* @return error status
*
**/
NS_IMETHOD Unlock(void) = 0;
/**
* Get the dimensions of a drawing surface
* @param aWidth out parameter for width of drawing surface
* @param aHeight out parameter for height of drawing surface
* @return error status
*
**/
NS_IMETHOD GetDimensions(PRUint32 *aWidth, PRUint32 *aHeight) = 0;
/**
* Get the offscreen status of the drawing surface
* @param aOffscreen out parameter for offscreen status of
* drawing surface. if PR_TRUE, then modifying the
* drawing surface does not immediately reflect the
* changes on the output device
* @return error status
*
**/
NS_IMETHOD IsOffscreen(PRBool *aOffScreen) = 0;
/**
* Get the pixel addressability status of the drawing surface
* @param aAddressable out parameter for pixel addressability
* status of drawing surface. if PR_TRUE, then the
* drawing surface is optimized for pixel addressability
* (i.e. the Lock() method has very low overhead). All
* drawing surfaces support Lock()ing, but doing so on
* drawing surfaces that do not return PR_TRUE here may
* impose significant overhead.
* @return error status
*
**/
NS_IMETHOD IsPixelAddressable(PRBool *aAddressable) = 0;
/**
* Get the pixel format of a drawing surface
* @param aOffscreen out parameter filled in with pixel
* format information.
* @return error status
*
**/
NS_IMETHOD GetPixelFormat(nsPixelFormat *aFormat) = 0;
};
//when creating a drawing surface, you can use this
//to tell the drawing surface that you anticipate
//the need to get to the actual bits of the drawing
//surface at some point during it's lifetime. typically
//used when creating bitmaps to be operated on by the
//nsIBlender implementations.
#define NS_CREATEDRAWINGSURFACE_FOR_PIXEL_ACCESS 0x0001
//flag to say that this drawing surface is shortlived,
//which may affect how the OS allocates it. Used for
//tiling, grouting etc.
#define NS_CREATEDRAWINGSURFACE_SHORTLIVED 0x0002
//when locking a drawing surface, use these flags to
//control how the data in the surface should be accessed
#define NS_LOCK_SURFACE_READ_ONLY 0x0001
#define NS_LOCK_SURFACE_WRITE_ONLY 0x0002
#endif // nsIDrawingSurface_h___

View File

@@ -1,228 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef nsIFontMetrics_h___
#define nsIFontMetrics_h___
#include "nsISupports.h"
#include "nsCoord.h"
struct nsFont;
class nsString;
class nsIDeviceContext;
class nsIAtom;
// IID for the nsIFontMetrics interface
#define NS_IFONT_METRICS_IID \
{ 0xc74cb770, 0xa33e, 0x11d1, \
{ 0xa8, 0x24, 0x00, 0x40, 0x95, 0x9a, 0x28, 0xc9 } }
//----------------------------------------------------------------------
/**
* A native font handle
*/
typedef void* nsFontHandle;
/**
* Font metrics interface
*
* This interface may be somewhat misnamed. A better name might be
* nsIFontList. The style system uses the nsFont struct for various font
* properties, one of which is font-family, which can contain a *list* of
* font names. The nsFont struct is "realized" by asking the device context
* to cough up an nsIFontMetrics object, which contains a list of real font
* handles, one for each font mentioned in font-family (and for each fallback
* when we fall off the end of that list).
*
* The style system needs to have access to certain metrics, such as the
* em height (for the CSS "em" unit), and we use the first Western font's
* metrics for that purpose. The platform-specific implementations are
* expected to select non-Western fonts that "fit" reasonably well with the
* Western font that is loaded at Init time.
*/
class nsIFontMetrics : public nsISupports
{
public:
NS_DEFINE_STATIC_IID_ACCESSOR(NS_IFONT_METRICS_IID)
/**
* Initialize the font metrics. Call this after creating the font metrics.
* Font metrics you get from the font cache do NOT need to be initialized
*
* @see nsIDeviceContext#GetMetricsFor()
*/
NS_IMETHOD Init(const nsFont& aFont, nsIAtom* aLangGroup,
nsIDeviceContext *aContext) = 0;
/**
* Destroy this font metrics. This breaks the association between
* the font metrics and the device context.
*/
NS_IMETHOD Destroy() = 0;
/**
* Return the font's xheight property, scaled into app-units.
*/
NS_IMETHOD GetXHeight(nscoord& aResult) = 0;
/**
* Return the font's superscript offset (the distance from the
* baseline to where a superscript's baseline should be placed). The
* value returned will be a positive value.
*/
NS_IMETHOD GetSuperscriptOffset(nscoord& aResult) = 0;
/**
* Return the font's subscript offset (the distance from the
* baseline to where a subscript's baseline should be placed). The
* value returned will be a positive value.
*/
NS_IMETHOD GetSubscriptOffset(nscoord& aResult) = 0;
/**
* Return the font's strikeout offset (the distance from the
* baseline to where a strikeout should be placed) and size
* Positive values are above the baseline, negative below.
*/
NS_IMETHOD GetStrikeout(nscoord& aOffset, nscoord& aSize) = 0;
/**
* Return the font's underline offset (the distance from the
* baseline to where a underline should be placed) and size.
* Positive values are above the baseline, negative below.
*/
NS_IMETHOD GetUnderline(nscoord& aOffset, nscoord& aSize) = 0;
/**
* Returns the height (in app units) of the font. This is ascent plus descent
* plus any internal leading
*
* This method will be removed once the callers have been moved over to the
* new GetEmHeight (and possibly GetMaxHeight).
*/
NS_IMETHOD GetHeight(nscoord &aHeight) = 0;
#if defined(XP_UNIX) || defined(XP_PC) || defined(XP_MAC) || defined(XP_BEOS)
#define NEW_FONT_HEIGHT_APIS 1
#endif
#ifdef NEW_FONT_HEIGHT_APIS
/**
* Returns the normal line height (em height + leading).
*/
NS_IMETHOD GetNormalLineHeight(nscoord &aHeight) = 0;
#endif /* NEW_FONT_HEIGHT_APIS */
/**
* Returns the amount of internal leading (in app units) for the font. This
* is computed as the "height - (ascent + descent)"
*/
NS_IMETHOD GetLeading(nscoord &aLeading) = 0;
#ifdef NEW_FONT_HEIGHT_APIS
/**
* Returns the height (in app units) of the Western font's em square. This is
* em ascent plus em descent.
*/
NS_IMETHOD GetEmHeight(nscoord &aHeight) = 0;
/**
* Returns, in app units, the ascent part of the Western font's em square.
*/
NS_IMETHOD GetEmAscent(nscoord &aAscent) = 0;
/**
* Returns, in app units, the descent part of the Western font's em square.
*/
NS_IMETHOD GetEmDescent(nscoord &aDescent) = 0;
/**
* Returns the height (in app units) of the Western font's bounding box.
* This is max ascent plus max descent.
*/
NS_IMETHOD GetMaxHeight(nscoord &aHeight) = 0;
#endif /* NEW_FONT_HEIGHT_APIS */
/**
* Returns, in app units, the maximum distance characters in this font extend
* above the base line.
*/
NS_IMETHOD GetMaxAscent(nscoord &aAscent) = 0;
/**
* Returns, in app units, the maximum distance characters in this font extend
* below the base line.
*/
NS_IMETHOD GetMaxDescent(nscoord &aDescent) = 0;
/**
* Returns, in app units, the maximum character advance for the font
*/
NS_IMETHOD GetMaxAdvance(nscoord &aAdvance) = 0;
/**
* Returns the font associated with these metrics
*/
NS_IMETHOD GetFont(const nsFont *&aFont) = 0;
/**
* Returns the language group associated with these metrics
*/
NS_IMETHOD GetLangGroup(nsIAtom** aLangGroup) = 0;
/**
* Returns the font handle associated with these metrics
*/
NS_IMETHOD GetFontHandle(nsFontHandle &aHandle) = 0;
#if defined(_WIN32) || defined(XP_OS2)
/**
* Returns the average character width
*/
NS_IMETHOD GetAveCharWidth(nscoord& aAveCharWidth) = 0;
#endif
/**
* Returns the often needed width of the space character
*/
NS_IMETHOD GetSpaceWidth(nscoord& aSpaceCharWidth) = 0;
};
#endif /* nsIFontMetrics_h___ */

View File

@@ -1,333 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef nsIImage_h___
#define nsIImage_h___
#include "nsISupports.h"
#include "nsIRenderingContext.h"
struct nsRect;
class nsIDeviceContext;
struct nsColorMap
{
//I lifted this from the image lib. The difference is that
//this uses nscolor instead of NI_RGB. Multiple color pollution
//is a bad thing. MMP
PRInt32 NumColors; // Number of colors in the colormap.
// A negative value can be used to denote a
// possibly non-unique set.
//nscolor *Map; // Colormap colors.
PRUint8 *Index; // NULL, if map is in index order, otherwise
// specifies the indices of the map entries. */
};
typedef enum {
nsMaskRequirements_kNoMask,
nsMaskRequirements_kNeeds1Bit,
nsMaskRequirements_kNeeds8Bit
} nsMaskRequirements;
#define nsImageUpdateFlags_kColorMapChanged 0x1
#define nsImageUpdateFlags_kBitsChanged 0x2
// IID for the nsIImage interface
#define NS_IIMAGE_IID \
{ 0x0b4faaa0, 0xaa3a, 0x11d1, \
{ 0xa8, 0x24, 0x00, 0x40, 0x95, 0x9a, 0x28, 0xc9 } }
// Interface to Images
class nsIImage : public nsISupports
{
public:
NS_DEFINE_STATIC_IID_ACCESSOR(NS_IIMAGE_IID)
/**
* Build and initialize the nsIImage
* @param aWidth The width in pixels of the desired pixelmap
* @param aHeight The height in pixels of the desired pixelmap
* @param aDepth The number of bits per pixel for the pixelmap
* @param aMaskRequirements A flag indicating if a alpha mask should be allocated
*/
virtual nsresult Init(PRInt32 aWidth, PRInt32 aHeight, PRInt32 aDepth, nsMaskRequirements aMaskRequirements) = 0;
/**
* Get the number of bytes per pixel for this image
* @update - dwc 2/3/99
* @return - the number of bytes per pixel
*/
virtual PRInt32 GetBytesPix() = 0;
/**
* Get whether rows are organized top to bottom, or bottom to top
* @update - syd 3/29/99
* @return PR_TRUE if top to bottom, else PR_FALSE
*/
virtual PRBool GetIsRowOrderTopToBottom() = 0;
/**
* Get the width for the pixelmap
* @update - dwc 2/1/99
* @return The width in pixels for the pixelmap
*/
virtual PRInt32 GetWidth() = 0;
/**
* Get the height for the pixelmap
* @update - dwc 2/1/99
* @return The height in pixels for the pixelmap
*/
virtual PRInt32 GetHeight() = 0;
/**
* Set/Get the decoded dimensions for the pixelmap
* 01/11/2000 - pnunn
*/
NS_IMETHOD SetDecodedRect(PRInt32, PRInt32, PRInt32, PRInt32) = 0;
virtual PRInt32 GetDecodedX1() = 0;
virtual PRInt32 GetDecodedY1() = 0;
virtual PRInt32 GetDecodedX2() = 0;
virtual PRInt32 GetDecodedY2() = 0;
NS_IMETHOD SetNaturalWidth(PRInt32) = 0;
NS_IMETHOD SetNaturalHeight(PRInt32) = 0;
virtual PRInt32 GetNaturalWidth() = 0;
virtual PRInt32 GetNaturalHeight() = 0;
/**
* Get a pointer to the bits for the pixelmap, only if it is not optimized
* @update - dwc 2/1/99
* @return address of the DIB pixel array
*/
virtual PRUint8 * GetBits() = 0;
/**
* Get the number of bytes needed to get to the next scanline for the pixelmap
* @update - dwc 2/1/99
* @return The number of bytes in each scanline
*/
virtual PRInt32 GetLineStride() = 0;
/**
* Get whether this image has an alpha mask. Preferable to testing
* if GetAlphaBits() is non-null.
* @update - sfraser 10/19/99
* @return PR_TRUE if the image has an alpha mask, PR_FALSE otherwise
*/
virtual PRBool GetHasAlphaMask() = 0;
/**
* Get a pointer to the bits for the alpha mask
* @update - dwc 2/1/99
* @return address of the alpha mask pixel array
*/
virtual PRUint8 * GetAlphaBits() = 0;
/**
* Get the width of the alpha mask
* @update - dwc 2/1/99
* @return The width in pixels
*/
virtual PRInt32 GetAlphaWidth() = 0;
/**
* Get the height of the alpha mask
* @update - dwc 2/1/99
* @return The width in pixels
*/
virtual PRInt32 GetAlphaHeight() = 0;
/**
* Get the number of bytes per scanline for the alpha mask
* @update - dwc 2/1/99
* @return The number of bytes in each scanline
*/
virtual PRInt32 GetAlphaLineStride() = 0;
/**
* Update the nsIImage color table
* @update - dwc 2/1/99
* @param aFlags Used to pass in parameters for the update
* @param aUpdateRect The rectangle to update
*/
virtual void ImageUpdated(nsIDeviceContext *aContext, PRUint8 aFlags, nsRect *aUpdateRect) = 0;
/**
* Returns if the pixelmap has been converted to an optimized pixelmap
* @update - dwc 2/1/99
* @return If true, it is optimized
*/
virtual PRBool IsOptimized() = 0;
/**
* Converted this pixelmap to an optimized pixelmap for the device
* @update - dwc 2/1/99
* @param aContext The device to optimize for
* @return the result of the operation, if NS_OK, then the pixelmap is optimized
*/
virtual nsresult Optimize(nsIDeviceContext* aContext) = 0;
/**
* Get the colormap for the nsIImage
* @update - dwc 2/1/99
* @return if non null, the colormap for the pixelmap,otherwise the image is not color mapped
*/
virtual nsColorMap * GetColorMap() = 0;
/**
* BitBlit the nsIImage to a device, the source can be scaled to the dest
* @update - dwc 2/1/99
* @param aSurface the surface to blit to
* @param aX The destination horizontal location
* @param aY The destination vertical location
* @param aWidth The destination width of the pixelmap
* @param aHeight The destination height of the pixelmap
* @return if TRUE, no errors
*/
NS_IMETHOD Draw(nsIRenderingContext &aContext, nsDrawingSurface aSurface, PRInt32 aX, PRInt32 aY, PRInt32 aWidth, PRInt32 aHeight) = 0;
/**
* BitBlit the nsIImage to a device, the source and dest can be scaled
* @update - dwc 2/1/99
* @param aSurface the surface to blit to
* @param aSX The source width of the pixelmap
* @param aSY The source vertical location
* @param aSWidth The source width of the pixelmap
* @param aSHeight The source height of the pixelmap
* @param aDX The destination horizontal location
* @param aDY The destination vertical location
* @param aDWidth The destination width of the pixelmap
* @param aDHeight The destination height of the pixelmap
* @return if TRUE, no errors
*/
NS_IMETHOD Draw(nsIRenderingContext &aContext, nsDrawingSurface aSurface, PRInt32 aSX, PRInt32 aSY, PRInt32 aSWidth, PRInt32 aSHeight,
PRInt32 aDX, PRInt32 aDY, PRInt32 aDWidth, PRInt32 aDHeight) = 0;
NS_IMETHOD DrawTile(nsIRenderingContext &aContext,
nsDrawingSurface aSurface,
PRInt32 aSXOffset, PRInt32 aSYOffset,
const nsRect &aTileRect) = 0;
/**
* BitBlit the entire (no cropping) nsIImage to another nsImage, the source and dest can be scaled
* @update - saari 03/08/01
* @param aDstImage the nsImage to blit to
* @param aDX The destination horizontal location
* @param aDY The destination vertical location
* @param aDWidth The destination width of the pixelmap
* @param aDHeight The destination height of the pixelmap
* @return if TRUE, no errors
*/
NS_IMETHOD DrawToImage(nsIImage* aDstImage, PRInt32 aDX, PRInt32 aDY, PRInt32 aDWidth, PRInt32 aDHeight) = 0;
/**
* Set the alpha level for the image
* @update - dwc 2/1/99
* @param the alpha level to set for the image, from 0 to 100%
*/
virtual void SetAlphaLevel(PRInt32 aAlphaLevel) = 0;
/**
* Get the alpha level for the image
* @update - dwc 2/1/99
* @return the alpha level for the image, from 0 to 100%
*/
virtual PRInt32 GetAlphaLevel() = 0;
/**
* Get the alpha depth for the image mask
* @update - lordpixel 2001/05/16
* @return the alpha mask depth for the image, ie, 0, 1 or 8
*/
virtual PRInt8 GetAlphaDepth() = 0;
/**
* Return information about the bits for this structure
* @update - dwc 2/1/99
* @return a bitmap info structure for the Device Dependent Bits
*/
virtual void* GetBitInfo() = 0;
/**
* LockImagePixels
* Lock the image pixels so that we can access them directly,
* with safely. May be a noop on some platforms.
*
* aMaskPixels = PR_TRUE for the mask, PR_FALSE for the image
*
* Must be balanced by a call to UnlockImagePixels().
*
* @update - sfraser 10/18/99
* @return error result
*/
NS_IMETHOD LockImagePixels(PRBool aMaskPixels) = 0;
/**
* UnlockImagePixels
* Unlock the image pixels. May be a noop on some platforms.
*
* Should balance an earlier call to LockImagePixels().
*
* aMaskPixels = PR_TRUE for the mask, PR_FALSE for the image
*
* @update - sfraser 10/18/99
* @return error result
*/
NS_IMETHOD UnlockImagePixels(PRBool aMaskPixels) = 0;
//get the color space metrics for this image
//virtual NI_ColorSpec * GetColorSpec() = 0; fix
//get the color which should be considered transparent.
//if this image is color mapped, this value will be an
//index into the color map. hokey? yes, but it avoids
//another silly api or struct.
//virtual nscolor GetTransparentColor() = 0; fix.
};
//change notification API flag bits
#define NS_IMAGE_UPDATE_COLORMAP 1
#define NS_IMAGE_UPDATE_PIXELS 2
#define NS_IMAGE_UPDATE_ALPHA 4
#endif

View File

@@ -1,94 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Patrick C. Beard <beard@netscape.com>
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef nsIPrintingContextMac_h___
#define nsIPrintingContextMac_h___
#include "nsISupports.h"
class nsIPrintSettings;
// 3d5917da-1dd2-11b2-bc7b-aa83823362e0
#define NS_IPRINTING_CONTEXT_IID \
{ 0x3d5917da, 0x1dd2, 0x11b2, \
{ 0xbc, 0x7b, 0xaa, 0x83, 0x82, 0x33, 0x62, 0xe0 } }
class nsIPrintingContext : public nsISupports {
public:
NS_DEFINE_STATIC_IID_ACCESSOR(NS_IPRINTING_CONTEXT_IID)
/**
* Initialize the printing context for use.
* @param aQuiet if PR_TRUE, prevent the need for user intervention
* in obtaining device context spec. if nsnull is passed in for
* the aOldSpec, this will typically result in getting a device
* context spec for the default output device (i.e. default
* printer).
* @return error status
*/
NS_IMETHOD Init(nsIPrintSettings* aPS, PRBool aQuiet) = 0;
/**
* This will tell if the printmanager is currently open
* @update dc 12/03/98
* @param aIsOpen True or False depending if the printmanager is open
* @return error status
*/
NS_IMETHOD PrintManagerOpen(PRBool* aIsOpen) = 0;
/**
* Closes the printmanager if it is open.
* @update dc 12/03/98
* @return error status
*/
NS_IMETHOD ClosePrintManager() = 0;
NS_IMETHOD BeginDocument() = 0;
NS_IMETHOD EndDocument() = 0;
NS_IMETHOD BeginPage() = 0;
NS_IMETHOD EndPage() = 0;
NS_IMETHOD GetPrinterResolution(double* aResolution) = 0;
NS_IMETHOD GetPageRect(double* aTop, double* aLeft, double* aBottom, double* aRight) = 0;
};
#endif /* nsIPrintingContextMac_h___ */

View File

@@ -1,279 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef nsIRegion_h___
#define nsIRegion_h___
#include "nscore.h"
#include "nsISupports.h"
#include "nsRect.h"
enum nsRegionComplexity
{
eRegionComplexity_empty = 0,
eRegionComplexity_rect = 1,
eRegionComplexity_complex = 2
};
typedef struct
{
PRInt32 x;
PRInt32 y;
PRUint32 width;
PRUint32 height;
} nsRegionRect;
typedef struct
{
PRUint32 mNumRects; //number of actual rects in the mRects array
PRUint32 mRectsLen; //length, in rects, of the mRects array
PRUint32 mArea; //area of the covered portion of the region
nsRegionRect mRects[1];
} nsRegionRectSet;
// An implementation of a region primitive that can be used to
// represent arbitrary pixel areas. Probably implemented on top
// of the native region primitive. The assumption is that, at worst,
// it is a rectangle list.
#define NS_IREGION_IID \
{ 0x8ef366e0, 0xee94, 0x11d1, \
{ 0xa8, 0x2a, 0x00, 0x40, 0x95, 0x9a, 0x28, 0xc9 } }
class nsIRegion : public nsISupports
{
public:
NS_DEFINE_STATIC_IID_ACCESSOR(NS_IREGION_IID)
virtual nsresult Init(void) = 0;
/**
* copy operator equivalent that takes another region
*
* @param region to copy
* @return void
*
**/
virtual void SetTo(const nsIRegion &aRegion) = 0;
/**
* copy operator equivalent that takes a rect
*
* @param aX xoffset of rect to set region to
* @param aY yoffset of rect to set region to
* @param aWidth width of rect to set region to
* @param aHeight height of rect to set region to
* @return void
*
**/
virtual void SetTo(PRInt32 aX, PRInt32 aY, PRInt32 aWidth, PRInt32 aHeight) = 0;
/**
* destructively intersect another region with this one
*
* @param region to intersect
* @return void
*
**/
virtual void Intersect(const nsIRegion &aRegion) = 0;
/**
* destructively intersect a rect with this region
*
* @param aX xoffset of rect to intersect with region
* @param aY yoffset of rect to intersect with region
* @param aWidth width of rect to intersect with region
* @param aHeight height of rect to intersect with region
* @return void
*
**/
virtual void Intersect(PRInt32 aX, PRInt32 aY, PRInt32 aWidth, PRInt32 aHeight) = 0;
/**
* destructively union another region with this one
*
* @param region to union
* @return void
*
**/
virtual void Union(const nsIRegion &aRegion) = 0;
/**
* destructively union a rect with this region
*
* @param aX xoffset of rect to union with region
* @param aY yoffset of rect to union with region
* @param aWidth width of rect to union with region
* @param aHeight height of rect to union with region
* @return void
*
**/
virtual void Union(PRInt32 aX, PRInt32 aY, PRInt32 aWidth, PRInt32 aHeight) = 0;
/**
* destructively subtract another region with this one
*
* @param region to subtract
* @return void
*
**/
virtual void Subtract(const nsIRegion &aRegion) = 0;
/**
* destructively subtract a rect from this region
*
* @param aX xoffset of rect to subtract with region
* @param aY yoffset of rect to subtract with region
* @param aWidth width of rect to subtract with region
* @param aHeight height of rect to subtract with region
* @return void
*
**/
virtual void Subtract(PRInt32 aX, PRInt32 aY, PRInt32 aWidth, PRInt32 aHeight) = 0;
/**
* is this region empty? i.e. does it contain any pixels
*
* @param none
* @return returns whether the region is empty
*
**/
virtual PRBool IsEmpty(void) = 0;
/**
* == operator equivalent i.e. do the regions contain exactly
* the same pixels
*
* @param region to compare
* @return whether the regions are identical
*
**/
virtual PRBool IsEqual(const nsIRegion &aRegion) = 0;
/**
* returns the bounding box of the region i.e. the smallest
* rectangle that completely contains the region.
*
* @param aX out parameter for xoffset of bounding rect for region
* @param aY out parameter for yoffset of bounding rect for region
* @param aWidth out parameter for width of bounding rect for region
* @param aHeight out parameter for height of bounding rect for region
* @return void
*
**/
virtual void GetBoundingBox(PRInt32 *aX, PRInt32 *aY, PRInt32 *aWidth, PRInt32 *aHeight) = 0;
/**
* offsets the region in x and y
*
* @param xoffset pixel offset in x
* @param yoffset pixel offset in y
* @return void
*
**/
virtual void Offset(PRInt32 aXOffset, PRInt32 aYOffset) = 0;
/**
* does the region intersect the rectangle?
*
* @param rect to check for containment
* @return true if the region intersects the rect
*
**/
virtual PRBool ContainsRect(PRInt32 aX, PRInt32 aY, PRInt32 aWidth, PRInt32 aHeight) = 0;
/**
* get the set of rects which make up this region. the aRects
* parameter must be freed by calling FreeRects before the region
* is deleted. aRects may be passed in again when requesting
* the rect list as a recycling method.
*
* @param aRects out parameter containing set of rects
* comprising the region
* @return error status
*
**/
NS_IMETHOD GetRects(nsRegionRectSet **aRects) = 0;
/**
* Free a rect set returned by GetRects.
*
* @param aRects rects to free
* @return error status
*
**/
NS_IMETHOD FreeRects(nsRegionRectSet *aRects) = 0;
/**
* Get the native region that this nsIRegion represents.
* @param aRegion out parameter for native region handle
* @return error status
**/
NS_IMETHOD GetNativeRegion(void *&aRegion) const = 0;
/**
* Get the complexity of the region as defined by the
* nsRegionComplexity enum.
* @param aComplexity out parameter for region complexity
* @return error status
**/
NS_IMETHOD GetRegionComplexity(nsRegionComplexity &aComplexity) const = 0;
/**
* get the number of rects which make up this region.
*
* @param aRects out parameter containing the number of rects
* comprising the region
* @return error status
*
**/
NS_IMETHOD GetNumRects(PRUint32 *aRects) const = 0;
};
#endif // nsIRegion_h___

File diff suppressed because it is too large Load Diff

View File

@@ -1,80 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Mozilla Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is the Mozilla browser.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1999 Netscape Communications Corporation. All
* Rights Reserved.
*
* Original Author: David W. Hyatt (hyatt@netscape.com)
*
* Contributors:
*/
#include "nsISupports.h"
#include "nsCOMPtr.h"
#include "nsColor.h"
struct nsRect;
struct nsSize;
struct nsFont;
struct nsMargin;
class nsIPresContext;
class nsIRenderingContext;
class nsIDeviceContext;
class nsIFrame;
class nsIAtom;
// IID for the nsITheme interface
// {F791038C-F97E-4068-A542-0343AE440664}
#define NS_ITHEME_IID \
{ 0xf791038c, 0xf97e, 0x4068, { 0xa5, 0x42, 0x3, 0x43, 0xae, 0x44, 0x6, 0x64 } }
// {D930E29B-6909-44e5-AB4B-AF10D6923705}
#define NS_THEMERENDERER_CID \
{ 0xd930e29b, 0x6909, 0x44e5, { 0xab, 0x4b, 0xaf, 0x10, 0xd6, 0x92, 0x37, 0x5 } }
class nsITheme: public nsISupports {
public:
static const nsIID& GetIID() { static nsIID iid = NS_ITHEME_IID; return iid; }
NS_IMETHOD DrawWidgetBackground(nsIRenderingContext* aContext,
nsIFrame* aFrame,
PRUint8 aWidgetType,
const nsRect& aRect,
const nsRect& aClipRect)=0;
NS_IMETHOD GetWidgetBorder(nsIDeviceContext* aContext,
nsIFrame* aFrame,
PRUint8 aWidgetType,
nsMargin* aResult)=0;
NS_IMETHOD GetMinimumWidgetSize(nsIRenderingContext* aContext, nsIFrame* aFrame,
PRUint8 aWidgetType,
nsSize* aResult,
PRBool* aIsOverridable)=0;
NS_IMETHOD WidgetStateChanged(nsIFrame* aFrame, PRUint8 aWidgetType,
nsIAtom* aAttribute, PRBool* aShouldRepaint)=0;
NS_IMETHOD ThemeChanged()=0;
virtual PRBool ThemeSupportsWidget(nsIPresContext* aPresContext,
PRUint8 aWidgetType)=0;
virtual PRBool WidgetIsContainer(PRUint8 aWidgetType)=0;
};
// Creator function
extern NS_METHOD NS_NewNativeTheme(nsISupports *aOuter, REFNSIID aIID, void **aResult);

View File

@@ -1,91 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef NSMARGIN_H
#define NSMARGIN_H
#include "nsCoord.h"
struct nsMargin {
nscoord left, top, right, bottom;
// Constructors
nsMargin() {}
nsMargin(const nsMargin& aMargin) {*this = aMargin;}
nsMargin(nscoord aLeft, nscoord aTop,
nscoord aRight, nscoord aBottom) {left = aLeft; top = aTop;
right = aRight; bottom = aBottom;}
void SizeTo(nscoord aLeft, nscoord aTop,
nscoord aRight, nscoord aBottom) {left = aLeft; top = aTop;
right = aRight; bottom = aBottom;}
void SizeBy(nscoord aLeft, nscoord aTop,
nscoord aRight, nscoord aBottom) {left += aLeft; top += aTop;
right += aRight; bottom += aBottom;}
// Overloaded operators. Note that '=' isn't defined so we'll get the
// compiler generated default assignment operator
PRBool operator==(const nsMargin& aMargin) const {
return (PRBool) ((left == aMargin.left) && (top == aMargin.top) &&
(right == aMargin.right) && (bottom == aMargin.bottom));
}
PRBool operator!=(const nsMargin& aMargin) const {
return (PRBool) ((left != aMargin.left) || (top != aMargin.top) ||
(right != aMargin.right) || (bottom != aMargin.bottom));
}
nsMargin operator+(const nsMargin& aMargin) const {
return nsMargin(left + aMargin.left, top + aMargin.top,
right + aMargin.right, bottom + aMargin.bottom);
}
nsMargin operator-(const nsMargin& aMargin) const {
return nsMargin(left - aMargin.left, top - aMargin.top,
right - aMargin.right, bottom - aMargin.bottom);
}
nsMargin& operator+=(const nsMargin& aMargin) {left += aMargin.left;
top += aMargin.top;
right += aMargin.right;
bottom += aMargin.bottom;
return *this;}
nsMargin& operator-=(const nsMargin& aMargin) {left -= aMargin.left;
top -= aMargin.top;
right -= aMargin.right;
bottom -= aMargin.bottom;
return *this;}
};
#endif /* NSMARGIN_H */

View File

@@ -1,141 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef NSPOINT_H
#define NSPOINT_H
#include "nsCoord.h"
struct nsPoint {
nscoord x, y;
// Constructors
nsPoint() {}
nsPoint(const nsPoint& aPoint) {x = aPoint.x; y = aPoint.y;}
nsPoint(nscoord aX, nscoord aY) {x = aX; y = aY;}
void MoveTo(nscoord aX, nscoord aY) {x = aX; y = aY;}
void MoveBy(nscoord aDx, nscoord aDy) {x += aDx; y += aDy;}
// Overloaded operators. Note that '=' isn't defined so we'll get the
// compiler generated default assignment operator
PRBool operator==(const nsPoint& aPoint) const {
return (PRBool) ((x == aPoint.x) && (y == aPoint.y));
}
PRBool operator!=(const nsPoint& aPoint) const {
return (PRBool) ((x != aPoint.x) || (y != aPoint.y));
}
nsPoint operator+(const nsPoint& aPoint) const {
return nsPoint(x + aPoint.x, y + aPoint.y);
}
nsPoint operator-(const nsPoint& aPoint) const {
return nsPoint(x - aPoint.x, y - aPoint.y);
}
nsPoint& operator+=(const nsPoint& aPoint) {
x += aPoint.x;
y += aPoint.y;
return *this;
}
nsPoint& operator-=(const nsPoint& aPoint) {
x -= aPoint.x;
y -= aPoint.y;
return *this;
}
};
/** ---------------------------------------------------
* A point structure with floats for the Quadratic bezier curve
* @update 4/27/2000 dwc
*/
struct nsFloatPoint {
float x, y;
// Constructors
nsFloatPoint() {}
nsFloatPoint(const nsFloatPoint& aPoint) {x = aPoint.x; y = aPoint.y;}
nsFloatPoint(float aX, float aY) {x = aX; y = aY;}
void MoveTo(float aX, float aY) {x = aX; y = aY;}
void MoveTo(nscoord aX, nscoord aY) {x = (float)aX; y = (float)aY;}
void MoveBy(float aDx, float aDy) {x += aDx; y += aDy;}
// Overloaded operators. Note that '=' isn't defined so we'll get the
// compiler generated default assignment operator
PRBool operator==(const nsFloatPoint& aPoint) const {
return (PRBool) ((x == aPoint.x) && (y == aPoint.y));
}
PRBool operator!=(const nsFloatPoint& aPoint) const {
return (PRBool) ((x != aPoint.x) || (y != aPoint.y));
}
nsFloatPoint operator+(const nsFloatPoint& aPoint) const {
return nsFloatPoint(x + aPoint.x, y + aPoint.y);
}
nsFloatPoint operator-(const nsFloatPoint& aPoint) const {
return nsFloatPoint(x - aPoint.x, y - aPoint.y);
}
nsFloatPoint& operator+=(const nsFloatPoint& aPoint) {
x += aPoint.x;
y += aPoint.y;
return *this;
}
nsFloatPoint& operator-=(const nsFloatPoint& aPoint) {
x -= aPoint.x;
y -= aPoint.y;
return *this;
}
};
/** ---------------------------------------------------
* A special type of point which also add the capability to tell if a point is on
* the curve.. or off of the curve for a path
* @update 03/29/00 dwc
*/
struct nsPathPoint: public nsFloatPoint{
PRBool mIsOnCurve;
// Constructors
nsPathPoint() {}
nsPathPoint(const nsPathPoint& aPoint) {x = aPoint.x; y = aPoint.y;mIsOnCurve=aPoint.mIsOnCurve;}
nsPathPoint(float aX, float aY) {x = aX; y = aY;mIsOnCurve=PR_TRUE;}
nsPathPoint(float aX, float aY,PRBool aIsOnCurve) {x = aX; y = aY;mIsOnCurve=aIsOnCurve;}
};
#endif /* NSPOINT_H */

View File

@@ -1,152 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef NSRECT_H
#define NSRECT_H
#include <stdio.h>
#include "nsCoord.h"
#include "nsPoint.h"
#include "nsSize.h"
#include "nsMargin.h"
#include "nsUnitConversion.h"
struct NS_GFX nsRect {
nscoord x, y;
nscoord width, height;
// Constructors
nsRect() : x(0), y(0), width(0), height(0) {}
nsRect(const nsRect& aRect) {*this = aRect;}
nsRect(const nsPoint& aOrigin, const nsSize &aSize) {x = aOrigin.x; y = aOrigin.y;
width = aSize.width; height = aSize.height;}
nsRect(nscoord aX, nscoord aY, nscoord aWidth, nscoord aHeight) {x = aX; y = aY;
width = aWidth; height = aHeight;}
// Emptiness. An empty rect is one that has no area, i.e. its height or width
// is <= 0
PRBool IsEmpty() const {
return (PRBool) ((height <= 0) || (width <= 0));
}
void Empty() {width = height = 0;}
// Containment
PRBool Contains(const nsRect& aRect) const;
PRBool Contains(nscoord aX, nscoord aY) const;
PRBool Contains(const nsPoint& aPoint) const {return Contains(aPoint.x, aPoint.y);}
// Intersection. Returns TRUE if the receiver overlaps aRect and
// FALSE otherwise
PRBool Intersects(const nsRect& aRect) const;
// Computes the area in which aRect1 and aRect2 overlap, and fills 'this' with
// the result. Returns FALSE if the rectangles don't intersect, and sets 'this'
// rect to be an empty rect.
//
// 'this' can be the same object as either aRect1 or aRect2
PRBool IntersectRect(const nsRect& aRect1, const nsRect& aRect2);
// Computes the smallest rectangle that contains both aRect1 and aRect2 and
// fills 'this' with the result. Returns FALSE and sets 'this' rect to be an
// empty rect if both aRect1 and aRect2 are empty
//
// 'this' can be the same object as either aRect1 or aRect2
PRBool UnionRect(const nsRect& aRect1, const nsRect& aRect2);
// Accessors
void SetRect(nscoord aX, nscoord aY, nscoord aWidth, nscoord aHeight) {
x = aX; y = aY; width = aWidth; height = aHeight;
}
void MoveTo(nscoord aX, nscoord aY) {x = aX; y = aY;}
void MoveTo(const nsPoint& aPoint) {x = aPoint.x; y = aPoint.y;}
void MoveBy(nscoord aDx, nscoord aDy) {x += aDx; y += aDy;}
void SizeTo(nscoord aWidth, nscoord aHeight) {width = aWidth; height = aHeight;}
void SizeTo(const nsSize& aSize) {SizeTo(aSize.width, aSize.height);}
void SizeBy(nscoord aDeltaWidth, nscoord aDeltaHeight) {width += aDeltaWidth;
height += aDeltaHeight;}
// Inflate the rect by the specified width/height or margin
void Inflate(nscoord aDx, nscoord aDy);
void Inflate(const nsSize& aSize) {Inflate(aSize.width, aSize.height);}
void Inflate(const nsMargin& aMargin);
// Deflate the rect by the specified width/height or margin
void Deflate(nscoord aDx, nscoord aDy);
void Deflate(const nsSize& aSize) {Deflate(aSize.width, aSize.height);}
void Deflate(const nsMargin& aMargin);
// Overloaded operators. Note that '=' isn't defined so we'll get the
// compiler generated default assignment operator.
PRBool operator==(const nsRect& aRect) const {
return (PRBool) ((IsEmpty() && aRect.IsEmpty()) ||
((x == aRect.x) && (y == aRect.y) &&
(width == aRect.width) && (height == aRect.height)));
}
PRBool operator!=(const nsRect& aRect) const {
return (PRBool) !operator==(aRect);
}
nsRect operator+(const nsRect& aRect) const {
return nsRect(x + aRect.x, y + aRect.y,
width + aRect.width, height + aRect.height);
}
nsRect operator-(const nsRect& aRect) const {
return nsRect(x - aRect.x, y - aRect.y,
width - aRect.width, height - aRect.height);
}
nsRect& operator+=(const nsPoint& aPoint) {x += aPoint.x; y += aPoint.y; return *this;}
nsRect& operator-=(const nsPoint& aPoint) {x -= aPoint.x; y -= aPoint.y; return *this;}
nsRect& operator*=(const float aScale) {x = NSToCoordRound(x * aScale);
y = NSToCoordRound(y * aScale);
width = NSToCoordRound(width * aScale);
height = NSToCoordRound(height * aScale);
return *this;}
nsRect& ScaleRoundOut(const float aScale);
nsRect& ScaleRoundIn(const float aScale);
// Helper methods for computing the extents
nscoord XMost() const {return x + width;}
nscoord YMost() const {return y + height;}
};
// Diagnostics
extern NS_GFX FILE* operator<<(FILE* out, const nsRect& rect);
#endif /* NSRECT_H */

View File

@@ -1,299 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef nsRenderingContextImpl_h___
#define nsRenderingContextImpl_h___
#include "nsIRenderingContext.h"
#include "nsPoint.h"
#include "nsSize.h"
typedef struct {
double x; // x coordinate of edge's intersection with current scanline */
double dx; // change in x with respect to y
int i; // edge number: edge i goes from mPointList[i] to mPointList[i+1]
} Edge;
class NS_GFX nsRenderingContextImpl : public nsIRenderingContext
{
// CLASS MEMBERS
public:
protected:
nsTransform2D *mTranMatrix; // The rendering contexts transformation matrix
nsLineStyle mLineStyle; // The current linestyle, currenly used on mac, other platfroms to follow
int mAct; // number of active edges
Edge *mActive; // active edge list:edges crossing scanline y
public:
nsRenderingContextImpl();
// CLASS METHODS
/**
* Gets the Pen Mode for the RenderingContext
* @param aPenMode The Pen Mode to be retrieved
* @return NS_OK if the Pen Mode is correctly retrieved
*/
NS_IMETHOD GetPenMode(nsPenMode &aPenMode) { return NS_ERROR_FAILURE;}
/**
* Sets the Pen Mode for the RenderingContext
* @param aPenMode The Pen Mode
* @return NS_OK if the Pen Mode is correctly set
*/
NS_IMETHOD SetPenMode(nsPenMode aPenMode) { return NS_ERROR_FAILURE;};
/** ---------------------------------------------------
* See documentation in nsIRenderingContext.h
* @update 03/29/00 dwc
*/
NS_IMETHOD DrawPath(nsPathPoint aPointArray[],PRInt32 aNumPts);
/** ---------------------------------------------------
* See documentation in nsIRenderingContext.h
* @update 03/29/00 dwc
*/
NS_IMETHOD FillPath(nsPathPoint aPointArray[],PRInt32 aNumPts);
/**
* Fill a poly in the current foreground color
* @param aPoints points to use for the drawing, last must equal first
* @param aNumPonts number of points in the polygon
*/
NS_IMETHOD RasterPolygon(const nsPoint aPoints[], PRInt32 aNumPoints);
/** ---------------------------------------------------
* See documentation in nsIRenderingContext.h
* @update 05/01/00 dwc
*/
NS_IMETHOD DrawStdLine(nscoord aX0, nscoord aY0, nscoord aX1, nscoord aY1) { return NS_OK;}
/** ---------------------------------------------------
* See documentation in nsIRenderingContext.h
* @update 05/01/00 dwc
*/
NS_IMETHOD FillStdPolygon(const nsPoint aPoints[], PRInt32 aNumPoints) { return NS_OK; }
NS_IMETHOD GetBackbuffer(const nsRect &aRequestedSize, const nsRect &aMaxSize, nsDrawingSurface &aBackbuffer);
NS_IMETHOD ReleaseBackbuffer(void);
NS_IMETHOD DestroyCachedBackbuffer(void);
#ifdef IBMBIDI
/**
* Let the device context know whether we want text reordered with
* right-to-left base direction
*/
NS_IMETHOD SetRightToLeftText(PRBool aIsRTL);
#endif // IBMBIDI
#ifdef USE_IMG2
NS_IMETHOD DrawImage(imgIContainer *aImage, const nsRect * aSrcRect, const nsPoint * aDestPoint);
NS_IMETHOD DrawScaledImage(imgIContainer *aImage, const nsRect * aSrcRect, const nsRect * aDestRect);
NS_IMETHOD DrawTile(imgIContainer *aImage, nscoord aXOffset, nscoord aYOffset, const nsRect * aTargetRect);
NS_IMETHOD DrawScaledTile(imgIContainer *aImage, nscoord aXOffset, nscoord aYOffset, nscoord aTileWidth, nscoord aTileHeight, const nsRect * aTargetRect);
#endif
protected:
virtual ~nsRenderingContextImpl();
/** ---------------------------------------------------
* Check to see if the given size of tile can be imaged by the RenderingContext
* @update 03/29/00 dwc
* @param aWidth The width of the tile
* @param aHeight The height of the tile
* @return PR_TRUE the RenderingContext can handle this tile
*/
virtual PRBool CanTile(nscoord aWidth,nscoord aHeight) { return PR_FALSE; }
/** ---------------------------------------------------
* A bit blitter to tile images to the background recursively
* @update 3/29/00 dwc
* @param aDS -- Target drawing surface for the rendering context
* @param aSrcRect -- Rectangle we are build with the image
* @param aHeight -- height of the tile
* @param aWidth -- width of the tile
*/
void TileImage(nsDrawingSurface aDS,nsRect &aSrcRect,PRInt16 aWidth,PRInt16 aHeight);
void cdelete(int i);
void cinsert(int i,int y,const nsPoint aPointArray[],PRInt32 aNumPts);
/**
* Determine if a rect's width and height will fit within a specified width and height
* @param aRect rectangle to test
* @param aWidth width to determine if the rectangle's width will fit within
* @param aHeight height to determine if the rectangles height will fit within
* @returns PR_TRUE if the rect width and height fits with aWidth, aHeight, PR_FALSE
* otherwise.
*/
PRBool RectFitsInside(const nsRect& aRect, PRInt32 aWidth, PRInt32 aHeight) const;
/**
* Determine if two rectangles width and height will fit within a specified width and height
* @param aRect1 first rectangle to test
* @param aRect1 second rectangle to test
* @param aWidth width to determine if both rectangle's width will fit within
* @param aHeight height to determine if both rectangles height will fit within
* @returns PR_TRUE if the rect1's and rect2's width and height fits with aWidth,
* aHeight, PR_FALSE otherwise.
*/
PRBool BothRectsFitInside(const nsRect& aRect1, const nsRect& aRect2, PRInt32 aWidth, PRInt32 aHeight, nsRect& aNewSize) const;
/**
* Return an offscreen surface size from a set of discrete surface sizes.
* The smallest discrete surface size that can enclose both the Maximum widget
* size (@see GetMaxWidgetBounds) and the requested size is returned.
*
* @param aMaxBackbufferSize Maximum size that may be requested for the backbuffer
* @param aRequestedSize Requested size for the offscreen.
* @param aSurfaceSize contains the surface size
*/
void CalculateDiscreteSurfaceSize(const nsRect& aMaxBackbufferSize, const nsRect& aRequestedSize, nsRect& aSize);
/**
* Get the size of the offscreen drawing surface..
*
* @param aMaxBackbufferSize Maximum size that may be requested for the backbuffer
* @param aRequestedSize Desired size for the offscreen.
* @param aSurfaceSize Offscreen adjusted to a discrete size which encloses aRequestedSize.
*/
void GetDrawingSurfaceSize(const nsRect& aMaxBackbufferSize, const nsRect& aRequestedSize, nsRect& aSurfaceSize);
/**
* Utility method used to implement NS_IMETHOD GetBackbuffer
*
* @param aRequestedSize size of the backbuffer area requested
* @param aMaxSize maximum size that may be requested for the backbuffer
* @param aBackbuffer drawing surface used as the backbuffer
* @param aCacheBackbuffer PR_TRUE then the backbuffer will be cached, if PR_FALSE it is created each time
*/
nsresult AllocateBackbuffer(const nsRect &aRequestedSize, const nsRect &aMaxSize, nsDrawingSurface &aBackbuffer, PRBool aCacheBackbuffer);
public:
protected:
nsPenMode mPenMode;
private:
static nsDrawingSurface gBackbuffer; //singleton backbuffer
static nsRect gBackbufferBounds; //backbuffer bounds
// Largest requested offscreen size if larger than a full screen.
static nsSize gLargestRequestedSize;
};
/** ---------------------------------------------------
* Class QBezierCurve, a quadratic bezier curve
* @update 4/27/2000 dwc
*/
class QBezierCurve
{
public:
nsFloatPoint mAnc1;
nsFloatPoint mCon;
nsFloatPoint mAnc2;
QBezierCurve() {mAnc1.x=0;mAnc1.y=0;mCon=mAnc2=mAnc1;}
void SetControls(nsFloatPoint &aAnc1,nsFloatPoint &aCon,nsFloatPoint &aAnc2) { mAnc1 = aAnc1; mCon = aCon; mAnc2 = aAnc2;}
void SetPoints(nscoord a1x,nscoord a1y,nscoord acx,nscoord acy,nscoord a2x,nscoord a2y) {mAnc1.MoveTo(a1x,a1y),mCon.MoveTo(acx,acy),mAnc2.MoveTo(a2x,a2y);}
void SetPoints(float a1x,float a1y,float acx,float acy,float a2x,float a2y) {mAnc1.MoveTo(a1x,a1y),mCon.MoveTo(acx,acy),mAnc2.MoveTo(a2x,a2y);}
void DebugPrint();
/** ---------------------------------------------------
* Divide a Quadratic curve into line segments if it is not smaller than a certain size
* else it is so small that it can be approximated by 2 lineto calls
* @param aRenderingContext -- The RenderingContext to use to draw with
* @update 3/26/99 dwc
*/
void SubDivide(nsIRenderingContext *aRenderingContext);
/** ---------------------------------------------------
* Divide a Quadratic curve into line segments if it is not smaller than a certain size
* else it is so small that it can be approximated by 2 lineto calls
* @param nsPoint* -- The points array to rasterize into
* @param aNumPts* -- Current number of points in this array
* @update 3/26/99 dwc
*/
void SubDivide(nsPoint aThePoints[],PRInt16 *aNumPts);
/** ---------------------------------------------------
* Divide a Quadratic Bezier curve at the mid-point
* @update 3/26/99 dwc
* @param aCurve1 -- Curve 1 as a result of the division
* @param aCurve2 -- Curve 2 as a result of the division
*/
void MidPointDivide(QBezierCurve *A,QBezierCurve *B);
};
enum eSegType {eUNDEF,eLINE,eQCURVE,eCCURVE};
/** ---------------------------------------------------
* A class to iterate through a nsPathPoint array and return segments
* @update 04/27/00 dwc
*/
class nsPathIter {
public:
enum eSegType {eUNDEF,eLINE,eQCURVE,eCCURVE};
private:
PRUint32 mCurPoint;
PRUint32 mNumPoints;
nsPathPoint *mThePath;
public:
nsPathIter();
nsPathIter(nsPathPoint* aThePath,PRUint32 aNumPts);
PRBool NextSeg(QBezierCurve& TheSegment,eSegType& aCurveType);
};
#endif /* nsRenderingContextImpl */

View File

@@ -1,82 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef nsRepeater_h___
#define nsRepeater_h___
#include "nscore.h"
class EventRecord;
class NS_WIDGET Repeater
{
public:
Repeater();
virtual ~Repeater();
virtual void RepeatAction(const EventRecord &aMacEvent) {}
virtual void IdleAction(const EventRecord &aMacEvent) {}
void StartRepeating();
void StopRepeating();
void StartIdling();
void StopIdling();
static void DoRepeaters(const EventRecord &aMacEvent);
static void DoIdlers(const EventRecord &aMacEvent);
protected:
void AddToRepeatList();
void RemoveFromRepeatList();
void AddToIdleList();
void RemoveFromIdleList();
static Repeater* sRepeaters;
static Repeater* sIdlers;
bool mRepeating;
bool mIdling;
Repeater* mPrevRptr;
Repeater* mNextRptr;
Repeater* mPrevIdlr;
Repeater* mNextIdlr;
};
#endif

View File

@@ -1,81 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef NSSIZE_H
#define NSSIZE_H
#include "nsCoord.h"
// Maximum allowable size
#define NS_MAXSIZE nscoord(1 << 30)
struct nsSize {
nscoord width, height;
// Constructors
nsSize() {}
nsSize(const nsSize& aSize) {width = aSize.width; height = aSize.height;}
nsSize(nscoord aWidth, nscoord aHeight) {width = aWidth; height = aHeight;}
void SizeTo(nscoord aWidth, nscoord aHeight) {width = aWidth; height = aHeight;}
void SizeBy(nscoord aDeltaWidth, nscoord aDeltaHeight) {width += aDeltaWidth;
height += aDeltaHeight;}
// Overloaded operators. Note that '=' isn't defined so we'll get the
// compiler generated default assignment operator
PRBool operator==(const nsSize& aSize) const {
return (PRBool) ((width == aSize.width) && (height == aSize.height));
}
PRBool operator!=(const nsSize& aSize) const {
return (PRBool) ((width != aSize.width) || (height != aSize.height));
}
nsSize operator+(const nsSize& aSize) const {
return nsSize(width + aSize.width, height + aSize.height);
}
nsSize operator-(const nsSize& aSize) const {
return nsSize(width - aSize.width, height - aSize.height);
}
nsSize& operator+=(const nsSize& aSize) {width += aSize.width;
height += aSize.height;
return *this;}
nsSize& operator-=(const nsSize& aSize) {width -= aSize.width;
height -= aSize.height;
return *this;}
};
#endif /* NSSIZE_H */

View File

@@ -1,178 +0,0 @@
// No appearance at all.
#define NS_THEME_NONE 0
// A typical dialog button.
#define NS_THEME_BUTTON 1
// A radio element within a radio group.
#define NS_THEME_RADIO 2
// A checkbox element.
#define NS_THEME_CHECKBOX 3
// The toolbox that contains the toolbars.
#define NS_THEME_TOOLBOX 11
// A toolbar in an application window.
#define NS_THEME_TOOLBAR 12
// A single toolbar button (with no associated dropdown)
#define NS_THEME_TOOLBAR_BUTTON 13
// A dual toolbar button (e.g., a Back button with a dropdown)
#define NS_THEME_TOOLBAR_DUAL_BUTTON 14
// The dropdown portion of a dual toolbar button
#define NS_THEME_TOOLBAR_DUAL_BUTTON_DROPDOWN 15
// A separator. Can be horizontal or vertical.
#define NS_THEME_TOOLBAR_SEPARATOR 16
// The gripper for a toolbar.
#define NS_THEME_TOOLBAR_GRIPPER 17
// A status bar in a main application window.
#define NS_THEME_STATUSBAR 21
// A single pane of a status bar.
#define NS_THEME_STATUSBAR_PANEL 22
// The resizer background area in a status bar
// for the resizer widget in the corner of a window.
#define NS_THEME_STATUSBAR_RESIZER_PANEL 23
// The resizer itself.
#define NS_THEME_RESIZER 24
// List boxes
#define NS_THEME_LISTBOX 31
// A listbox item
#define NS_THEME_LISTBOX_LISTITEM 32
// A tree widget
#define NS_THEME_TREEVIEW 41
// A tree item
#define NS_THEME_TREEVIEW_TREEITEM 42
// A tree widget twisty
#define NS_THEME_TREEVIEW_TWISTY 43
// A tree widget branch line
#define NS_THEME_TREEVIEW_LINE 44
// A listbox or tree widget header
#define NS_THEME_TREEVIEW_HEADER 45
// An individual header cell
#define NS_THEME_TREEVIEW_HEADER_CELL 46
// The sort arrow for a header.
#define NS_THEME_TREEVIEW_HEADER_SORTARROW 47
// Open tree widget twisty
#define NS_THEME_TREEVIEW_TWISTY_OPEN 48
// A horizontal progress bar.
#define NS_THEME_PROGRESSBAR 51
// The progress bar's progress indicator
#define NS_THEME_PROGRESSBAR_CHUNK 52
// A vertical progress bar.
#define NS_THEME_PROGRESSBAR_VERTICAL 53
// A vertical progress chunk
#define NS_THEME_PROGRESSBAR_CHUNK_VERTICAL 54
// A single tab in a tab widget.
#define NS_THEME_TAB 61
// A single pane (inside the tabpanels container)
#define NS_THEME_TAB_PANEL 62
// The tab just before the selection
#define NS_THEME_TAB_LEFT_EDGE 63
// The tab just after the selection
#define NS_THEME_TAB_RIGHT_EDGE 64
// The tab panels container.
#define NS_THEME_TAB_PANELS 65
// A tooltip
#define NS_THEME_TOOLTIP 71
// A spin control (up/down control for time/date pickers)
#define NS_THEME_SPINNER 72
// The up button of a spin control
#define NS_THEME_SPINNER_UP_BUTTON 73
// The down button of a spin control
#define NS_THEME_SPINNER_DOWN_BUTTON 74
// A scrollbar.
#define NS_THEME_SCROLLBAR 81
// A scrollbar button (up/down/left/right)
#define NS_THEME_SCROLLBAR_BUTTON_UP 82
#define NS_THEME_SCROLLBAR_BUTTON_DOWN 83
#define NS_THEME_SCROLLBAR_BUTTON_LEFT 84
#define NS_THEME_SCROLLBAR_BUTTON_RIGHT 85
// The scrollbar track
#define NS_THEME_SCROLLBAR_TRACK_HORIZONTAL 86
#define NS_THEME_SCROLLBAR_TRACK_VERTICAL 87
// The scrollbar thumb
#define NS_THEME_SCROLLBAR_THUMB_HORIZONTAL 88
#define NS_THEME_SCROLLBAR_THUMB_VERTICAL 89
// The gripper that goes on the thumb
#define NS_THEME_SCROLLBAR_GRIPPER_HORIZONTAL 90
#define NS_THEME_SCROLLBAR_GRIPPER_VERTICAL 91
// A textfield or text area
#define NS_THEME_TEXTFIELD 95
// The caret of a text area
#define NS_THEME_TEXTFIELD_CARET 96
// A dropdown list.
#define NS_THEME_DROPDOWN 101
// The dropdown button(s) that open up a dropdown list.
#define NS_THEME_DROPDOWN_BUTTON 102
// The text part of a dropdown list, to left of button
#define NS_THEME_DROPDOWN_TEXT 103
// A slider
#define NS_THEME_SLIDER 111
// A slider's thumb
#define NS_THEME_SLIDER_THUMB 112
// If the platform supports it, the left/right chunks
// of the slider thumb
#define NS_THEME_SLIDER_THUMB_START 113
#define NS_THEME_SLIDER_THUMB_END 114
// The ticks for a slider.
#define NS_THEME_SLIDER_TICK 115
// A generic container that always repaints on state
// changes. This is a hack to make checkboxes and
// radio buttons work.
#define NS_THEME_CHECKBOX_CONTAINER 200
#define NS_THEME_RADIO_CONTAINER 201
// Window and dialog backgrounds
#define NS_THEME_WINDOW 250
#define NS_THEME_DIALOG 251
// Menu and Menu Bar backgrounds
#define NS_THEME_MENU 260
#define NS_THEME_MENUBAR 261

View File

@@ -1,256 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef nsTransform2D_h___
#define nsTransform2D_h___
#include "nscore.h"
#include "nsCoord.h"
#include "nsUnitConversion.h"
#define MG_2DIDENTITY 0
#define MG_2DTRANSLATION 1
#define MG_2DSCALE 2
#define MG_2DGENERAL 4
class NS_GFX nsTransform2D
{
private:
//accelerators
float m00, m01, m10, m11, m20, m21;
PRUint16 type;
public:
//constructors
nsTransform2D(void) { SetToIdentity(); }
nsTransform2D(nsTransform2D *aTransform2D) { SetMatrix(aTransform2D); }
//destructor
~nsTransform2D(void) { }
/**
* get the type of this transform
*
* @param
* @return type from above set
* @exception
* @author michaelp 09-25-97 1:56pm
**/
PRUint16 GetType(void) { return type; }
/**
* set this transform to identity
*
* @param
* @exception
* @author michaelp 09-25-97 1:56pm
**/
void SetToIdentity(void) { m01 = m10 = m20 = m21 = 0.0f; m00 = m11 = 1.0f; type = MG_2DIDENTITY; }
/**
* set this transform to a scale
*
* @param sx, x scale
* @param sy, y scale
* @exception
* @author michaelp 09-25-97 1:56pm
**/
void SetToScale(float sx, float sy);
/**
* set this transform to a translation
*
* @param tx, x translation
* @param ty, y translation
* @exception
* @author michaelp 09-25-97 1:56pm
**/
void SetToTranslate(float tx, float ty);
/**
* get the translation portion of this transform
*
* @param pt, Point to return translation values in
* @exception
* @author michaelp 09-25-97 1:56pm
**/
void GetTranslation(float *ptX, float *ptY) { *ptX = m20; *ptY = m21; }
void GetTranslationCoord(nscoord *ptX, nscoord *ptY) { *ptX = NSToCoordRound(m20); *ptY = NSToCoordRound(m21); }
/**
* set the translation portion of this transform
*
* @param tx, x translation
* @param ty, y translation
* @exception
**/
void SetTranslation(float tX, float tY) {
m20 = tX;
m21 = tY;
type |= MG_2DTRANSLATION;
}
/**
* get the X translation portion of this transform
*
* @param
* @returns x component of translation
* @exception
**/
float GetXTranslation(void) { return m20; }
nscoord GetXTranslationCoord(void) { return NSToCoordRound(m20); }
/**
* get the Y translation portion of this transform
*
* @param
* @returns y component of translation
* @exception
**/
float GetYTranslation(void) { return m21; }
nscoord GetYTranslationCoord(void) { return NSToCoordRound(m21); }
/**
* set this matrix and type from another Transform2D
*
* @param aTransform2D is the Transform2D to be copied from
* @exception
* @author michaelp 09-25-97 1:56pm
**/
void SetMatrix(nsTransform2D *aTransform2D);
/**
* post-multiply a new Transform
*
* @param newxform new Transform2D
* @exception
* @author michaelp 09-25-97 1:56pm
**/
void Concatenate(nsTransform2D *newxform);
/**
* pre-multiply a new Transform
*
* @param newxform new Transform2D
* @exception
* @author michaelp 09-25-97 1:56pm
**/
void PreConcatenate(nsTransform2D *newxform);
/**
* apply nontranslation portion of matrix to vector
*
* @param pt Point to transform
* @exception
* @author michaelp 09-25-97 1:56pm
**/
void TransformNoXLate(float *ptX, float *ptY);
void TransformNoXLateCoord(nscoord *ptX, nscoord *ptY);
/**
* apply matrix to vector
*
* @param pt Point to transform
* @exception
* @author michaelp 09-25-97 1:56pm
**/
void Transform(float *ptX, float *ptY);
void TransformCoord(nscoord *ptX, nscoord *ptY);
/**
* apply matrix to rect
*
* @param rect Rect to transform
* @exception
* @author michaelp 09-25-97 1:56pm
**/
void Transform(float *aX, float *aY, float *aWidth, float *aHeight);
void TransformCoord(nscoord *aX, nscoord *aY, nscoord *aWidth, nscoord *aHeight);
/**
* Scale an array of X/Y coordinates by the X/Y scale factor in the
* matrix. The scale is done as if the other coordinate were zero.
*
* @param aSrc Base of coordinate input array
* @param aDst Base of coordinate output array
* @param aNumCoords Number of coordinates to scale
*/
void ScaleXCoords(const nscoord* aSrc, PRUint32 aNumCoords, PRIntn* aDst);
void ScaleYCoords(const nscoord* aSrc, PRUint32 aNumCoords, PRIntn* aDst);
/**
* add a translation to a Transform via x, y pair
*
* @param ptX x value to add as x translation
* @param ptY y value to add as y translation
* @exception
* @author michaelp 09-25-97 1:56pm
**/
void AddTranslation(float ptX, float ptY);
/**
* add a scale to a Transform via x, y pair
*
* @param ptX x value to add as x scale
* @param ptY y value to add as y scale
* @exception
* @author michaelp 09-25-97 1:56pm
**/
void AddScale(float ptX, float ptY);
};
#endif

View File

@@ -1,2 +0,0 @@
icon_0.gif
icon_1.gif

View File

@@ -1,139 +0,0 @@
#
# The contents of this file are subject to the Netscape Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/NPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
#
DEPTH = ../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
MODULE = gfx
EXPORTS = nsFontList.h
LIBRARY_NAME = gkgfx
EXPORT_LIBRARY = 1
REQUIRES = xpcom \
string \
widget \
locale \
view \
pref \
gfx2 \
imglib2 \
uconv \
unicharutil \
$(NULL)
ifneq (,$(filter os2 windows,$(MOZ_WIDGET_TOOLKIT)))
DIRS =
else
DIRS = ps
endif
ifneq (,$(filter beos os2 mac windows,$(MOZ_GFX_TOOLKIT)))
DIRS += $(MOZ_GFX_TOOLKIT)
endif
# Build xlibrgb only for X toolkits and/or Xprint
ifneq (,$(filter xlib,$(MOZ_WIDGET_TOOLKIT))$(MOZ_ENABLE_XLIB)$(MOZ_ENABLE_XPRINT))
DIRS += xlibrgb
endif
ifdef MOZ_ENABLE_GTK
DIRS += gtk
endif
ifdef MOZ_ENABLE_GTK2
DIRS += gtk
endif
ifdef MOZ_ENABLE_QT
DIRS += qt
endif
ifdef MOZ_ENABLE_XLIB
DIRS += xlib
endif
ifdef MOZ_ENABLE_PHOTON
DIRS += photon
endif
ifdef MOZ_ENABLE_XPRINT
DIRS += xprint
endif
CPPSRCS = \
nsBlender.cpp \
nsColor.cpp \
nsColorNames.cpp \
nsDeviceContext.cpp \
nsFont.cpp \
nsFontList.cpp \
nsRenderingContextImpl.cpp \
nsRect.cpp \
nsTransform2D.cpp \
nsScriptableRegion.cpp \
nsGraphicsImpl.cpp \
nsPrintOptionsImpl.cpp \
nsPrintSettingsImpl.cpp \
$(NULL)
ifeq (,$(filter windows,$(MOZ_WIDGET_TOOLKIT)))
CPPSRCS += nsCompressedCharMap.cpp
endif
ifneq (,$(filter gtk gtk2 xlib os2,$(MOZ_WIDGET_TOOLKIT)))
CPPSRCS += \
nsRegion.cpp \
nsRegionImpl.cpp \
$(NULL)
endif
ifneq (,$(filter gtk gtk2 xlib beos,$(MOZ_WIDGET_TOOLKIT)))
CPPSRCS += imgScaler.cpp
endif
ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
CPPSRCS += \
mac/nsRegionPool.cpp \
$(NULL)
endif
EXTRA_DSO_LDOPTS = \
$(DIST)/lib/$(LIB_PREFIX)mozutil_s.$(LIB_SUFFIX) \
$(MOZ_UNICHARUTIL_LIBS) \
$(MOZ_COMPONENT_LIBS) \
$(NULL)
ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
EXTRA_DSO_LDOPTS += \
$(TK_LIBS) \
$(NULL)
endif
include $(topsrcdir)/config/rules.mk
DEFINES += -D_IMPL_NS_GFX
ifeq ($(OS_ARCH),WINNT)
DEFINES += -DWIN32_LEAN_AND_MEAN
endif
libs:: icon_0.gif icon_1.gif
$(INSTALL) -m 555 $^ $(DIST)/bin/res/gfx

View File

@@ -1,78 +0,0 @@
#
# The contents of this file are subject to the Netscape Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/NPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
#
DEPTH = ../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
MODULE = gfx
LIBRARY_NAME = gfx_beos
EXPORT_LIBRARY = 1
IS_COMPONENT = 1
MODULE_NAME = nsGfxBeOSModule
CPPSRCS = \
nsDeviceContextBeOS.cpp \
nsDeviceContextSpecFactoryB.cpp \
nsDeviceContextSpecB.cpp \
nsDrawingSurfaceBeOS.cpp \
nsFontMetricsBeOS.cpp \
nsGfxFactoryBeOS.cpp \
nsGraphicsStateBeOS.cpp \
nsRenderingContextBeOS.cpp \
nsImageBeOS.cpp \
nsRegionBeOS.cpp \
nsScreenBeOS.cpp \
nsScreenManagerBeOS.cpp \
nsPrintOptionsBeOS.cpp \
$(NULL)
REQUIRES = xpcom \
string \
pref \
widget \
view \
intl \
uconv \
dom \
windowwatcher \
unicharutil \
$(NULL)
include $(topsrcdir)/config/rules.mk
DEFINES += -D_IMPL_NS_GFXONXP
CXXFLAGS += $(TK_CFLAGS)
INCLUDES += $(TK_CFLAGS)
EXTRA_DSO_LDOPTS += $(MOZ_COMPONENT_LIBS) $(MOZ_JS_LIBS) \
-lgkgfx \
$(XPCOM_LIBS) \
$(TK_LIBS) \
$(NSPR_LIBS)
INCLUDES += \
-I$(srcdir)/. \
-I$(srcdir)/.. \
$(NULL)

View File

@@ -1,472 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Pierre Phaneuf <pp@ludusdesign.com>
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include <math.h>
#include "nspr.h"
#include "nsIPref.h"
#include "nsIServiceManager.h"
#include "nsCRT.h"
#include "nsReadableUtils.h"
#include "nsDeviceContextBeOS.h"
#include "nsFontMetricsBeOS.h"
#include "nsGfxCIID.h"
#include "nsGfxPSCID.h"
#include "nsIDeviceContextPS.h"
#include <ScrollBar.h>
#include <Screen.h>
#include "nsIScreenManager.h"
static NS_DEFINE_CID(kPrefCID, NS_PREF_CID);
nscoord nsDeviceContextBeOS::mDpi = 96;
nsDeviceContextBeOS::nsDeviceContextBeOS()
: DeviceContextImpl()
{
mTwipsToPixels = 1.0;
mPixelsToTwips = 1.0;
mDepth = 0 ;
mNumCells = 0;
mWidthFloat = 0.0f;
mHeightFloat = 0.0f;
mWidth = -1;
mHeight = -1;
}
nsDeviceContextBeOS::~nsDeviceContextBeOS()
{
nsresult rv;
nsCOMPtr<nsIPref> prefs = do_GetService(kPrefCID, &rv);
if (NS_SUCCEEDED(rv)) {
prefs->UnregisterCallback("browser.display.screen_resolution",
prefChanged, (void *)this);
}
}
NS_IMETHODIMP nsDeviceContextBeOS::Init(nsNativeWidget aNativeWidget)
{
// get the screen object and its width/height
// XXXRight now this will only get the primary monitor.
nsresult ignore;
nsCOMPtr<nsIScreenManager> sm ( do_GetService("@mozilla.org/gfx/screenmanager;1", &ignore) );
if ( sm ) {
nsCOMPtr<nsIScreen> screen;
sm->GetPrimaryScreen ( getter_AddRefs(screen) );
if ( screen ) {
PRInt32 x, y, width, height, depth;
screen->GetAvailRect ( &x, &y, &width, &height );
screen->GetPixelDepth ( &depth );
mWidthFloat = float(width);
mHeightFloat = float(height);
mDepth = NS_STATIC_CAST ( PRUint32, depth );
}
}
static int initialized = 0;
if (!initialized) {
initialized = 1;
// Set prefVal the value of the preference "browser.display.screen_resolution"
// or -1 if we can't get it.
// If it's negative, we pretend it's not set.
// If it's 0, it means force use of the operating system's logical resolution.
// If it's positive, we use it as the logical resolution
PRInt32 prefVal = -1;
nsresult res;
nsCOMPtr<nsIPref> prefs(do_GetService(kPrefCID, &res));
if (NS_SUCCEEDED(res) && prefs) {
res = prefs->GetIntPref("browser.display.screen_resolution", &prefVal);
if (! NS_SUCCEEDED(res)) {
prefVal = -1;
}
prefs->RegisterCallback("browser.display.screen_resolution", prefChanged,
(void *)this);
}
// Set OSVal to what the operating system thinks the logical resolution is.
PRInt32 OSVal = 72;
if (prefVal > 0) {
// If there's a valid pref value for the logical resolution,
// use it.
mDpi = prefVal;
} else if ((prefVal == 0) || (OSVal > 96)) {
// Either if the pref is 0 (force use of OS value) or the OS
// value is bigger than 96, use the OS value.
mDpi = OSVal;
} else {
// if we couldn't get the pref or it's negative, and the OS
// value is under 96ppi, then use 96.
mDpi = 96;
}
}
SetDPI(mDpi);
mScrollbarHeight = PRInt16(B_H_SCROLL_BAR_HEIGHT);
mScrollbarWidth = PRInt16(B_V_SCROLL_BAR_WIDTH);
#ifdef DEBUG
static PRBool once = PR_TRUE;
if (once) {
printf("GFX: dpi=%d t2p=%g p2t=%g depth=%d\n", mDpi, mTwipsToPixels, mPixelsToTwips,mDepth);
once = PR_FALSE;
}
#endif
DeviceContextImpl::CommonInit();
return NS_OK;
}
NS_IMETHODIMP nsDeviceContextBeOS::CreateRenderingContext(nsIRenderingContext *&aContext)
{
nsIRenderingContext *pContext;
nsresult rv;
nsDrawingSurfaceBeOS *surf;
BView *w;
w = (BView*)mWidget;
// to call init for this, we need to have a valid nsDrawingSurfaceBeOS created
pContext = new nsRenderingContextBeOS();
if (nsnull != pContext)
{
NS_ADDREF(pContext);
// create the nsDrawingSurfaceBeOS
surf = new nsDrawingSurfaceBeOS();
if (surf && w)
{
// init the nsDrawingSurfaceBeOS
rv = surf->Init(w);
if (NS_OK == rv)
// Init the nsRenderingContextBeOS
rv = pContext->Init(this, surf);
}
else
rv = NS_ERROR_OUT_OF_MEMORY;
}
else
rv = NS_ERROR_OUT_OF_MEMORY;
if (NS_OK != rv)
{
NS_IF_RELEASE(pContext);
}
aContext = pContext;
return rv;
}
NS_IMETHODIMP nsDeviceContextBeOS::SupportsNativeWidgets(PRBool &aSupportsWidgets)
{
//XXX it is very critical that this not lie!! MMP
// read the comments in the mac code for this
aSupportsWidgets = PR_TRUE;
return NS_OK;
}
NS_IMETHODIMP nsDeviceContextBeOS::GetScrollBarDimensions(float &aWidth, float &aHeight) const
{
aWidth = mScrollbarWidth * mPixelsToTwips;
aHeight = mScrollbarHeight * mPixelsToTwips;
return NS_OK;
}
NS_IMETHODIMP nsDeviceContextBeOS::GetSystemFont(nsSystemFontID aID, nsFont *aFont) const
{
nsresult status = NS_OK;
switch (aID) {
case eSystemFont_Caption: // css2
case eSystemFont_Icon :
case eSystemFont_Menu :
case eSystemFont_MessageBox :
case eSystemFont_SmallCaption :
case eSystemFont_StatusBar :
case eSystemFont_Window: // css3
case eSystemFont_Document:
case eSystemFont_Workspace:
case eSystemFont_Desktop:
case eSystemFont_Info:
case eSystemFont_Dialog:
case eSystemFont_Button:
case eSystemFont_PullDownMenu:
case eSystemFont_List:
case eSystemFont_Field:
case eSystemFont_Tooltips: // moz
case eSystemFont_Widget:
status = GetSystemFontInfo(be_plain_font, aID, aFont);
break;
}
return status;
}
NS_IMETHODIMP nsDeviceContextBeOS::GetDrawingSurface(nsIRenderingContext &aContext,
nsDrawingSurface &aSurface)
{
aContext.CreateDrawingSurface(nsnull, 0, aSurface);
return nsnull == aSurface ? NS_ERROR_OUT_OF_MEMORY : NS_OK;
}
NS_IMETHODIMP nsDeviceContextBeOS::ConvertPixel(nscolor aColor,
PRUint32 & aPixel)
{
// koehler@mythrium.com:
// I think this fill the 32 bits pixel with the desired color
// It's possible that the nscolor is not representing that color
// if you just dump it inside a 32 bits value.
aPixel = aColor;
return NS_OK;
}
NS_IMETHODIMP nsDeviceContextBeOS::CheckFontExistence(const nsString& aFontName)
{
return nsFontMetricsBeOS::FamilyExists(aFontName);
}
/*
NS_IMETHODIMP nsDeviceContextBeOS::CheckFontExistence(const nsString& aFontName)
{
PRBool isthere = PR_FALSE;
char* cStr = ToNewCString(aFontName);
int32 numFamilies = count_font_families();
for(int32 i = 0; i < numFamilies; i++)
{
font_family family;
uint32 flags;
if(get_font_family(i, &family, &flags) == B_OK)
{
if(strcmp(family, cStr) == 0)
{
isthere = PR_TRUE;
break;
}
}
}
//printf("%s there? %s\n", cStr, isthere?"Yes":"No" );
delete[] cStr;
if (PR_TRUE == isthere)
return NS_OK;
else
return NS_ERROR_FAILURE;
}
*/
NS_IMETHODIMP nsDeviceContextBeOS::GetDeviceSurfaceDimensions(PRInt32 &aWidth, PRInt32 &aHeight)
{
if (mWidth == -1)
mWidth = NSToIntRound(mWidthFloat * mDevUnitsToAppUnits);
if (mHeight == -1)
mHeight = NSToIntRound(mHeightFloat * mDevUnitsToAppUnits);
aWidth = mWidth;
aHeight = mHeight;
return NS_OK;
}
NS_IMETHODIMP nsDeviceContextBeOS::GetRect(nsRect &aRect)
{
PRInt32 width, height;
nsresult rv;
rv = GetDeviceSurfaceDimensions(width, height);
aRect.x = 0;
aRect.y = 0;
aRect.width = width;
aRect.height = height;
return rv;
}
NS_IMETHODIMP nsDeviceContextBeOS::GetClientRect(nsRect &aRect)
{
//XXX do we know if the client rect should ever differ from the screen rect?
return GetRect ( aRect );
}
NS_IMETHODIMP nsDeviceContextBeOS::GetDeviceContextFor(nsIDeviceContextSpec *aDevice,
nsIDeviceContext *&aContext)
{
static NS_DEFINE_CID(kCDeviceContextPS, NS_DEVICECONTEXTPS_CID);
// Create a Postscript device context
nsresult rv;
nsIDeviceContextPS *dcps;
rv = nsComponentManager::CreateInstance(kCDeviceContextPS,
nsnull,
NS_GET_IID(nsIDeviceContextPS),
(void **)&dcps);
NS_ASSERTION(NS_SUCCEEDED(rv), "Couldn't create PS Device context");
dcps->SetSpec(aDevice);
dcps->InitDeviceContextPS((nsIDeviceContext*)aContext,
(nsIDeviceContext*)this);
rv = dcps->QueryInterface(NS_GET_IID(nsIDeviceContext),
(void **)&aContext);
NS_RELEASE(dcps);
return rv;
}
NS_IMETHODIMP nsDeviceContextBeOS::BeginDocument(PRUnichar * aTitle)
{
return NS_OK;
}
NS_IMETHODIMP nsDeviceContextBeOS::EndDocument(void)
{
return NS_OK;
}
NS_IMETHODIMP nsDeviceContextBeOS::BeginPage(void)
{
return NS_OK;
}
NS_IMETHODIMP nsDeviceContextBeOS::EndPage(void)
{
return NS_OK;
}
NS_IMETHODIMP nsDeviceContextBeOS::GetDepth(PRUint32& aDepth)
{
aDepth = mDepth;
return NS_OK;
}
nsresult
nsDeviceContextBeOS::SetDPI(PRInt32 aDpi)
{
mDpi = aDpi;
int pt2t = 72;
// make p2t a nice round number - this prevents rounding problems
mPixelsToTwips = float(NSToIntRound(float(NSIntPointsToTwips(pt2t)) / float(aDpi)));
mTwipsToPixels = 1.0f / mPixelsToTwips;
// XXX need to reflow all documents
return NS_OK;
}
int nsDeviceContextBeOS::prefChanged(const char *aPref, void *aClosure)
{
nsDeviceContextBeOS *context = (nsDeviceContextBeOS*)aClosure;
nsresult rv;
if (nsCRT::strcmp(aPref, "browser.display.screen_resolution")==0) {
PRInt32 dpi;
nsCOMPtr<nsIPref> prefs(do_GetService(kPrefCID, &rv));
rv = prefs->GetIntPref(aPref, &dpi);
if (NS_SUCCEEDED(rv))
context->SetDPI(dpi);
}
return 0;
}
nsresult
nsDeviceContextBeOS::GetSystemFontInfo(const BFont *theFont, nsSystemFontID anID, nsFont* aFont) const
{
nsresult status = NS_OK;
aFont->style = NS_FONT_STYLE_NORMAL;
aFont->weight = NS_FONT_WEIGHT_NORMAL;
aFont->decorations = NS_FONT_DECORATION_NONE;
// do we have the default_font defined by BeOS, if not then
// we error out.
if( !theFont )
theFont = be_plain_font; // BeOS default font
if( !theFont )
{
status = NS_ERROR_FAILURE;
}
else
{
font_family family;
font_style style;
font_height height;
theFont->GetFamilyAndStyle(&family, &style);
aFont->name.AssignWithConversion( family );
// No weight
theFont->GetHeight(&height);
aFont->size = NSIntPixelsToTwips(uint32(height.ascent+height.descent+height.leading), mPixelsToTwips);
// no style
// no decoration
status = NS_OK;
}
return (status);
}

View File

@@ -1,112 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef nsDeviceContextBeOS_h___
#define nsDeviceContextBeOS_h___
#include "nsDeviceContext.h"
#include "nsUnitConversion.h"
#include "nsIWidget.h"
#include "nsIView.h"
#include "nsIRenderingContext.h"
#include "nsRenderingContextBeOS.h"
class nsDeviceContextBeOS : public DeviceContextImpl
{
public:
nsDeviceContextBeOS();
virtual ~nsDeviceContextBeOS();
NS_IMETHOD Init(nsNativeWidget aNativeWidget);
NS_IMETHOD CreateRenderingContext(nsIRenderingContext *&aContext);
NS_IMETHOD CreateRenderingContext(nsIView *aView, nsIRenderingContext *&aContext) {return (DeviceContextImpl::CreateRenderingContext(aView,aContext));}
NS_IMETHOD CreateRenderingContext(nsIWidget *aWidget, nsIRenderingContext *&aContext) {return (DeviceContextImpl::CreateRenderingContext(aWidget,aContext));}
NS_IMETHOD SupportsNativeWidgets(PRBool &aSupportsWidgets);
NS_IMETHOD GetScrollBarDimensions(float &aWidth, float &aHeight) const;
NS_IMETHOD GetSystemFont(nsSystemFontID anID, nsFont *aFont) const;
//get a low level drawing surface for rendering. the rendering context
//that is passed in is used to create the drawing surface if there isn't
//already one in the device context. the drawing surface is then cached
//in the device context for re-use.
NS_IMETHOD GetDrawingSurface(nsIRenderingContext &aContext, nsDrawingSurface &aSurface);
NS_IMETHOD ConvertPixel(nscolor aColor, PRUint32 & aPixel);
NS_IMETHOD CheckFontExistence(const nsString& aFontName);
NS_IMETHOD GetDeviceSurfaceDimensions(PRInt32 &aWidth, PRInt32 &aHeight);
NS_IMETHOD GetClientRect(nsRect &aRect);
NS_IMETHOD GetRect(nsRect &aRect);
NS_IMETHOD GetDeviceContextFor(nsIDeviceContextSpec *aDevice,
nsIDeviceContext *&aContext);
NS_IMETHOD BeginDocument(PRUnichar * aTitle);
NS_IMETHOD EndDocument(void);
NS_IMETHOD BeginPage(void);
NS_IMETHOD EndPage(void);
NS_IMETHOD GetDepth(PRUint32& aDepth);
static int prefChanged(const char *aPref, void *aClosure);
nsresult SetDPI(PRInt32 dpi);
private:
PRUint32 mDepth;
PRBool mWriteable;
PRUint32 mNumCells;
PRInt16 mScrollbarHeight;
PRInt16 mScrollbarWidth;
static nscoord mDpi;
float mWidthFloat;
float mHeightFloat;
PRInt32 mWidth;
PRInt32 mHeight;
nsresult GetSystemFontInfo(const BFont *font, nsSystemFontID anID, nsFont* aFont) const;
};
#endif /* nsDeviceContextBeOS_h___ */

View File

@@ -1,629 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Roland Mainz <roland.mainz@informatik.med.uni-giessen.de>
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "nsDeviceContextSpecB.h"
#include "nsIPref.h"
#include "prenv.h" /* for PR_GetEnv */
#include "nsIDOMWindow.h"
#include "nsIServiceManager.h"
#include "nsIDialogParamBlock.h"
#include "nsISupportsPrimitives.h"
#include "nsIWindowWatcher.h"
#include "nsIDOMWindowInternal.h"
#include "nsReadableUtils.h"
#include "nsISupportsArray.h"
//#include "prmem.h"
//#include "plstr.h"
//----------------------------------------------------------------------------------
// The printer data is shared between the PrinterEnumerator and the nsDeviceContextSpecG
// The PrinterEnumerator creates the printer info
// but the nsDeviceContextSpecG cleans it up
// If it gets created (via the Page Setup Dialog) but the user never prints anything
// then it will never be delete, so this class takes care of that.
class GlobalPrinters {
public:
static GlobalPrinters* GetInstance() { return &mGlobalPrinters; }
~GlobalPrinters() { FreeGlobalPrinters(); }
void FreeGlobalPrinters();
nsresult InitializeGlobalPrinters();
PRBool PrintersAreAllocated() { return mGlobalPrinterList != nsnull; }
PRInt32 GetNumPrinters() { return mGlobalNumPrinters; }
nsString* GetStringAt(PRInt32 aInx) { return mGlobalPrinterList->StringAt(aInx); }
protected:
GlobalPrinters() {}
static GlobalPrinters mGlobalPrinters;
static nsStringArray* mGlobalPrinterList;
static int mGlobalNumPrinters;
};
//---------------
// static members
GlobalPrinters GlobalPrinters::mGlobalPrinters;
nsStringArray* GlobalPrinters::mGlobalPrinterList = nsnull;
int GlobalPrinters::mGlobalNumPrinters = 0;
/** -------------------------------------------------------
* Construct the nsDeviceContextSpecBeOS
* @update dc 12/02/98
*/
nsDeviceContextSpecBeOS :: nsDeviceContextSpecBeOS()
{
NS_INIT_REFCNT();
}
/** -------------------------------------------------------
* Destroy the nsDeviceContextSpecBeOS
* @update dc 2/15/98
*/
nsDeviceContextSpecBeOS :: ~nsDeviceContextSpecBeOS()
{
}
static NS_DEFINE_IID(kIDeviceContextSpecIID, NS_IDEVICE_CONTEXT_SPEC_IID);
static NS_DEFINE_IID(kIDeviceContextSpecPSIID, NS_IDEVICE_CONTEXT_SPEC_PS_IID);
#if 0
NS_IMPL_ISUPPORTS1(nsDeviceContextSpecBeOS, nsIDeviceContextSpec)
#endif
NS_IMETHODIMP nsDeviceContextSpecBeOS :: QueryInterface(REFNSIID aIID, void** aInstancePtr)
{
if (nsnull == aInstancePtr)
return NS_ERROR_NULL_POINTER;
if (aIID.Equals(kIDeviceContextSpecIID))
{
nsIDeviceContextSpec* tmp = this;
*aInstancePtr = (void*) tmp;
NS_ADDREF_THIS();
return NS_OK;
}
if (aIID.Equals(kIDeviceContextSpecPSIID))
{
nsIDeviceContextSpecPS* tmp = this;
*aInstancePtr = (void*) tmp;
NS_ADDREF_THIS();
return NS_OK;
}
static NS_DEFINE_IID(kISupportsIID, NS_ISUPPORTS_IID);
if (aIID.Equals(kISupportsIID))
{
nsIDeviceContextSpec* tmp = this;
nsISupports* tmp2 = tmp;
*aInstancePtr = (void*) tmp2;
NS_ADDREF_THIS();
return NS_OK;
}
return NS_NOINTERFACE;
}
NS_IMPL_ADDREF(nsDeviceContextSpecBeOS)
NS_IMPL_RELEASE(nsDeviceContextSpecBeOS)
/** -------------------------------------------------------
*/
static nsresult DisplayXPDialog(nsIPrintSettings* aPS,
const char* aChromeURL,
PRBool& aClickedOK)
{
NS_ASSERTION(aPS, "Must have a print settings!");
aClickedOK = PR_FALSE;
nsresult rv = NS_ERROR_FAILURE;
// create a nsISupportsArray of the parameters
// being passed to the window
nsCOMPtr<nsISupportsArray> array;
NS_NewISupportsArray(getter_AddRefs(array));
if (!array) return NS_ERROR_FAILURE;
nsCOMPtr<nsIPrintSettings> ps = aPS;
nsCOMPtr<nsISupports> psSupports(do_QueryInterface(ps));
NS_ASSERTION(psSupports, "PrintSettings must be a supports");
array->AppendElement(psSupports);
nsCOMPtr<nsIDialogParamBlock> ioParamBlock(do_CreateInstance("@mozilla.org/embedcomp/dialogparam;1"));
if (ioParamBlock) {
ioParamBlock->SetInt(0, 0);
nsCOMPtr<nsISupports> blkSupps(do_QueryInterface(ioParamBlock));
NS_ASSERTION(blkSupps, "IOBlk must be a supports");
array->AppendElement(blkSupps);
nsCOMPtr<nsISupports> arguments(do_QueryInterface(array));
NS_ASSERTION(array, "array must be a supports");
nsCOMPtr<nsIWindowWatcher> wwatch(do_GetService("@mozilla.org/embedcomp/window-watcher;1"));
if (wwatch) {
nsCOMPtr<nsIDOMWindow> active;
wwatch->GetActiveWindow(getter_AddRefs(active));
nsCOMPtr<nsIDOMWindowInternal> parent = do_QueryInterface(active);
nsCOMPtr<nsIDOMWindow> newWindow;
rv = wwatch->OpenWindow(parent, aChromeURL,
"_blank", "chrome,modal,centerscreen", array,
getter_AddRefs(newWindow));
}
}
if (NS_SUCCEEDED(rv)) {
PRInt32 buttonPressed = 0;
ioParamBlock->GetInt(0, &buttonPressed);
if (buttonPressed == 1) {
aClickedOK = PR_TRUE;
} else {
rv = NS_ERROR_ABORT;
}
} else {
rv = NS_ERROR_ABORT;
}
return rv;
}
/** -------------------------------------------------------
* Initialize the nsDeviceContextSpecBeOS
* @update dc 2/15/98
* @update syd 3/2/99
*/
NS_IMETHODIMP nsDeviceContextSpecBeOS::Init(nsIPrintSettings* aPS, PRBool aQuiet)
{
nsresult rv = NS_ERROR_FAILURE;
NS_ASSERTION(nsnull != aPS, "No print settings.");
// if there is a current selection then enable the "Selection" radio button
if (aPS != nsnull) {
PRBool isOn;
aPS->GetPrintOptions(nsIPrintSettings::kEnableSelectionRB, &isOn);
nsCOMPtr<nsIPref> pPrefs = do_GetService(NS_PREF_CONTRACTID, &rv);
if (NS_SUCCEEDED(rv)) {
(void) pPrefs->SetBoolPref("print.selection_radio_enabled", isOn);
}
}
char *path;
PRBool canPrint = PR_FALSE;
PRBool reversed = PR_FALSE;
PRBool color = PR_FALSE;
PRBool tofile = PR_FALSE;
PRInt16 printRange = nsIPrintSettings::kRangeAllPages;
PRInt32 paper_size = NS_LETTER_SIZE;
PRInt32 orientation = NS_PORTRAIT;
PRInt32 fromPage = 1;
PRInt32 toPage = 1;
PRUnichar *command = nsnull;
PRInt32 copies = 1;
PRUnichar *printer = nsnull;
PRUnichar *printfile = nsnull;
double dleft = 0.5;
double dright = 0.5;
double dtop = 0.5;
double dbottom = 0.5;
rv = GlobalPrinters::GetInstance()->InitializeGlobalPrinters();
if (NS_FAILED(rv)) {
return rv;
}
if (!aQuiet ) {
rv = DisplayXPDialog(aPS,
"chrome://global/content/printdialog.xul", canPrint);
}
else {
canPrint = PR_TRUE;
}
GlobalPrinters::GetInstance()->FreeGlobalPrinters();
if (canPrint) {
if (aPS != nsnull) {
aPS->GetPrinterName(&printer);
aPS->GetPrintReversed(&reversed);
aPS->GetPrintInColor(&color);
aPS->GetPaperSize(&paper_size);
aPS->GetOrientation(&orientation);
aPS->GetPrintCommand(&command);
aPS->GetPrintRange(&printRange);
aPS->GetToFileName(&printfile);
aPS->GetPrintToFile(&tofile);
aPS->GetStartPageRange(&fromPage);
aPS->GetEndPageRange(&toPage);
aPS->GetNumCopies(&copies);
aPS->GetMarginTop(&dtop);
aPS->GetMarginLeft(&dleft);
aPS->GetMarginBottom(&dbottom);
aPS->GetMarginRight(&dright);
if (command != nsnull && printfile != nsnull) {
// ToDo: Use LocalEncoding instead of UTF-8 (see bug 73446)
strcpy(mPrData.command, NS_ConvertUCS2toUTF8(command).get());
strcpy(mPrData.path, NS_ConvertUCS2toUTF8(printfile).get());
}
if (printer != nsnull)
strcpy(mPrData.printer, NS_ConvertUCS2toUTF8(printer).get());
#ifdef DEBUG_rods
printf("margins: %5.2f,%5.2f,%5.2f,%5.2f\n", dtop, dleft, dbottom, dright);
printf("printRange %d\n", printRange);
printf("fromPage %d\n", fromPage);
printf("toPage %d\n", toPage);
#endif /* DEBUG_rods */
} else {
#ifdef VMS
// Note to whoever puts the "lpr" into the prefs file. Please contact me
// as I need to make the default be "print" instead of "lpr" for OpenVMS.
strcpy(mPrData.command, "print");
#else
strcpy(mPrData.command, "lpr ${MOZ_PRINTER_NAME:+'-P'}${MOZ_PRINTER_NAME}");
#endif /* VMS */
}
mPrData.top = dtop;
mPrData.bottom = dbottom;
mPrData.left = dleft;
mPrData.right = dright;
mPrData.fpf = !reversed;
mPrData.grayscale = !color;
mPrData.size = paper_size;
mPrData.orientation = orientation;
mPrData.toPrinter = !tofile;
mPrData.copies = copies;
// PWD, HOME, or fail
if (!printfile) {
if ( ( path = PR_GetEnv( "PWD" ) ) == (char *) nsnull )
if ( ( path = PR_GetEnv( "HOME" ) ) == (char *) nsnull )
strcpy(mPrData.path, "mozilla.ps");
if ( path != (char *) nsnull )
sprintf(mPrData.path, "%s/mozilla.ps", path);
else
return NS_ERROR_FAILURE;
}
#ifdef NOT_IMPLEMENTED_YET
if (mGlobalNumPrinters) {
for(int i = 0; (i < mGlobalNumPrinters) && !mQueue; i++) {
if (!(mGlobalPrinterList->StringAt(i)->CompareWithConversion(mPrData.printer, TRUE, -1)))
mQueue = PrnDlg.SetPrinterQueue(i);
}
}
#endif /* NOT_IMPLEMENTED_YET */
if (command != nsnull) {
nsMemory::Free(command);
}
if (printfile != nsnull) {
nsMemory::Free(printfile);
}
return NS_OK;
}
return rv;
}
NS_IMETHODIMP nsDeviceContextSpecBeOS :: GetToPrinter( PRBool &aToPrinter )
{
aToPrinter = mPrData.toPrinter;
return NS_OK;
}
NS_IMETHODIMP nsDeviceContextSpecBeOS::GetPrinterName ( char **aPrinter )
{
*aPrinter = &mPrData.printer[0];
return NS_OK;
}
NS_IMETHODIMP nsDeviceContextSpecBeOS::GetCopies ( int &aCopies )
{
aCopies = mPrData.copies;
return NS_OK;
}
NS_IMETHODIMP nsDeviceContextSpecBeOS :: GetFirstPageFirst ( PRBool &aFpf )
{
aFpf = mPrData.fpf;
return NS_OK;
}
NS_IMETHODIMP nsDeviceContextSpecBeOS :: GetGrayscale ( PRBool &aGrayscale )
{
aGrayscale = mPrData.grayscale;
return NS_OK;
}
NS_IMETHODIMP nsDeviceContextSpecBeOS :: GetSize ( int &aSize )
{
aSize = mPrData.size;
return NS_OK;
}
NS_IMETHODIMP nsDeviceContextSpecBeOS :: GetPageDimensions ( float &aWidth, float &aHeight )
{
if ( mPrData.size == NS_LETTER_SIZE ) {
aWidth = 8.5;
aHeight = 11.0;
} else if ( mPrData.size == NS_LEGAL_SIZE ) {
aWidth = 8.5;
aHeight = 14.0;
} else if ( mPrData.size == NS_EXECUTIVE_SIZE ) {
aWidth = 7.5;
aHeight = 10.0;
} else if ( mPrData.size == NS_A4_SIZE ) {
// 210mm X 297mm == 8.27in X 11.69in
aWidth = 8.27;
aHeight = 11.69;
} else if ( mPrData.size == NS_A3_SIZE ) {
// 297mm X 420mm == 11.69in X 16.53in
aWidth = 11.69;
aHeight = 16.53;
}
if (mPrData.orientation == NS_LANDSCAPE) {
float temp;
temp = aWidth;
aWidth = aHeight;
aHeight = temp;
}
return NS_OK;
}
NS_IMETHODIMP nsDeviceContextSpecBeOS :: GetLandscape ( PRBool &landscape )
{
landscape = (mPrData.orientation == NS_LANDSCAPE);
return NS_OK;
}
NS_IMETHODIMP nsDeviceContextSpecBeOS :: GetTopMargin ( float &value )
{
value = mPrData.top;
return NS_OK;
}
NS_IMETHODIMP nsDeviceContextSpecBeOS :: GetBottomMargin ( float &value )
{
value = mPrData.bottom;
return NS_OK;
}
NS_IMETHODIMP nsDeviceContextSpecBeOS :: GetRightMargin ( float &value )
{
value = mPrData.right;
return NS_OK;
}
NS_IMETHODIMP nsDeviceContextSpecBeOS :: GetLeftMargin ( float &value )
{
value = mPrData.left;
return NS_OK;
}
NS_IMETHODIMP nsDeviceContextSpecBeOS :: GetCommand ( char **aCommand )
{
*aCommand = &mPrData.command[0];
return NS_OK;
}
NS_IMETHODIMP nsDeviceContextSpecBeOS :: GetPath ( char **aPath )
{
*aPath = &mPrData.path[0];
return NS_OK;
}
NS_IMETHODIMP nsDeviceContextSpecBeOS :: GetUserCancelled( PRBool &aCancel )
{
aCancel = mPrData.cancel;
return NS_OK;
}
/** -------------------------------------------------------
* Closes the printmanager if it is open.
* @update dc 2/15/98
*/
NS_IMETHODIMP nsDeviceContextSpecBeOS :: ClosePrintManager()
{
return NS_OK;
}
// Printer Enumerator
nsPrinterEnumeratorBeOS::nsPrinterEnumeratorBeOS()
{
NS_INIT_REFCNT();
}
NS_IMPL_ISUPPORTS1(nsPrinterEnumeratorBeOS, nsIPrinterEnumerator)
NS_IMETHODIMP nsPrinterEnumeratorBeOS::EnumeratePrinters(PRUint32* aCount, PRUnichar*** aResult)
{
NS_ENSURE_ARG(aCount);
NS_ENSURE_ARG_POINTER(aResult);
if (aCount)
*aCount = 0;
else
return NS_ERROR_NULL_POINTER;
if (aResult)
*aResult = nsnull;
else
return NS_ERROR_NULL_POINTER;
nsresult rv = GlobalPrinters::GetInstance()->InitializeGlobalPrinters();
if (NS_FAILED(rv)) {
return rv;
}
PRInt32 numPrinters = GlobalPrinters::GetInstance()->GetNumPrinters();
PRUnichar** array = (PRUnichar**) nsMemory::Alloc(numPrinters * sizeof(PRUnichar*));
if (!array && numPrinters > 0) {
GlobalPrinters::GetInstance()->FreeGlobalPrinters();
return NS_ERROR_OUT_OF_MEMORY;
}
int count = 0;
while( count < numPrinters )
{
PRUnichar *str = ToNewUnicode(*GlobalPrinters::GetInstance()->GetStringAt(count));
if (!str) {
for (int i = count - 1; i >= 0; i--)
nsMemory::Free(array[i]);
nsMemory::Free(array);
GlobalPrinters::GetInstance()->FreeGlobalPrinters();
return NS_ERROR_OUT_OF_MEMORY;
}
array[count++] = str;
}
*aCount = count;
*aResult = array;
GlobalPrinters::GetInstance()->FreeGlobalPrinters();
return NS_OK;
}
NS_IMETHODIMP nsPrinterEnumeratorBeOS::DisplayPropertiesDlg(const PRUnichar *aPrinter, nsIPrintSettings *aPrintSettings)
{
/* fixme: We simply ignore the |aPrinter| argument here
* We should get the supported printer attributes from the printer and
* populate the print job options dialog with these data instead of using
* the "default set" here.
* However, this requires changes on all platforms and is another big chunk
* of patches ... ;-(
*/
PRBool pressedOK;
return DisplayXPDialog(aPrintSettings,
"chrome://global/content/printjoboptions.xul",
pressedOK);
}
//----------------------------------------------------------------------
nsresult GlobalPrinters::InitializeGlobalPrinters ()
{
if (PrintersAreAllocated()) {
return NS_OK;
}
mGlobalNumPrinters = 0;
mGlobalPrinterList = new nsStringArray();
if (!mGlobalPrinterList)
return NS_ERROR_OUT_OF_MEMORY;
/* add an entry for the default printer (see nsPostScriptObj.cpp) */
mGlobalPrinterList->AppendString(
nsString(NS_ConvertASCIItoUCS2(NS_POSTSCRIPT_DRIVER_NAME "default")));
mGlobalNumPrinters++;
/* get the list of printers */
char *printerList = nsnull;
/* the env var MOZILLA_PRINTER_LIST can "override" the prefs */
printerList = PR_GetEnv("MOZILLA_PRINTER_LIST");
if (!printerList) {
nsresult rv;
nsCOMPtr<nsIPref> pPrefs = do_GetService(NS_PREF_CONTRACTID, &rv);
if (NS_SUCCEEDED(rv)) {
(void) pPrefs->CopyCharPref("print.printer_list", &printerList);
}
}
if (printerList) {
char *tok_lasts;
char *name;
/* PL_strtok_r() will modify the string - copy it! */
printerList = strdup(printerList);
if (!printerList)
return NS_ERROR_OUT_OF_MEMORY;
for( name = PL_strtok_r(printerList, " ", &tok_lasts) ;
name != nsnull ;
name = PL_strtok_r(nsnull, " ", &tok_lasts) )
{
mGlobalPrinterList->AppendString(
nsString(NS_ConvertASCIItoUCS2(NS_POSTSCRIPT_DRIVER_NAME)) +
nsString(NS_ConvertASCIItoUCS2(name)));
mGlobalNumPrinters++;
}
free(printerList);
}
if (mGlobalNumPrinters == 0)
return NS_ERROR_GFX_PRINTER_NO_PRINTER_AVAILABLE;
return NS_OK;
}
//----------------------------------------------------------------------
void GlobalPrinters::FreeGlobalPrinters()
{
delete mGlobalPrinterList;
mGlobalPrinterList = nsnull;
mGlobalNumPrinters = 0;
}

View File

@@ -1,143 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Roland Mainz <roland.mainz@informatik.med.uni-giessen.de>
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef nsDeviceContextSpecB_h___
#define nsDeviceContextSpecB_h___
#include "nsIDeviceContextSpec.h"
#include "nsDeviceContextSpecB.h"
#include "nsVoidArray.h"
#include "nsIDeviceContextSpecPS.h"
#include "nsIPrintSettings.h"
#include "nsIPrintOptions.h"
#include "nsPrintdBeOS.h"
class nsDeviceContextSpecBeOS : public nsIDeviceContextSpec ,
public nsIDeviceContextSpecPS
{
public:
/**
* Construct a nsDeviceContextSpecMac, which is an object which contains and manages a mac printrecord
* @update dc 12/02/98
*/
nsDeviceContextSpecBeOS();
NS_DECL_ISUPPORTS
/**
* Initialize the nsDeviceContextSpecBeOS for use. This will allocate a printrecord for use
* @update dc 2/16/98
* @param aQuiet if PR_TRUE, prevent the need for user intervention
* in obtaining device context spec. if nsnull is passed in for
* the aOldSpec, this will typically result in getting a device
* context spec for the default output device (i.e. default
* printer).
* @return error status
*/
NS_IMETHOD Init(nsIPrintSettings* aPS, PRBool aQuiet);
/**
* Closes the printmanager if it is open.
* @update dc 2/13/98
* @return error status
*/
NS_IMETHOD ClosePrintManager();
NS_IMETHOD GetToPrinter( PRBool &aToPrinter );
NS_IMETHOD GetPrinterName ( char **aPrinter );
NS_IMETHOD GetCopies ( int &aCopies );
NS_IMETHOD GetFirstPageFirst ( PRBool &aFpf );
NS_IMETHOD GetGrayscale( PRBool &aGrayscale );
NS_IMETHOD GetSize ( int &aSize );
NS_IMETHOD GetTopMargin ( float &value );
NS_IMETHOD GetBottomMargin ( float &value );
NS_IMETHOD GetLeftMargin ( float &value );
NS_IMETHOD GetRightMargin ( float &value );
NS_IMETHOD GetCommand ( char **aCommand );
NS_IMETHOD GetPath ( char **aPath );
NS_IMETHOD GetPageDimensions (float &aWidth, float &aHeight );
NS_IMETHOD GetLandscape (PRBool &aLandscape);
NS_IMETHOD GetUserCancelled( PRBool &aCancel );
/**
* Destuct a nsDeviceContextSpecMac, this will release the printrecord
* @update dc 2/16/98
*/
protected:
virtual ~nsDeviceContextSpecBeOS();
public:
int InitializeGlobalPrinters();
void FreeGlobalPrinters();
protected:
BeOSPrData mPrData;
};
//-------------------------------------------------------------------------
// Printer Enumerator
//-------------------------------------------------------------------------
class nsPrinterEnumeratorBeOS : public nsIPrinterEnumerator
{
public:
nsPrinterEnumeratorBeOS();
NS_DECL_ISUPPORTS
NS_DECL_NSIPRINTERENUMERATOR
protected:
};
#endif

View File

@@ -1,100 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1999
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Roland Mainz <roland.mainz@informatik.med.uni-giessen.de>
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "nsDeviceContextSpecFactoryB.h"
#include "nsDeviceContextSpecB.h"
#include "nsGfxCIID.h"
#include "plstr.h"
/** -------------------------------------------------------
* Constructor
* @update dc 2/16/98
*/
nsDeviceContextSpecFactoryBeOS :: nsDeviceContextSpecFactoryBeOS()
{
NS_INIT_REFCNT();
}
/** -------------------------------------------------------
* Destructor
* @update dc 2/16/98
*/
nsDeviceContextSpecFactoryBeOS :: ~nsDeviceContextSpecFactoryBeOS()
{
}
static NS_DEFINE_IID(kIDeviceContextSpecIID, NS_IDEVICE_CONTEXT_SPEC_IID);
static NS_DEFINE_CID(kDeviceContextSpecCID, NS_DEVICE_CONTEXT_SPEC_CID);
NS_IMPL_ISUPPORTS1(nsDeviceContextSpecFactoryBeOS, nsIDeviceContextSpecFactory)
/** -------------------------------------------------------
* Initialize the device context spec factory
* @update dc 2/16/98
*/
NS_IMETHODIMP nsDeviceContextSpecFactoryBeOS :: Init(void)
{
return NS_OK;
}
/** -------------------------------------------------------
* Get a device context specification
* @update dc 2/16/98
*/
NS_IMETHODIMP nsDeviceContextSpecFactoryBeOS :: CreateDeviceContextSpec(nsIWidget *aWidget,
nsIPrintSettings* aPrintSettings,
nsIDeviceContextSpec *&aNewSpec,
PRBool aQuiet)
{
nsresult rv;
static NS_DEFINE_CID(kDeviceContextSpecCID, NS_DEVICE_CONTEXT_SPEC_CID);
nsCOMPtr<nsIDeviceContextSpec> devSpec = do_CreateInstance(kDeviceContextSpecCID, &rv);
if (NS_SUCCEEDED(rv))
{
rv = ((nsDeviceContextSpecBeOS *)devSpec.get())->Init(aPrintSettings, aQuiet);
if (NS_SUCCEEDED(rv))
{
aNewSpec = devSpec;
NS_ADDREF(aNewSpec);
}
}
return rv;
}

View File

@@ -1,62 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1999
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef nsDeviceContextSpecFactoryB_h___
#define nsDeviceContextSpecFactoryB_h___
#include "nsIDeviceContextSpecFactory.h"
#include "nsIDeviceContextSpec.h"
class nsDeviceContextSpecFactoryBeOS : public nsIDeviceContextSpecFactory
{
public:
nsDeviceContextSpecFactoryBeOS();
NS_DECL_ISUPPORTS
NS_IMETHOD Init(void);
NS_IMETHOD CreateDeviceContextSpec(nsIWidget *aWidget,
nsIPrintSettings* aPrintSettings,
nsIDeviceContextSpec *&aNewSpec,
PRBool aQuiet);
protected:
virtual ~nsDeviceContextSpecFactoryBeOS();
};
#endif

View File

@@ -1,277 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "nsDrawingSurfaceBeOS.h"
#include "nsCoord.h"
NS_IMPL_ISUPPORTS2(nsDrawingSurfaceBeOS, nsIDrawingSurface, nsIDrawingSurfaceBeOS)
#ifdef CHEAP_PERFORMANCE_MEASUREMENT
static PRTime mLockTime, mUnlockTime;
#endif
nsDrawingSurfaceBeOS :: nsDrawingSurfaceBeOS()
{
NS_INIT_REFCNT();
mView = NULL;
mBitmap = nsnull;
mWidth = 0;
mHeight = 0;
mLockWidth = 0;
mLockHeight = 0;
mLockFlags = 0;
mLockX = 0;
mLockY = 0;
mLocked = PR_FALSE;
}
nsDrawingSurfaceBeOS :: ~nsDrawingSurfaceBeOS()
{
if(mBitmap)
{
mBitmap->RemoveChild(mView);
delete mBitmap;
}
}
/**
* Lock a rect of a drawing surface and return a
* pointer to the upper left hand corner of the
* bitmap.
* @param aX x position of subrect of bitmap
* @param aY y position of subrect of bitmap
* @param aWidth width of subrect of bitmap
* @param aHeight height of subrect of bitmap
* @param aBits out parameter for upper left hand
* corner of bitmap
* @param aStride out parameter for number of bytes
* to add to aBits to go from scanline to scanline
* @param aWidthBytes out parameter for number of
* bytes per line in aBits to process aWidth pixels
* @return error status
*
**/
NS_IMETHODIMP nsDrawingSurfaceBeOS :: Lock(PRInt32 aX, PRInt32 aY,
PRUint32 aWidth, PRUint32 aHeight,
void **aBits, PRInt32 *aStride,
PRInt32 *aWidthBytes, PRUint32 aFlags)
{
#ifdef CHEAP_PERFORMANCE_MEASUREMENT
mLockTime = PR_Now();
// MOZ_TIMER_RESET(mLockTime);
// MOZ_TIMER_START(mLockTime);
#endif
if (mLocked)
{
NS_ASSERTION(0, "nested lock attempt");
return NS_ERROR_FAILURE;
}
mLocked = PR_TRUE;
mLockX = aX;
mLockY = aY;
mLockWidth = aWidth;
mLockHeight = aHeight;
mLockFlags = aFlags;
// Obtain an ximage from the pixmap. ( I think this copy the bitmap )
// FIX ME !!!! We need to copy the part locked into the mImage
mView->LockLooper();
#ifdef CHEAP_PERFORMANCE_MEASUREMENT
// MOZ_TIMER_STOP(mLockTime);
// MOZ_TIMER_LOG(("Time taken to lock: "));
// MOZ_TIMER_PRINT(mLockTime);
printf("Time taken to lock: %d\n", PR_Now() - mLockTime);
#endif
return NS_OK;
}
NS_IMETHODIMP nsDrawingSurfaceBeOS :: Unlock(void)
{
#ifdef CHEAP_PERFORMANCE_MEASUREMENT
mUnlockTime = PR_Now();
#endif
// g_print("nsDrawingSurfaceGTK::UnLock() called\n");
if (!mLocked)
{
NS_ASSERTION(0, "attempting to unlock an DS that isn't locked");
return NS_ERROR_FAILURE;
}
// If the lock was not read only, put the bits back on the pixmap
if (!(mLockFlags & NS_LOCK_SURFACE_READ_ONLY))
{
// FIX ME!!!
// Now draw the image ...
}
// FIX ME!!!
// Destroy mImage
mView->UnlockLooper();
mLocked = PR_FALSE;
#ifdef CHEAP_PERFORMANCE_MEASUREMENT
printf("Time taken to unlock: %d\n", PR_Now() - mUnlockTime);
#endif
}
NS_IMETHODIMP nsDrawingSurfaceBeOS :: GetDimensions(PRUint32 *aWidth, PRUint32 *aHeight)
{
*aWidth = mWidth;
*aHeight = mHeight;
return NS_OK;
}
NS_IMETHODIMP nsDrawingSurfaceBeOS :: IsOffscreen(PRBool *aOffScreen)
{
*aOffScreen = mIsOffscreen;//mBitmap ? PR_TRUE : PR_FALSE;
return NS_OK;
}
NS_IMETHODIMP nsDrawingSurfaceBeOS :: IsPixelAddressable(PRBool *aAddressable)
{
*aAddressable = PR_FALSE;
return NS_OK;
}
NS_IMETHODIMP nsDrawingSurfaceBeOS :: GetPixelFormat(nsPixelFormat *aFormat)
{
*aFormat = mPixFormat;
return NS_OK;
}
NS_IMETHODIMP nsDrawingSurfaceBeOS :: Init(BView *aView)
{
if(aView->LockLooper())
{
//remember dimensions
mWidth=nscoord(aView->Bounds().Width()+1);
mHeight=nscoord(aView->Bounds().Height()+1);
mView = aView;
aView->UnlockLooper();
}
// XXX was i smoking crack when i wrote this comment?
// this is definatly going to be on the screen, as it will be the window of a
// widget or something.
mIsOffscreen = PR_FALSE;
return NS_OK;
}
NS_IMETHODIMP nsDrawingSurfaceBeOS :: Init(BView *aView, PRUint32 aWidth,
PRUint32 aHeight, PRUint32 aFlags)
{
NS_ASSERTION(!(aView == nsnull), "null BView");
//remember dimensions
mWidth=aWidth;
mHeight=aHeight;
mFlags = aFlags;
// we can draw on this offscreen because it has no parent
mIsOffscreen = PR_TRUE;
BRect r(0,0, mWidth-1, mHeight-1);
mView = new BView(r, "", 0, 0);
if (!mView)
return NS_ERROR_OUT_OF_MEMORY;
//if((aFlags & NS_CREATEDRAWINGSURFACE_FOR_PIXEL_ACCESS) &&
// (aWidth > 0) && (aHeight > 0))
if(aWidth > 0 && aHeight > 0)
{
mBitmap = new BBitmap(r, B_RGBA32, true);
if (!mBitmap)
return NS_ERROR_OUT_OF_MEMORY;
if (mBitmap->InitCheck()!=B_OK) {
//for some reason, the bitmap isn't valid - delete the
//bitmap object, then indicate failure
delete mBitmap;
mBitmap=NULL;
return NS_ERROR_FAILURE;
}
mBitmap->AddChild(mView);
}
return NS_OK;
}
NS_IMETHODIMP nsDrawingSurfaceBeOS :: AcquireView(BView **aView)
{
*aView = mView;
return NS_OK;
}
NS_IMETHODIMP nsDrawingSurfaceBeOS :: AcquireBitmap(BBitmap **aBitmap)
{
if(mBitmap && mBitmap->Lock())
{
mView->Sync();
mBitmap->Unlock();
}
*aBitmap = mBitmap;
return NS_OK;
}
NS_IMETHODIMP nsDrawingSurfaceBeOS :: ReleaseView(void)
{
return NS_OK;
}
NS_IMETHODIMP nsDrawingSurfaceBeOS :: ReleaseBitmap(void)
{
return NS_OK;
}

View File

@@ -1,103 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef nsDrawingSurfaceBeOS_h___
#define nsDrawingSurfaceBeOS_h___
#include "nsIDrawingSurface.h"
#include "nsIDrawingSurfaceBeOS.h"
#include <Bitmap.h>
#include <View.h>
class nsDrawingSurfaceBeOS : public nsIDrawingSurface,
public nsIDrawingSurfaceBeOS
{
public:
nsDrawingSurfaceBeOS();
virtual ~nsDrawingSurfaceBeOS();
NS_DECL_ISUPPORTS
//nsIDrawingSurface interface
NS_IMETHOD Lock(PRInt32 aX, PRInt32 aY, PRUint32 aWidth, PRUint32 aHeight,
void **aBits, PRInt32 *aStride, PRInt32 *aWidthBytes,
PRUint32 aFlags);
NS_IMETHOD Unlock(void);
NS_IMETHOD GetDimensions(PRUint32 *aWidth, PRUint32 *aHeight);
NS_IMETHOD IsOffscreen(PRBool *aOffScreen);
NS_IMETHOD IsPixelAddressable(PRBool *aAddressable);
NS_IMETHOD GetPixelFormat(nsPixelFormat *aFormat);
// local methods
NS_IMETHOD Init(BView *aView);
NS_IMETHOD Init(BView *aView, PRUint32 aWidth, PRUint32 aHeight,
PRUint32 aFlags);
/* below are utility functions used mostly for nsRenderingContext and nsImage
* to plug into gdk_* functions for drawing. You should not set a pointer
* that might hang around with the return from these. instead use the ones
* above. pav
*/
NS_IMETHOD AcquireView(BView **aView);
NS_IMETHOD ReleaseView(void);
NS_IMETHOD AcquireBitmap(BBitmap **aBitmap);
NS_IMETHOD ReleaseBitmap(void);
void GetSize(PRUint32 *aWidth, PRUint32 *aHeight) { *aWidth = mWidth; *aHeight = mHeight; }
private:
BView *mView;
BBitmap *mBitmap;
nsPixelFormat mPixFormat;
PRUint32 mWidth;
PRUint32 mHeight;
PRUint32 mFlags;
PRBool mIsOffscreen;
/* for locks */
PRInt32 mLockX;
PRInt32 mLockY;
PRUint32 mLockWidth;
PRUint32 mLockHeight;
PRUint32 mLockFlags;
PRBool mLocked;
};
#endif

View File

@@ -1,563 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Yannick Koehler <koehler@mythrium.com>
* Christian M Hoffman <chrmhoffmann@web.de>
* Makoto hamanaka <VYA04230@nifty.com>
* Paul Ashford <arougthopher@lizardland.net>
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "xp_core.h"
#include "nsQuickSort.h"
#include "nsFontMetricsBeOS.h"
#include "nsIServiceManager.h"
#include "nsICharsetConverterManager.h"
#include "nsICharsetConverterManager2.h"
#include "nsISaveAsCharset.h"
#include "nsIPref.h"
#include "nsCOMPtr.h"
#include "nspr.h"
#include "nsHashtable.h"
#include "nsReadableUtils.h"
#undef USER_DEFINED
#define USER_DEFINED "x-user-def"
#undef NOISY_FONTS
#undef REALLY_NOISY_FONTS
static NS_DEFINE_CID(kPrefCID, NS_PREF_CID);
nsFontMetricsBeOS::nsFontMetricsBeOS()
:mEmulateBold(PR_FALSE)
{
NS_INIT_REFCNT();
}
nsFontMetricsBeOS::~nsFontMetricsBeOS()
{
if (nsnull != mFont) {
delete mFont;
mFont = nsnull;
}
if (mDeviceContext) {
// Notify our device context that owns us so that it can update its font cache
mDeviceContext->FontMetricsDeleted(this);
mDeviceContext = nsnull;
}
}
NS_IMPL_ISUPPORTS1(nsFontMetricsBeOS, nsIFontMetrics)
static PRBool
IsASCIIFontName(const nsString& aName)
{
PRUint32 len = aName.Length();
const PRUnichar* str = aName.get();
for (PRUint32 i = 0; i < len; i++) {
/*
* X font names are printable ASCII, ignore others (for now)
*/
if ((str[i] < 0x20) || (str[i] > 0x7E)) {
return PR_FALSE;
}
}
return PR_TRUE;
}
// a structure to hold a font family list
typedef struct nsFontEnumParamsBeOS {
nsFontMetricsBeOS *metrics;
nsStringArray family;
nsVoidArray isgeneric;
} NS_FONT_ENUM_PARAMS_BEOS;
// a callback func to get a font family list from a nsFont object
static PRBool FontEnumCallback(const nsString& aFamily, PRBool aGeneric, void *aData)
{
NS_FONT_ENUM_PARAMS_BEOS *param = (NS_FONT_ENUM_PARAMS_BEOS *) aData;
param->family.AppendString(aFamily);
param->isgeneric.AppendElement((void*) aGeneric);
if (aGeneric)
return PR_FALSE;
return PR_TRUE;
}
NS_IMETHODIMP nsFontMetricsBeOS::Init(const nsFont& aFont, nsIAtom* aLangGroup,
nsIDeviceContext* aContext)
{
NS_ASSERTION(!(nsnull == aContext), "attempt to init fontmetrics with null device context");
mLangGroup = aLangGroup;
mDeviceContext = aContext;
// get font family list
NS_FONT_ENUM_PARAMS_BEOS param;
param.metrics = this;
aFont.EnumerateFamilies(FontEnumCallback, &param);
PRInt16 face = 0;
mFont = new nsFont(aFont);
float app2dev, app2twip;
aContext->GetAppUnitsToDevUnits(app2dev);
aContext->GetDevUnitsToTwips(app2twip);
float textZoom = 1.0;
aContext->GetTextZoom(textZoom);
app2twip *= app2dev;
float rounded = ((float)NSIntPointsToTwips(NSTwipsToFloorIntPoints(nscoord(mFont->size * app2twip * textZoom)))) / app2twip;
// process specified fonts from first item of the array.
// stop processing next when a real font found;
PRBool fontfound = PR_FALSE;
for (int i=0 ; i<param.family.Count() && !fontfound ; i++) {
nsString *fam = param.family.StringAt(i);
PRBool isgeneric = ( param.isgeneric[i] ) ? PR_TRUE: PR_FALSE;
char *family = ToNewUTF8String(*fam);
if (!isgeneric) {
// non-generic font
if ( count_font_styles((font_family)family) <= 0) {
// the specified font is not exist in this computer.
nsMemory::Free(family);
continue;
}
mFontHandle.SetFamilyAndStyle( (font_family)family, NULL );
nsMemory::Free(family);
fontfound = PR_TRUE;
break;
}
else {
// family is generic string like
// "serif" "sans-serif" "cursive" "fantasy" "monospace" "-moz-fixed"
// so look up preferences and get real family name
const PRUnichar *langGroup;
aLangGroup->GetUnicode( &langGroup );
char *lang = ToNewUTF8String(nsDependentString(langGroup));
char prop[256];
sprintf( prop, "font.name.%s.%s", family, lang );
nsMemory::Free(lang);
nsMemory::Free(family);
// look up prefs
char *real_family = NULL;
nsresult res = NS_ERROR_FAILURE;
//NS_WITH_SERVICE( nsIPref, prefs, kPrefCID, &res );
nsCOMPtr<nsIPref> prefs = do_GetService( kPrefCID, &res );
if( res == NS_OK ) {
prefs->CopyCharPref( prop, &real_family );
if ( (real_family) && count_font_styles((font_family)real_family) > 0) {
mFontHandle.SetFamilyAndStyle( (font_family)real_family, NULL );
fontfound = PR_TRUE;
break;
}
}
// not successful. use normal font.
mFontHandle = be_plain_font;
fontfound = PR_TRUE;
break;
}
}
// if got no font, then use system font.
if (!fontfound)
mFontHandle = be_plain_font;
if (aFont.style == NS_FONT_STYLE_ITALIC)
face |= B_ITALIC_FACE;
if( aFont.weight > NS_FONT_WEIGHT_NORMAL )
face |= B_BOLD_FACE;
// I don't think B_UNDERSCORE_FACE and B_STRIKEOUT_FACE really works...
// instead, nsTextFrame do them for us. ( my guess... Makoto Hamanaka )
if( aFont.decorations & NS_FONT_DECORATION_UNDERLINE )
face |= B_UNDERSCORE_FACE;
if( aFont.decorations & NS_FONT_DECORATION_LINE_THROUGH )
face |= B_STRIKEOUT_FACE;
mFontHandle.SetFace( face );
// emulate italic and bold if the selected family has no such style
if (aFont.style == NS_FONT_STYLE_ITALIC
&& !(mFontHandle.Face() & B_ITALIC_FACE)) {
mFontHandle.SetShear(105.0);
}
if ( aFont.weight > NS_FONT_WEIGHT_NORMAL
&& !(mFontHandle.Face() & B_BOLD_FACE)) {
mEmulateBold = PR_TRUE;
}
mFontHandle.SetSize( rounded * app2dev );
#ifdef NOISY_FONTS
#ifdef DEBUG
fprintf(stderr, "looking for font %s (%d)", wildstring, aFont.size / app2twip);
#endif
#endif
RealizeFont(aContext);
return NS_OK;
}
NS_IMETHODIMP nsFontMetricsBeOS::Destroy()
{
mDeviceContext = nsnull;
return NS_OK;
}
void nsFontMetricsBeOS::RealizeFont(nsIDeviceContext* aContext)
{
float f;
aContext->GetDevUnitsToAppUnits(f);
struct font_height height;
mFontHandle.GetHeight( &height );
struct font_height emHeight;
be_plain_font->GetHeight(&emHeight);
int lineSpacing = nscoord(height.ascent + height.descent);
if (lineSpacing > (emHeight.ascent + emHeight.descent)) {
mLeading = nscoord((lineSpacing - (emHeight.ascent + emHeight.descent)) * f);
}
else {
mLeading = 0;
}
mEmHeight = PR_MAX(1, nscoord((emHeight.ascent + emHeight.descent) * f));
mEmAscent = nscoord(height.ascent * (emHeight.ascent + emHeight.descent) * f / lineSpacing);
mEmDescent = mEmHeight - mEmAscent;
mMaxHeight = nscoord((height.ascent +
height.descent) * f) ;
mMaxAscent = nscoord(height.ascent * f) ;
mMaxDescent = nscoord(height.descent * f);
mMaxAdvance = nscoord(mFontHandle.BoundingBox().Width() * f);
// 56% of ascent, best guess for non-true type
mXHeight = NSToCoordRound((float) height.ascent* f * 0.56f);
float rawWidth = mFontHandle.StringWidth(" ");
mSpaceWidth = NSToCoordRound(rawWidth * f);
/* Temp */
mUnderlineOffset = -NSToIntRound(MAX (1, floor (0.1 * (height.ascent + height.descent + height.leading) + 0.5)) * f);
mUnderlineSize = NSToIntRound(MAX(1, floor (0.05 * (height.ascent + height.descent + height.leading) + 0.5)) * f);
mSuperscriptOffset = mXHeight;
mSubscriptOffset = mXHeight;
/* need better way to calculate this */
mStrikeoutOffset = NSToCoordRound(mXHeight / 2.0);
mStrikeoutSize = mUnderlineSize;
}
NS_IMETHODIMP nsFontMetricsBeOS::GetXHeight(nscoord& aResult)
{
aResult = mXHeight;
return NS_OK;
}
NS_IMETHODIMP nsFontMetricsBeOS::GetSuperscriptOffset(nscoord& aResult)
{
aResult = mSuperscriptOffset;
return NS_OK;
}
NS_IMETHODIMP nsFontMetricsBeOS::GetSubscriptOffset(nscoord& aResult)
{
aResult = mSubscriptOffset;
return NS_OK;
}
NS_IMETHODIMP nsFontMetricsBeOS::GetStrikeout(nscoord& aOffset, nscoord& aSize)
{
aOffset = mStrikeoutOffset;
aSize = mStrikeoutSize;
// aOffset = nscoord( ( mAscent / 2 ) - mDescent );
// aSize = nscoord( 20 ); // FIXME Put 1 pixel which equal 20 twips..
return NS_OK;
}
NS_IMETHODIMP nsFontMetricsBeOS::GetUnderline(nscoord& aOffset, nscoord& aSize)
{
aOffset = mUnderlineOffset;
aSize = mUnderlineSize;
//aOffset = nscoord( 0 ); // FIXME
//aSize = nscoord( 20 ); // FIXME
return NS_OK;
}
NS_IMETHODIMP nsFontMetricsBeOS::GetHeight(nscoord &aHeight)
{
aHeight = mMaxHeight;
return NS_OK;
}
NS_IMETHODIMP nsFontMetricsBeOS::GetNormalLineHeight(nscoord &aHeight)
{
aHeight = mEmHeight + mLeading;
return NS_OK;
}
NS_IMETHODIMP nsFontMetricsBeOS::GetLeading(nscoord &aLeading)
{
aLeading = mLeading;
return NS_OK;
}
NS_IMETHODIMP nsFontMetricsBeOS::GetEmHeight(nscoord &aHeight)
{
aHeight = mEmHeight;
return NS_OK;
}
NS_IMETHODIMP nsFontMetricsBeOS::GetEmAscent(nscoord &aAscent)
{
aAscent = mEmAscent;
return NS_OK;
}
NS_IMETHODIMP nsFontMetricsBeOS::GetEmDescent(nscoord &aDescent)
{
aDescent = mEmDescent;
return NS_OK;
}
NS_IMETHODIMP nsFontMetricsBeOS::GetMaxHeight(nscoord &aHeight)
{
aHeight = mMaxHeight;
return NS_OK;
}
NS_IMETHODIMP nsFontMetricsBeOS::GetMaxAscent(nscoord &aAscent)
{
aAscent = mMaxAscent;
return NS_OK;
}
NS_IMETHODIMP nsFontMetricsBeOS::GetMaxDescent(nscoord &aDescent)
{
aDescent = mMaxDescent;
return NS_OK;
}
NS_IMETHODIMP nsFontMetricsBeOS::GetMaxAdvance(nscoord &aAdvance)
{
aAdvance = mMaxAdvance;
return NS_OK;
}
NS_IMETHODIMP nsFontMetricsBeOS::GetSpaceWidth(nscoord &aSpaceWidth)
{
aSpaceWidth = mSpaceWidth;
return NS_OK;
}
NS_IMETHODIMP nsFontMetricsBeOS::GetFont(const nsFont*& aFont)
{
aFont = mFont;
return NS_OK;
}
NS_IMETHODIMP nsFontMetricsBeOS::GetLangGroup(nsIAtom** aLangGroup)
{
if (!aLangGroup) {
return NS_ERROR_NULL_POINTER;
}
*aLangGroup = mLangGroup;
NS_IF_ADDREF(*aLangGroup);
return NS_OK;
}
NS_IMETHODIMP nsFontMetricsBeOS::GetFontHandle(nsFontHandle &aHandle)
{
aHandle = (nsFontHandle)&mFontHandle;
return NS_OK;
}
nsresult
nsFontMetricsBeOS::FamilyExists(const nsString& aName)
{
if (!IsASCIIFontName(aName)) {
return NS_ERROR_FAILURE;
}
nsCAutoString name;
name.AssignWithConversion(aName.get());
ToLowerCase(name);
PRBool isthere = PR_FALSE;
char* cStr = ToNewCString(name);
int32 numFamilies = count_font_families();
for(int32 i = 0; i < numFamilies; i++) {
font_family family;
uint32 flags;
if(get_font_family(i, &family, &flags) == B_OK) {
if(strcmp(family, cStr) == 0) {
isthere = PR_TRUE;
break;
}
}
}
//printf("%s there? %s\n", cStr, isthere?"Yes":"No" );
delete[] cStr;
if (PR_TRUE == isthere)
return NS_OK;
else
return NS_ERROR_FAILURE;
}
// The Font Enumerator
nsFontEnumeratorBeOS::nsFontEnumeratorBeOS()
{
NS_INIT_REFCNT();
}
NS_IMPL_ISUPPORTS1(nsFontEnumeratorBeOS, nsIFontEnumerator)
static int
CompareFontNames(const void* aArg1, const void* aArg2, void* aClosure)
{
const PRUnichar* str1 = *((const PRUnichar**) aArg1);
const PRUnichar* str2 = *((const PRUnichar**) aArg2);
// XXX add nsICollation stuff
return nsCRT::strcmp(str1, str2);
}
static nsresult
EnumFonts(nsIAtom* aLangGroup, const char* aGeneric, PRUint32* aCount,
PRUnichar*** aResult)
{
nsString font_name;
int32 numFamilies = count_font_families();
PRUnichar** array =
(PRUnichar**) nsMemory::Alloc(numFamilies * sizeof(PRUnichar*));
if (!array) {
return NS_ERROR_OUT_OF_MEMORY;
}
for(int32 i = 0; i < numFamilies; i++) {
font_family family;
uint32 flags;
if(get_font_family(i, &family, &flags) == B_OK) {
font_name.AssignWithConversion(family);
array[i] = ToNewUnicode(font_name);
}
}
NS_QuickSort(array, numFamilies, sizeof(PRUnichar*), CompareFontNames,
nsnull);
*aCount = numFamilies;
if (*aCount) {
*aResult = array;
}
else {
nsMemory::Free(array);
}
return NS_OK;
}
NS_IMETHODIMP
nsFontEnumeratorBeOS::EnumerateAllFonts(PRUint32* aCount, PRUnichar*** aResult)
{
NS_ENSURE_ARG_POINTER(aResult);
*aResult = nsnull;
NS_ENSURE_ARG_POINTER(aCount);
*aCount = 0;
return EnumFonts(nsnull, nsnull, aCount, aResult);
}
NS_IMETHODIMP
nsFontEnumeratorBeOS::EnumerateFonts(const char* aLangGroup,
const char* aGeneric, PRUint32* aCount, PRUnichar*** aResult)
{
NS_ENSURE_ARG_POINTER(aResult);
*aResult = nsnull;
NS_ENSURE_ARG_POINTER(aCount);
*aCount = 0;
NS_ENSURE_ARG_POINTER(aGeneric);
NS_ENSURE_ARG_POINTER(aLangGroup);
nsCOMPtr<nsIAtom> langGroup = getter_AddRefs(NS_NewAtom(aLangGroup));
// XXX still need to implement aLangGroup and aGeneric
return EnumFonts(langGroup, aGeneric, aCount, aResult);
}
NS_IMETHODIMP
nsFontEnumeratorBeOS::HaveFontFor(const char* aLangGroup, PRBool* aResult)
{
NS_ENSURE_ARG_POINTER(aLangGroup);
NS_ENSURE_ARG_POINTER(aResult);
*aResult = PR_FALSE;
// XXX stub
return NS_OK;
}
NS_IMETHODIMP
nsFontEnumeratorBeOS::UpdateFontList(PRBool *updateFontList)
{
*updateFontList = PR_FALSE; // always return false for now
return NS_OK;
}

View File

@@ -1,137 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Paul Ashford <arougthopher@lizardland.net>
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef nsFontMetricsBeOS_h__
#define nsFontMetricsBeOS_h__
#include "nsDeviceContextBeOS.h"
#include "nsIFontMetrics.h"
#include "nsIFontEnumerator.h"
#include "nsFont.h"
#include "nsString.h"
#include "nsUnitConversion.h"
#include "nsIDeviceContext.h"
#include "nsCRT.h"
#include "nsCOMPtr.h"
#include "nsRenderingContextBeOS.h"
#include "nsICharRepresentable.h"
#include <Font.h>
class nsFontMetricsBeOS : public nsIFontMetrics
{
public:
nsFontMetricsBeOS();
virtual ~nsFontMetricsBeOS();
NS_DECL_AND_IMPL_ZEROING_OPERATOR_NEW
NS_DECL_ISUPPORTS
NS_IMETHOD Init(const nsFont& aFont, nsIAtom* aLangGroup,
nsIDeviceContext* aContext);
NS_IMETHOD Destroy();
NS_IMETHOD GetXHeight(nscoord& aResult);
NS_IMETHOD GetSuperscriptOffset(nscoord& aResult);
NS_IMETHOD GetSubscriptOffset(nscoord& aResult);
NS_IMETHOD GetStrikeout(nscoord& aOffset, nscoord& aSize);
NS_IMETHOD GetUnderline(nscoord& aOffset, nscoord& aSize);
NS_IMETHOD GetHeight(nscoord &aHeight);
NS_IMETHOD GetNormalLineHeight(nscoord &aHeight);
NS_IMETHOD GetLeading(nscoord &aLeading);
NS_IMETHOD GetEmHeight(nscoord &aHeight);
NS_IMETHOD GetEmAscent(nscoord &aAscent);
NS_IMETHOD GetEmDescent(nscoord &aDescent);
NS_IMETHOD GetMaxHeight(nscoord &aHeight);
NS_IMETHOD GetMaxAscent(nscoord &aAscent);
NS_IMETHOD GetMaxDescent(nscoord &aDescent);
NS_IMETHOD GetMaxAdvance(nscoord &aAdvance);
NS_IMETHOD GetFont(const nsFont *&aFont);
NS_IMETHOD GetLangGroup(nsIAtom** aLangGroup);
NS_IMETHOD GetFontHandle(nsFontHandle &aHandle);
NS_IMETHOD GetSpaceWidth(nscoord &aSpaceWidth);
static nsresult FamilyExists(const nsString& aFontName);
inline PRBool GetEmulateBold() { return mEmulateBold; }
nsCOMPtr<nsIAtom> mLangGroup;
protected:
void RealizeFont(nsIDeviceContext* aContext);
nsIDeviceContext *mDeviceContext;
nsFont *mFont;
BFont mFontHandle;
nscoord mLeading;
nscoord mEmHeight;
nscoord mEmAscent;
nscoord mEmDescent;
nscoord mMaxHeight;
nscoord mMaxAscent;
nscoord mMaxDescent;
nscoord mMaxAdvance;
nscoord mXHeight;
nscoord mSuperscriptOffset;
nscoord mSubscriptOffset;
nscoord mStrikeoutSize;
nscoord mStrikeoutOffset;
nscoord mUnderlineSize;
nscoord mUnderlineOffset;
nscoord mSpaceWidth;
PRUint16 mPixelSize;
PRUint8 mStretchIndex;
PRUint8 mStyleIndex;
PRBool mEmulateBold;
};
class nsFontEnumeratorBeOS : public nsIFontEnumerator
{
public:
nsFontEnumeratorBeOS();
NS_DECL_ISUPPORTS
NS_DECL_NSIFONTENUMERATOR
};
#endif

View File

@@ -1,189 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "nsIGenericFactory.h"
#include "nsIModule.h"
#include "nsCOMPtr.h"
#include "nsGfxCIID.h"
#include "nsBlender.h"
#include "nsFontMetricsBeOS.h"
#include "nsRenderingContextBeOS.h"
// aka nsDeviceContextSpecBeOS.h
#include "nsDeviceContextSpecB.h"
// aka nsDeviceContextSpecFactoryBeOS.h
#include "nsDeviceContextSpecFactoryB.h"
#include "nsScreenManagerBeOS.h"
#include "nsScriptableRegion.h"
#include "nsDeviceContextBeOS.h"
#include "nsPrintOptionsBeOS.h"
#include "nsImageBeOS.h"
#include "nsFontList.h"
// objects that just require generic constructors
NS_GENERIC_FACTORY_CONSTRUCTOR(nsFontMetricsBeOS)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsDeviceContextBeOS)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsRenderingContextBeOS)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsImageBeOS)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsBlender)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsRegionBeOS)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsDeviceContextSpecBeOS)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsDeviceContextSpecFactoryBeOS)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsFontEnumeratorBeOS)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsFontList);
NS_GENERIC_FACTORY_CONSTRUCTOR(nsScreenManagerBeOS)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsPrinterEnumeratorBeOS)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsPrintOptionsBeOS)
// our custom constructors
static NS_IMETHODIMP nsScriptableRegionConstructor(nsISupports *aOuter, REFNSIID aIID, void **aResult)
{
nsresult rv;
nsIScriptableRegion *inst;
if ( !aResult )
{
rv = NS_ERROR_NULL_POINTER;
return rv;
}
*aResult = nsnull;
if (aOuter)
{
rv = NS_ERROR_NO_AGGREGATION;
return rv;
}
// create an nsRegionBeOS and get the scriptable region from it
nsCOMPtr <nsIRegion> rgn;
NS_NEWXPCOM(rgn, nsRegionBeOS);
nsCOMPtr<nsIScriptableRegion> scriptableRgn;
if (rgn != nsnull)
{
scriptableRgn = new nsScriptableRegion(rgn);
inst = scriptableRgn;
}
if (!inst)
{
rv = NS_ERROR_OUT_OF_MEMORY;
return rv;
}
NS_ADDREF(inst);
// release our variable above now that we have created our owning
// reference - we don't want this to go out of scope early!
scriptableRgn = nsnull;
rv = inst->QueryInterface(aIID, aResult);
NS_RELEASE(inst);
return rv;
}
static const nsModuleComponentInfo components[] =
{
{ "BeOS Font Metrics",
NS_FONT_METRICS_CID,
// "@mozilla.org/gfx/font_metrics/beos;1",
"@mozilla.org/gfx/fontmetrics;1",
nsFontMetricsBeOSConstructor },
{ "BeOS Device Context",
NS_DEVICE_CONTEXT_CID,
// "@mozilla.org/gfx/device_context/beos;1",
"@mozilla.org/gfx/devicecontext;1",
nsDeviceContextBeOSConstructor },
{ "BeOS Rendering Context",
NS_RENDERING_CONTEXT_CID,
// "@mozilla.org/gfx/rendering_context/beos;1",
"@mozilla.org/gfx/renderingcontext;1",
nsRenderingContextBeOSConstructor },
{ "BeOS Image",
NS_IMAGE_CID,
// "@mozilla.org/gfx/image/beos;1",
"@mozilla.org/gfx/image;1",
nsImageBeOSConstructor },
{ "BeOS Region",
NS_REGION_CID,
"@mozilla.org/gfx/region/beos;1",
nsRegionBeOSConstructor },
{ "Scriptable Region",
NS_SCRIPTABLE_REGION_CID,
// "@mozilla.org/gfx/scriptable_region;1",
"@mozilla.org/gfx/region;1",
nsScriptableRegionConstructor },
{ "Blender",
NS_BLENDER_CID,
// "@mozilla.org/gfx/blender;1",
"@mozilla.org/gfx/blender;1",
nsBlenderConstructor },
{ "BeOS Device Context Spec",
NS_DEVICE_CONTEXT_SPEC_CID,
// "@mozilla.org/gfx/device_context_spec/beos;1",
"@mozilla.org/gfx/devicecontextspec;1",
nsDeviceContextSpecBeOSConstructor },
{ "BeOS Device Context Spec Factory",
NS_DEVICE_CONTEXT_SPEC_FACTORY_CID,
// "@mozilla.org/gfx/device_context_spec_factory/beos;1",
"@mozilla.org/gfx/devicecontextspecfactory;1",
nsDeviceContextSpecFactoryBeOSConstructor },
{ "BeOS Font Enumerator",
NS_FONT_ENUMERATOR_CID,
// "@mozilla.org/gfx/font_enumerator/beos;1",
"@mozilla.org/gfx/fontenumerator;1",
nsFontEnumeratorBeOSConstructor },
{ "Font List",
NS_FONTLIST_CID,
// "@mozilla.org/gfx/fontlist;1"
NS_FONTLIST_CONTRACTID,
nsFontListConstructor },
{ "BeOS Screen Manager",
NS_SCREENMANAGER_CID,
// "@mozilla.org/gfx/screenmanager/beos;1",
"@mozilla.org/gfx/screenmanager;1",
nsScreenManagerBeOSConstructor },
{ "BeOS Printer Enumerator",
NS_PRINTER_ENUMERATOR_CID,
// "@mozilla.org/gfx/printer_enumerator/beos;1",
"@mozilla.org/gfx/printerenumerator;1",
nsPrinterEnumeratorBeOSConstructor },
{ "BeOS Printer Options",
NS_PRINTOPTIONS_CID,
"@mozilla.org/gfx/printoptions;1",
nsPrintOptionsBeOSConstructor }
};
NS_IMPL_NSGETMODULE(nsGfxBeOSModule, components)

View File

@@ -1,141 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "nsGraphicsStateBeOS.h"
//////////////////////////////////////////////////////////////////////////
nsGraphicsState::nsGraphicsState()
{
mMatrix = nsnull;
mClipRegion = nsnull;
mColor = 0;
mLineStyle = nsLineStyle_kSolid;
mFontMetrics = nsnull;
}
//////////////////////////////////////////////////////////////////////////
nsGraphicsState::~nsGraphicsState()
{
NS_IF_RELEASE(mFontMetrics);
}
//////////////////////////////////////////////////////////////////////////
nsGraphicsStatePool::nsGraphicsStatePool()
{
mFreeList = nsnull;
}
//////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////
//
// Public nsGraphicsStatePool
//
//////////////////////////////////////////////////////////////////////////
/* static */ nsGraphicsState *
nsGraphicsStatePool::GetNewGS()
{
nsGraphicsStatePool * thePool = PrivateGetPool();
return thePool->PrivateGetNewGS();
}
//////////////////////////////////////////////////////////////////////////
/* static */ void
nsGraphicsStatePool::ReleaseGS(nsGraphicsState* aGS)
{
nsGraphicsStatePool * thePool = PrivateGetPool();
thePool->PrivateReleaseGS(aGS);
}
//////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////
//
// Private nsGraphicsStatePool
//
//////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////
nsGraphicsStatePool *
nsGraphicsStatePool::gsThePool = nsnull;
//////////////////////////////////////////////////////////////////////////
nsGraphicsStatePool *
nsGraphicsStatePool::PrivateGetPool()
{
if (nsnull == gsThePool)
{
gsThePool = new nsGraphicsStatePool();
}
return gsThePool;
}
//////////////////////////////////////////////////////////////////////////
nsGraphicsStatePool::~nsGraphicsStatePool()
{
nsGraphicsState* gs = mFreeList;
while (gs != nsnull) {
nsGraphicsState* next = gs->mNext;
delete gs;
gs = next;
}
}
//////////////////////////////////////////////////////////////////////////
nsGraphicsState *
nsGraphicsStatePool::PrivateGetNewGS()
{
nsGraphicsState* gs = mFreeList;
if (gs != nsnull) {
mFreeList = gs->mNext;
return gs;
}
return new nsGraphicsState;
}
//////////////////////////////////////////////////////////////////////////
void
nsGraphicsStatePool::PrivateReleaseGS(nsGraphicsState* aGS)
{
// aGS->Clear();
aGS->mNext = mFreeList;
mFreeList = aGS;
}
//////////////////////////////////////////////////////////////////////////

View File

@@ -1,91 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef nsGraphicsStateBeOS_h___
#define nsGraphicsStateBeOS_h___
#include "nsIRenderingContext.h"
#include "nsIFontMetrics.h"
#include "nsTransform2D.h"
#include "nsRegionBeOS.h"
#include "nsCOMPtr.h"
class nsGraphicsState
{
public:
nsTransform2D *mMatrix;
nsCOMPtr<nsIRegion> mClipRegion;
nscolor mColor;
nsLineStyle mLineStyle;
nsIFontMetrics *mFontMetrics;
nsGraphicsState *mNext; // link into free list of graphics states.
friend class nsGraphicsStatePool;
#ifndef USE_GS_POOL
friend class nsRenderingContextBeOS;
#endif
private:
nsGraphicsState();
~nsGraphicsState();
};
class nsGraphicsStatePool
{
public:
static nsGraphicsState * GetNewGS();
static void ReleaseGS(nsGraphicsState* aGS);
nsGraphicsStatePool();
~nsGraphicsStatePool();
private:
nsGraphicsState* mFreeList;
static nsGraphicsStatePool * PrivateGetPool();
nsGraphicsState * PrivateGetNewGS();
void PrivateReleaseGS(nsGraphicsState* aGS);
static nsGraphicsStatePool * gsThePool;
};
#endif /* nsGraphicsStateBeOS_h___ */

View File

@@ -1,84 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef nsIDrawingSurfaceBeOS_h___
#define nsIDrawingSurfaceBeOS_h___
#include "nsIDrawingSurface.h"
#include <View.h>
// windows specific drawing surface method set
#define NS_IDRAWING_SURFACE_BEOS_IID \
{ 0x1ed958b0, 0xcab6, 0x11d2, \
{ 0xa8, 0x49, 0x00, 0x40, 0x95, 0x9a, 0x28, 0xc9 } }
class nsIDrawingSurfaceBeOS : public nsISupports
{
public:
NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDRAWING_SURFACE_BEOS_IID)
/**
* Initialize a drawing surface using a windows DC.
* aDC is "owned" by the drawing surface until the drawing
* surface is destroyed.
* @param aDC HDC to initialize drawing surface with
* @return error status
**/
NS_IMETHOD Init(BView *aView) = 0;
/**
* Initialize an offscreen drawing surface using a
* windows DC. aDC is not "owned" by this drawing surface, instead
* it is used to create a drawing surface compatible
* with aDC. if width or height are less than zero, aDC will
* be created with no offscreen bitmap installed.
* @param aDC HDC to initialize drawing surface with
* @param aWidth width of drawing surface
* @param aHeight height of drawing surface
* @param aFlags flags used to control type of drawing
* surface created
* @return error status
**/
NS_IMETHOD Init(BView *aView, PRUint32 aWidth, PRUint32 aHeight,
PRUint32 aFlags) = 0;
};
#endif // nsIDrawingSurfaceBeOS_h___

View File

@@ -1,712 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "nsImageBeOS.h"
#include "nsRenderingContextBeOS.h"
#include "nspr.h"
//#include <string.h>
#include "imgScaler.h"
#define IsFlagSet(a,b) (a & b)
NS_IMPL_ISUPPORTS1(nsImageBeOS, nsIImage)
//------------------------------------------------------------
nsImageBeOS::nsImageBeOS()
{
NS_INIT_REFCNT();
mStaticImage = PR_FALSE;
mImageBits = nsnull;
mWidth = 0;
mHeight = 0;
mDepth = 0;
mAlphaBits = nsnull;
mAlphaDepth = 0;
mRowBytes = 0;
mSizeImage = 0;
mAlphaHeight = 0;
mAlphaWidth = 0;
mImage = nsnull;
mNaturalWidth = 0;
mNaturalHeight = 0;
}
//------------------------------------------------------------
nsImageBeOS::~nsImageBeOS()
{
if (NULL != mImage) {
delete mImage;
mImage = NULL;
}
if(nsnull != mImageBits) {
delete[] (PRUint8*)mImageBits;
mImageBits = nsnull;
}
if (nsnull != mAlphaBits) {
delete[] (PRUint8*)mAlphaBits;
mAlphaBits = nsnull;
}
}
//------------------------------------------------------------
nsresult
nsImageBeOS::Init(PRInt32 aWidth, PRInt32 aHeight,
PRInt32 aDepth, nsMaskRequirements aMaskRequirements)
{
if (nsnull != mImageBits) {
delete[] (PRUint8*)mImageBits;
mImageBits = nsnull;
}
if (nsnull != mAlphaBits) {
delete[] (PRUint8*)mAlphaBits;
mAlphaBits = nsnull;
}
SetDecodedRect(0,0,0,0); //init
SetNaturalWidth(0);
SetNaturalHeight(0);
if (24 == aDepth) {
mNumBytesPixel = 3;
} else {
NS_ASSERTION(PR_FALSE, "unexpected image depth");
return NS_ERROR_UNEXPECTED;
}
mWidth = aWidth;
mHeight = aHeight;
mDepth = aDepth;
mIsTopToBottom = PR_TRUE;
// create the memory for the image
ComputeMetrics();
mImageBits = (PRUint8*) new PRUint8[mSizeImage];
switch(aMaskRequirements)
{
case nsMaskRequirements_kNoMask:
mAlphaBits = nsnull;
mAlphaWidth = 0;
mAlphaHeight = 0;
break;
case nsMaskRequirements_kNeeds1Bit:
mAlphaRowBytes = (aWidth + 7) / 8;
mAlphaDepth = 1;
// 32-bit align each row
mAlphaRowBytes = (mAlphaRowBytes + 3) & ~0x3;
mAlphaBits = new PRUint8[mAlphaRowBytes * aHeight];
memset(mAlphaBits, 255, mAlphaRowBytes * aHeight);
mAlphaWidth = aWidth;
mAlphaHeight = aHeight;
break;
case nsMaskRequirements_kNeeds8Bit:
mAlphaRowBytes = aWidth;
mAlphaDepth = 8;
// 32-bit align each row
mAlphaRowBytes = (mAlphaRowBytes + 3) & ~0x3;
mAlphaBits = new PRUint8[mAlphaRowBytes * aHeight];
mAlphaWidth = aWidth;
mAlphaHeight = aHeight;
break;
}
return NS_OK;
}
//------------------------------------------------------------
PRInt32 nsImageBeOS::GetHeight()
{
return mHeight;
}
PRInt32 nsImageBeOS::GetWidth()
{
return mWidth;
}
PRUint8 *nsImageBeOS::GetBits()
{
return mImageBits;
}
void *nsImageBeOS::GetBitInfo()
{
return nsnull;
}
PRInt32 nsImageBeOS::GetLineStride()
{
return mRowBytes;
}
nsColorMap *nsImageBeOS::GetColorMap()
{
return nsnull;
}
PRBool nsImageBeOS::IsOptimized()
{
return mStaticImage;
}
PRUint8 *nsImageBeOS::GetAlphaBits()
{
return mAlphaBits;
}
PRInt32 nsImageBeOS::GetAlphaWidth()
{
return mAlphaWidth;
}
PRInt32 nsImageBeOS::GetAlphaHeight()
{
return mAlphaHeight;
}
PRInt32 nsImageBeOS::GetAlphaLineStride()
{
return mAlphaRowBytes;
}
nsIImage *nsImageBeOS::DuplicateImage()
{
return nsnull;
}
void nsImageBeOS::SetAlphaLevel(PRInt32 aAlphaLevel)
{
}
PRInt32 nsImageBeOS::GetAlphaLevel()
{
return 0;
}
void nsImageBeOS::MoveAlphaMask(PRInt32 aX, PRInt32 aY)
{
}
//------------------------------------------------------------
// set up the palette to the passed in color array, RGB only in this array
void
nsImageBeOS::ImageUpdated(nsIDeviceContext *aContext,
PRUint8 aFlags,
nsRect *aUpdateRect)
{
mFlags = aFlags; // this should be 0'd out by Draw()
}
// Draw the bitmap, this method has a source and destination coordinates
NS_IMETHODIMP
nsImageBeOS::Draw(nsIRenderingContext &aContext, nsDrawingSurface aSurface,
PRInt32 aSX, PRInt32 aSY, PRInt32 aSWidth, PRInt32 aSHeight,
PRInt32 aDX, PRInt32 aDY, PRInt32 aDWidth, PRInt32 aDHeight)
{
nsDrawingSurfaceBeOS *beosdrawing =(nsDrawingSurfaceBeOS *) aSurface;
BView *view;
beosdrawing->AcquireView(&view);
if((PR_FALSE == mStaticImage) || (NULL == mImage))
BuildImage(aSurface);
if(NULL == mImage)
return PR_FALSE;
if(view && view->LockLooper())
{
view->SetDrawingMode(B_OP_ALPHA);
view->DrawBitmapAsync(mImage, BRect(aSX, aSY, aSX + aSWidth - 1, aSY + aSHeight - 1),
BRect(aDX, aDY, aDX + aDWidth - 1, aDY + aDHeight - 1));
view->SetDrawingMode(B_OP_COPY);
view->Sync();
view->UnlockLooper();
}
beosdrawing->ReleaseView();
return NS_OK;
}
//------------------------------------------------------------
// Draw the bitmap, this draw just has destination coordinates
NS_IMETHODIMP
nsImageBeOS::Draw(nsIRenderingContext &aContext,
nsDrawingSurface aSurface,
PRInt32 aX, PRInt32 aY,
PRInt32 aWidth, PRInt32 aHeight)
{
// XXX kipp: this is temporary code until we eliminate the
// width/height arguments from the draw method.
aWidth = PR_MIN(aWidth, mWidth);
aHeight = PR_MIN(aHeight, mHeight);
nsDrawingSurfaceBeOS *beosdrawing = (nsDrawingSurfaceBeOS *) aSurface;
BView *view;
beosdrawing->AcquireView(&view);
if((PR_FALSE == mStaticImage) || (NULL == mImage))
BuildImage(aSurface);
if(NULL == mImage)
return PR_FALSE;
if(view && view->LockLooper())
{
view->SetDrawingMode(B_OP_ALPHA);
view->DrawBitmapAsync(mImage,
BRect(0, 0, aWidth - 1, aHeight - 1),
BRect(aX, aY, aX + aWidth - 1, aY + aHeight - 1));
view->SetDrawingMode(B_OP_COPY);
view->Sync();
view->UnlockLooper();
}
beosdrawing->ReleaseView();
return NS_OK;
}
/**
* Draw a tiled version of the bitmap
* @update - dwc 3/30/00
* @param aSurface the surface to blit to
* @param aX0 starting x
* @param aY0 starting y
* @param aX1 ending x
* @param aY1 ending y
* @param aWidth The destination width of the pixelmap
* @param aHeight The destination height of the pixelmap
*/
NS_IMETHODIMP nsImageBeOS::DrawTile(nsIRenderingContext &aContext,
nsDrawingSurface aSurface,
nsRect &aSrcRect,
nsRect &aTileRect)
{
PRInt32 aY0 = aTileRect.y,
aX0 = aTileRect.x,
aY1 = aTileRect.y + aTileRect.height,
aX1 = aTileRect.x + aTileRect.width;
for (PRInt32 y = aY0; y < aY1; y+=aSrcRect.height)
for (PRInt32 x = aX0; x < aX1; x+=aSrcRect.width)
Draw(aContext,aSurface,x,y,
PR_MIN(aSrcRect.width, aX1-x),
PR_MIN(aSrcRect.height, aY1-y));
return NS_OK;
}
NS_IMETHODIMP nsImageBeOS::DrawTile(nsIRenderingContext &aContext,
nsDrawingSurface aSurface,
PRInt32 aSXOffset, PRInt32 aSYOffset,
const nsRect &aTileRect)
{
PRInt32
validX = 0,
validY = 0,
validWidth = mWidth,
validHeight = mHeight;
// limit the image rectangle to the size of the image data which
// has been validated.
if ((mDecodedY2 < mHeight)) {
validHeight = mDecodedY2 - mDecodedY1;
}
if ((mDecodedX2 < mWidth)) {
validWidth = mDecodedX2 - mDecodedX1;
}
if ((mDecodedY1 > 0)) {
validHeight -= mDecodedY1;
validY = mDecodedY1;
}
if ((mDecodedX1 > 0)) {
validWidth -= mDecodedX1;
validX = mDecodedX1;
}
PRInt32 aY0 = aTileRect.y - aSYOffset,
aX0 = aTileRect.x - aSXOffset,
aY1 = aTileRect.y + aTileRect.height,
aX1 = aTileRect.x + aTileRect.width;
// Set up clipping and call Draw().
PRBool clipState;
aContext.PushState();
aContext.SetClipRect(aTileRect, nsClipCombine_kIntersect,
clipState);
for (PRInt32 y = aY0; y < aY1; y+=validHeight)
for (PRInt32 x = aX0; x < aX1; x+=validWidth)
Draw(aContext,aSurface,x,y, PR_MIN(validWidth, aX1-x),
PR_MIN(validHeight, aY1-y));
aContext.PopState(clipState);
return NS_OK;
}
nsresult nsImageBeOS::BuildImage(nsDrawingSurface aDrawingSurface)
{
if(NULL != mImage)
{
delete mImage;
mImage = NULL;
}
// ConvertImage(aDrawingSurface);
CreateImage(aDrawingSurface);
return NS_OK;
}
void nsImageBeOS::CreateImage(nsDrawingSurface aSurface)
{
if(mImageBits)
{
color_space cs;
if(mDepth == 8)
cs = B_CMAP8;
else
cs = B_RGBA32;
mImage = new BBitmap(BRect(0, 0, mWidth - 1, mHeight - 1), cs);
PRInt32 span = (mWidth * mDepth) >> 5;
if (((PRUint32)mWidth * mDepth) & 0x1F)
span++;
span <<= 2;
if( mImage && mImage->IsValid() )
{
uint8 *dest = (uint8*)mImage->Bits();
uint8 *src = mImageBits;
uint8 *alpha = mAlphaBits;
if(mAlphaBits)
{
if( mDepth == 32 )
{
uint32 *pdest, *psrc;
for( int j=0; j<mHeight; j++ )
{
for( int i=0; i<mWidth; i++ )
{
pdest = (uint32*)dest; psrc = (uint32*)src;
// ANSI Shit, can't cast the lvalue!
*pdest = *psrc;
dest[3] = mAlphaDepth == 1 ? ((alpha[i / 8] & (1 << (7 - (i % 8)))) ? 255 : 0) : alpha[i];
dest += 4;
src+=4;
}
src += span - (mWidth*mNumBytesPixel);
alpha += mAlphaRowBytes;
}
}
else if( mDepth == 8 )
{
for( int j=0; j<mHeight; j++ )
{
for( int i=0; i<mWidth * mNumBytesPixel; i++ )
*dest++ = *src++;
src += span - (mWidth*mNumBytesPixel);
}
}
else if( mDepth == 24 )
{
for( int j=0; j<mHeight; j++ )
{
for( int i=0; i<mWidth; i++ )
{
dest[0] = src[0];
dest[1] = src[1];
dest[2] = src[2];
dest[3] = mAlphaDepth == 1 ? ((alpha[i / 8] & (1 << (7 - (i % 8)))) ? 255 : 0) : alpha[i];
dest+= 4;
src+=3;
}
src += span - (mWidth*mNumBytesPixel);
alpha += mAlphaRowBytes;
}
}
}
else
{
if( mDepth == 32 )
{
uint32 *pdest, *psrc;
for( int j=0; j<mHeight; j++ )
{
for( int i=0; i<mWidth; i++ )
{
pdest = (uint32*)dest; psrc = (uint32*)src;
// ANSI Shit, can't cast the lvalue!
*pdest = *psrc;
dest += 4; src+=4;
}
src += span - (mWidth*mNumBytesPixel);
}
}
else if( mDepth == 8 )
{
for( int j=0; j<mHeight; j++ )
{
for( int i=0; i<mWidth * mNumBytesPixel; i++ )
*dest++ = *src++;
src += span - (mWidth*mNumBytesPixel);
}
}
else if( mDepth == 24 )
{
for( int j=0; j<mHeight; j++ )
{
for( int i=0; i<mWidth; i++ )
{
memcpy( dest, src, mNumBytesPixel );
dest[3] = 255;
dest+= 4;
src+=3;
}
src += span - (mWidth*mNumBytesPixel);
}
}
}
}
}
}
//------------------------------------------------------------
nsresult nsImageBeOS::Optimize(nsIDeviceContext* aContext)
{
mStaticImage = PR_TRUE;
return NS_OK;
}
//------------------------------------------------------------
// lock the image pixels. Implement this if you need it.
NS_IMETHODIMP
nsImageBeOS::LockImagePixels(PRBool aMaskPixels)
{
return NS_OK;
}
//------------------------------------------------------------
// unlock the image pixels. Implement this if you need it.
NS_IMETHODIMP
nsImageBeOS::UnlockImagePixels(PRBool aMaskPixels)
{
return NS_OK;
}
// ---------------------------------------------------
// Set the decoded dimens of the image
//
NS_IMETHODIMP
nsImageBeOS::SetDecodedRect(PRInt32 x1, PRInt32 y1, PRInt32 x2, PRInt32 y2 )
{
mDecodedX1 = x1;
mDecodedY1 = y1;
mDecodedX2 = x2;
mDecodedY2 = y2;
return NS_OK;
}
#ifdef USE_IMG2
NS_IMETHODIMP nsImageBeOS::DrawToImage(nsIImage* aDstImage,
nscoord aDX, nscoord aDY,
nscoord aDWidth, nscoord aDHeight)
{
nsImageBeOS *dest = NS_STATIC_CAST(nsImageBeOS *, aDstImage);
if (!dest)
return NS_ERROR_FAILURE;
if (!dest->mImage)
dest->CreateImage(NULL);
if (!dest->mImage)
return NS_ERROR_FAILURE;
if (!mImage)
CreateImage(NULL);
if (!mImage)
return NS_ERROR_FAILURE;
BBitmap *bmpDst = dest->mImage;
BBitmap bmpTmp(bmpDst->Bounds(), bmpDst->ColorSpace(), true);
BView *v = new BView(bmpDst->Bounds(), "", 0, 0);
if (!v)
return NS_ERROR_OUT_OF_MEMORY;
memcpy( bmpTmp.Bits(), bmpDst->Bits(), bmpDst->BitsLength() );
bmpTmp.AddChild(v);
bmpTmp.Lock();
v->SetDrawingMode(B_OP_ALPHA);
v->SetBlendingMode(B_PIXEL_ALPHA, B_ALPHA_COMPOSITE);
v->DrawBitmap(mImage, BRect(0, 0, mWidth - 1, mHeight - 1), BRect( aDX, aDY, aDX + aDWidth - 1, aDY + aDHeight -1 ));
v->SetDrawingMode(B_OP_COPY);
v->Sync();
bmpTmp.Unlock();
bmpTmp.RemoveChild(v);
bmpDst->SetBits(bmpTmp.Bits(), bmpTmp.BitsLength(), 0, bmpTmp.ColorSpace() );
delete v;
//
// following part is derived from GTK version
// 2001/6/21 Makoto Hamanaka < VTA04230@nifty.com >
// need to copy the mImageBits in case we're rendered scaled
PRUint8 *scaledImage = 0, *scaledAlpha = 0;
PRUint8 *rgbPtr=0, *alphaPtr=0;
PRUint32 rgbStride, alphaStride;
if ((aDWidth != mWidth) || (aDHeight != mHeight)) {
// scale factor in DrawTo... start scaling
scaledImage = (PRUint8 *)nsMemory::Alloc(3*aDWidth*aDHeight);
if (!scaledImage)
return NS_ERROR_OUT_OF_MEMORY;
RectStretch(0, 0, mWidth-1, mHeight-1, 0, 0, aDWidth-1, aDHeight-1,
mImageBits, mRowBytes, scaledImage, 3*aDWidth, 24);
if (mAlphaDepth) {
if (mAlphaDepth==1)
alphaStride = (aDWidth+7)>>3; // round to next byte
else
alphaStride = aDWidth;
scaledAlpha = (PRUint8 *)nsMemory::Alloc(alphaStride*aDHeight);
if (!scaledAlpha) {
nsMemory::Free(scaledImage);
return NS_ERROR_OUT_OF_MEMORY;
}
RectStretch(0, 0, mWidth-1, mHeight-1, 0, 0, aDWidth-1, aDHeight-1,
mAlphaBits, mAlphaRowBytes, scaledAlpha, alphaStride,
mAlphaDepth);
}
rgbPtr = scaledImage;
rgbStride = 3*aDWidth;
alphaPtr = scaledAlpha;
} else {
rgbPtr = mImageBits;
rgbStride = mRowBytes;
alphaPtr = mAlphaBits;
alphaStride = mAlphaRowBytes;
}
PRInt32 y;
// now composite the two images together
switch (mAlphaDepth) {
case 1:
for (y=0; y<aDHeight; y++) {
PRUint8 *dst = dest->mImageBits + (y+aDY)*dest->mRowBytes + 3*aDX;
PRUint8 *dstAlpha = dest->mAlphaBits + (y+aDY)*dest->mAlphaRowBytes;
PRUint8 *src = rgbPtr + y*rgbStride;
PRUint8 *alpha = alphaPtr + y*alphaStride;
for (int x=0; x<aDWidth; x++, dst+=3, src+=3) {
#define NS_GET_BIT(rowptr, x) (rowptr[(x)>>3] & (1<<(7-(x)&0x7)))
#define NS_SET_BIT(rowptr, x) (rowptr[(x)>>3] |= (1<<(7-(x)&0x7)))
// if this pixel is opaque then copy into the destination image
if (NS_GET_BIT(alpha, x)) {
dst[0] = src[0];
dst[1] = src[1];
dst[2] = src[2];
NS_SET_BIT(dstAlpha, aDX+x);
}
#undef NS_GET_BIT
#undef NS_SET_BIT
}
}
break;
case 8:
for (y=0; y<aDHeight; y++) {
PRUint8 *dst = dest->mImageBits + (y+aDY)*dest->mRowBytes + 3*aDX;
PRUint8 *dstAlpha =
dest->mAlphaBits + (y+aDY)*dest->mAlphaRowBytes + aDX;
PRUint8 *src = rgbPtr + y*rgbStride;
PRUint8 *alpha = alphaPtr + y*alphaStride;
for (int x=0; x<aDWidth; x++, dst+=3, dstAlpha++, src+=3, alpha++) {
// blend this pixel over the destination image
unsigned val = *alpha;
MOZ_BLEND(dst[0], dst[0], src[0], val);
MOZ_BLEND(dst[1], dst[1], src[1], val);
MOZ_BLEND(dst[2], dst[2], src[2], val);
MOZ_BLEND(*dstAlpha, *dstAlpha, val, val);
}
}
break;
case 0:
default:
for (y=0; y<aDHeight; y++)
memcpy(dest->mImageBits + (y+aDY)*dest->mRowBytes + 3*aDX,
rgbPtr + y*rgbStride,
3*aDWidth);
}
if (scaledAlpha)
nsMemory::Free(scaledAlpha);
if (scaledImage)
nsMemory::Free(scaledImage);
return NS_OK;
}
#endif

View File

@@ -1,187 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef nsImageBeOS_h___
#define nsImageBeOS_h___
#include "nsIImage.h"
#include "nsPoint.h"
#include <Bitmap.h>
#undef Bool
class nsImageBeOS : public nsIImage
{
public:
nsImageBeOS();
virtual ~nsImageBeOS();
NS_DECL_ISUPPORTS
/**
@see nsIImage.h
*/
virtual PRInt32 GetBytesPix() { return mNumBytesPixel; }
virtual PRInt32 GetHeight();
virtual PRInt32 GetWidth();
virtual PRUint8* GetBits();
virtual void* GetBitInfo();
virtual PRBool GetIsRowOrderTopToBottom() { return mIsTopToBottom; }
virtual PRInt32 GetLineStride();
NS_IMETHOD SetNaturalWidth(PRInt32 naturalwidth) { mNaturalWidth= naturalwidth; return NS_OK;}
NS_IMETHOD SetNaturalHeight(PRInt32 naturalheight) { mNaturalHeight= naturalheight; return NS_OK;}
virtual PRInt32 GetNaturalWidth() {return mNaturalWidth; }
virtual PRInt32 GetNaturalHeight() {return mNaturalHeight; }
NS_IMETHOD SetDecodedRect(PRInt32 x1, PRInt32 y1, PRInt32 x2, PRInt32 y2);
virtual PRInt32 GetDecodedX1() { return mDecodedX1;}
virtual PRInt32 GetDecodedY1() { return mDecodedY1;}
virtual PRInt32 GetDecodedX2() { return mDecodedX2;}
virtual PRInt32 GetDecodedY2() { return mDecodedY2;}
virtual nsColorMap* GetColorMap();
NS_IMETHOD Draw(nsIRenderingContext &aContext,
nsDrawingSurface aSurface,
PRInt32 aX, PRInt32 aY,
PRInt32 aWidth, PRInt32 aHeight);
NS_IMETHOD Draw(nsIRenderingContext &aContext,
nsDrawingSurface aSurface,
PRInt32 aSX, PRInt32 aSY, PRInt32 aSWidth, PRInt32 aSHeight,
PRInt32 aDX, PRInt32 aDY, PRInt32 aDWidth, PRInt32 aDHeight);
#ifdef USE_IMG2
NS_IMETHOD DrawToImage(nsIImage* aDstImage, nscoord aDX, nscoord aDY,
nscoord aDWidth, nscoord aDHeight);
#endif
NS_IMETHOD DrawTile(nsIRenderingContext &aContext,
nsDrawingSurface aSurface,
nsRect &aSrcRect,
nsRect &aTileRect);
NS_IMETHOD DrawTile(nsIRenderingContext &aContext,
nsDrawingSurface aSurface,
PRInt32 aSXOffset, PRInt32 aSYOffset,
const nsRect &aTileRect);
virtual void ImageUpdated(nsIDeviceContext *aContext,
PRUint8 aFlags, nsRect *aUpdateRect);
virtual nsresult Init(PRInt32 aWidth, PRInt32 aHeight,
PRInt32 aDepth,
nsMaskRequirements aMaskRequirements);
virtual PRBool IsOptimized();
virtual nsresult Optimize(nsIDeviceContext* aContext);
virtual PRBool GetHasAlphaMask() { return mAlphaBits != nsnull; }
virtual PRUint8* GetAlphaBits();
virtual PRInt32 GetAlphaWidth();
virtual PRInt32 GetAlphaHeight();
virtual PRInt32 GetAlphaLineStride();
virtual nsIImage* DuplicateImage();
virtual void SetAlphaLevel(PRInt32 aAlphaLevel);
virtual PRInt32 GetAlphaLevel();
/**
* Get the alpha depth for the image mask
* @update - lordpixel 2001/05/16
* @return the alpha mask depth for the image, ie, 0, 1 or 8
*/
virtual PRInt8 GetAlphaDepth() {return(mAlphaDepth);}
virtual void MoveAlphaMask(PRInt32 aX, PRInt32 aY);
NS_IMETHOD LockImagePixels(PRBool aMaskPixels);
NS_IMETHOD UnlockImagePixels(PRBool aMaskPixels);
private:
/**
* Calculate the amount of memory needed for the initialization of the image
*/
void ComputeMetrics() {
mRowBytes = (mWidth * mDepth) >> 5;
if (((PRUint32)mWidth * mDepth) & 0x1F)
mRowBytes++;
mRowBytes <<= 2;
mSizeImage = mRowBytes * mHeight;
};
void ComputePaletteSize(PRIntn nBitCount);
protected:
void CreateImage(nsDrawingSurface aSurface);
nsresult BuildImage(nsDrawingSurface aDrawingSurface);
private:
BBitmap *mImage;
PRBool mStaticImage;
PRInt32 mWidth;
PRInt32 mHeight;
PRInt32 mDepth; // bits per pixel
PRInt32 mRowBytes;
PRUint8 *mImageBits;
PRUint8 *mConvertedBits;
PRInt32 mSizeImage;
PRBool mIsTopToBottom;
PRInt8 mNumBytesPixel;
PRInt32 mNaturalWidth;
PRInt32 mNaturalHeight;
PRInt32 mDecodedX1; //Keeps track of what part of image
PRInt32 mDecodedY1; // has been decoded.
PRInt32 mDecodedX2;
PRInt32 mDecodedY2;
// alpha layer members
PRUint8 *mAlphaBits;
PRInt8 mAlphaDepth; // alpha layer depth
PRInt16 mAlphaRowBytes; // alpha bytes per row
PRInt16 mAlphaWidth; // alpha layer width
PRInt16 mAlphaHeight; // alpha layer height
nsPoint mLocation; // alpha mask location
PRUint8 mFlags; // flags set by ImageUpdated
};
#endif

View File

@@ -1,59 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Paul Ashford <arougthopher@lizardland.net>
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "nsPrintOptionsBeOS.h"
/** ---------------------------------------------------
* See documentation in nsPrintOptionsWin.h
* @update 6/21/00 dwc
*/
nsPrintOptionsBeOS::nsPrintOptionsBeOS()
{
}
/** ---------------------------------------------------
* See documentation in nsPrintOptionsImpl.h
* @update 6/21/00 dwc
*/
nsPrintOptionsBeOS::~nsPrintOptionsBeOS()
{
}

View File

@@ -1,59 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Paul Ashford <arougthopher@lizardland.net>
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef nsPrintOptionsBeOS_h__
#define nsPrintOptionsBeOS_h__
#include "nsPrintOptionsImpl.h"
//*****************************************************************************
//*** nsPrintOptions
//*****************************************************************************
class nsPrintOptionsBeOS : public nsPrintOptions
{
public:
nsPrintOptionsBeOS();
virtual ~nsPrintOptionsBeOS();
};
#endif /* nsPrintOptions_h__ */

View File

@@ -1,91 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
/* Original Code: Syd Logan (syd@netscape.com) 3/12/99 */
#ifndef nsPrintdBeOS_h___
#define nsPrintdBeOS_h___
#include <limits.h>
PR_BEGIN_EXTERN_C
/* stolen from nsPostScriptObj.h. needs to be put somewhere else that
both ps and gtk can see easily */
#ifndef NS_LEGAL_SIZE
#define NS_LETTER_SIZE 0
#define NS_LEGAL_SIZE 1
#define NS_EXECUTIVE_SIZE 2
#define NS_A4_SIZE 3
#define NS_A3_SIZE 4
#define NS_PORTRAIT 0
#define NS_LANDSCAPE 1
#endif
#ifndef PATH_MAX
#ifdef _POSIX_PATH_MAX
#define PATH_MAX _POSIX_PATH_MAX
#else
#define PATH_MAX 256
#endif
#endif
typedef struct beosprdata {
PRBool toPrinter; /* If PR_TRUE, print to printer */
PRBool fpf; /* If PR_TRUE, first page first */
PRBool grayscale; /* If PR_TRUE, print grayscale */
int size; /* Paper size e.g., SizeLetter */
int orientation; /* Page orientation, e.g. portrait */
char command[ PATH_MAX ]; /* Print command e.g., lpr */
char path[ PATH_MAX ]; /* If toPrinter = PR_FALSE, dest file */
char printer[256]; /* Printer name */
int copies; /* number of copies */
PRBool cancel; /* If PR_TRUE, user cancelled */
float left; /* left margin */
float right; /* right margin */
float top; /* top margin */
float bottom; /* bottom margin */
} BeOSPrData;
//void BeOSPrDialog(UnixPrData *prData);
PR_END_EXTERN_C
#endif /* !defined(nsPrintdBeOS_h___) */

View File

@@ -1,264 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include <Region.h>
#include "nsRegionBeOS.h"
#include "prmem.h"
#ifdef DEBUG_REGIONS
static int nRegions;
#endif
static NS_DEFINE_IID(kRegionIID, NS_IREGION_IID);
nsRegionBeOS :: nsRegionBeOS()
{
NS_INIT_REFCNT();
#ifdef DEBUG_REGIONS
++nRegions;
printf("REGIONS+ = %i\n", nRegions);
#endif
mRegion.MakeEmpty();
mRegionType = eRegionComplexity_empty;
}
nsRegionBeOS :: ~nsRegionBeOS()
{
#ifdef DEBUG_REGIONS
--nRegions;
printf("REGIONS- = %i\n", nRegions);
#endif
mRegion.MakeEmpty();
}
NS_IMPL_ISUPPORTS1(nsRegionBeOS, nsIRegion)
nsresult nsRegionBeOS :: Init(void)
{
mRegion.MakeEmpty();
mRegionType = eRegionComplexity_empty;
return NS_OK;
}
void nsRegionBeOS :: SetTo(const nsIRegion &aRegion)
{
Init();
nsRegionBeOS *pRegion = (nsRegionBeOS *)&aRegion;
mRegion = pRegion->mRegion;
SetRegionType();
}
void nsRegionBeOS :: SetTo(PRInt32 aX, PRInt32 aY, PRInt32 aWidth, PRInt32 aHeight)
{
Init();
mRegion.Set(BRect(aX, aY, aX + aWidth - 1, aY + aHeight - 1));
SetRegionType();
}
void nsRegionBeOS :: Intersect(const nsIRegion &aRegion)
{
nsRegionBeOS *pRegion = (nsRegionBeOS*)&aRegion;
mRegion.IntersectWith(&pRegion->mRegion);
SetRegionType();
}
void nsRegionBeOS :: Intersect(PRInt32 aX, PRInt32 aY, PRInt32 aWidth, PRInt32 aHeight)
{
BRegion tRegion;
tRegion.Set( BRect( aX, aY, aX + aWidth - 1, aY + aHeight - 1 ) );
mRegion.IntersectWith(&tRegion);
SetRegionType();
}
void nsRegionBeOS :: Union(const nsIRegion &aRegion)
{
nsRegionBeOS *pRegion = (nsRegionBeOS*)&aRegion;
mRegion.Include(&pRegion->mRegion);
SetRegionType();
}
void nsRegionBeOS :: Union(PRInt32 aX, PRInt32 aY, PRInt32 aWidth, PRInt32 aHeight)
{
mRegion.Include(BRect(aX, aY, aX + aWidth - 1, aY + aHeight - 1));
SetRegionType();
}
void nsRegionBeOS :: Subtract(const nsIRegion &aRegion)
{
nsRegionBeOS *pRegion = (nsRegionBeOS*)&aRegion;
mRegion.Exclude(&pRegion->mRegion);
SetRegionType();
}
void nsRegionBeOS :: Subtract(PRInt32 aX, PRInt32 aY, PRInt32 aWidth, PRInt32 aHeight)
{
mRegion.Exclude(BRect(aX, aY, aX + aWidth - 1, aY + aHeight - 1));
SetRegionType();
}
PRBool nsRegionBeOS :: IsEmpty(void)
{
if( mRegionType == eRegionComplexity_empty )
return PR_TRUE;
return PR_FALSE;
}
PRBool nsRegionBeOS :: IsEqual(const nsIRegion &aRegion)
{
#ifdef DEBUG
printf(" - nsRegionBeOS :: IsEqual not implemented!\n");
#endif
return PR_FALSE;
}
void nsRegionBeOS :: GetBoundingBox(PRInt32 *aX, PRInt32 *aY, PRInt32 *aWidth, PRInt32 *aHeight)
{
if( mRegion.CountRects() ) {
BRect rect = mRegion.Frame();
*aX = nscoord(rect.left);
*aY = nscoord(rect.top);
*aWidth = nscoord(rect.Width()+1);
*aHeight = nscoord(rect.Height()+1);
}
else
{
*aX = *aY = *aWidth = *aHeight = 0;
}
}
void nsRegionBeOS :: Offset(PRInt32 aXOffset, PRInt32 aYOffset)
{
mRegion.OffsetBy( aXOffset, aYOffset );
}
void nsRegionBeOS :: SetRegionType(void)
{
if(mRegion.CountRects() == 1)
mRegionType = eRegionComplexity_rect ;
else if(mRegion.CountRects() > 1)
mRegionType = eRegionComplexity_complex ;
else
mRegionType = eRegionComplexity_empty;
}
PRBool nsRegionBeOS :: ContainsRect(PRInt32 aX, PRInt32 aY, PRInt32 aWidth, PRInt32 aHeight)
{
return mRegion.Intersects(BRect(aX, aY, aX + aWidth - 1, aY + aHeight - 1));
}
NS_IMETHODIMP nsRegionBeOS :: GetRects(nsRegionRectSet **aRects)
{
nsRegionRectSet *rects;
int nbox;
nsRegionRect *rect;
NS_ASSERTION(!(nsnull == aRects), "bad ptr");
//code lifted from old xfe. MMP
nbox = mRegion.CountRects();
rects = *aRects;
if ((nsnull == rects) || (rects->mRectsLen < (PRUint32)nbox))
{
void *buf = PR_Realloc(rects, sizeof(nsRegionRectSet) + (sizeof(nsRegionRect) * (nbox - 1)));
if(nsnull == buf)
{
if(nsnull != rects)
rects->mNumRects = 0;
return NS_OK;
}
rects = (nsRegionRectSet *)buf;
rects->mRectsLen = nbox;
}
rects->mNumRects = nbox;
rects->mArea = 0;
rect = &rects->mRects[0];
for(int32 i = 0; i < nbox; i++)
{
BRect r = mRegion.RectAt(i);
rect->x = nscoord(r.left);
rect->width = nscoord(r.right - r.left + 1);
rect->y = nscoord(r.top);
rect->height = nscoord(r.bottom - r.top + 1);
rects->mArea += rect->width * rect->height;
rect++;
}
*aRects = rects;
return NS_OK;
}
NS_IMETHODIMP nsRegionBeOS :: FreeRects(nsRegionRectSet *aRects)
{
if(nsnull != aRects)
PR_Free((void *)aRects);
return NS_OK;
}
NS_IMETHODIMP nsRegionBeOS :: GetNativeRegion(void *&aRegion) const
{
aRegion = (void *)&mRegion;
return NS_OK;
}
NS_IMETHODIMP nsRegionBeOS :: GetRegionComplexity(nsRegionComplexity &aComplexity) const
{
aComplexity = mRegionType;
return NS_OK;
}

View File

@@ -1,85 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef nsRegionBeOS_h___
#define nsRegionBeOS_h___
#include "nsIRegion.h"
#include <Region.h>
class nsRegionBeOS : public nsIRegion
{
public:
nsRegionBeOS();
virtual ~nsRegionBeOS();
NS_DECL_ISUPPORTS
virtual nsresult Init();
virtual void SetTo(const nsIRegion &aRegion);
virtual void SetTo(PRInt32 aX, PRInt32 aY, PRInt32 aWidth, PRInt32 aHeight);
void SetTo(const nsRegionBeOS *aRegion);
virtual void Intersect(const nsIRegion &aRegion);
virtual void Intersect(PRInt32 aX, PRInt32 aY, PRInt32 aWidth, PRInt32 aHeight);
virtual void Union(const nsIRegion &aRegion);
virtual void Union(PRInt32 aX, PRInt32 aY, PRInt32 aWidth, PRInt32 aHeight);
virtual void Subtract(const nsIRegion &aRegion);
virtual void Subtract(PRInt32 aX, PRInt32 aY, PRInt32 aWidth, PRInt32 aHeight);
virtual PRBool IsEmpty(void);
virtual PRBool IsEqual(const nsIRegion &aRegion);
virtual void GetBoundingBox(PRInt32 *aX, PRInt32 *aY, PRInt32 *aWidth, PRInt32 *aHeight);
virtual void Offset(PRInt32 aXOffset, PRInt32 aYOffset);
virtual PRBool ContainsRect(PRInt32 aX, PRInt32 aY, PRInt32 aWidth, PRInt32 aHeight);
NS_IMETHOD GetRects(nsRegionRectSet **aRects);
NS_IMETHOD FreeRects(nsRegionRectSet *aRects);
NS_IMETHOD GetNativeRegion(void *&aRegion) const;
NS_IMETHOD GetRegionComplexity(nsRegionComplexity &aComplexity) const;
NS_IMETHOD GetNumRects(PRUint32 *aRects) const { *aRects = 0; return NS_OK; }
protected:
void SetRegionType(void);
private:
BRegion mRegion;
nsRegionComplexity mRegionType;
};
#endif // nsRegionBeOS_h___

File diff suppressed because it is too large Load Diff

View File

@@ -1,246 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef nsRenderingContextBeOS_h___
#define nsRenderingContextBeOS_h___
#include "nsRenderingContextImpl.h"
#include "nsUnitConversion.h"
#include "nsFont.h"
#include "nsIFontMetrics.h"
#include "nsPoint.h"
#include "nsString.h"
#include "nsCRT.h"
#include "nsTransform2D.h"
#include "nsIWidget.h"
#include "nsRect.h"
#include "nsIImage.h"
#include "nsIDeviceContext.h"
#include "nsVoidArray.h"
#include "nsGfxCIID.h"
#include "nsDrawingSurfaceBeOS.h"
#include "nsRegionBeOS.h"
#define USE_NATIVE_TILING 1
class nsRenderingContextBeOS : public nsRenderingContextImpl
{
public:
nsRenderingContextBeOS();
virtual ~nsRenderingContextBeOS();
NS_DECL_AND_IMPL_ZEROING_OPERATOR_NEW
NS_DECL_ISUPPORTS
NS_IMETHOD Init(nsIDeviceContext* aContext, nsIWidget *aWindow);
NS_IMETHOD Init(nsIDeviceContext* aContext, nsDrawingSurface aSurface);
NS_IMETHOD Reset(void);
NS_IMETHOD GetDeviceContext(nsIDeviceContext *&aContext);
NS_IMETHOD LockDrawingSurface(PRInt32 aX, PRInt32 aY, PRUint32 aWidth, PRUint32 aHeight,
void **aBits, PRInt32 *aStride, PRInt32 *aWidthBytes,
PRUint32 aFlags);
NS_IMETHOD UnlockDrawingSurface(void);
NS_IMETHOD SelectOffScreenDrawingSurface(nsDrawingSurface aSurface);
NS_IMETHOD GetDrawingSurface(nsDrawingSurface *aSurface);
NS_IMETHOD GetHints(PRUint32& aResult);
NS_IMETHOD PushState(void);
NS_IMETHOD PopState(PRBool &aClipEmpty);
NS_IMETHOD IsVisibleRect(const nsRect& aRect, PRBool &aVisible);
NS_IMETHOD SetClipRect(const nsRect& aRect, nsClipCombine aCombine, PRBool &aClipEmpty);
NS_IMETHOD GetClipRect(nsRect &aRect, PRBool &aClipValid);
NS_IMETHOD SetClipRegion(const nsIRegion& aRegion, nsClipCombine aCombine, PRBool &aClipEmpty);
NS_IMETHOD CopyClipRegion(nsIRegion &aRegion);
NS_IMETHOD GetClipRegion(nsIRegion **aRegion);
NS_IMETHOD SetLineStyle(nsLineStyle aLineStyle);
NS_IMETHOD GetLineStyle(nsLineStyle &aLineStyle);
NS_IMETHOD SetColor(nscolor aColor);
NS_IMETHOD GetColor(nscolor &aColor) const;
NS_IMETHOD SetFont(const nsFont& aFont);
NS_IMETHOD SetFont(nsIFontMetrics *aFontMetrics);
NS_IMETHOD GetFontMetrics(nsIFontMetrics *&aFontMetrics);
NS_IMETHOD Translate(nscoord aX, nscoord aY);
NS_IMETHOD Scale(float aSx, float aSy);
NS_IMETHOD GetCurrentTransform(nsTransform2D *&aTransform);
NS_IMETHOD CreateDrawingSurface(nsRect *aBounds, PRUint32 aSurfFlags, nsDrawingSurface &aSurface);
NS_IMETHOD DestroyDrawingSurface(nsDrawingSurface aDS);
NS_IMETHOD DrawLine(nscoord aX0, nscoord aY0, nscoord aX1, nscoord aY1);
NS_IMETHOD DrawStdLine(nscoord aX0, nscoord aY0, nscoord aX1, nscoord aY1);
NS_IMETHOD DrawPolyline(const nsPoint aPoints[], PRInt32 aNumPoints);
NS_IMETHOD DrawRect(const nsRect& aRect);
NS_IMETHOD DrawRect(nscoord aX, nscoord aY, nscoord aWidth, nscoord aHeight);
NS_IMETHOD FillRect(const nsRect& aRect);
NS_IMETHOD FillRect(nscoord aX, nscoord aY, nscoord aWidth, nscoord aHeight);
NS_IMETHOD InvertRect(const nsRect& aRect);
NS_IMETHOD InvertRect(nscoord aX, nscoord aY, nscoord aWidth, nscoord aHeight);
NS_IMETHOD DrawPolygon(const nsPoint aPoints[], PRInt32 aNumPoints);
NS_IMETHOD FillPolygon(const nsPoint aPoints[], PRInt32 aNumPoints);
NS_IMETHOD DrawEllipse(const nsRect& aRect);
NS_IMETHOD DrawEllipse(nscoord aX, nscoord aY, nscoord aWidth, nscoord aHeight);
NS_IMETHOD FillEllipse(const nsRect& aRect);
NS_IMETHOD FillEllipse(nscoord aX, nscoord aY, nscoord aWidth, nscoord aHeight);
NS_IMETHOD DrawArc(const nsRect& aRect,
float aStartAngle, float aEndAngle);
NS_IMETHOD DrawArc(nscoord aX, nscoord aY, nscoord aWidth, nscoord aHeight,
float aStartAngle, float aEndAngle);
NS_IMETHOD FillArc(const nsRect& aRect,
float aStartAngle, float aEndAngle);
NS_IMETHOD FillArc(nscoord aX, nscoord aY, nscoord aWidth, nscoord aHeight,
float aStartAngle, float aEndAngle);
NS_IMETHOD GetWidth(char aC, nscoord &aWidth);
NS_IMETHOD GetWidth(PRUnichar aC, nscoord &aWidth,
PRInt32 *aFontID);
NS_IMETHOD GetWidth(const nsString& aString, nscoord &aWidth,
PRInt32 *aFontID);
NS_IMETHOD GetWidth(const char *aString, nscoord &aWidth);
NS_IMETHOD GetWidth(const char *aString, PRUint32 aLength, nscoord &aWidth);
NS_IMETHOD GetWidth(const PRUnichar *aString, PRUint32 aLength, nscoord &aWidth,
PRInt32 *aFontID);
NS_IMETHOD GetTextDimensions(const char* aString, PRUint32 aLength,
nsTextDimensions& aDimensions);
NS_IMETHOD GetTextDimensions(const PRUnichar *aString, PRUint32 aLength,
nsTextDimensions& aDimensions,
PRInt32 *aFontID);
NS_IMETHOD DrawString(const char *aString, PRUint32 aLength,
nscoord aX, nscoord aY,
const nscoord* aSpacing);
NS_IMETHOD DrawString(const PRUnichar *aString, PRUint32 aLength,
nscoord aX, nscoord aY,
PRInt32 aFontID,
const nscoord* aSpacing);
NS_IMETHOD DrawString(const nsString& aString, nscoord aX, nscoord aY,
PRInt32 aFontID,
const nscoord* aSpacing);
NS_IMETHOD DrawImage(nsIImage *aImage, nscoord aX, nscoord aY);
NS_IMETHOD DrawImage(nsIImage *aImage, nscoord aX, nscoord aY,
nscoord aWidth, nscoord aHeight);
NS_IMETHOD DrawImage(nsIImage *aImage, const nsRect& aRect);
NS_IMETHOD DrawImage(nsIImage *aImage, const nsRect& aSRect, const nsRect& aDRect);
#ifdef USE_NATIVE_TILING
NS_IMETHOD DrawTile(nsIImage *aImage,nscoord aX0,nscoord aY0,nscoord aX1,nscoord aY1,
nscoord aWidth, nscoord aHeight);
NS_IMETHOD DrawTile(nsIImage *aImage, nscoord aSrcXOffset,
nscoord aSrcYOffset, const nsRect &aTileRect);
#endif
NS_IMETHOD CopyOffScreenBits(nsDrawingSurface aSrcSurf, PRInt32 aSrcX, PRInt32 aSrcY,
const nsRect &aDestBounds, PRUint32 aCopyFlags);
NS_IMETHOD RetrieveCurrentNativeGraphicData(PRUint32 * ngd);
//locals
NS_IMETHOD CommonInit();
void CreateClipRegion() {
static NS_DEFINE_CID(kRegionCID, NS_REGION_CID);
if (mClipRegion)
return;
PRUint32 w, h;
mSurface->GetSize(&w, &h);
mClipRegion = do_CreateInstance(kRegionCID);
if (mClipRegion) {
mClipRegion->Init();
mClipRegion->SetTo(0,0,w,h);
}
}
protected:
nsDrawingSurfaceBeOS *mOffscreenSurface;
nsDrawingSurfaceBeOS *mSurface;
nsIDeviceContext *mContext;
nsIFontMetrics *mFontMetrics;
nsCOMPtr<nsIRegion> mClipRegion;
float mP2T;
// graphic state stack (GraphicsState)
nsVoidArray *mStateCache;
BView *mView;
PRUint8 *mGammaTable;
nscolor mCurrentColor;
BFont *mCurrentFont;
nsLineStyle mCurrentLineStyle;
void UpdateView();
// ConditionRect is used to fix coordinate overflow problems for
// rectangles after they are transformed to screen coordinates
void ConditionRect(nscoord &x, nscoord &y, nscoord &w, nscoord &h) {
if ( y < -32766 ) {
y = -32766;
}
if ( y + h > 32766 ) {
h = 32766 - y;
}
if ( x < -32766 ) {
x = -32766;
}
if ( x + w > 32766 ) {
w = 32766 - x;
}
}
};
#endif /* nsRenderingContextBeOS_h___ */

View File

@@ -1,137 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 2000
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "nsScreenBeOS.h"
#include <Screen.h>
nsScreenBeOS :: nsScreenBeOS ( )
{
NS_INIT_REFCNT();
// nothing else to do. I guess we could cache a bunch of information
// here, but we want to ask the device at runtime in case anything
// has changed.
}
nsScreenBeOS :: ~nsScreenBeOS()
{
// nothing to see here.
}
// addref, release, QI
NS_IMPL_ISUPPORTS1(nsScreenBeOS, nsIScreen)
NS_IMETHODIMP
nsScreenBeOS :: GetRect(PRInt32 *outLeft, PRInt32 *outTop, PRInt32 *outWidth, PRInt32 *outHeight)
{
BScreen screen;
*outTop = 0;
*outLeft = 0;
*outWidth = PRInt32(screen.Frame().Width()+1);
*outHeight = PRInt32(screen.Frame().Height()+1);
return NS_OK;
} // GetRect
NS_IMETHODIMP
nsScreenBeOS :: GetAvailRect(PRInt32 *outLeft, PRInt32 *outTop, PRInt32 *outWidth, PRInt32 *outHeight)
{
BScreen screen;
*outTop = 0;
*outLeft = 0;
*outWidth = PRInt32(screen.Frame().Width()+1);
*outHeight = PRInt32(screen.Frame().Height()+1);
return NS_OK;
} // GetAvailRect
NS_IMETHODIMP
nsScreenBeOS :: GetPixelDepth(PRInt32 *aPixelDepth)
{
BScreen screen;
color_space depth;
PRInt32 pixelDepth;
depth = screen.ColorSpace();
switch(depth)
{
case B_CMAP8:
pixelDepth = 8;
break;
case B_RGB32:
pixelDepth = 32;
break;
case B_RGB15:
pixelDepth = 15;
break;
case B_RGB16:
pixelDepth = 16;
break;
default:
#ifdef DEBUG
printf("FIXME: Please add this screen depth to the code nsScreenBeOS.cpp\n");
#endif
pixelDepth = 32;
break;
}
*aPixelDepth = pixelDepth;
return NS_OK;
} // GetPixelDepth
NS_IMETHODIMP
nsScreenBeOS :: GetColorDepth(PRInt32 *aColorDepth)
{
return GetPixelDepth ( aColorDepth );
} // GetColorDepth

View File

@@ -1,59 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 2000
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef nsScreenBeOS_h___
#define nsScreenBeOS_h___
#include "nsIScreen.h"
//------------------------------------------------------------------------
class nsScreenBeOS : public nsIScreen
{
public:
nsScreenBeOS ( );
virtual ~nsScreenBeOS();
NS_DECL_ISUPPORTS
NS_DECL_NSISCREEN
private:
};
#endif // nsScreenBeOS_h___

View File

@@ -1,128 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 2000
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "nsScreenManagerBeOS.h"
#include "nsScreenBeOS.h"
nsScreenManagerBeOS :: nsScreenManagerBeOS ( )
{
NS_INIT_REFCNT();
// nothing else to do. I guess we could cache a bunch of information
// here, but we want to ask the device at runtime in case anything
// has changed.
}
nsScreenManagerBeOS :: ~nsScreenManagerBeOS()
{
// nothing to see here.
}
// addref, release, QI
NS_IMPL_ISUPPORTS1(nsScreenManagerBeOS, nsIScreenManager)
//
// CreateNewScreenObject
//
// Utility routine. Creates a new screen object from the given device handle
//
// NOTE: For this "single-monitor" impl, we just always return the cached primary
// screen. This should change when a multi-monitor impl is done.
//
nsIScreen*
nsScreenManagerBeOS :: CreateNewScreenObject ( )
{
nsIScreen* retval = nsnull;
if ( !mCachedMainScreen )
mCachedMainScreen = new nsScreenBeOS ( );
NS_IF_ADDREF(retval = mCachedMainScreen.get());
return retval;
}
//
// ScreenForRect
//
// Returns the screen that contains the rectangle. If the rect overlaps
// multiple screens, it picks the screen with the greatest area of intersection.
//
// The coordinates are in pixels (not twips) and in screen coordinates.
//
NS_IMETHODIMP
nsScreenManagerBeOS :: ScreenForRect ( PRInt32 /*inLeft*/, PRInt32 /*inTop*/, PRInt32 /*inWidth*/,
PRInt32 /*inHeight*/, nsIScreen **outScreen )
{
GetPrimaryScreen ( outScreen );
return NS_OK;
} // ScreenForRect
//
// GetPrimaryScreen
//
// The screen with the menubar/taskbar. This shouldn't be needed very
// often.
//
NS_IMETHODIMP
nsScreenManagerBeOS :: GetPrimaryScreen(nsIScreen * *aPrimaryScreen)
{
*aPrimaryScreen = CreateNewScreenObject(); // addrefs
return NS_OK;
} // GetPrimaryScreen
//
// GetNumberOfScreens
//
// Returns how many physical screens are available.
//
NS_IMETHODIMP
nsScreenManagerBeOS :: GetNumberOfScreens(PRUint32 *aNumberOfScreens)
{
*aNumberOfScreens = 1;
return NS_OK;
} // GetNumberOfScreens

View File

@@ -1,66 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 2000
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef nsScreenManagerBeOS_h___
#define nsScreenManagerBeOS_h___
#include "nsIScreenManager.h"
#include "nsIScreen.h"
#include "nsCOMPtr.h"
//------------------------------------------------------------------------
class nsScreenManagerBeOS : public nsIScreenManager
{
public:
nsScreenManagerBeOS ( );
virtual ~nsScreenManagerBeOS();
NS_DECL_ISUPPORTS
NS_DECL_NSISCREENMANAGER
private:
nsIScreen* CreateNewScreenObject ( ) ;
// cache the primary screen object to avoid memory allocation every time
nsCOMPtr<nsIScreen> mCachedMainScreen;
};
#endif // nsScreenManagerBeOS_h___

View File

@@ -1,184 +0,0 @@
#
# The contents of this file are subject to the Netscape Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/NPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
# Roland Mainz <roland.mainz@informatik.med.uni-giessen.de>
#
DEPTH = ../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
MODULE = gfx
LIBRARY_NAME = gfx_gtk
EXPORT_LIBRARY = 1
IS_COMPONENT = 1
MODULE_NAME = nsGfxGTKModule
REQUIRES = xpcom \
string \
widget \
view \
util \
dom \
pref \
uconv \
unicharutil \
windowwatcher \
locale \
content \
layout \
necko \
$(NULL)
# Sun's Complex Text Layout support
ifdef SUNCTL
REQUIRES += ctl
endif
#NATIVE_THEME_SUPPORT = 1
CSRCS = nsPrintdGTK.c
ifdef NATIVE_THEME_SUPPORT
CSRCS += gtkdrawing.c
endif
# Code shared between GTK+, Xlib and Xprint gfx modules
X11SHARED_LCPPSRCS = \
nsAntiAliasedGlyph.cpp \
nsX11AlphaBlend.cpp \
nsXFontAAScaledBitmap.cpp \
nsXFontNormal.cpp \
$(NULL)
CPPSRCS = \
$(X11SHARED_LCPPSRCS) \
nsDeviceContextGTK.cpp \
nsDeviceContextSpecFactoryG.cpp \
nsDeviceContextSpecG.cpp \
nsDrawingSurfaceGTK.cpp \
nsFontMetricsGTK.cpp \
nsGfxFactoryGTK.cpp \
nsGraphicsStateGTK.cpp \
nsImageGTK.cpp \
nsGCCache.cpp \
nsRenderingContextGTK.cpp \
nsScreenGtk.cpp \
nsScreenManagerGtk.cpp \
nsPrintOptionsGTK.cpp \
$(NULL)
ifdef MOZ_ENABLE_GTK
CPPSRCS += \
nsRegionGTK.cpp \
$(NULL)
endif
ifdef MOZ_ENABLE_GTK2
CPPSRCS += \
nsRegionGTK2.cpp \
$(NULL)
endif
ifdef NATIVE_THEME_SUPPORT
CPPSRCS += nsNativeThemeGTK.cpp
endif
# If not primary toolkit, install in secondary path
ifneq (gtk,$(MOZ_GFX_TOOLKIT))
ifneq (gtk2, $(MOZ_GFX_TOOLKIT))
INACTIVE_COMPONENT = 1
endif
endif
ifdef MOZ_ENABLE_XPRINT
XPU_LCSRCS = xprintutil.c
CSRCS += $(XPU_LCSRCS)
endif
GARBAGE += $(X11SHARED_LCPPSRCS) $(XPU_LCSRCS) $(wildcard *.$(OBJ_SUFFIX))
include $(topsrcdir)/config/rules.mk
EXTRA_DSO_LDOPTS += $(MOZ_GTK_LDFLAGS) $(MOZ_GTK2_LIBS)
CXXFLAGS += $(MOZ_GTK_CFLAGS) $(MOZ_GTK2_CFLAGS)
CFLAGS += $(MOZ_GTK_CFLAGS) $(MOZ_GTK2_CFLAGS)
ifdef MOZ_ENABLE_XINERAMA
GFX_XINERAMA_LIBS += $(MOZ_XINERAMA_LIBS)
endif
ifdef MOZ_ENABLE_GTK
EXTRA_DSO_LDOPTS += $(MOZ_COMPONENT_LIBS) \
-lgkgfx \
$(GFX_XINERAMA_LIBS) \
-lgtksuperwin \
$(MOZ_JS_LIBS) \
$(NULL)
endif
ifdef MOZ_ENABLE_GTK2
EXTRA_DSO_LDOPTS += $(MOZ_COMPONENT_LIBS) \
-lgkgfx \
$(GFX_XINERAMA_LIBS) \
$(MOZ_JS_LIBS) \
$(NULL)
endif
DEFINES += -D_IMPL_NS_GFXNONXP
ifeq ($(OS_ARCH), Linux)
DEFINES += -D_BSD_SOURCE
endif
ifeq ($(OS_ARCH), SunOS)
ifndef GNU_CC
# When using Sun's WorkShop compiler, including
# /wherever/workshop-5.0/SC5.0/include/CC/std/time.h
# causes most of these compiles to fail with:
# line 29: Error: Multiple declaration for std::tm.
# So, this gets around the problem.
DEFINES += -D_TIME_H=1
endif
endif
ifdef MOZ_ENABLE_XPRINT
DEFINES += -DUSE_XPRINT -DUSE_MOZILLA_TYPES
INCLUDES += -I$(srcdir)/../xprint
EXTRA_DSO_LDOPTS += $(MOZ_XPRINT_LDFLAGS)
endif
ifdef NATIVE_THEME_SUPPORT
DEFINES += -DNATIVE_THEME_SUPPORT
endif
LOCAL_INCLUDES = \
-I$(srcdir)/. \
-I$(srcdir)/.. \
-I$(srcdir)/../x11shared \
$(NULL)
ifdef MOZ_ENABLE_XPRINT
export:: $(addprefix $(srcdir)/../xprint/,$(XPU_LCSRCS)) $(addprefix $(srcdir)/../x11shared/,$(X11SHARED_LCPPSRCS))
$(INSTALL) $^ .
else
export:: $(addprefix $(srcdir)/../x11shared/,$(X11SHARED_LCPPSRCS))
$(INSTALL) $^ .
endif

View File

@@ -1,269 +0,0 @@
/* -*- Mode: C; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 2002
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Brian Ryner <bryner@netscape.com> (Original Author)
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
/*
* This file contains painting functions for each of the gtk widgets.
* Adapted from the gtk+ 1.2.10 source.
*/
#include <gtk/gtk.h>
#include <gdk/gdkprivate.h>
#include <string.h>
#include "gtkdrawing.h"
extern GtkWidget* gButtonWidget;
extern GtkWidget* gCheckboxWidget;
extern GtkWidget* gScrollbarWidget;
extern GtkWidget* gGripperWidget;
extern GtkWidget* gEntryWidget;
extern GtkWidget* gArrowWidget;
extern GtkWidget* gDropdownButtonWidget;
GtkStateType
ConvertGtkState(GtkWidgetState* state)
{
if (state->disabled)
return GTK_STATE_INSENSITIVE;
else if (state->inHover)
return (state->active ? GTK_STATE_ACTIVE : GTK_STATE_PRELIGHT);
else
return GTK_STATE_NORMAL;
}
void
moz_gtk_button_paint(GdkWindow* window, GtkStyle* style,
GdkRectangle* rect, GdkRectangle* cliprect,
GtkWidgetState* state, GtkReliefStyle relief)
{
GtkShadowType shadow_type;
gint default_spacing = 7; /* xxx fix me */
GtkStateType button_state = ConvertGtkState(state);
gint x = rect->x, y=rect->y, width=rect->width, height=rect->height;
if (((GdkWindowPrivate*)window)->mapped) {
gdk_window_set_back_pixmap(window, NULL, TRUE);
gdk_window_clear_area(window, cliprect->x, cliprect->y, cliprect->width,
cliprect->height);
}
gtk_widget_set_state(gButtonWidget, button_state);
if (state->isDefault)
gtk_paint_box(style, window, GTK_STATE_NORMAL, GTK_SHADOW_IN, cliprect,
gButtonWidget, "buttondefault", x, y, width, height);
if (state->canDefault) {
x += style->klass->xthickness;
y += style->klass->ythickness;
width -= 2 * x + default_spacing;
height -= 2 * y + default_spacing;
x += (1 + default_spacing) / 2;
y += (1 + default_spacing) / 2;
}
if (state->focused) {
x += 1;
y += 1;
width -= 2;
height -= 2;
}
shadow_type = (state->active && state->inHover) ? GTK_SHADOW_IN : GTK_SHADOW_OUT;
if (relief != GTK_RELIEF_NONE || (button_state != GTK_STATE_NORMAL &&
button_state != GTK_STATE_INSENSITIVE))
gtk_paint_box(style, window, button_state, shadow_type, cliprect,
gButtonWidget, "button", x, y, width, height);
if (state->focused) {
x -= 1;
y -= 1;
width += 2;
height += 2;
gtk_paint_focus(style, window, cliprect, gButtonWidget, "button", x, y,
width - 1, height - 1);
}
}
void
moz_gtk_checkbox_paint(GdkWindow* window, GtkStyle* style,
GdkRectangle* rect, GdkRectangle* cliprect,
GtkWidgetState* state, gboolean selected,
gboolean isradio)
{
GtkStateType state_type;
GtkShadowType shadow_type;
gint indicator_size, indicator_spacing;
gint x, y, width, height;
_gtk_check_button_get_props(GTK_CHECK_BUTTON(gCheckboxWidget),
&indicator_size, &indicator_spacing);
/* left justified, vertically centered within the rect */
x = rect->x;
y = rect->y + (rect->height - indicator_size) / 2;
width = indicator_size;
height = indicator_size;
if (selected) {
state_type = GTK_STATE_ACTIVE;
shadow_type = GTK_SHADOW_IN;
}
else {
shadow_type = GTK_SHADOW_OUT;
state_type = ConvertGtkState(state);
}
if (isradio)
gtk_paint_option(style, window, state_type, shadow_type, cliprect,
gCheckboxWidget, "radiobutton", x, y, width, height);
else
gtk_paint_check(style, window, state_type, shadow_type, cliprect,
gCheckboxWidget, "checkbutton", x, y, width, height);
}
void
moz_gtk_scrollbar_button_paint(GdkWindow* window, GtkStyle* style,
GdkRectangle* rect, GdkRectangle* cliprect,
GtkWidgetState* state, GtkArrowType type)
{
GtkStateType state_type = ConvertGtkState(state);
GtkShadowType shadow_type = (state->active) ? GTK_SHADOW_IN : GTK_SHADOW_OUT;
gtk_paint_arrow(style, window, state_type, shadow_type, cliprect,
gScrollbarWidget, (type < 2) ? "vscrollbar" : "hscrollbar",
type, TRUE, rect->x, rect->y, rect->width, rect->height);
}
void
moz_gtk_scrollbar_trough_paint(GdkWindow* window, GtkStyle* style,
GdkRectangle* rect, GdkRectangle* cliprect,
GtkWidgetState* state)
{
gtk_style_apply_default_background(style, window, TRUE, GTK_STATE_ACTIVE,
cliprect, rect->x, rect->y,
rect->width, rect->height);
gtk_paint_box(style, window, GTK_STATE_ACTIVE, GTK_SHADOW_IN, cliprect,
gScrollbarWidget, "trough", rect->x, rect->y, rect->width,
rect->height);
if (state->focused)
gtk_paint_focus(style, window, cliprect, gScrollbarWidget, "trough",
rect->x, rect->y, rect->width, rect->height);
}
void
moz_gtk_scrollbar_thumb_paint(GdkWindow* window, GtkStyle* style,
GdkRectangle* rect, GdkRectangle* cliprect,
GtkWidgetState* state)
{
GtkStateType state_type = state->inHover ? GTK_STATE_PRELIGHT : GTK_STATE_NORMAL;
gtk_paint_box(style, window, state_type, GTK_SHADOW_OUT, cliprect,
gScrollbarWidget, "slider", rect->x, rect->y, rect->width,
rect->height);
}
void
moz_gtk_gripper_paint(GdkWindow* window, GtkStyle* style, GdkRectangle* rect,
GdkRectangle* cliprect, GtkWidgetState* state)
{
GtkStateType state_type = ConvertGtkState(state);
GtkShadowType shadow_type = GTK_HANDLE_BOX(gGripperWidget)->shadow_type;
gtk_paint_box(style, window, state_type, shadow_type, cliprect,
gGripperWidget, "handlebox_bin", rect->x, rect->y,
rect->width, rect->height);
}
void
moz_gtk_entry_paint(GdkWindow* window, GtkStyle* style, GdkRectangle* rect,
GdkRectangle* cliprect, GtkWidgetState* state)
{
gint x = rect->x, y = rect->y, width = rect->width, height = rect->height;
if (state->focused) {
x += 1;
y += 1;
width -= 2;
height -= 2;
}
gtk_paint_shadow (style, window, GTK_STATE_NORMAL, GTK_SHADOW_IN, cliprect,
gEntryWidget, "entry", x, y, width, height);
if (state->focused)
gtk_paint_focus (style, window, cliprect, gEntryWidget, "entry",
rect->x, rect->y, rect->width - 1, rect->height - 1);
x = style->klass->xthickness;
y = style->klass->ythickness;
gtk_paint_flat_box (style, window, GTK_STATE_NORMAL, GTK_SHADOW_NONE,
cliprect, gEntryWidget, "entry_bg", rect->x + x,
rect->y + y, rect->width - 2*x, rect->height - 2*y);
}
void
moz_gtk_dropdown_arrow_paint(GdkWindow* window, GtkStyle* style,
GdkRectangle* rect, GdkRectangle* cliprect,
GtkWidgetState* state)
{
moz_gtk_button_paint(window, gDropdownButtonWidget->style, rect, cliprect,
state, GTK_RELIEF_NORMAL);
gtk_paint_arrow(style, window, ConvertGtkState(state),
state->active ? GTK_SHADOW_IN : GTK_SHADOW_OUT, cliprect,
gArrowWidget, "arrow", GTK_ARROW_DOWN, TRUE, rect->x, rect->y,
rect->width, rect->height);
}
void
moz_gtk_container_paint(GdkWindow* window, GtkStyle* style, GdkRectangle* rect,
GdkRectangle* cliprect, GtkWidgetState* state,
gboolean isradio)
{
GtkStateType state_type = ConvertGtkState(state);
if (state_type != GTK_STATE_NORMAL && state_type != GTK_STATE_PRELIGHT)
state_type = GTK_STATE_NORMAL;
if (state_type != GTK_STATE_NORMAL) /* this is for drawing a prelight box */
gtk_paint_flat_box (style, window, state_type, GTK_SHADOW_ETCHED_OUT,
cliprect, gCheckboxWidget,
isradio ? "radiobutton" : "checkbutton",
rect->x, rect->y, rect->width, rect->height);
}

View File

@@ -1,107 +0,0 @@
/* -*- Mode: C; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 2002
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Brian Ryner <bryner@netscape.com> (Original Author)
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef _GTK_DRAWING_H_
#define _GTK_DRAWING_H_
#include <gdk/gdk.h>
#include <gtk/gtkstyle.h>
#include "prtypes.h"
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
typedef struct {
PRPackedBool active;
PRPackedBool focused;
PRPackedBool inHover;
PRPackedBool disabled;
PRPackedBool isDefault;
PRPackedBool canDefault;
} GtkWidgetState;
void
moz_gtk_button_paint(GdkWindow* window, GtkStyle* style, GdkRectangle* rect,
GdkRectangle* cliprect, GtkWidgetState* state,
GtkReliefStyle relief);
void
moz_gtk_checkbox_paint(GdkWindow* window, GtkStyle* style, GdkRectangle *rect,
GdkRectangle* cliprect, GtkWidgetState* state,
gboolean selected, gboolean isradio);
void
moz_gtk_scrollbar_button_paint(GdkWindow* window, GtkStyle* style,
GdkRectangle* rect, GdkRectangle* cliprect,
GtkWidgetState* state, GtkArrowType type);
void
moz_gtk_scrollbar_trough_paint(GdkWindow* window, GtkStyle* style,
GdkRectangle* rect, GdkRectangle* cliprect,
GtkWidgetState* state);
void
moz_gtk_scrollbar_thumb_paint(GdkWindow* window, GtkStyle* style,
GdkRectangle* rect, GdkRectangle* cliprect,
GtkWidgetState* state);
void
moz_gtk_gripper_paint(GdkWindow* window, GtkStyle* style, GdkRectangle* rect,
GdkRectangle* cliprect, GtkWidgetState* state);
void
moz_gtk_entry_paint(GdkWindow* window, GtkStyle* style, GdkRectangle* rect,
GdkRectangle* cliprect, GtkWidgetState* state);
void
moz_gtk_dropdown_arrow_paint(GdkWindow* window, GtkStyle* style,
GdkRectangle* rect, GdkRectangle* cliprect,
GtkWidgetState* state);
void
moz_gtk_container_paint(GdkWindow* window, GtkStyle* style, GdkRectangle* rect,
GdkRectangle* cliprect, GtkWidgetState* state,
gboolean isradio);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif

View File

@@ -1,878 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
// vim:cindent:ts=2:et:sw=2:
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Roland Mainz <roland.mainz@informatik.med.uni-giessen.de>
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include <math.h>
#include "nspr.h"
#include "nsIPref.h"
#include "nsIServiceManager.h"
#include "nsCRT.h"
#include "nsDeviceContextGTK.h"
#include "nsFontMetricsGTK.h"
#include "nsGfxCIID.h"
#include "nsGfxPSCID.h"
#include "nsIDeviceContextPS.h"
#ifdef USE_XPRINT
#include "nsGfxXPrintCID.h"
#include "nsIDeviceContextXPrint.h"
#endif /* USE_XPRINT */
#include <gdk/gdk.h>
#include <gdk/gdkx.h>
#ifdef MOZ_WIDGET_GTK
#include "gdksuperwin.h"
#endif /* MOZ_WIDGET_GTK */
#include <X11/Xatom.h>
#include "nsDeviceContextSpecG.h"
#define NS_TO_GDK_RGB(ns) (ns & 0xff) << 16 | (ns & 0xff00) | ((ns >> 16) & 0xff)
#define GDK_COLOR_TO_NS_RGB(c) \
((nscolor) NS_RGB(c.red, c.green, c.blue))
static NS_DEFINE_CID(kPrefCID, NS_PREF_CID);
#define GDK_DEFAULT_FONT1 "-*-helvetica-medium-r-*--*-120-*-*-*-*-iso8859-1"
#define GDK_DEFAULT_FONT2 "-*-fixed-medium-r-*-*-*-120-*-*-*-*-*-*"
#ifdef MOZ_WIDGET_GTK
// this is specific to gtk 1.2
extern GdkFont *default_font;
#endif /* MOZ_WIDGET_GTK */
/**
* A singleton instance of nsSystemFontsGTK is created by the first
* device context and destroyed by the module destructor.
*/
class nsSystemFontsGTK {
public:
nsSystemFontsGTK(float aPixelsToTwips);
const nsFont& GetDefaultFont() { return mDefaultFont; }
const nsFont& GetMenuFont() { return mMenuFont; }
const nsFont& GetFieldFont() { return mFieldFont; }
const nsFont& GetButtonFont() { return mButtonFont; }
private:
nsresult GetSystemFontInfo(GtkStyle *aStyle, nsFont* aFont,
float aPixelsToTwips) const;
/*
* The following system font constants exist:
*
* css2: http://www.w3.org/TR/REC-CSS2/fonts.html#x27
* eSystemFont_Caption, eSystemFont_Icon, eSystemFont_Menu,
* eSystemFont_MessageBox, eSystemFont_SmallCaption,
* eSystemFont_StatusBar,
* // css3
* eSystemFont_Window, eSystemFont_Document,
* eSystemFont_Workspace, eSystemFont_Desktop,
* eSystemFont_Info, eSystemFont_Dialog,
* eSystemFont_Button, eSystemFont_PullDownMenu,
* eSystemFont_List, eSystemFont_Field,
* // moz
* eSystemFont_Tooltips, eSystemFont_Widget
*/
nsFont mDefaultFont;
nsFont mButtonFont;
nsFont mFieldFont;
nsFont mMenuFont;
};
nscoord nsDeviceContextGTK::mDpi = 96;
static nsSystemFontsGTK *gSystemFonts = nsnull;
nsDeviceContextGTK::nsDeviceContextGTK()
: DeviceContextImpl()
{
mTwipsToPixels = 1.0;
mPixelsToTwips = 1.0;
mDepth = 0 ;
mNumCells = 0;
mWidthFloat = 0.0f;
mHeightFloat = 0.0f;
mWidth = -1;
mHeight = -1;
mDeviceWindow = nsnull;
}
nsDeviceContextGTK::~nsDeviceContextGTK()
{
nsresult rv;
nsCOMPtr<nsIPref> prefs = do_GetService(kPrefCID, &rv);
if (NS_SUCCEEDED(rv)) {
prefs->UnregisterCallback("browser.display.screen_resolution",
prefChanged, (void *)this);
}
}
/* static */ void nsDeviceContextGTK::Shutdown()
{
if (gSystemFonts) {
delete gSystemFonts;
gSystemFonts = nsnull;
}
}
NS_IMETHODIMP nsDeviceContextGTK::Init(nsNativeWidget aNativeWidget)
{
GtkRequisition req;
GtkWidget *sb;
// get the screen object and its width/height
// XXXRight now this will only get the primary monitor.
if (!mScreenManager)
mScreenManager = do_GetService("@mozilla.org/gfx/screenmanager;1");
if (!mScreenManager) {
return NS_ERROR_FAILURE;
}
#ifdef MOZ_WIDGET_GTK
if (aNativeWidget) {
// superwin?
if (GDK_IS_SUPERWIN(aNativeWidget)) {
mDeviceWindow = GDK_SUPERWIN(aNativeWidget)->shell_window;
}
// gtk widget?
else if (GTK_IS_WIDGET(aNativeWidget)) {
mDeviceWindow = GTK_WIDGET(aNativeWidget)->window;
}
// must be a bin_window
else {
mDeviceWindow = NS_STATIC_CAST(GdkWindow *, aNativeWidget);
}
}
#endif /* MOZ_WIDGET_GTK */
#ifdef MOZ_WIDGET_GTK2
if (aNativeWidget) {
// can only be a gdk window
if (GDK_IS_WINDOW(aNativeWidget))
mDeviceWindow = GDK_WINDOW(aNativeWidget);
else
NS_WARNING("unsupported native widget type!");
}
#endif
nsCOMPtr<nsIScreen> screen;
mScreenManager->GetPrimaryScreen ( getter_AddRefs(screen) );
if ( screen ) {
PRInt32 x, y, width, height, depth;
screen->GetAvailRect ( &x, &y, &width, &height );
screen->GetPixelDepth ( &depth );
mWidthFloat = float(width);
mHeightFloat = float(height);
mDepth = NS_STATIC_CAST ( PRUint32, depth );
}
static int initialized = 0;
PRInt32 prefVal = -1;
if (!initialized) {
initialized = 1;
// Set prefVal the value of the preference
// "browser.display.screen_resolution"
// or -1 if we can't get it.
// If it's negative, we pretend it's not set.
// If it's 0, it means force use of the operating system's logical
// resolution.
// If it's positive, we use it as the logical resolution
nsresult res;
nsCOMPtr<nsIPref> prefs(do_GetService(kPrefCID, &res));
if (NS_SUCCEEDED(res) && prefs) {
res = prefs->GetIntPref("browser.display.screen_resolution", &prefVal);
if (NS_FAILED(res)) {
prefVal = -1;
}
prefs->RegisterCallback("browser.display.screen_resolution", prefChanged,
(void *)this);
}
SetDPI(prefVal);
} else {
SetDPI(mDpi); // to setup p2t and t2p
}
sb = gtk_vscrollbar_new(NULL);
gtk_widget_ref(sb);
gtk_object_sink(GTK_OBJECT(sb));
#ifdef MOZ_WIDGET_GTK2
gtk_widget_ensure_style(sb);
gtk_widget_queue_resize(sb);
#endif /* MOZ_WIDGET_GTK2 */
gtk_widget_size_request(sb,&req);
mScrollbarWidth = req.width;
gtk_widget_destroy(sb);
gtk_widget_unref(sb);
sb = gtk_hscrollbar_new(NULL);
gtk_widget_ref(sb);
gtk_object_sink(GTK_OBJECT(sb));
#ifdef MOZ_WIDGET_GTK2
gtk_widget_ensure_style(sb);
gtk_widget_queue_resize(sb);
#endif /* MOZ_WIDGET_GTK2 */
gtk_widget_size_request(sb,&req);
mScrollbarHeight = req.height;
gtk_widget_destroy(sb);
gtk_widget_unref(sb);
#ifdef DEBUG
static PRBool once = PR_TRUE;
if (once) {
printf("GFX: dpi=%d t2p=%g p2t=%g depth=%d\n", mDpi, mTwipsToPixels, mPixelsToTwips,mDepth);
once = PR_FALSE;
}
#endif
DeviceContextImpl::CommonInit();
return NS_OK;
}
NS_IMETHODIMP nsDeviceContextGTK::CreateRenderingContext(nsIRenderingContext *&aContext)
{
#ifdef NS_PRINT_PREVIEW
// Defer to Alt when there is one
if (mAltDC && ((mUseAltDC & kUseAltDCFor_CREATERC_PAINT) || (mUseAltDC & kUseAltDCFor_CREATERC_REFLOW))) {
return mAltDC->CreateRenderingContext(aContext);
}
#endif
nsIRenderingContext *pContext;
nsresult rv;
nsDrawingSurfaceGTK *surf;
GtkWidget *w;
w = (GtkWidget*)mWidget;
// to call init for this, we need to have a valid nsDrawingSurfaceGTK created
pContext = new nsRenderingContextGTK();
if (nsnull != pContext)
{
NS_ADDREF(pContext);
// create the nsDrawingSurfaceGTK
surf = new nsDrawingSurfaceGTK();
if (surf && w)
{
GdkDrawable *gwin = nsnull;
GdkDrawable *win = nsnull;
// FIXME
if (GTK_IS_LAYOUT(w))
gwin = (GdkDrawable*)GTK_LAYOUT(w)->bin_window;
else
gwin = (GdkDrawable*)(w)->window;
// window might not be realized... ugh
if (gwin)
gdk_window_ref(gwin);
else
win = gdk_pixmap_new(nsnull,
w->allocation.width,
w->allocation.height,
gdk_rgb_get_visual()->depth);
GdkGC *gc = gdk_gc_new(win);
// init the nsDrawingSurfaceGTK
rv = surf->Init(win,gc);
if (NS_OK == rv)
// Init the nsRenderingContextGTK
rv = pContext->Init(this, surf);
}
else
rv = NS_ERROR_OUT_OF_MEMORY;
}
else
rv = NS_ERROR_OUT_OF_MEMORY;
if (NS_OK != rv)
{
NS_IF_RELEASE(pContext);
}
aContext = pContext;
return rv;
}
NS_IMETHODIMP nsDeviceContextGTK::SupportsNativeWidgets(PRBool &aSupportsWidgets)
{
//XXX it is very critical that this not lie!! MMP
// read the comments in the mac code for this
aSupportsWidgets = PR_TRUE;
return NS_OK;
}
NS_IMETHODIMP nsDeviceContextGTK::GetScrollBarDimensions(float &aWidth, float &aHeight) const
{
aWidth = mScrollbarWidth * mPixelsToTwips;
aHeight = mScrollbarHeight * mPixelsToTwips;
return NS_OK;
}
NS_IMETHODIMP nsDeviceContextGTK::GetSystemFont(nsSystemFontID aID, nsFont *aFont) const
{
nsresult status = NS_OK;
if (!gSystemFonts) {
gSystemFonts = new nsSystemFontsGTK(mPixelsToTwips);
}
switch (aID) {
case eSystemFont_Menu: // css2
case eSystemFont_PullDownMenu: // css3
*aFont = gSystemFonts->GetMenuFont();
break;
case eSystemFont_Field: // css3
case eSystemFont_List: // css3
*aFont = gSystemFonts->GetFieldFont();
break;
case eSystemFont_Button: // css3
*aFont = gSystemFonts->GetButtonFont();
break;
case eSystemFont_Caption: // css2
case eSystemFont_Icon: // css2
case eSystemFont_MessageBox: // css2
case eSystemFont_SmallCaption: // css2
case eSystemFont_StatusBar: // css2
case eSystemFont_Window: // css3
case eSystemFont_Document: // css3
case eSystemFont_Workspace: // css3
case eSystemFont_Desktop: // css3
case eSystemFont_Info: // css3
case eSystemFont_Dialog: // css3
case eSystemFont_Tooltips: // moz
case eSystemFont_Widget: // moz
*aFont = gSystemFonts->GetDefaultFont();
break;
}
return status;
}
NS_IMETHODIMP nsDeviceContextGTK::GetDrawingSurface(nsIRenderingContext &aContext,
nsDrawingSurface &aSurface)
{
aContext.CreateDrawingSurface(nsnull, 0, aSurface);
return nsnull == aSurface ? NS_ERROR_OUT_OF_MEMORY : NS_OK;
}
NS_IMETHODIMP nsDeviceContextGTK::ConvertPixel(nscolor aColor,
PRUint32 & aPixel)
{
aPixel = ::gdk_rgb_xpixel_from_rgb (NS_TO_GDK_RGB(aColor));
return NS_OK;
}
NS_IMETHODIMP nsDeviceContextGTK::CheckFontExistence(const nsString& aFontName)
{
return nsFontMetricsGTK::FamilyExists(aFontName);
}
NS_IMETHODIMP nsDeviceContextGTK::GetDeviceSurfaceDimensions(PRInt32 &aWidth, PRInt32 &aHeight)
{
#ifdef NS_PRINT_PREVIEW
// Defer to Alt when there is one
if (mAltDC && (mUseAltDC & kUseAltDCFor_SURFACE_DIM)) {
return mAltDC->GetDeviceSurfaceDimensions(aWidth, aHeight);
}
#endif
if (mWidth == -1)
mWidth = NSToIntRound(mWidthFloat * mDevUnitsToAppUnits);
if (mHeight == -1)
mHeight = NSToIntRound(mHeightFloat * mDevUnitsToAppUnits);
aWidth = mWidth;
aHeight = mHeight;
return NS_OK;
}
NS_IMETHODIMP nsDeviceContextGTK::GetRect(nsRect &aRect)
{
// if we have an initialized widget for this device context, use it
// to try and get real screen coordinates.
if (mDeviceWindow) {
gint x, y, width, height, depth;
x = y = width = height = 0;
gdk_window_get_geometry(mDeviceWindow, &x, &y, &width, &height,
&depth);
gdk_window_get_origin(mDeviceWindow, &x, &y);
nsCOMPtr<nsIScreen> screen;
mScreenManager->ScreenForRect(x, y, width, height, getter_AddRefs(screen));
screen->GetRect(&aRect.x, &aRect.y, &aRect.width, &aRect.height);
aRect.x = NSToIntRound(mDevUnitsToAppUnits * aRect.x);
aRect.y = NSToIntRound(mDevUnitsToAppUnits * aRect.y);
aRect.width = NSToIntRound(mDevUnitsToAppUnits * aRect.width);
aRect.height = NSToIntRound(mDevUnitsToAppUnits * aRect.height);
}
else {
PRInt32 width, height;
GetDeviceSurfaceDimensions(width, height);
aRect.x = 0;
aRect.y = 0;
aRect.width = width;
aRect.height = height;
}
return NS_OK;
}
NS_IMETHODIMP nsDeviceContextGTK::GetClientRect(nsRect &aRect)
{
// The client rect is never different from the standard rect on
// linux because we don't have the concept of the title bar.
return GetRect ( aRect );
}
NS_IMETHODIMP nsDeviceContextGTK::GetDeviceContextFor(nsIDeviceContextSpec *aDevice,
nsIDeviceContext *&aContext)
{
nsresult rv;
PrintMethod method;
nsDeviceContextSpecGTK *spec = NS_STATIC_CAST(nsDeviceContextSpecGTK *, aDevice);
rv = spec->GetPrintMethod(method);
if (NS_FAILED(rv))
return rv;
#ifdef USE_XPRINT
if (method == pmXprint) { // XPRINT
static NS_DEFINE_CID(kCDeviceContextXp, NS_DEVICECONTEXTXP_CID);
nsCOMPtr<nsIDeviceContextXp> dcxp(do_CreateInstance(kCDeviceContextXp, &rv));
NS_ASSERTION(NS_SUCCEEDED(rv), "Couldn't create Xp Device context.");
if (NS_FAILED(rv))
return rv;
rv = dcxp->SetSpec(aDevice);
if (NS_FAILED(rv))
return rv;
rv = dcxp->InitDeviceContextXP((nsIDeviceContext*)aContext,
(nsIDeviceContext*)this);
if (NS_FAILED(rv))
return rv;
rv = dcxp->QueryInterface(NS_GET_IID(nsIDeviceContext),
(void **)&aContext);
return rv;
}
else
#endif /* USE_XPRINT */
if (method == pmPostScript) { // PostScript
// default/PS
static NS_DEFINE_CID(kCDeviceContextPS, NS_DEVICECONTEXTPS_CID);
// Create a Postscript device context
nsCOMPtr<nsIDeviceContextPS> dcps(do_CreateInstance(kCDeviceContextPS, &rv));
NS_ASSERTION(NS_SUCCEEDED(rv), "Couldn't create PS Device context.");
if (NS_FAILED(rv))
return rv;
rv = dcps->SetSpec(aDevice);
if (NS_FAILED(rv))
return rv;
rv = dcps->InitDeviceContextPS((nsIDeviceContext*)aContext,
(nsIDeviceContext*)this);
if (NS_FAILED(rv))
return rv;
rv = dcps->QueryInterface(NS_GET_IID(nsIDeviceContext),
(void **)&aContext);
return rv;
}
NS_WARNING("no print module created.");
return NS_ERROR_UNEXPECTED;
}
NS_IMETHODIMP nsDeviceContextGTK::BeginDocument(PRUnichar * aTitle)
{
return NS_OK;
}
NS_IMETHODIMP nsDeviceContextGTK::EndDocument(void)
{
return NS_OK;
}
NS_IMETHODIMP nsDeviceContextGTK::BeginPage(void)
{
return NS_OK;
}
NS_IMETHODIMP nsDeviceContextGTK::EndPage(void)
{
return NS_OK;
}
NS_IMETHODIMP nsDeviceContextGTK::GetDepth(PRUint32& aDepth)
{
aDepth = mDepth;
return NS_OK;
}
nsresult
nsDeviceContextGTK::SetDPI(PRInt32 aPrefDPI)
{
// Set OSVal to what the operating system thinks the logical resolution is.
float screenWidthIn = float(::gdk_screen_width_mm()) / 25.4f;
PRInt32 OSVal = NSToCoordRound(float(::gdk_screen_width()) / screenWidthIn);
if (aPrefDPI > 0) {
// If there's a valid pref value for the logical resolution,
// use it.
mDpi = aPrefDPI;
} else if ((aPrefDPI == 0) || (OSVal > 96)) {
// Either if the pref is 0 (force use of OS value) or the OS
// value is bigger than 96, use the OS value.
mDpi = OSVal;
} else {
// if we couldn't get the pref or it's negative, and the OS
// value is under 96ppi, then use 96.
mDpi = 96;
}
int pt2t = 72;
// make p2t a nice round number - this prevents rounding problems
mPixelsToTwips = float(NSToIntRound(float(NSIntPointsToTwips(pt2t)) / float(mDpi)));
mTwipsToPixels = 1.0f / mPixelsToTwips;
// XXX need to reflow all documents
return NS_OK;
}
int nsDeviceContextGTK::prefChanged(const char *aPref, void *aClosure)
{
nsDeviceContextGTK *context = (nsDeviceContextGTK*)aClosure;
nsresult rv;
if (nsCRT::strcmp(aPref, "browser.display.screen_resolution")==0) {
PRInt32 dpi;
nsCOMPtr<nsIPref> prefs(do_GetService(kPrefCID, &rv));
rv = prefs->GetIntPref(aPref, &dpi);
if (NS_SUCCEEDED(rv))
context->SetDPI(dpi);
// If this pref changes, we have to clear our cache of stored system
// fonts.
if (gSystemFonts) {
delete gSystemFonts;
gSystemFonts = nsnull;
}
}
return 0;
}
#define DEFAULT_TWIP_FONT_SIZE 240
nsSystemFontsGTK::nsSystemFontsGTK(float aPixelsToTwips)
: mDefaultFont("sans-serif", NS_FONT_STYLE_NORMAL, NS_FONT_VARIANT_NORMAL,
NS_FONT_WEIGHT_NORMAL, NS_FONT_DECORATION_NONE,
DEFAULT_TWIP_FONT_SIZE),
mButtonFont("sans-serif", NS_FONT_STYLE_NORMAL, NS_FONT_VARIANT_NORMAL,
NS_FONT_WEIGHT_NORMAL, NS_FONT_DECORATION_NONE,
DEFAULT_TWIP_FONT_SIZE),
mFieldFont("sans-serif", NS_FONT_STYLE_NORMAL, NS_FONT_VARIANT_NORMAL,
NS_FONT_WEIGHT_NORMAL, NS_FONT_DECORATION_NONE,
DEFAULT_TWIP_FONT_SIZE),
mMenuFont("sans-serif", NS_FONT_STYLE_NORMAL, NS_FONT_VARIANT_NORMAL,
NS_FONT_WEIGHT_NORMAL, NS_FONT_DECORATION_NONE,
DEFAULT_TWIP_FONT_SIZE)
{
/*
* Much of the widget creation code here is similar to the code in
* nsLookAndFeel::InitColors().
*/
// mDefaultFont
GtkWidget *label = gtk_label_new("M");
GtkWidget *parent = gtk_fixed_new();
GtkWidget *window = gtk_window_new(GTK_WINDOW_POPUP);
gtk_container_add(GTK_CONTAINER(parent), label);
gtk_container_add(GTK_CONTAINER(window), parent);
gtk_widget_set_rc_style(parent);
gtk_widget_set_rc_style(label);
gtk_widget_realize(parent);
gtk_widget_realize(label);
GtkStyle *style = gtk_widget_get_style(label);
GetSystemFontInfo(style, &mDefaultFont, aPixelsToTwips);
gtk_widget_destroy(window); // no unref, windows are different
// mFieldFont
GtkWidget *entry = gtk_entry_new();
parent = gtk_fixed_new();
window = gtk_window_new(GTK_WINDOW_POPUP);
gtk_container_add(GTK_CONTAINER(parent), entry);
gtk_container_add(GTK_CONTAINER(window), parent);
gtk_widget_set_rc_style(entry);
gtk_widget_realize(entry);
style = gtk_widget_get_style(entry);
GetSystemFontInfo(style, &mFieldFont, aPixelsToTwips);
gtk_widget_destroy(window); // no unref, windows are different
// mMenuFont
GtkWidget *accel_label = gtk_accel_label_new("M");
GtkWidget *menuitem = gtk_menu_item_new();
GtkWidget *menu = gtk_menu_new();
gtk_object_ref(GTK_OBJECT(menu));
gtk_object_sink(GTK_OBJECT(menu));
gtk_container_add(GTK_CONTAINER(menuitem), accel_label);
gtk_menu_append(GTK_MENU(menu), menuitem);
gtk_widget_set_rc_style(accel_label);
gtk_widget_set_rc_style(menu);
gtk_widget_realize(menu);
gtk_widget_realize(accel_label);
style = gtk_widget_get_style(accel_label);
GetSystemFontInfo(style, &mMenuFont, aPixelsToTwips);
gtk_widget_unref(menu);
// mButtonFont
parent = gtk_fixed_new();
GtkWidget *button = gtk_button_new();
label = gtk_label_new("M");
window = gtk_window_new(GTK_WINDOW_POPUP);
gtk_container_add(GTK_CONTAINER(button), label);
gtk_container_add(GTK_CONTAINER(parent), button);
gtk_container_add(GTK_CONTAINER(window), parent);
gtk_widget_set_rc_style(button);
gtk_widget_set_rc_style(label);
gtk_widget_realize(button);
gtk_widget_realize(label);
style = gtk_widget_get_style(label);
GetSystemFontInfo(style, &mButtonFont, aPixelsToTwips);
gtk_widget_destroy(window); // no unref, windows are different
}
#if 0 // debugging code to list the font properties
static void
ListFontProps(XFontStruct *aFont, Display *aDisplay)
{
printf("\n\n");
for (int i = 0, n = aFont->n_properties; i < n; ++i) {
XFontProp *prop = aFont->properties + i;
char *atomName = ::XGetAtomName(aDisplay, prop->name);
// 500 is just a guess
char *cardName = (prop->card32 > 0 && prop->card32 < 500)
? ::XGetAtomName(aDisplay, prop->card32)
: 0;
printf("%s : %ld (%s)\n", atomName, prop->card32, cardName?cardName:"");
::XFree(atomName);
if (cardName)
::XFree(cardName);
}
printf("\n\n");
}
#endif
static void
AppendFontName(XFontStruct* aFontStruct, nsString& aString, Display *aDisplay)
{
unsigned long pr = 0;
::XGetFontProperty(aFontStruct, XA_FAMILY_NAME, &pr);
if (!pr)
::XGetFontProperty(aFontStruct, XA_FULL_NAME, &pr);
if (pr) {
char *fontName = ::XGetAtomName(aDisplay, pr);
aString.AppendWithConversion(fontName);
::XFree(fontName);
}
}
static PRUint16
GetFontWeight(XFontStruct* aFontStruct, Display *aDisplay)
{
PRUint16 weight = NS_FONT_WEIGHT_NORMAL;
// WEIGHT_NAME seems more reliable than WEIGHT, where 10 can mean
// anything. Check both, and make it bold if either says so.
unsigned long pr = 0;
Atom weightName = ::XInternAtom(aDisplay, "WEIGHT_NAME", True);
if (weightName != None) {
::XGetFontProperty(aFontStruct, weightName, &pr);
if (pr) {
char *weightString = ::XGetAtomName(aDisplay, pr);
if (nsCRT::strcasecmp(weightString, "bold") == 0)
weight = NS_FONT_WEIGHT_BOLD;
::XFree(weightString);
}
}
pr = 0;
::XGetFontProperty(aFontStruct, XA_WEIGHT, &pr);
if ( pr > 10 )
weight = NS_FONT_WEIGHT_BOLD;
return weight;
}
static nscoord
GetFontSize(XFontStruct *aFontStruct, float aPixelsToTwips)
{
unsigned long pr = 0;
Atom pixelSizeAtom = ::XInternAtom(GDK_DISPLAY(), "PIXEL_SIZE", 0);
::XGetFontProperty(aFontStruct, pixelSizeAtom, &pr);
if (!pr)
return DEFAULT_TWIP_FONT_SIZE;
return NSIntPixelsToTwips(pr, aPixelsToTwips);
}
nsresult
nsSystemFontsGTK::GetSystemFontInfo(GtkStyle *aStyle, nsFont* aFont, float aPixelsToTwips) const
{
#ifdef MOZ_WIDGET_GTK
GdkFont *theFont = aStyle->font;
#endif /* MOZ_WIDGET_GTK */
#ifdef MOZ_WIDGET_GTK2
GdkFont *theFont = gtk_style_get_font(aStyle);
#endif /* MOZ_WIDGET_GTK2 */
aFont->style = NS_FONT_STYLE_NORMAL;
aFont->weight = NS_FONT_WEIGHT_NORMAL;
aFont->decorations = NS_FONT_DECORATION_NONE;
// do we have the default_font defined by GTK/GDK then
// we use it, if not then we load helvetica, if not then
// we load fixed font else we error out.
#ifdef MOZ_WIDGET_GTK
if (!theFont)
theFont = default_font; // GTK default font
#endif
if (!theFont)
theFont = ::gdk_font_load( GDK_DEFAULT_FONT1 );
if (!theFont)
theFont = ::gdk_font_load( GDK_DEFAULT_FONT2 );
if (!theFont)
return NS_ERROR_FAILURE;
Display *fontDisplay = GDK_FONT_XDISPLAY(theFont);
if (theFont->type == GDK_FONT_FONT) {
XFontStruct *fontStruct =
NS_STATIC_CAST(XFontStruct*, GDK_FONT_XFONT(theFont));
aFont->name.Truncate();
AppendFontName(fontStruct, aFont->name, fontDisplay);
aFont->weight = GetFontWeight(fontStruct, fontDisplay);
aFont->size = GetFontSize(fontStruct, aPixelsToTwips);
} else {
NS_ASSERTION(theFont->type == GDK_FONT_FONTSET,
"theFont->type can only have two values");
XFontSet fontSet = NS_REINTERPRET_CAST(XFontSet, GDK_FONT_XFONT(theFont));
XFontStruct **fontStructs;
char **fontNames;
int numFonts = ::XFontsOfFontSet(fontSet, &fontStructs, &fontNames);
if (numFonts == 0)
return NS_ERROR_FAILURE;
// Use the weight and size from the first font, but append all
// the names.
aFont->weight = GetFontWeight(*fontStructs, fontDisplay);
aFont->size = GetFontSize(*fontStructs, aPixelsToTwips);
nsString& fontName = aFont->name;
fontName.Truncate();
for (;;) {
AppendFontName(*fontStructs, fontName, fontDisplay);
++fontStructs;
--numFonts;
if (numFonts == 0)
break;
fontName.Append(NS_LITERAL_STRING(","));
}
}
return NS_OK;
}

View File

@@ -1,120 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef nsDeviceContextGTK_h___
#define nsDeviceContextGTK_h___
#include "nsDeviceContext.h"
#include "nsUnitConversion.h"
#include "nsIWidget.h"
#include "nsIView.h"
#include "nsIRenderingContext.h"
#include "nsRenderingContextGTK.h"
#include "nsIScreenManager.h"
class nsDeviceContextGTK : public DeviceContextImpl
{
public:
nsDeviceContextGTK();
virtual ~nsDeviceContextGTK();
static void Shutdown(); // to be called from module destructor
NS_IMETHOD Init(nsNativeWidget aNativeWidget);
NS_IMETHOD CreateRenderingContext(nsIRenderingContext *&aContext);
NS_IMETHOD CreateRenderingContext(nsIView *aView, nsIRenderingContext *&aContext) {return (DeviceContextImpl::CreateRenderingContext(aView,aContext));}
NS_IMETHOD CreateRenderingContext(nsIWidget *aWidget, nsIRenderingContext *&aContext) {return (DeviceContextImpl::CreateRenderingContext(aWidget,aContext));}
NS_IMETHOD SupportsNativeWidgets(PRBool &aSupportsWidgets);
NS_IMETHOD GetScrollBarDimensions(float &aWidth, float &aHeight) const;
NS_IMETHOD GetSystemFont(nsSystemFontID anID, nsFont *aFont) const;
//get a low level drawing surface for rendering. the rendering context
//that is passed in is used to create the drawing surface if there isn't
//already one in the device context. the drawing surface is then cached
//in the device context for re-use.
NS_IMETHOD GetDrawingSurface(nsIRenderingContext &aContext, nsDrawingSurface &aSurface);
NS_IMETHOD ConvertPixel(nscolor aColor, PRUint32 & aPixel);
NS_IMETHOD CheckFontExistence(const nsString& aFontName);
NS_IMETHOD GetDeviceSurfaceDimensions(PRInt32 &aWidth, PRInt32 &aHeight);
NS_IMETHOD GetClientRect(nsRect &aRect);
NS_IMETHOD GetRect(nsRect &aRect);
NS_IMETHOD GetDeviceContextFor(nsIDeviceContextSpec *aDevice,
nsIDeviceContext *&aContext);
NS_IMETHOD BeginDocument(PRUnichar * aTitle);
NS_IMETHOD EndDocument(void);
NS_IMETHOD BeginPage(void);
NS_IMETHOD EndPage(void);
NS_IMETHOD GetDepth(PRUint32& aDepth);
static int prefChanged(const char *aPref, void *aClosure);
protected:
nsresult SetDPI(PRInt32 aPrefDPI);
private:
PRUint32 mDepth;
PRBool mWriteable;
PRUint32 mNumCells;
PRInt16 mScrollbarHeight;
PRInt16 mScrollbarWidth;
static nscoord mDpi;
float mWidthFloat;
float mHeightFloat;
PRInt32 mWidth;
PRInt32 mHeight;
GdkWindow *mDeviceWindow;
nsCOMPtr<nsIScreenManager> mScreenManager;
nsresult GetSystemFontInfo(GdkFont* iFont, nsSystemFontID anID, nsFont* aFont) const;
};
#endif /* nsDeviceContextGTK_h___ */

View File

@@ -1,96 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1999
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Roland Mainz <roland.mainz@informatik.med.uni-giessen.de>
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "nsDeviceContextSpecFactoryG.h"
#include "nsDeviceContextSpecG.h"
#include "nsGfxCIID.h"
#include "plstr.h"
/** -------------------------------------------------------
* Constructor
* @update dc 2/16/98
*/
nsDeviceContextSpecFactoryGTK :: nsDeviceContextSpecFactoryGTK()
{
NS_INIT_REFCNT();
}
/** -------------------------------------------------------
* Destructor
* @update dc 2/16/98
*/
nsDeviceContextSpecFactoryGTK :: ~nsDeviceContextSpecFactoryGTK()
{
}
NS_IMPL_ISUPPORTS1(nsDeviceContextSpecFactoryGTK, nsIDeviceContextSpecFactory)
/** -------------------------------------------------------
* Initialize the device context spec factory
* @update dc 2/16/98
*/
NS_IMETHODIMP nsDeviceContextSpecFactoryGTK :: Init(void)
{
return NS_OK;
}
/** -------------------------------------------------------
* Get a device context specification
* @update dc 2/16/98
*/
NS_IMETHODIMP nsDeviceContextSpecFactoryGTK :: CreateDeviceContextSpec(nsIWidget *aWidget,
nsIPrintSettings* aPrintSettings,
nsIDeviceContextSpec *&aNewSpec,
PRBool aQuiet)
{
nsresult rv;
static NS_DEFINE_CID(kDeviceContextSpecCID, NS_DEVICE_CONTEXT_SPEC_CID);
nsCOMPtr<nsIDeviceContextSpec> devSpec = do_CreateInstance(kDeviceContextSpecCID, &rv);
if (NS_SUCCEEDED(rv))
{
rv = ((nsDeviceContextSpecGTK *)devSpec.get())->Init(aPrintSettings, aQuiet);
if (NS_SUCCEEDED(rv))
{
aNewSpec = devSpec;
NS_ADDREF(aNewSpec);
}
}
return rv;
}

View File

@@ -1,62 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1999
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef nsDeviceContextSpecFactoryG_h___
#define nsDeviceContextSpecFactoryG_h___
#include "nsIDeviceContextSpecFactory.h"
#include "nsIDeviceContextSpec.h"
class nsDeviceContextSpecFactoryGTK : public nsIDeviceContextSpecFactory
{
public:
nsDeviceContextSpecFactoryGTK();
NS_DECL_ISUPPORTS
NS_IMETHOD Init(void);
NS_IMETHOD CreateDeviceContextSpec(nsIWidget *aWidget,
nsIPrintSettings* aPrintSettings,
nsIDeviceContextSpec *&aNewSpec,
PRBool aQuiet);
protected:
virtual ~nsDeviceContextSpecFactoryGTK();
};
#endif

View File

@@ -1,636 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Roland Mainz <roland.mainz@informatik.med.uni-giessen.de>
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "nsDeviceContextSpecG.h"
#include "nsReadableUtils.h"
#include "nsIPref.h"
#include "prenv.h" /* for PR_GetEnv */
#include "nsIDOMWindow.h"
#include "nsIServiceManager.h"
#include "nsIDialogParamBlock.h"
#include "nsISupportsPrimitives.h"
#include "nsIWindowWatcher.h"
#include "nsIDOMWindowInternal.h"
#include "nsISupportsArray.h"
#ifdef USE_XPRINT
#include "xprintutil.h"
#endif /* USE_XPRINT */
//----------------------------------------------------------------------------------
// The printer data is shared between the PrinterEnumerator and the nsDeviceContextSpecG
// The PrinterEnumerator creates the printer info
// but the nsDeviceContextSpecG cleans it up
// If it gets created (via the Page Setup Dialog) but the user never prints anything
// then it will never be delete, so this class takes care of that.
class GlobalPrinters {
public:
static GlobalPrinters* GetInstance() { return &mGlobalPrinters; }
~GlobalPrinters() { FreeGlobalPrinters(); }
void FreeGlobalPrinters();
nsresult InitializeGlobalPrinters();
PRBool PrintersAreAllocated() { return mGlobalPrinterList != nsnull; }
PRInt32 GetNumPrinters() { return mGlobalNumPrinters; }
nsString* GetStringAt(PRInt32 aInx) { return mGlobalPrinterList->StringAt(aInx); }
protected:
GlobalPrinters() {}
static GlobalPrinters mGlobalPrinters;
static nsStringArray* mGlobalPrinterList;
static int mGlobalNumPrinters;
};
//---------------
// static members
GlobalPrinters GlobalPrinters::mGlobalPrinters;
nsStringArray* GlobalPrinters::mGlobalPrinterList = nsnull;
int GlobalPrinters::mGlobalNumPrinters = 0;
//---------------
/** -------------------------------------------------------
* Construct the nsDeviceContextSpecGTK
* @update dc 12/02/98
*/
nsDeviceContextSpecGTK :: nsDeviceContextSpecGTK()
{
NS_INIT_REFCNT();
}
/** -------------------------------------------------------
* Destroy the nsDeviceContextSpecGTK
* @update dc 2/15/98
*/
nsDeviceContextSpecGTK :: ~nsDeviceContextSpecGTK()
{
}
#ifdef USE_XPRINT
NS_IMPL_ISUPPORTS3(nsDeviceContextSpecGTK,
nsIDeviceContextSpec,
nsIDeviceContextSpecPS,
nsIDeviceContextSpecXp)
#else
NS_IMPL_ISUPPORTS2(nsDeviceContextSpecGTK,
nsIDeviceContextSpec,
nsIDeviceContextSpecPS)
#endif /* USE_XPRINT */
static nsresult DisplayXPDialog(nsIPrintSettings* aPS,
const char* aChromeURL,
PRBool& aClickedOK)
{
NS_ASSERTION(aPS, "Must have a print settings!");
aClickedOK = PR_FALSE;
nsresult rv = NS_ERROR_FAILURE;
// create a nsISupportsArray of the parameters
// being passed to the window
nsCOMPtr<nsISupportsArray> array;
NS_NewISupportsArray(getter_AddRefs(array));
if (!array) return NS_ERROR_FAILURE;
nsCOMPtr<nsIPrintSettings> ps = aPS;
nsCOMPtr<nsISupports> psSupports(do_QueryInterface(ps));
NS_ASSERTION(psSupports, "PrintSettings must be a supports");
array->AppendElement(psSupports);
nsCOMPtr<nsIDialogParamBlock> ioParamBlock(do_CreateInstance("@mozilla.org/embedcomp/dialogparam;1"));
if (ioParamBlock) {
ioParamBlock->SetInt(0, 0);
nsCOMPtr<nsISupports> blkSupps(do_QueryInterface(ioParamBlock));
NS_ASSERTION(blkSupps, "IOBlk must be a supports");
array->AppendElement(blkSupps);
nsCOMPtr<nsISupports> arguments(do_QueryInterface(array));
NS_ASSERTION(array, "array must be a supports");
nsCOMPtr<nsIWindowWatcher> wwatch(do_GetService("@mozilla.org/embedcomp/window-watcher;1"));
if (wwatch) {
nsCOMPtr<nsIDOMWindow> active;
wwatch->GetActiveWindow(getter_AddRefs(active));
nsCOMPtr<nsIDOMWindowInternal> parent = do_QueryInterface(active);
nsCOMPtr<nsIDOMWindow> newWindow;
rv = wwatch->OpenWindow(parent, aChromeURL,
"_blank", "chrome,modal,centerscreen", array,
getter_AddRefs(newWindow));
}
}
if (NS_SUCCEEDED(rv)) {
PRInt32 buttonPressed = 0;
ioParamBlock->GetInt(0, &buttonPressed);
if (buttonPressed == 1) {
aClickedOK = PR_TRUE;
} else {
rv = NS_ERROR_ABORT;
}
} else {
rv = NS_ERROR_ABORT;
}
return rv;
}
/** -------------------------------------------------------
* Initialize the nsDeviceContextSpecGTK
* @update dc 2/15/98
* @update syd 3/2/99
*
* gisburn: Please note that this function exists as 1:1 copy in other
* toolkits including:
* - GTK+-toolkit:
* file: mozilla/gfx/src/gtk/nsDeviceContextSpecG.cpp
* function: NS_IMETHODIMP nsDeviceContextSpecGTK::Init(PRBool aQuiet)
* - Xlib-toolkit:
* file: mozilla/gfx/src/xlib/nsDeviceContextSpecXlib.cpp
* function: NS_IMETHODIMP nsDeviceContextSpecXlib::Init(PRBool aQuiet)
* - Qt-toolkit:
* file: mozilla/gfx/src/qt/nsDeviceContextSpecQT.cpp
* function: NS_IMETHODIMP nsDeviceContextSpecQT::Init(PRBool aQuiet)
*
* ** Please update the other toolkits when changing this function.
*/
NS_IMETHODIMP nsDeviceContextSpecGTK::Init(nsIPrintSettings* aPS, PRBool aQuiet)
{
nsresult rv = NS_ERROR_FAILURE;
mPrintSettings = aPS;
// if there is a current selection then enable the "Selection" radio button
if (mPrintSettings) {
PRBool isOn;
mPrintSettings->GetPrintOptions(nsIPrintSettings::kEnableSelectionRB, &isOn);
nsCOMPtr<nsIPref> pPrefs = do_GetService(NS_PREF_CONTRACTID, &rv);
if (NS_SUCCEEDED(rv)) {
(void) pPrefs->SetBoolPref("print.selection_radio_enabled", isOn);
}
}
char *path;
PRBool canPrint = PR_FALSE;
PRBool reversed = PR_FALSE;
PRBool color = PR_FALSE;
PRBool tofile = PR_FALSE;
PRInt16 printRange = nsIPrintSettings::kRangeAllPages;
PRInt32 paper_size = NS_LETTER_SIZE;
PRInt32 orientation = NS_PORTRAIT;
PRInt32 fromPage = 1;
PRInt32 toPage = 1;
PRUnichar *command = nsnull;
PRInt32 copies = 1;
PRUnichar *printer = nsnull;
PRUnichar *printfile = nsnull;
double dleft = 0.5;
double dright = 0.5;
double dtop = 0.5;
double dbottom = 0.5;
rv = GlobalPrinters::GetInstance()->InitializeGlobalPrinters();
if (NS_FAILED(rv)) {
return rv;
}
if (!aQuiet ) {
rv = DisplayXPDialog(mPrintSettings,
"chrome://global/content/printdialog.xul", canPrint);
}
else {
canPrint = PR_TRUE;
}
GlobalPrinters::GetInstance()->FreeGlobalPrinters();
if (canPrint) {
if (aPS != nsnull) {
aPS->GetPrinterName(&printer);
aPS->GetPrintReversed(&reversed);
aPS->GetPrintInColor(&color);
aPS->GetPaperSize(&paper_size);
aPS->GetOrientation(&orientation);
aPS->GetPrintCommand(&command);
aPS->GetPrintRange(&printRange);
aPS->GetToFileName(&printfile);
aPS->GetPrintToFile(&tofile);
aPS->GetStartPageRange(&fromPage);
aPS->GetEndPageRange(&toPage);
aPS->GetNumCopies(&copies);
aPS->GetMarginTop(&dtop);
aPS->GetMarginLeft(&dleft);
aPS->GetMarginBottom(&dbottom);
aPS->GetMarginRight(&dright);
if (command != nsnull && printfile != nsnull) {
// ToDo: Use LocalEncoding instead of UTF-8 (see bug 73446)
strcpy(mPrData.command, NS_ConvertUCS2toUTF8(command).get());
strcpy(mPrData.path, NS_ConvertUCS2toUTF8(printfile).get());
}
if (printer != nsnull)
strcpy(mPrData.printer, NS_ConvertUCS2toUTF8(printer).get());
#ifdef DEBUG_rods
printf("margins: %5.2f,%5.2f,%5.2f,%5.2f\n",
dtop, dleft, dbottom, dright);
printf("printRange %d\n", printRange);
printf("fromPage %d\n", fromPage);
printf("toPage %d\n", toPage);
printf("tofile %d\n", tofile);
printf("printfile %s\n",
printfile? NS_ConvertUCS2toUTF8(printfile).get():"NULL");
printf("command %s\n",
command? NS_ConvertUCS2toUTF8(command).get():"NULL");
printf("printer %s\n",
printer? NS_ConvertUCS2toUTF8(printer).get():"NULL");
#endif /* DEBUG_rods */
} else {
#ifdef VMS
// Note to whoever puts the "lpr" into the prefs file. Please contact me
// as I need to make the default be "print" instead of "lpr" for OpenVMS.
strcpy(mPrData.command, "print");
#else
strcpy(mPrData.command, "lpr ${MOZ_PRINTER_NAME:+'-P'}${MOZ_PRINTER_NAME}");
#endif /* VMS */
}
mPrData.top = dtop;
mPrData.bottom = dbottom;
mPrData.left = dleft;
mPrData.right = dright;
mPrData.fpf = !reversed;
mPrData.grayscale = !color;
mPrData.size = paper_size;
mPrData.orientation = orientation;
mPrData.toPrinter = !tofile;
mPrData.copies = copies;
// PWD, HOME, or fail
if (!printfile) {
if ( ( path = PR_GetEnv( "PWD" ) ) == (char *) nsnull )
if ( ( path = PR_GetEnv( "HOME" ) ) == (char *) nsnull )
strcpy(mPrData.path, "mozilla.ps");
if ( path != (char *) nsnull )
sprintf(mPrData.path, "%s/mozilla.ps", path);
else
return NS_ERROR_FAILURE;
}
#ifdef NOT_IMPLEMENTED_YET
if (mGlobalNumPrinters) {
for(int i = 0; (i < mGlobalNumPrinters) && !mQueue; i++) {
if (!(mGlobalPrinterList->StringAt(i)->CompareWithConversion(mPrData.printer, TRUE, -1)))
mQueue = PrnDlg.SetPrinterQueue(i);
}
}
#endif /* NOT_IMPLEMENTED_YET */
if (command != nsnull) {
nsMemory::Free(command);
}
if (printfile != nsnull) {
nsMemory::Free(printfile);
}
return NS_OK;
}
return rv;
}
NS_IMETHODIMP nsDeviceContextSpecGTK::GetToPrinter(PRBool &aToPrinter)
{
aToPrinter = mPrData.toPrinter;
return NS_OK;
}
NS_IMETHODIMP nsDeviceContextSpecGTK::GetPrinterName ( char **aPrinter )
{
*aPrinter = &mPrData.printer[0];
return NS_OK;
}
NS_IMETHODIMP nsDeviceContextSpecGTK::GetCopies ( int &aCopies )
{
aCopies = mPrData.copies;
return NS_OK;
}
NS_IMETHODIMP nsDeviceContextSpecGTK :: GetFirstPageFirst ( PRBool &aFpf )
{
aFpf = mPrData.fpf;
return NS_OK;
}
NS_IMETHODIMP nsDeviceContextSpecGTK :: GetGrayscale ( PRBool &aGrayscale )
{
aGrayscale = mPrData.grayscale;
return NS_OK;
}
NS_IMETHODIMP nsDeviceContextSpecGTK :: GetSize ( int &aSize )
{
aSize = mPrData.size;
return NS_OK;
}
NS_IMETHODIMP nsDeviceContextSpecGTK :: GetPageDimensions ( float &aWidth, float &aHeight )
{
if ( mPrData.size == NS_LETTER_SIZE ) {
aWidth = 8.5;
aHeight = 11.0;
} else if ( mPrData.size == NS_LEGAL_SIZE ) {
aWidth = 8.5;
aHeight = 14.0;
} else if ( mPrData.size == NS_EXECUTIVE_SIZE ) {
aWidth = 7.5;
aHeight = 10.0;
} else if ( mPrData.size == NS_A4_SIZE ) {
// 210mm X 297mm == 8.27in X 11.69in
aWidth = 8.27;
aHeight = 11.69;
} else if ( mPrData.size == NS_A3_SIZE ) {
// 297mm X 420mm == 11.69in X 16.53in
aWidth = 11.69;
aHeight = 16.53; }
if (mPrData.orientation == NS_LANDSCAPE) {
float temp;
temp = aWidth;
aWidth = aHeight;
aHeight = temp;
}
return NS_OK;
}
NS_IMETHODIMP nsDeviceContextSpecGTK :: GetLandscape ( PRBool &landscape )
{
landscape = (mPrData.orientation == NS_LANDSCAPE);
return NS_OK;
}
NS_IMETHODIMP nsDeviceContextSpecGTK :: GetTopMargin ( float &value )
{
value = mPrData.top;
return NS_OK;
}
NS_IMETHODIMP nsDeviceContextSpecGTK :: GetBottomMargin ( float &value )
{
value = mPrData.bottom;
return NS_OK;
}
NS_IMETHODIMP nsDeviceContextSpecGTK :: GetRightMargin ( float &value )
{
value = mPrData.right;
return NS_OK;
}
NS_IMETHODIMP nsDeviceContextSpecGTK :: GetLeftMargin ( float &value )
{
value = mPrData.left;
return NS_OK;
}
NS_IMETHODIMP nsDeviceContextSpecGTK :: GetCommand ( char **aCommand )
{
*aCommand = &mPrData.command[0];
return NS_OK;
}
NS_IMETHODIMP nsDeviceContextSpecGTK :: GetPath ( char **aPath )
{
*aPath = &mPrData.path[0];
return NS_OK;
}
NS_IMETHODIMP nsDeviceContextSpecGTK :: GetUserCancelled( PRBool &aCancel )
{
aCancel = mPrData.cancel;
return NS_OK;
}
NS_IMETHODIMP nsDeviceContextSpecGTK::GetPrintMethod(PrintMethod &aMethod)
{
/* printer names for the PostScript module alwas start with
* the NS_POSTSCRIPT_DRIVER_NAME string */
if (strncmp(mPrData.printer, NS_POSTSCRIPT_DRIVER_NAME,
NS_POSTSCRIPT_DRIVER_NAME_LEN) != 0)
aMethod = pmXprint;
else
aMethod = pmPostScript;
return NS_OK;
}
NS_IMETHODIMP nsDeviceContextSpecGTK::ClosePrintManager()
{
return NS_OK;
}
// Printer Enumerator
nsPrinterEnumeratorGTK::nsPrinterEnumeratorGTK()
{
NS_INIT_REFCNT();
}
NS_IMPL_ISUPPORTS1(nsPrinterEnumeratorGTK, nsIPrinterEnumerator)
NS_IMETHODIMP nsPrinterEnumeratorGTK::EnumeratePrinters(PRUint32* aCount, PRUnichar*** aResult)
{
NS_ENSURE_ARG(aCount);
NS_ENSURE_ARG_POINTER(aResult);
if (aCount)
*aCount = 0;
else
return NS_ERROR_NULL_POINTER;
if (aResult)
*aResult = nsnull;
else
return NS_ERROR_NULL_POINTER;
nsresult rv = GlobalPrinters::GetInstance()->InitializeGlobalPrinters();
if (NS_FAILED(rv)) {
return rv;
}
PRInt32 numPrinters = GlobalPrinters::GetInstance()->GetNumPrinters();
PRUnichar** array = (PRUnichar**) nsMemory::Alloc(numPrinters * sizeof(PRUnichar*));
if (!array && numPrinters > 0) {
GlobalPrinters::GetInstance()->FreeGlobalPrinters();
return NS_ERROR_OUT_OF_MEMORY;
}
int count = 0;
while( count < numPrinters )
{
PRUnichar *str = ToNewUnicode(*GlobalPrinters::GetInstance()->GetStringAt(count));
if (!str) {
for (int i = count - 1; i >= 0; i--)
nsMemory::Free(array[i]);
nsMemory::Free(array);
GlobalPrinters::GetInstance()->FreeGlobalPrinters();
return NS_ERROR_OUT_OF_MEMORY;
}
array[count++] = str;
}
*aCount = count;
*aResult = array;
GlobalPrinters::GetInstance()->FreeGlobalPrinters();
return NS_OK;
}
NS_IMETHODIMP nsPrinterEnumeratorGTK::DisplayPropertiesDlg(const PRUnichar *aPrinter, nsIPrintSettings* aPrintSettings)
{
/* fixme: We simply ignore the |aPrinter| argument here
* We should get the supported printer attributes from the printer and
* populate the print job options dialog with these data instead of using
* the "default set" here.
* However, this requires changes on all platforms and is another big chunk
* of patches ... ;-(
*/
PRBool pressedOK;
return DisplayXPDialog(aPrintSettings,
"chrome://global/content/printjoboptions.xul",
pressedOK);
}
//----------------------------------------------------------------------
nsresult GlobalPrinters::InitializeGlobalPrinters ()
{
if (PrintersAreAllocated()) {
return NS_OK;
}
mGlobalNumPrinters = 0;
mGlobalPrinterList = new nsStringArray();
if (!mGlobalPrinterList)
return NS_ERROR_OUT_OF_MEMORY;
#ifdef USE_XPRINT
XPPrinterList plist = XpuGetPrinterList(nsnull, &mGlobalNumPrinters);
if (plist && (mGlobalNumPrinters > 0))
{
int i;
for( i = 0 ; i < mGlobalNumPrinters ; i++ )
{
mGlobalPrinterList->AppendString(nsString(NS_ConvertASCIItoUCS2(plist[i].name)));
}
XpuFreePrinterList(plist);
}
#endif /* USE_XPRINT */
/* add an entry for the default printer (see nsPostScriptObj.cpp) */
mGlobalPrinterList->AppendString(
nsString(NS_ConvertASCIItoUCS2(NS_POSTSCRIPT_DRIVER_NAME "default")));
mGlobalNumPrinters++;
/* get the list of printers */
char *printerList = nsnull;
/* the env var MOZILLA_PRINTER_LIST can "override" the prefs */
printerList = PR_GetEnv("MOZILLA_PRINTER_LIST");
if (!printerList) {
nsresult rv;
nsCOMPtr<nsIPref> pPrefs = do_GetService(NS_PREF_CONTRACTID, &rv);
if (NS_SUCCEEDED(rv)) {
(void) pPrefs->CopyCharPref("print.printer_list", &printerList);
}
}
if (printerList) {
char *tok_lasts;
char *name;
/* PL_strtok_r() will modify the string - copy it! */
printerList = strdup(printerList);
if (!printerList)
return NS_ERROR_OUT_OF_MEMORY;
for( name = PL_strtok_r(printerList, " ", &tok_lasts) ;
name != nsnull ;
name = PL_strtok_r(nsnull, " ", &tok_lasts) )
{
mGlobalPrinterList->AppendString(
nsString(NS_ConvertASCIItoUCS2(NS_POSTSCRIPT_DRIVER_NAME)) +
nsString(NS_ConvertASCIItoUCS2(name)));
mGlobalNumPrinters++;
}
free(printerList);
}
if (mGlobalNumPrinters == 0)
return NS_ERROR_GFX_PRINTER_NO_PRINTER_AVAILABLE;
return NS_OK;
}
//----------------------------------------------------------------------
void GlobalPrinters::FreeGlobalPrinters()
{
delete mGlobalPrinterList;
mGlobalPrinterList = nsnull;
mGlobalNumPrinters = 0;
}

View File

@@ -1,154 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Roland Mainz <roland.mainz@informatik.med.uni-giessen.de>
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef nsDeviceContextSpecG_h___
#define nsDeviceContextSpecG_h___
#include "nsIDeviceContextSpec.h"
#include "nsIPrintOptions.h"
#include "nsVoidArray.h"
#include "nsIDeviceContextSpecPS.h"
#include "nsIPrintSettings.h"
#ifdef USE_XPRINT
#include "nsIDeviceContextSpecXPrint.h"
#endif /* USE_XPRINT */
#include "nsPrintdGTK.h"
typedef enum
{
pmInvalid = 0,
pmXprint,
pmPostScript
} PrintMethod;
class nsDeviceContextSpecGTK : public nsIDeviceContextSpec ,
public nsIDeviceContextSpecPS
#ifdef USE_XPRINT
, public nsIDeviceContextSpecXp
#endif
{
public:
/**
* Construct a nsDeviceContextSpecMac, which is an object which contains and manages a mac printrecord
* @update dc 12/02/98
*/
nsDeviceContextSpecGTK();
NS_DECL_ISUPPORTS
/**
* Initialize the nsDeviceContextSpecMac for use. This will allocate a printrecord for use
* @update dc 2/16/98
* @param aQuiet if PR_TRUE, prevent the need for user intervention
* in obtaining device context spec. if nsnull is passed in for
* the aOldSpec, this will typically result in getting a device
* context spec for the default output device (i.e. default
* printer).
* @return error status
*/
NS_IMETHOD Init(nsIPrintSettings* aPS, PRBool aQuiet);
/**
* Closes the printmanager if it is open.
* @update dc 2/13/98
* @update syd 3/20/99
* @return error status
*/
NS_IMETHOD ClosePrintManager();
NS_IMETHOD GetToPrinter( PRBool &aToPrinter );
NS_IMETHOD GetPrinterName ( char **aPrinter );
NS_IMETHOD GetCopies ( int &aCopies );
NS_IMETHOD GetFirstPageFirst ( PRBool &aFpf );
NS_IMETHOD GetGrayscale( PRBool &aGrayscale );
NS_IMETHOD GetSize ( int &aSize );
NS_IMETHOD GetTopMargin ( float &value );
NS_IMETHOD GetBottomMargin ( float &value );
NS_IMETHOD GetLeftMargin ( float &value );
NS_IMETHOD GetRightMargin ( float &value );
NS_IMETHOD GetCommand ( char **aCommand );
NS_IMETHOD GetPath ( char **aPath );
NS_IMETHOD GetPageDimensions (float &aWidth, float &aHeight );
NS_IMETHOD GetLandscape (PRBool &aLandscape);
NS_IMETHOD GetUserCancelled( PRBool &aCancel );
NS_IMETHOD GetPrintMethod(PrintMethod &aMethod );
/**
* Destuct a nsDeviceContextSpecMac, this will release the printrecord
* @update dc 2/16/98
*/
virtual ~nsDeviceContextSpecGTK();
protected:
nsCOMPtr<nsIPrintSettings> mPrintSettings;
UnixPrData mPrData;
};
//-------------------------------------------------------------------------
// Printer Enumerator
//-------------------------------------------------------------------------
class nsPrinterEnumeratorGTK : public nsIPrinterEnumerator
{
public:
nsPrinterEnumeratorGTK();
NS_DECL_ISUPPORTS
NS_DECL_NSIPRINTERENUMERATOR
protected:
};
#endif /* !nsDeviceContextSpecG_h___ */

View File

@@ -1,323 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include <gdk/gdkx.h>
#include <gdk/gdkprivate.h>
#include "nsDrawingSurfaceGTK.h"
NS_IMPL_ISUPPORTS1(nsDrawingSurfaceGTK, nsIDrawingSurface)
//#define CHEAP_PERFORMANCE_MEASUREMENT
#ifdef CHEAP_PERFORMANCE_MEASUREMENT
static PRTime mLockTime, mUnlockTime;
#endif
nsDrawingSurfaceGTK :: nsDrawingSurfaceGTK()
{
NS_INIT_REFCNT();
GdkVisual *v;
mPixmap = nsnull;
mGC = nsnull;
mDepth = 0;
mWidth = 0;
mHeight = 0;
mFlags = 0;
mImage = nsnull;
mLockWidth = 0;
mLockHeight = 0;
mLockFlags = 0;
mLockX = 0;
mLockY = 0;
mLocked = PR_FALSE;
v = ::gdk_rgb_get_visual();
mPixFormat.mRedMask = v->red_mask;
mPixFormat.mGreenMask = v->green_mask;
mPixFormat.mBlueMask = v->blue_mask;
// FIXME
mPixFormat.mAlphaMask = 0;
mPixFormat.mRedCount = ConvertMaskToCount(v->red_mask);
mPixFormat.mGreenCount = ConvertMaskToCount(v->green_mask);
mPixFormat.mBlueCount = ConvertMaskToCount(v->blue_mask);;
mPixFormat.mRedShift = v->red_shift;
mPixFormat.mGreenShift = v->green_shift;
mPixFormat.mBlueShift = v->blue_shift;
// FIXME
mPixFormat.mAlphaShift = 0;
mDepth = v->depth;
}
nsDrawingSurfaceGTK :: ~nsDrawingSurfaceGTK()
{
if (mPixmap)
::gdk_pixmap_unref(mPixmap);
if (mImage)
::gdk_image_destroy(mImage);
if (mGC)
gdk_gc_unref(mGC);
}
/**
* Lock a rect of a drawing surface and return a
* pointer to the upper left hand corner of the
* bitmap.
* @param aX x position of subrect of bitmap
* @param aY y position of subrect of bitmap
* @param aWidth width of subrect of bitmap
* @param aHeight height of subrect of bitmap
* @param aBits out parameter for upper left hand
* corner of bitmap
* @param aStride out parameter for number of bytes
* to add to aBits to go from scanline to scanline
* @param aWidthBytes out parameter for number of
* bytes per line in aBits to process aWidth pixels
* @return error status
*
**/
NS_IMETHODIMP nsDrawingSurfaceGTK :: Lock(PRInt32 aX, PRInt32 aY,
PRUint32 aWidth, PRUint32 aHeight,
void **aBits, PRInt32 *aStride,
PRInt32 *aWidthBytes, PRUint32 aFlags)
{
#ifdef CHEAP_PERFORMANCE_MEASUREMENT
mLockTime = PR_Now();
// MOZ_TIMER_RESET(mLockTime);
// MOZ_TIMER_START(mLockTime);
#endif
#if 0
g_print("nsDrawingSurfaceGTK::Lock() called\n" \
" aX = %i, aY = %i,\n" \
" aWidth = %i, aHeight = %i,\n" \
" aBits, aStride, aWidthBytes,\n" \
" aFlags = %i\n", aX, aY, aWidth, aHeight, aFlags);
#endif
if (mLocked)
{
NS_ASSERTION(0, "nested lock attempt");
return NS_ERROR_FAILURE;
}
mLocked = PR_TRUE;
mLockX = aX;
mLockY = aY;
mLockWidth = aWidth;
mLockHeight = aHeight;
mLockFlags = aFlags;
// Obtain an ximage from the pixmap.
mImage = ::gdk_image_get(mPixmap, mLockX, mLockY, mLockWidth, mLockHeight);
*aBits = GDK_IMAGE_XIMAGE(mImage)->data;
*aWidthBytes = GDK_IMAGE_XIMAGE(mImage)->bytes_per_line;
*aStride = GDK_IMAGE_XIMAGE(mImage)->bytes_per_line;
#ifdef CHEAP_PERFORMANCE_MEASUREMENT
// MOZ_TIMER_STOP(mLockTime);
// MOZ_TIMER_LOG(("Time taken to lock: "));
// MOZ_TIMER_PRINT(mLockTime);
printf("Time taken to lock: %d\n", PR_Now() - mLockTime);
#endif
return NS_OK;
}
NS_IMETHODIMP nsDrawingSurfaceGTK :: Unlock(void)
{
#ifdef CHEAP_PERFORMANCE_MEASUREMENT
mUnlockTime = PR_Now();
#endif
// g_print("nsDrawingSurfaceGTK::UnLock() called\n");
if (!mLocked)
{
NS_ASSERTION(0, "attempting to unlock an DS that isn't locked");
return NS_ERROR_FAILURE;
}
// If the lock was not read only, put the bits back on the pixmap
if (!(mLockFlags & NS_LOCK_SURFACE_READ_ONLY))
{
#if 0
g_print("%p gdk_draw_image(pixmap=%p,lockx=%d,locky=%d,lockw=%d,lockh=%d)\n",
this,
mPixmap,
mLockX, mLockY,
mLockWidth, mLockHeight);
#endif
gdk_draw_image(mPixmap,
mGC,
mImage,
0, 0,
mLockX, mLockY,
mLockWidth, mLockHeight);
}
if (mImage)
::gdk_image_destroy(mImage);
mImage = nsnull;
mLocked = PR_FALSE;
#ifdef CHEAP_PERFORMANCE_MEASUREMENT
printf("Time taken to unlock: %d\n", PR_Now() - mUnlockTime);
#endif
return NS_OK;
}
NS_IMETHODIMP nsDrawingSurfaceGTK :: GetDimensions(PRUint32 *aWidth, PRUint32 *aHeight)
{
*aWidth = mWidth;
*aHeight = mHeight;
return NS_OK;
}
NS_IMETHODIMP nsDrawingSurfaceGTK :: IsOffscreen(PRBool *aOffScreen)
{
*aOffScreen = mIsOffscreen;
return NS_OK;
}
NS_IMETHODIMP nsDrawingSurfaceGTK :: IsPixelAddressable(PRBool *aAddressable)
{
// FIXME
*aAddressable = PR_FALSE;
return NS_OK;
}
NS_IMETHODIMP nsDrawingSurfaceGTK :: GetPixelFormat(nsPixelFormat *aFormat)
{
*aFormat = mPixFormat;
return NS_OK;
}
nsresult nsDrawingSurfaceGTK :: Init(GdkDrawable *aDrawable, GdkGC *aGC)
{
if (mGC)
gdk_gc_unref(mGC);
mGC = gdk_gc_ref(aGC);
mPixmap = aDrawable;
#ifdef MOZ_WIDGET_GTK
mWidth = ((GdkWindowPrivate*)aDrawable)->width;
mHeight = ((GdkWindowPrivate*)aDrawable)->height;
#endif /* MOZ_WIDGET_GTK */
#ifdef MOZ_WIDGET_GTK2
gint width = 0;
gint height = 0;
gdk_drawable_get_size(aDrawable, &width, &height);
mWidth = width;
mHeight = height;
#endif /* MOZ_WIDGET_GTK2 */
// XXX was i smoking crack when i wrote this comment?
// this is definatly going to be on the screen, as it will be the window of a
// widget or something.
mIsOffscreen = PR_FALSE;
if (mImage)
gdk_image_destroy(mImage);
mImage = nsnull;
g_return_val_if_fail(mPixmap != nsnull, NS_ERROR_FAILURE);
return NS_OK;
}
nsresult nsDrawingSurfaceGTK :: Init(GdkGC *aGC, PRUint32 aWidth,
PRUint32 aHeight, PRUint32 aFlags)
{
// ::g_return_val_if_fail (aGC != nsnull, NS_ERROR_FAILURE);
// ::g_return_val_if_fail ((aWidth > 0) && (aHeight > 0), NS_ERROR_FAILURE);
if (mGC)
gdk_gc_unref(mGC);
mGC = gdk_gc_ref(aGC);
mWidth = aWidth;
mHeight = aHeight;
mFlags = aFlags;
// we can draw on this offscreen because it has no parent
mIsOffscreen = PR_TRUE;
mPixmap = ::gdk_pixmap_new(nsnull, mWidth, mHeight, mDepth);
if (mImage)
gdk_image_destroy(mImage);
mImage = nsnull;
return NS_OK;
}
/* inline */
PRUint8
nsDrawingSurfaceGTK::ConvertMaskToCount(unsigned long val)
{
PRUint8 retval = 0;
PRUint8 cur_bit = 0;
// walk through the number, incrementing the value if
// the bit in question is set.
while (cur_bit < (sizeof(unsigned long) * 8)) {
if ((val >> cur_bit) & 0x1) {
retval++;
}
cur_bit++;
}
return retval;
}

View File

@@ -1,132 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef nsDrawingSurfaceGTK_h___
#define nsDrawingSurfaceGTK_h___
#include "nsIDrawingSurface.h"
#include "nsTimer.h"
#include <gtk/gtk.h>
class nsDrawingSurfaceGTK : public nsIDrawingSurface
{
public:
nsDrawingSurfaceGTK();
virtual ~nsDrawingSurfaceGTK();
/**
* Initialize a drawing surface using a windows DC.
* aDC is "owned" by the drawing surface until the drawing
* surface is destroyed.
* @param aDC HDC to initialize drawing surface with
* @return error status
**/
nsresult Init(GdkDrawable *aDrawable, GdkGC *aGC);
/**
* Initialize an offscreen drawing surface using a
* windows DC. aDC is not "owned" by this drawing surface, instead
* it is used to create a drawing surface compatible
* with aDC. if width or height are less than zero, aDC will
* be created with no offscreen bitmap installed.
* @param aDC HDC to initialize drawing surface with
* @param aWidth width of drawing surface
* @param aHeight height of drawing surface
* @param aFlags flags used to control type of drawing
* surface created
* @return error status
**/
nsresult Init(GdkGC *aGC, PRUint32 aWidth, PRUint32 aHeight,
PRUint32 aFlags);
NS_DECL_ISUPPORTS
//nsIDrawingSurface interface
NS_IMETHOD Lock(PRInt32 aX, PRInt32 aY, PRUint32 aWidth, PRUint32 aHeight,
void **aBits, PRInt32 *aStride, PRInt32 *aWidthBytes,
PRUint32 aFlags);
NS_IMETHOD Unlock(void);
NS_IMETHOD GetDimensions(PRUint32 *aWidth, PRUint32 *aHeight);
NS_IMETHOD IsOffscreen(PRBool *aOffScreen);
NS_IMETHOD IsPixelAddressable(PRBool *aAddressable);
NS_IMETHOD GetPixelFormat(nsPixelFormat *aFormat);
/* below are utility functions used mostly for nsRenderingContext and nsImage
* to plug into gdk_* functions for drawing. You should not set a pointer
* that might hang around with the return from these. instead use the ones
* above. pav
*/
GdkDrawable *GetDrawable(void) { return mPixmap; }
void GetSize(PRUint32 *aWidth, PRUint32 *aHeight) { *aWidth = mWidth; *aHeight = mHeight; }
PRInt32 GetDepth() { return mDepth; }
protected:
inline PRUint8 ConvertMaskToCount(unsigned long val);
private:
/* general */
GdkPixmap *mPixmap;
GdkGC *mGC;
gint mDepth;
nsPixelFormat mPixFormat;
PRUint32 mWidth;
PRUint32 mHeight;
PRUint32 mFlags;
PRBool mIsOffscreen;
/* for locks */
GdkImage *mImage;
PRInt32 mLockX;
PRInt32 mLockY;
PRUint32 mLockWidth;
PRUint32 mLockHeight;
PRUint32 mLockFlags;
PRBool mLocked;
// MOZ_TIMER_DECLARE(mLockTime)
// MOZ_TIMER_DECLARE(mUnlockTime)
};
#endif

File diff suppressed because it is too large Load Diff

View File

@@ -1,249 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef nsFontMetricsGTK_h__
#define nsFontMetricsGTK_h__
#include "nsDeviceContextGTK.h"
#include "nsIFontMetrics.h"
#include "nsIFontEnumerator.h"
#include "nsFont.h"
#include "nsString.h"
#include "nsUnitConversion.h"
#include "nsIDeviceContext.h"
#include "nsCRT.h"
#include "nsCOMPtr.h"
#include "nsRenderingContextGTK.h"
#include "nsICharRepresentable.h"
#include "nsCompressedCharMap.h"
#include <gdk/gdk.h>
#include <gdk/gdkx.h>
#undef FONT_HAS_GLYPH
#define FONT_HAS_GLYPH(map, char) IS_REPRESENTABLE(map, char)
typedef struct nsFontCharSetInfo nsFontCharSetInfo;
typedef gint (*nsFontCharSetConverter)(nsFontCharSetInfo* aSelf,
XFontStruct* aFont, const PRUnichar* aSrcBuf, PRInt32 aSrcLen,
char* aDestBuf, PRInt32 aDestLen);
struct nsFontCharSet;
struct nsFontFamily;
struct nsFontNode;
struct nsFontStretch;
class nsXFont;
class nsFontGTKUserDefined;
class nsFontMetricsGTK;
class nsFontGTK
{
public:
nsFontGTK();
nsFontGTK(nsFontGTK*);
virtual ~nsFontGTK();
NS_DECL_AND_IMPL_ZEROING_OPERATOR_NEW
void LoadFont(void);
PRBool IsEmptyFont(XFontStruct*);
inline int SupportsChar(PRUnichar aChar)
{ return mFont && CCMAP_HAS_CHAR(mCCMap, aChar); };
virtual GdkFont* GetGDKFont(void);
virtual nsXFont* GetXFont(void);
virtual PRBool GetXFontIs10646(void);
virtual gint GetWidth(const PRUnichar* aString, PRUint32 aLength) = 0;
virtual gint DrawString(nsRenderingContextGTK* aContext,
nsDrawingSurfaceGTK* aSurface, nscoord aX,
nscoord aY, const PRUnichar* aString,
PRUint32 aLength) = 0;
#ifdef MOZ_MATHML
// bounding metrics for a string
// remember returned values are not in app units
// - to emulate GetWidth () above
virtual nsresult
GetBoundingMetrics(const PRUnichar* aString,
PRUint32 aLength,
nsBoundingMetrics& aBoundingMetrics) = 0;
#endif
PRUint16* mCCMap;
nsFontCharSetInfo* mCharSetInfo;
char* mName;
nsFontGTKUserDefined* mUserDefinedFont;
PRUint16 mSize;
PRUint16 mAABaseSize;
PRInt16 mBaselineAdjust;
// these values are not in app units, they need to be scaled with
// nsIDeviceContext::GetDevUnitsToAppUnits()
PRInt16 mMaxAscent;
PRInt16 mMaxDescent;
protected:
GdkFont* mFont;
GdkFont* mFontHolder;
nsXFont* mXFont;
PRBool mAlreadyCalledLoadFont;
};
class nsFontMetricsGTK : public nsIFontMetrics
{
public:
nsFontMetricsGTK();
virtual ~nsFontMetricsGTK();
NS_DECL_AND_IMPL_ZEROING_OPERATOR_NEW
NS_DECL_ISUPPORTS
NS_IMETHOD Init(const nsFont& aFont, nsIAtom* aLangGroup,
nsIDeviceContext* aContext);
NS_IMETHOD Destroy();
NS_IMETHOD GetXHeight(nscoord& aResult);
NS_IMETHOD GetSuperscriptOffset(nscoord& aResult);
NS_IMETHOD GetSubscriptOffset(nscoord& aResult);
NS_IMETHOD GetStrikeout(nscoord& aOffset, nscoord& aSize);
NS_IMETHOD GetUnderline(nscoord& aOffset, nscoord& aSize);
NS_IMETHOD GetHeight(nscoord &aHeight);
NS_IMETHOD GetNormalLineHeight(nscoord &aHeight);
NS_IMETHOD GetLeading(nscoord &aLeading);
NS_IMETHOD GetEmHeight(nscoord &aHeight);
NS_IMETHOD GetEmAscent(nscoord &aAscent);
NS_IMETHOD GetEmDescent(nscoord &aDescent);
NS_IMETHOD GetMaxHeight(nscoord &aHeight);
NS_IMETHOD GetMaxAscent(nscoord &aAscent);
NS_IMETHOD GetMaxDescent(nscoord &aDescent);
NS_IMETHOD GetMaxAdvance(nscoord &aAdvance);
NS_IMETHOD GetFont(const nsFont *&aFont);
NS_IMETHOD GetLangGroup(nsIAtom** aLangGroup);
NS_IMETHOD GetFontHandle(nsFontHandle &aHandle);
NS_IMETHOD GetSpaceWidth(nscoord &aSpaceWidth);
nsFontGTK* FindFont(PRUnichar aChar);
nsFontGTK* FindUserDefinedFont(PRUnichar aChar);
nsFontGTK* FindStyleSheetSpecificFont(PRUnichar aChar);
nsFontGTK* FindStyleSheetGenericFont(PRUnichar aChar);
nsFontGTK* FindLangGroupPrefFont(nsIAtom* aLangGroup, PRUnichar aChar);
nsFontGTK* FindLangGroupFont(nsIAtom* aLangGroup, PRUnichar aChar, nsCString* aName);
nsFontGTK* FindAnyFont(PRUnichar aChar);
nsFontGTK* FindSubstituteFont(PRUnichar aChar);
nsFontGTK* SearchNode(nsFontNode* aNode, PRUnichar aChar);
nsFontGTK* TryAliases(nsCString* aName, PRUnichar aChar);
nsFontGTK* TryFamily(nsCString* aName, PRUnichar aChar);
nsFontGTK* TryNode(nsCString* aName, PRUnichar aChar);
nsFontGTK* TryNodes(nsAWritableCString &aFFREName, PRUnichar aChar);
nsFontGTK* TryLangGroup(nsIAtom* aLangGroup, nsCString* aName, PRUnichar aChar);
nsFontGTK* AddToLoadedFontsList(nsFontGTK* aFont);
nsFontGTK* FindNearestSize(nsFontStretch* aStretch, PRUint16 aSize);
nsFontGTK* GetAASBBaseFont(nsFontStretch* aStretch,
nsFontCharSetInfo* aCharSet);
nsFontGTK* PickASizeAndLoad(nsFontStretch* aStretch,
nsFontCharSetInfo* aCharSet,
PRUnichar aChar,
const char *aName);
static nsresult FamilyExists(const nsString& aFontName);
//friend struct nsFontGTK;
nsFontGTK **mLoadedFonts;
PRUint16 mLoadedFontsAlloc;
PRUint16 mLoadedFontsCount;
nsFontGTK *mSubstituteFont;
nsCStringArray mFonts;
PRUint16 mFontsIndex;
nsAutoVoidArray mFontIsGeneric;
nsCAutoString mDefaultFont;
nsCString *mGeneric;
nsCOMPtr<nsIAtom> mLangGroup;
nsCAutoString mUserDefined;
PRUint8 mTriedAllGenerics;
PRUint8 mIsUserDefined;
protected:
void RealizeFont();
nsIDeviceContext *mDeviceContext;
nsFont *mFont;
nsFontGTK *mWesternFont;
nscoord mLeading;
nscoord mEmHeight;
nscoord mEmAscent;
nscoord mEmDescent;
nscoord mMaxHeight;
nscoord mMaxAscent;
nscoord mMaxDescent;
nscoord mMaxAdvance;
nscoord mXHeight;
nscoord mSuperscriptOffset;
nscoord mSubscriptOffset;
nscoord mStrikeoutSize;
nscoord mStrikeoutOffset;
nscoord mUnderlineSize;
nscoord mUnderlineOffset;
nscoord mSpaceWidth;
PRUint16 mPixelSize;
PRUint8 mStretchIndex;
PRUint8 mStyleIndex;
nsFontCharSetConverter mDocConverterType;
};
class nsFontEnumeratorGTK : public nsIFontEnumerator
{
public:
nsFontEnumeratorGTK();
NS_DECL_ISUPPORTS
NS_DECL_NSIFONTENUMERATOR
};
#endif

View File

@@ -1,317 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Mozilla Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is the Mozilla browser.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1999 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
* Stuart Parmenter <pavlov@netscape.com>
* Mike Shaver <shaver@zeroknowledge.com>
* Tomi Leppikangas <Tomi.Leppikangas@oulu.fi>
*/
#include <stdio.h>
#include "nsGCCache.h"
#include "nsISupportsUtils.h"
#include <gdk/gdkx.h>
#include <gdk/gdkprivate.h>
#include <X11/Xlib.h>
/* The GC cache is shared among all windows, since it doesn't hog
any scarce resources (like colormap entries.) */
GdkRegion *nsGCCache::copyRegion = NULL;
MOZ_DECL_CTOR_COUNTER(nsGCCache)
nsGCCache::nsGCCache()
{
MOZ_COUNT_CTOR(nsGCCache);
PR_INIT_CLIST(&GCCache);
PR_INIT_CLIST(&GCFreeList);
for (int i = 0; i < GC_CACHE_SIZE; i++) {
GCCacheEntry *entry = new GCCacheEntry();
entry->gc=NULL;
PR_INSERT_LINK(&entry->clist, &GCFreeList);
}
DEBUG_METER(memset(&GCCacheStats, 0, sizeof(GCCacheStats));)
}
/* static */ void
nsGCCache::Shutdown()
{
if (copyRegion) {
gdk_region_destroy(copyRegion);
copyRegion = nsnull;
}
}
void
nsGCCache::move_cache_entry(PRCList *clist)
{
/* thread on the freelist, at the front */
PR_REMOVE_LINK(clist);
PR_INSERT_LINK(clist, &GCFreeList);
}
void
nsGCCache::free_cache_entry(PRCList *clist)
{
GCCacheEntry *entry = (GCCacheEntry *)clist;
gdk_gc_unref(entry->gc);
if (entry->clipRegion)
gdk_region_destroy(entry->clipRegion);
/* thread on the freelist, at the front */
PR_REMOVE_LINK(clist);
memset(entry, 0, sizeof(*entry));
PR_INSERT_LINK(clist, &GCFreeList);
}
nsGCCache::~nsGCCache()
{
PRCList *head;
MOZ_COUNT_DTOR(nsGCCache);
ReportStats();
while (!PR_CLIST_IS_EMPTY(&GCCache)) {
head = PR_LIST_HEAD(&GCCache);
if (head == &GCCache)
break;
free_cache_entry(head);
}
while (!PR_CLIST_IS_EMPTY(&GCFreeList)) {
head = PR_LIST_HEAD(&GCFreeList);
if (head == &GCFreeList)
break;
PR_REMOVE_LINK(head);
delete (GCCacheEntry *)head;
}
}
void
nsGCCache::ReportStats() {
DEBUG_METER(
fprintf(stderr, "GC Cache:\n\thits:");
int hits = 0;
for (int i = 0; i < GC_CACHE_SIZE; i++) {
fprintf(stderr, " %4d", GCCacheStats.hits[i]);
hits+=GCCacheStats.hits[i];
}
int total = hits + GCCacheStats.misses;
float percent = float(float(hits) / float(total));
percent *= 100;
fprintf(stderr, "\n\thits: %d, misses: %d, hit percent: %f%%\n",
hits, GCCacheStats.misses, percent);
);
}
/* Dispose of entries matching the given flags, compressing the GC cache */
void nsGCCache::Flush(unsigned long flags)
{
while (!PR_CLIST_IS_EMPTY(&GCCache)) {
PRCList *head = PR_LIST_HEAD(&GCCache);
if (head == &GCCache)
break;
GCCacheEntry *entry = (GCCacheEntry *)head;
if (entry->flags & flags)
free_cache_entry(head);
}
}
GdkGC *nsGCCache::GetGC(GdkWindow *window, GdkGCValues *gcv, GdkGCValuesMask flags, GdkRegion *clipRegion)
{
PRCList *iter;
GCCacheEntry *entry;
DEBUG_METER(int i = 0;)
for (iter = PR_LIST_HEAD(&GCCache); iter != &GCCache;
iter = PR_NEXT_LINK(iter)) {
entry = (GCCacheEntry *)iter;
if (flags == entry->flags &&
!memcmp (gcv, &entry->gcv, sizeof (*gcv))) {
/* if there's a clipRegion, we have to match */
if ((clipRegion && entry->clipRegion &&
gdk_region_equal(clipRegion, entry->clipRegion)) ||
/* and if there isn't, we can't have one */
(!clipRegion && !entry->clipRegion)) {
/* move to the front of the list, if needed */
if (iter != PR_LIST_HEAD(&GCCache)) {
PR_REMOVE_LINK(iter);
PR_INSERT_LINK(iter, &GCCache);
}
DEBUG_METER(GCCacheStats.hits[i]++;)
return gdk_gc_ref(entry->gc);
}
}
DEBUG_METER(++i;)
}
/* might need to forcibly free the LRU cache entry */
if (PR_CLIST_IS_EMPTY(&GCFreeList)) {
DEBUG_METER(GCCacheStats.reclaim++);
move_cache_entry(PR_LIST_TAIL(&GCCache));
}
DEBUG_METER(GCCacheStats.misses++;)
iter = PR_LIST_HEAD(&GCFreeList);
PR_REMOVE_LINK(iter);
PR_INSERT_LINK(iter, &GCCache);
entry = (GCCacheEntry *)iter;
if (!entry->gc) {
// No old GC, greate new
entry->gc = gdk_gc_new_with_values(window, gcv, flags);
entry->flags = flags;
entry->gcv = *gcv;
entry->clipRegion = NULL;
//printf("creating new gc=%X\n",entry->gc);
}
#ifdef MOZ_WIDGET_GTK
else if ( ((GdkGCPrivate*)entry->gc)->ref_count > 1 ) {
#endif /* MOZ_WIDGET_GTK */
#ifdef MOZ_WIDGET_GTK2
else if ( G_OBJECT(entry->gc)->ref_count > 1 ) {
#endif /* MOZ_WIDGET_GTK2 */
// Old GC still in use, create new
gdk_gc_unref(entry->gc);
entry->gc=gdk_gc_new_with_values(window, gcv, flags);
entry->flags = flags;
entry->gcv = *gcv;
entry->clipRegion = NULL;
//printf("creating new (use)gc=%X\n",entry->gc);
}
else {
ReuseGC(entry, gcv, flags);
}
if (clipRegion) {
entry->clipRegion = gdk_region_copy(clipRegion);
if (entry->clipRegion)
gdk_gc_set_clip_region(entry->gc, entry->clipRegion);
/* XXX what if it fails? */
}
return gdk_gc_ref(entry->gc);
}
void nsGCCache::ReuseGC(GCCacheEntry *entry, GdkGCValues *gcv, GdkGCValuesMask flags)
{
// We have old GC, reuse it and check what
// we have to change
XGCValues xvalues;
unsigned long xvalues_mask=0;
if (entry->clipRegion) {
// set it to none here and then set the clip region with
// gdk_gc_set_clip_region in GetGC()
xvalues.clip_mask = None;
xvalues_mask |= GCClipMask;
gdk_region_destroy(entry->clipRegion);
entry->clipRegion = NULL;
}
if (entry->gcv.foreground.pixel != gcv->foreground.pixel) {
xvalues.foreground = gcv->foreground.pixel;
xvalues_mask |= GCForeground;
}
if (entry->gcv.function != gcv->function) {
switch (gcv->function) {
case GDK_COPY:
xvalues.function = GXcopy;
break;
case GDK_INVERT:
xvalues.function = GXinvert;
break;
case GDK_XOR:
xvalues.function = GXxor;
break;
case GDK_CLEAR:
xvalues.function = GXclear;
break;
case GDK_AND:
xvalues.function = GXand;
break;
case GDK_AND_REVERSE:
xvalues.function = GXandReverse;
break;
case GDK_AND_INVERT:
xvalues.function = GXandInverted;
break;
case GDK_NOOP:
xvalues.function = GXnoop;
break;
case GDK_OR:
xvalues.function = GXor;
break;
case GDK_EQUIV:
xvalues.function = GXequiv;
break;
case GDK_OR_REVERSE:
xvalues.function = GXorReverse;
break;
case GDK_COPY_INVERT:
xvalues.function = GXcopyInverted;
break;
case GDK_OR_INVERT:
xvalues.function = GXorInverted;
break;
case GDK_NAND:
xvalues.function = GXnand;
break;
case GDK_SET:
xvalues.function = GXset;
break;
}
xvalues_mask |= GCFunction;
}
if(entry->gcv.font != gcv->font && flags & GDK_GC_FONT) {
xvalues.font = ((XFontStruct *)GDK_FONT_XFONT(gcv->font))->fid;
xvalues_mask |= GCFont;
}
if (entry->gcv.line_style != gcv->line_style) {
switch (gcv->line_style) {
case GDK_LINE_SOLID:
xvalues.line_style = LineSolid;
break;
case GDK_LINE_ON_OFF_DASH:
xvalues.line_style = LineOnOffDash;
break;
case GDK_LINE_DOUBLE_DASH:
xvalues.line_style = LineDoubleDash;
break;
}
xvalues_mask |= GCLineStyle;
}
if (xvalues_mask != 0) {
XChangeGC(GDK_GC_XDISPLAY(entry->gc), GDK_GC_XGC(entry->gc),
xvalues_mask, &xvalues);
}
entry->flags = flags;
entry->gcv = *gcv;
}

View File

@@ -1,84 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Mozilla Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is the Mozilla browser.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1999 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
* Stuart Parmenter <pavlov@netscape.com>
* Mike Shaver <shaver@zeroknowledge.com>
*/
#include <gdk/gdk.h>
#include <string.h>
#include "prclist.h"
#ifndef nsGCCache_h___
#define nsGCCache_h___
#define countof(x) ((int)(sizeof(x) / sizeof (*x)))
#define GC_CACHE_SIZE 10
#ifdef DEBUG
#define DEBUG_METER(x) x
#else
#define DEBUG_METER(x)
#endif
struct GCCacheEntry
{
PRCList clist;
GdkGCValuesMask flags;
GdkGCValues gcv;
GdkRegion *clipRegion;
GdkGC *gc;
};
class nsGCCache
{
public:
nsGCCache();
virtual ~nsGCCache();
static void Shutdown();
void Flush(unsigned long flags);
GdkGC *GetGC(GdkWindow *window, GdkGCValues *gcv, GdkGCValuesMask flags, GdkRegion *clipRegion);
private:
void ReuseGC(GCCacheEntry *entry, GdkGCValues *gcv, GdkGCValuesMask flags);
PRCList GCCache;
PRCList GCFreeList;
void free_cache_entry(PRCList *clist);
void move_cache_entry(PRCList *clist);
#ifdef MOZ_WIDGET_GTK
static GdkRegion * gdk_region_copy(GdkRegion *region);
#endif
static GdkRegion *copyRegion;
void ReportStats();
DEBUG_METER(
struct {
int hits[GC_CACHE_SIZE];
int misses;
int reclaim;
} GCCacheStats;
)
};
#endif

View File

@@ -1,219 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Christopher Blizzard.
* Portions created by the Initial Developer are Copyright (C) 2000
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Christopher Blizzzard <blizzard@mozilla.org>
* Roland Mainz <roland.mainz@informatik.med.uni-giessen.de>
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "nsIGenericFactory.h"
#include "nsIModule.h"
#include "nsCOMPtr.h"
#include "nsGfxCIID.h"
#include "nsBlender.h"
#include "nsFontMetricsGTK.h"
#include "nsRenderingContextGTK.h"
#include "nsDeviceContextGTK.h"
// aka nsDeviceContextSpecGTK.h
#include "nsDeviceContextSpecG.h"
// aka nsDeviceContextSpecFactoryGTK.h
#include "nsDeviceContextSpecFactoryG.h"
#include "nsScreenManagerGtk.h"
#include "nsScriptableRegion.h"
#include "nsDeviceContextGTK.h"
#include "nsImageGTK.h"
#include "nsPrintOptionsGTK.h"
#include "nsFontList.h"
#include "nsRegionGTK.h"
#include "nsGCCache.h"
#ifdef NATIVE_THEME_SUPPORT
#include "nsNativeThemeGTK.h"
#endif
// objects that just require generic constructors
NS_GENERIC_FACTORY_CONSTRUCTOR(nsFontMetricsGTK)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsDeviceContextGTK)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsRenderingContextGTK)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsImageGTK)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsBlender)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsRegionGTK)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsDeviceContextSpecGTK)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsDeviceContextSpecFactoryGTK)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsFontEnumeratorGTK)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsFontList);
NS_GENERIC_FACTORY_CONSTRUCTOR(nsScreenManagerGtk)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsPrintOptionsGTK)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsPrinterEnumeratorGTK)
#ifdef NATIVE_THEME_SUPPORT
NS_GENERIC_FACTORY_CONSTRUCTOR(nsNativeThemeGTK)
#endif
// our custom constructors
static NS_IMETHODIMP nsScriptableRegionConstructor(nsISupports *aOuter, REFNSIID aIID, void **aResult)
{
nsresult rv;
nsIScriptableRegion *inst;
if ( !aResult )
{
rv = NS_ERROR_NULL_POINTER;
return rv;
}
*aResult = nsnull;
if (aOuter)
{
rv = NS_ERROR_NO_AGGREGATION;
return rv;
}
// create an nsRegionGtk and get the scriptable region from it
nsCOMPtr <nsIRegion> rgn;
NS_NEWXPCOM(rgn, nsRegionGTK);
nsCOMPtr<nsIScriptableRegion> scriptableRgn;
if (rgn != nsnull)
{
scriptableRgn = new nsScriptableRegion(rgn);
inst = scriptableRgn;
}
if (!inst)
{
rv = NS_ERROR_OUT_OF_MEMORY;
return rv;
}
NS_ADDREF(inst);
// release our variable above now that we have created our owning
// reference - we don't want this to go out of scope early!
scriptableRgn = nsnull;
rv = inst->QueryInterface(aIID, aResult);
NS_RELEASE(inst);
return rv;
}
static const nsModuleComponentInfo components[] =
{
{ "Gtk Font Metrics",
NS_FONT_METRICS_CID,
// "@mozilla.org/gfx/font_metrics/gtk;1",
"@mozilla.org/gfx/fontmetrics;1",
nsFontMetricsGTKConstructor },
{ "Gtk Device Context",
NS_DEVICE_CONTEXT_CID,
// "@mozilla.org/gfx/device_context/gtk;1",
"@mozilla.org/gfx/devicecontext;1",
nsDeviceContextGTKConstructor },
{ "Gtk Rendering Context",
NS_RENDERING_CONTEXT_CID,
// "@mozilla.org/gfx/rendering_context/gtk;1",
"@mozilla.org/gfx/renderingcontext;1",
nsRenderingContextGTKConstructor },
{ "Gtk Image",
NS_IMAGE_CID,
// "@mozilla.org/gfx/image/gtk;1",
"@mozilla.org/gfx/image;1",
nsImageGTKConstructor },
{ "Gtk Region",
NS_REGION_CID,
"@mozilla.org/gfx/region/gtk;1",
nsRegionGTKConstructor },
{ "Scriptable Region",
NS_SCRIPTABLE_REGION_CID,
// "@mozilla.org/gfx/scriptable_region;1",
"@mozilla.org/gfx/region;1",
nsScriptableRegionConstructor },
{ "Blender",
NS_BLENDER_CID,
// "@mozilla.org/gfx/blender;1",
"@mozilla.org/gfx/blender;1",
nsBlenderConstructor },
{ "Gtk Device Context Spec",
NS_DEVICE_CONTEXT_SPEC_CID,
// "@mozilla.org/gfx/device_context_spec/gtk;1",
"@mozilla.org/gfx/devicecontextspec;1",
nsDeviceContextSpecGTKConstructor },
{ "Gtk Device Context Spec Factory",
NS_DEVICE_CONTEXT_SPEC_FACTORY_CID,
// "@mozilla.org/gfx/device_context_spec_factory/gtk;1",
"@mozilla.org/gfx/devicecontextspecfactory;1",
nsDeviceContextSpecFactoryGTKConstructor },
{ "Print Options",
NS_PRINTOPTIONS_CID,
// "@mozilla.org/gfx/printoptions;1",
"@mozilla.org/gfx/printoptions;1",
nsPrintOptionsGTKConstructor },
{ "GTK Font Enumerator",
NS_FONT_ENUMERATOR_CID,
// "@mozilla.org/gfx/font_enumerator/gtk;1",
"@mozilla.org/gfx/fontenumerator;1",
nsFontEnumeratorGTKConstructor },
{ "Font List",
NS_FONTLIST_CID,
// "@mozilla.org/gfx/fontlist;1"
NS_FONTLIST_CONTRACTID,
nsFontListConstructor },
{ "Gtk Screen Manager",
NS_SCREENMANAGER_CID,
// "@mozilla.org/gfx/screenmanager/gtk;1",
"@mozilla.org/gfx/screenmanager;1",
nsScreenManagerGtkConstructor },
{ "Gtk Printer Enumerator",
NS_PRINTER_ENUMERATOR_CID,
// "@mozilla.org/gfx/printer_enumerator/gtk;1",
"@mozilla.org/gfx/printerenumerator;1",
nsPrinterEnumeratorGTKConstructor }
#ifdef NATIVE_THEME_SUPPORT
,{ "Native Theme Renderer",
NS_THEMERENDERER_CID,
"@mozilla.org/chrome/chrome-native-theme;1",
nsNativeThemeGTKConstructor }
#endif
};
PR_STATIC_CALLBACK(void)
nsGfxGTKModuleDtor(nsIModule *self)
{
nsRenderingContextGTK::Shutdown();
nsDeviceContextGTK::Shutdown();
nsGCCache::Shutdown();
#ifdef MOZ_WIDGET_GTK
nsRegionGTK::Shutdown();
#endif
}
NS_IMPL_NSGETMODULE_WITH_DTOR(nsGfxGTKModule, components, nsGfxGTKModuleDtor)

Some files were not shown because too many files have changed in this diff Show More