Compare commits

..

25 Commits

Author SHA1 Message Date
preed%mozilla.com
0acab9f44d Moving the new win ref platform build machine from the MozillaExperimental page to the Firefox page.
git-svn-id: svn://10.0.0.236/branches/test_perf_deployprep@232167 18797224-902f-48f8-a5cc-f745e15eee43
2007-08-15 21:09:33 +00:00
preed%mozilla.com
fcd028eecb Rename the ref platform tinderbox; repoint the test tinderboxen at the renamed machine.
git-svn-id: svn://10.0.0.236/branches/test_perf_deployprep@232080 18797224-902f-48f8-a5cc-f745e15eee43
2007-08-14 23:33:37 +00:00
preed%mozilla.com
81994d38d1 Bug 384624: Get bl-bldxp01 to test the new win32 ref platform builds. r=rhelmer
git-svn-id: svn://10.0.0.236/branches/test_perf_deployprep@231984 18797224-902f-48f8-a5cc-f745e15eee43
2007-08-13 22:32:47 +00:00
(no author)
2a388babed This commit was manufactured by cvs2svn to create branch
'test_perf_deployprep'.

git-svn-id: svn://10.0.0.236/branches/test_perf_deployprep@231430 18797224-902f-48f8-a5cc-f745e15eee43
2007-08-03 17:47:30 +00:00
preed%mozilla.com
c99bf39606 Update the tinder-config header, per rhelmer's review of the last checkin on this branch.
git-svn-id: svn://10.0.0.236/branches/test_perf_deployprep@229658 18797224-902f-48f8-a5cc-f745e15eee43
2007-07-11 02:22:28 +00:00
cltbld
79537e61f6 Create a new test_perf_deployprep branch to give us a place to store perf testing configs that we're running in a "pre-deployment" mode (In this case, doing normal trunk testing, but on a new machine, bl-bldlnx03). me=preed
git-svn-id: svn://10.0.0.236/branches/test_perf_deployprep@229656 18797224-902f-48f8-a5cc-f745e15eee43
2007-07-11 01:49:29 +00:00
(no author)
c2e8e9f629 This commit was manufactured by cvs2svn to create branch
'test_perf_deployprep'.

git-svn-id: svn://10.0.0.236/branches/test_perf_deployprep@229454 18797224-902f-48f8-a5cc-f745e15eee43
2007-07-06 23:15:56 +00:00
preed%mozilla.com
9f640334f2 Back out cf's change to point the test machines at the new refplatform; the builds fail to run with: firefox-bin: error while loading shared libraries: libpangocairo-1.0.so.0: cannot open shared object file: No such file or directory
git-svn-id: svn://10.0.0.236/branches/test_perf@229453 18797224-902f-48f8-a5cc-f745e15eee43
2007-07-06 23:15:55 +00:00
nrthomas%gmail.com
515a2686c0 Bug 384035, update testing config for linux ref platform change
git-svn-id: svn://10.0.0.236/branches/test_perf@229452 18797224-902f-48f8-a5cc-f745e15eee43
2007-07-06 22:40:40 +00:00
nrthomas%gmail.com
008b19ded4 Bug 386114, bump version in perf test config too
git-svn-id: svn://10.0.0.236/branches/test_perf@229178 18797224-902f-48f8-a5cc-f745e15eee43
2007-07-02 18:29:32 +00:00
rhelmer%mozilla.com
e893b6c9dc use more explicit graph name
git-svn-id: svn://10.0.0.236/branches/test_perf@227948 18797224-902f-48f8-a5cc-f745e15eee43
2007-06-13 04:39:24 +00:00
rhelmer%mozilla.com
e9bc02bc66 make fx-linux-tbox the default trunk nightly build r=coop b=384150
git-svn-id: svn://10.0.0.236/branches/test_perf@227914 18797224-902f-48f8-a5cc-f745e15eee43
2007-06-12 21:53:36 +00:00
reed%reedloden.com
ee6f2ef1da Bug 363499 - Update the pageload_server on the test_perf tinderboxen to use the FQDN for spider. [p=reed r=preed]
git-svn-id: svn://10.0.0.236/branches/test_perf@227685 18797224-902f-48f8-a5cc-f745e15eee43
2007-06-08 03:07:57 +00:00
nrthomas%gmail.com
503406d6b7 Bug 383649, use 'test perf' in name of all performance testing tinderboxen, r=rhelmer
git-svn-id: svn://10.0.0.236/branches/test_perf@227681 18797224-902f-48f8-a5cc-f745e15eee43
2007-06-07 23:25:39 +00:00
dbaron%dbaron.org
faa603c0ac Bump version from 3.0a5pre to 3.0a6pre. b=382873
git-svn-id: svn://10.0.0.236/branches/test_perf@227397 18797224-902f-48f8-a5cc-f745e15eee43
2007-06-02 03:44:25 +00:00
dbaron%dbaron.org
9e1948d108 Bump version number from 3.0a4 to 3.0a5. b=378905
git-svn-id: svn://10.0.0.236/branches/test_perf@225178 18797224-902f-48f8-a5cc-f745e15eee43
2007-04-27 17:00:56 +00:00
nrthomas%gmail.com
888f92c246 Bug 375220, bump versions to {3.0,1.9}a4pre now that alpha 3 has shipped, r=preed
git-svn-id: svn://10.0.0.236/branches/test_perf@222373 18797224-902f-48f8-a5cc-f745e15eee43
2007-03-25 22:25:02 +00:00
dbaron%dbaron.org
65ecdf5a94 Bump trunk version numbers to 1.9a3pre / 3.0a3pre. b=369583 r=preed
git-svn-id: svn://10.0.0.236/branches/test_perf@219639 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-07 07:03:52 +00:00
benjamin%smedbergs.us
fb596ac07c Bug 362418 - update tinder-config for testing tinderboxes to pull the correct files, r=mconor
git-svn-id: svn://10.0.0.236/branches/test_perf@217203 18797224-902f-48f8-a5cc-f745e15eee43
2006-12-19 16:58:35 +00:00
pavlov%pavlov.net
c72cf6b016 commenting out the disable cycle collector environment variable
git-svn-id: svn://10.0.0.236/branches/test_perf@215720 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-22 23:20:00 +00:00
pavlov%pavlov.net
4e744e87a2 re-disabling cycle collector
git-svn-id: svn://10.0.0.236/branches/test_perf@215715 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-22 22:43:00 +00:00
pavlov%pavlov.net
74ab325fe3 backing out cycle collector change..
git-svn-id: svn://10.0.0.236/branches/test_perf@215710 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-22 22:26:31 +00:00
pavlov%pavlov.net
b40beb16e8 turning cycle collector off
git-svn-id: svn://10.0.0.236/branches/test_perf@215709 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-22 22:23:18 +00:00
ccooper%deadsquid.com
e3557e35a0 - adding erformance testing configs to public CVS
git-svn-id: svn://10.0.0.236/branches/test_perf@214828 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-06 22:43:08 +00:00
(no author)
bb28b56310 This commit was manufactured by cvs2svn to create branch 'test_perf'.
git-svn-id: svn://10.0.0.236/branches/test_perf@214804 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-06 20:11:07 +00:00
20 changed files with 498 additions and 32214 deletions

View File

@@ -1 +0,0 @@
2.0.7

View File

@@ -1 +0,0 @@
2011

View File

@@ -1,185 +0,0 @@
{\rtf1\ansi\ansicpg1252\cocoartf949\cocoasubrtf540
\readonlydoc1{\fonttbl\f0\fnil\fcharset0 TrebuchetMS;\f1\fnil\fcharset0 LucidaGrande;\f2\fnil\fcharset0 Monaco;
}
{\colortbl;\red255\green255\blue255;\red51\green51\blue51;\red0\green0\blue255;}
\margl1440\margr1440\vieww12100\viewh16140\viewkind0
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\sl320\sa60\ql\qnatural
\f0\b\fs30 \cf2 About Camino
\fs24 \super \'ae
\fs30 \nosupersub 2.0.7\
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\sa200\ql\qnatural
\f1\b0\fs20 \cf2 Camino 2.0.7 is a security and stability update for Camino 2.0.x. All users are urged to upgrade.\
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\sl320\sa60\ql\qnatural
\f0\b\fs30 \cf2 Changes since Camino 2.0\
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural
\f1\b0\fs20 \cf2 The following changes and improvements have been made since the Camino 2.0 release.
\f0\b\fs30 \
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\sb200\sa200\ql\qnatural
\f1\fs20 \cf2 Camino 2.0.7 contains the following improvements over version 2.0.6:\
\pard\tx360\tx720\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li720\fi-720\ql\qnatural
\b0 \cf2 \'95 Improved the handling of bad SSL certificates.\
\'95 Restored the ability for certain Java applets to open new windows.\
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\sb200\sa200\ql\qnatural
\b \cf2 Camino 2.0.6 contains the following improvements over version 2.0.5:\
\pard\tx360\tx720\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li720\fi-720\ql\qnatural
\b0 \cf2 \'95 Upgraded to the latest 1.9.0 version of the Mozilla Gecko rendering engine, which includes several critical security and stability fixes.\
\'95 Flash and Silverlight plug-ins no longer continually log errors to the Console on Mac OS X 10.6 when Camino is hidden or a browser window is minimized.\
\'95 Camino can now save usernames and passwords for web page forms which manipulate the username or password via JavaScript during form submission.\
\'95 Creating, editing, and removing bookmarks now updates the Spotlight metadata more reliably.\
\'95 Downloaded files that do not have a
\f2 content-length
\f1 header will no longer appear as canceled downloads after restarting Camino.\
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\sb200\sa200\ql\qnatural
\b \cf2 Camino 2.0.5 contains the following improvements over version 2.0.4:\
\pard\tx360\tx720\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li720\fi-720\ql\qnatural
\b0 \cf2 \'95 Improved stability.\
\'95 Google Calendar\'92s print function now works in Camino.\
\'95 Plug-ins now receive the correct modifier keys after switching Spaces using keyboard shortcuts on Mac OS X 10.6.\
\'95 Links on the blocked site overlay are now visible even if the \'93Underline links\'94 preference is off.\
\'95 Removed Bloglines from the supported web-based feed readers.\
\'95 Upgraded the bundled Java Embedding Plugin to version 0.9.7.4.\
\'95 Improved ad-blocking.\
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\sb200\sa200\ql\qnatural
\b \cf2 Camino 2.0.4 contains the following improvements over version 2.0.3:\
\pard\tx360\tx720\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li720\fi-720\ql\qnatural
\b0 \cf2 \'95 Upgraded to the latest 1.9.0 version of the Mozilla Gecko rendering engine, which includes several critical security and stability fixes.\
\'95 Worked around a Flash bug to prevent Flash 10.1 from crashing Camino when invoking Expos\'e9 while a Flash video is playing in full-screen mode.\
\'95 Camino should now properly remember print settings on Mac OS X 10.6.\
\'95 The location bar no longer unescapes the percent sign and whitespace characters.\
\'95 Upgraded the \'93Block flash animations\'94 code to use Flashblock 1.5.13.\
\'95 Upgraded the bundled Java Embedding Plugin to version 0.9.7.3.\
\'95 Improved ad-blocking.\
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\sb200\sa200\ql\qnatural
\b \cf2 Camino 2.0.3 contains the following improvements over version 2.0.2:\
\pard\tx360\tx720\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li720\fi-720\ql\qnatural
\b0 \cf2 \'95 Upgraded to version 1.9.0.19 of the Mozilla Gecko rendering engine, which includes several critical security and stability fixes.\
\'95 Prevented possible crashes when closing several tabs in succession.\
\'95 Bookmarks found in Spotlight searches will once again open in Camino.\
\'95 Bookmark import will no longer try to import old Firefox
\f2 bookmarks.html
\f1 files from profiles used by Firefox 3 and later.\
\'95 Camino no longer exports Spotlight metadata for menu spacers.\
\'95 \'93Reset Camino\'94 will now always clear the \'93Recently Closed Pages\'94 menu.\
\'95 The context menu in about:config is now functional.\
\'95 Insecure cookies will no longer be shown as secure in the list of cookies.\
\'95 Prevented possible crashes when software update fails to download information about available updates.\
\'95 Improved ad-blocking.\
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\sb200\sa200\ql\qnatural
\b \cf2 Camino 2.0.2 contains the following improvements over version 2.0.1:\
\pard\tx360\tx720\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li720\fi-720\ql\qnatural
\b0 \cf2 \'95 Upgraded to version 1.9.0.18 of the Mozilla Gecko rendering engine, which includes several critical security and stability fixes.\
\'95 Command-Arrow key combinations can again be reassigned as shortcuts for other menu items.\
\'95 Google\'92s Safe Browsing information pages will now appear in Norwegian for users of the Norwegian localization.\
\'95 The Bookmark Bar colors will again appear correctly on displays with a gamma other than 1.8.\
\'95 Upgraded the \'93Block flash animations\'94 code to use Flashblock 1.5.12.\
\'95 Improved ad-blocking.\
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\sb200\sa200\ql\qnatural
\b \cf2 Camino 2.0.1 contains the following improvements over version 2.0:\
\pard\tx360\tx720\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li720\fi-720\ql\qnatural
\b0 \cf2 \'95 Upgraded to version 1.9.0.16 of the Mozilla Gecko rendering engine, which includes several critical security and stability fixes.\
\'95 The Help menu will once again contain the search field in non-English localizations on Mac OS X 10.6.\
\'95 The Camino Crash Reporter will now offer to send your email address with your crash report to allow the Camino developers to contact you for more information about your crash.\
\'95 Clicking on warning or error text in a certificate no longer causes the text to change colors.\
\'95 Improved ad-blocking.\
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural
\f0\b\fs30 \cf2 \
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\sl320\sa60\ql\qnatural
\cf2 Features in Camino 2\
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\sa200\ql\qnatural
\f1\b0\fs20 \cf2 The following are the major changes and improvements made since the Camino 1.6 release. A full list is available on our {\field{\*\fldinst{HYPERLINK "http://caminobrowser.org/releases/2.0/complete.php"}}{\fldrslt \cf3 \ul \ulc3 website}}.\
\pard\tx360\tx720\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li720\fi-720\ql\qnatural
\cf2 \'95
\b Improved tabbed browsing
\b0 \
\pard\tx1080\tx1440\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li1440\fi-720\ql\qnatural
\cf2 \'95 The Tab Overview feature displays a grid of thumbnails of the tabs in the current window.\
\'95 Tabs can be rearranged by dragging and dropping.\
\'95 Command-click now defaults to opening links in new tabs instead of new windows.\
\pard\tx360\tx720\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li720\fi-720\ql\qnatural
\cf2 \'95
\b New security features
\b0 \
\pard\tx1080\tx1440\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li1440\fi-720\ql\qnatural
\cf2 \'95 Camino now supports the {\field{\*\fldinst{HYPERLINK "http://code.google.com/apis/safebrowsing/"}}{\fldrslt Google Safe Browsing}} service to provide warnings about many potentially malicious websites.\
\'95 Camino now displays error pages for secure web pages using invalid or untrusted certificates.\
\pard\tx360\tx720\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li720\fi-720\ql\qnatural
\cf2 \'95
\b Full content zoom
\b0 \
\pard\tx1080\tx1440\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li1440\fi-720\ql\qnatural
\cf2 \'95 Camino now has support for making the entire contents of a web page bigger or smaller.\
\pard\tx360\tx720\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li720\fi-720\ql\qnatural
\cf2 \'95
\b Download notifications
\b0 \
\pard\tx1080\tx1440\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li1440\fi-720\ql\qnatural
\cf2 \'95 If {\field{\*\fldinst{HYPERLINK "http://growl.info/"}}{\fldrslt Growl}} is installed, Camino will generate notifications when downloads begin and finish.\
\'95 On Mac OS X 10.5 and higher, Camino will bounce the downloads folder in the Dock when a download finishes.\
\pard\tx360\tx720\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li720\fi-720\ql\qnatural
\cf2 \'95
\b Recently closed pages
\b0 \
\pard\tx1080\tx1440\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li1440\fi-720\ql\qnatural
\cf2 \'95 The History menu now contains a sub-menu listing the last 20 closed web pages.\
\pard\tx360\tx720\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li720\fi-720\ql\qnatural
\cf2 \'95
\b Improved support for Full Keyboard Access
\b0 \
\pard\tx1080\tx1440\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li1440\fi-720\ql\qnatural
\cf2 \'95 When Full Keyboard Access is enabled, tabbing now moves correctly through the entire browser window.\
\pard\tx360\tx720\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li720\fi-720\ql\qnatural
\cf2 \'95
\b Enhanced annoyance blocking
\b0 \
\pard\tx1080\tx1440\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li1440\fi-720\ql\qnatural
\cf2 \'95 Camino now includes an exceptions list to allow disabling \'93Block Flash animations\'94 on a per-site basis and an \'93Allow Flash From This Site\'94 contextual menu item to ease adding sites to the exceptions list.\
\pard\tx360\tx720\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li720\fi-720\ql\qnatural
\cf2 \'95
\b New AppleScript capabilities
\b0 \
\pard\tx1080\tx1440\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li1440\fi-720\ql\qnatural
\cf2 \'95 AppleScripts can now obtain the HTML source or text of an entire web page or of a selection.\
\'95 Added AppleScript support for setting the active tab in each browser window.\
\pard\tx360\tx720\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li720\fi-720\ql\qnatural
\cf2 \'95
\b Web content support
\b0 \
\pard\tx1080\tx1440\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li1440\fi-720\ql\qnatural
\cf2 \'95 Camino now uses version 1.9.0 of Mozilla\'92s Gecko rendering engine, which contains thousands of bug fixes, better web plug-in compatibility and performance, enhanced support for web standards, and new technologies like JavaScript 1.8.\
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural
\f0\b\fs30 \cf2 \
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\sl320\sa60\ql\qnatural
\cf2 Known Issues\
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural
\f1\b0\fs20 \cf2 For information about other issues or problems, please visit our {\field{\*\fldinst{HYPERLINK "http://www.caminobrowser.org/help/"}}{\fldrslt \cf3 \ul \ulc3 Help page}}.\
\
\pard\tx360\tx720\tx1440\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li720\fi-720\sa200\ql\qnatural
\cf2 \'95 If \'93Ask me before accepting each cookie\'94 is checked, Camino will display a cookie dialog for each cookie request from a web page.\
\'95 Scroll bars will appear active even when the window is not active.\
\'95 Incompatible third-party plug-ins:\
\pard\tx1080\tx1440\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li1440\fi-720\sa200\ql\qnatural
\cf2 \'95 Shockwave Player 10 and older will not display Shockwave content in Camino 2; to display Shockwave content, install Shockwave Player 11 or newer.\
\'95 Versions of the Flip4Mac (F4M) plug-in older than version 2.2.1.11 contained a bug that caused major rendering issues in Camino. To display Windows Media content without experiencing this bug, upgrade to Flip4Mac version 2.2.3.7 or later.\
\'95 Older versions of the Adobe Flash plug-in had a bug that could cause Camino to stop functioning correctly after visiting enough pages with Flash content while browsing. This is fixed in version 10.0 of the Flash plug-in.}

View File

@@ -1,86 +0,0 @@
# ***** 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 the Mozilla Browser code.
#
# The Initial Developer of the Original Code is
# IBM Corporation.
# Portions created by the Initial Developer are Copyright (C) 2004
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
# Mark Mentovai <mark@moxienet.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 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 *****
DEPTH = ../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
include $(topsrcdir)/config/rules.mk
CAMINO_VERSION=2.0.7
_RELNOTE_VERSION:=$(subst .,-,$(CAMINO_VERSION))
# The packager runs in the dist directory, paths must be relative to there.
MOZ_PKG_MAC_DSSTORE=../camino/resources/package/dsstore
MOZ_PKG_MAC_BACKGROUND=../camino/resources/package/background.jpg
MOZ_PKG_MAC_ICON=../camino/resources/package/disk.icns
# The docs aren't copied into an objdir, chase them in the srcdir.
# Use $(_ABS_TOPSRCDIR) for an absolute path, handling both srcdir and
# objdir builds.
MOZ_PKG_MAC_EXTRA=--format "UDBZ" \
--copy "$(_ABS_TOPSRCDIR)/camino/docs/ReadMe.rtf" \
--copy "$(_ABS_TOPSRCDIR)/camino/docs/Release Notes $(_RELNOTE_VERSION).rtf:Release Notes.rtf" \
--attribute "E:/ReadMe.rtf:/Release Notes.rtf"
include $(topsrcdir)/toolkit/mozapps/installer/packager.mk
# Use striptease instead of strip. Strip out debugging symbols and local
# symbols, but leave local symbols in text sections intact. This keeps
# CrashReporter stacks usable. Use pwd to get an absolute path based
# on $(DIST) relative to this directory. If $(DIST) were used directly, the
# strip part of packger.mk might not be able to find strip, because $(DIST)
# is a relative path, and the stripper changes directory.
STRIP:=$(shell pwd)/$(DIST)/host/bin/tease
STRIP_FLAGS=-S -t
# The core build system thinks it's Mozilla. Override what's necessary.
# Do this after including packager.mk because it has dependencies that
# break if these are already set to Camino when it's included.
MOZ_APP_DISPLAYNAME=Camino
MOZ_PKG_APPNAME=camino
# packager.mk has its own exclude list that's appropriate for toolkit apps
# but not appropriate for the Xcode-built Camino. Specifically, it excludes
# the files produced by Camino.app/Contents/MacOS/Camino -autoRegister YES,
# although they belong in the package. Override.
NO_PKG_FILES=
# Override toolkit/mozapps/installer/package-name.mk.
PKG_BASENAME=$(MOZ_APP_DISPLAYNAME)

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,577 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set ts=2 sw=2 et tw=80: */
/* ***** 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
* Mozilla Japan.
* Portions created by the Initial Developer are Copyright (C) 2008
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Masayuki Nakano <masayuki@d-toybox.com>
*
* Alternatively, the contents of this file may be used under the terms of
* either of 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 ***** */
#include "nsQueryContentEventHandler.h"
#include "nsCOMPtr.h"
#include "nsPresContext.h"
#include "nsIPresShell.h"
#include "nsISelection.h"
#include "nsIDOMText.h"
#include "nsIDOMRange.h"
#include "nsRange.h"
#include "nsGUIEvent.h"
#include "nsICaret.h"
#include "nsFrameSelection.h"
#include "nsIFrame.h"
#include "nsIView.h"
#include "nsIContentIterator.h"
#include "nsTextFragment.h"
#include "nsTextFrame.h"
nsresult NS_NewContentIterator(nsIContentIterator** aInstancePtrResult);
/******************************************************************/
/* nsQueryContentEventHandler */
/******************************************************************/
nsQueryContentEventHandler::nsQueryContentEventHandler(
nsPresContext* aPresContext) :
mPresContext(aPresContext),
mPresShell(aPresContext->GetPresShell()), mSelection(nsnull),
mFirstSelectedRange(nsnull), mRootContent(nsnull)
{
}
nsresult
nsQueryContentEventHandler::Init(nsQueryContentEvent* aEvent)
{
NS_ASSERTION(aEvent, "aEvent must not be null");
if (mSelection)
return NS_OK;
aEvent->mSucceeded = PR_FALSE;
if (!mPresShell)
return NS_ERROR_NOT_AVAILABLE;
nsresult rv = mPresShell->GetSelectionForCopy(getter_AddRefs(mSelection));
NS_ENSURE_SUCCESS(rv, rv);
NS_ASSERTION(mSelection,
"GetSelectionForCopy succeeded, but the result is null");
nsCOMPtr<nsIDOMRange> firstRange;
rv = mSelection->GetRangeAt(0, getter_AddRefs(firstRange));
// This shell doesn't support selection.
if (NS_FAILED(rv))
return NS_ERROR_NOT_AVAILABLE;
mFirstSelectedRange = do_QueryInterface(firstRange);
NS_ENSURE_TRUE(mFirstSelectedRange, NS_ERROR_FAILURE);
nsINode* startNode = mFirstSelectedRange->GetStartParent();
NS_ENSURE_TRUE(startNode, NS_ERROR_FAILURE);
mRootContent = startNode->GetSelectionRootContent(mPresShell);
NS_ENSURE_TRUE(mRootContent, NS_ERROR_FAILURE);
aEvent->mReply.mContentsRoot = mRootContent.get();
return NS_OK;
}
static void ConvertToNativeNewlines(nsAFlatString& aString)
{
#if defined(XP_MACOSX)
aString.ReplaceSubstring(NS_LITERAL_STRING("\n"), NS_LITERAL_STRING("\r"));
#elif defined(XP_WIN)
aString.ReplaceSubstring(NS_LITERAL_STRING("\n"), NS_LITERAL_STRING("\r\n"));
#endif
}
static void ConvertToXPNewlines(nsAFlatString& aString)
{
#if defined(XP_MACOSX)
aString.ReplaceSubstring(NS_LITERAL_STRING("\r"), NS_LITERAL_STRING("\n"));
#elif defined(XP_WIN)
aString.ReplaceSubstring(NS_LITERAL_STRING("\r\n"), NS_LITERAL_STRING("\n"));
#endif
}
static void AppendString(nsAString& aString, nsIContent* aContent)
{
NS_ASSERTION(aContent->IsNodeOfType(nsINode::eTEXT),
"aContent is not a text node!");
const nsTextFragment* text = aContent->GetText();
if (!text)
return;
text->AppendTo(aString);
}
static void AppendSubString(nsAString& aString, nsIContent* aContent,
PRUint32 aXPOffset, PRUint32 aXPLength)
{
NS_ASSERTION(aContent->IsNodeOfType(nsINode::eTEXT),
"aContent is not a text node!");
const nsTextFragment* text = aContent->GetText();
if (!text)
return;
text->AppendTo(aString, PRInt32(aXPOffset), PRInt32(aXPLength));
}
static PRUint32 GetNativeTextLength(nsIContent* aContent)
{
nsAutoString str;
if (aContent->IsNodeOfType(nsINode::eTEXT))
AppendString(str, aContent);
else if (aContent->IsNodeOfType(nsINode::eHTML) &&
aContent->Tag() == nsGkAtoms::br)
str.Assign(PRUnichar('\n'));
ConvertToNativeNewlines(str);
return str.Length();
}
static PRUint32 ConvertToXPOffset(nsIContent* aContent, PRUint32 aNativeOffset)
{
nsAutoString str;
AppendString(str, aContent);
ConvertToNativeNewlines(str);
NS_ASSERTION(aNativeOffset <= str.Length(),
"aOffsetForNativeLF is too large!");
str.Truncate(aNativeOffset);
ConvertToXPNewlines(str);
return str.Length();
}
nsresult
nsQueryContentEventHandler::GenerateFlatTextContent(nsIRange* aRange,
nsAFlatString& aString)
{
nsCOMPtr<nsIContentIterator> iter;
nsresult rv = NS_NewContentIterator(getter_AddRefs(iter));
NS_ENSURE_SUCCESS(rv, rv);
NS_ASSERTION(iter, "NS_NewContentIterator succeeded, but the result is null");
nsCOMPtr<nsIDOMRange> domRange(do_QueryInterface(aRange));
NS_ASSERTION(domRange, "aRange doesn't have nsIDOMRange!");
iter->Init(domRange);
NS_ASSERTION(aString.IsEmpty(), "aString must be empty string");
nsINode* startNode = aRange->GetStartParent();
NS_ENSURE_TRUE(startNode, NS_ERROR_FAILURE);
nsINode* endNode = aRange->GetEndParent();
NS_ENSURE_TRUE(endNode, NS_ERROR_FAILURE);
if (startNode == endNode && startNode->IsNodeOfType(nsINode::eTEXT)) {
nsIContent* content = static_cast<nsIContent*>(startNode);
AppendSubString(aString, content, aRange->StartOffset(),
aRange->EndOffset() - aRange->StartOffset());
ConvertToNativeNewlines(aString);
return NS_OK;
}
nsAutoString tmpStr;
for (; !iter->IsDone(); iter->Next()) {
nsIContent* content = iter->GetCurrentNode();
if (!content)
continue;
if (content->IsNodeOfType(nsINode::eTEXT)) {
if (content == startNode)
AppendSubString(aString, content, aRange->StartOffset(),
content->TextLength() - aRange->StartOffset());
else if (content == endNode)
AppendSubString(aString, content, 0, aRange->EndOffset());
else
AppendString(aString, content);
} else if (content->IsNodeOfType(nsINode::eHTML) &&
content->Tag() == nsGkAtoms::br)
aString.Append(PRUnichar('\n'));
}
ConvertToNativeNewlines(aString);
return NS_OK;
}
nsresult
nsQueryContentEventHandler::ExpandToClusterBoundary(nsIContent* aContent,
PRBool aForward,
PRUint32* aXPOffset)
{
NS_ASSERTION(*aXPOffset >= 0 && *aXPOffset <= aContent->TextLength(),
"offset is out of range.");
// XXX This method assumes that the frame boundaries must be cluster
// boundaries. It's false, but no problem now, maybe.
if (!aContent->IsNodeOfType(nsINode::eTEXT) ||
*aXPOffset == 0 || *aXPOffset == aContent->TextLength())
return NS_OK;
nsCOMPtr<nsFrameSelection> fs = mPresShell->FrameSelection();
PRInt32 offsetInFrame;
nsFrameSelection::HINT hint =
aForward ? nsFrameSelection::HINTLEFT : nsFrameSelection::HINTRIGHT;
nsIFrame* frame = fs->GetFrameForNodeOffset(aContent, PRInt32(*aXPOffset),
hint, &offsetInFrame);
if (!frame) {
// This content doesn't have any frames, we only can check surrogate pair...
const nsTextFragment* text = aContent->GetText();
NS_ENSURE_TRUE(text, NS_ERROR_FAILURE);
if (NS_IS_LOW_SURROGATE(text->CharAt(*aXPOffset)) &&
NS_IS_HIGH_SURROGATE(text->CharAt(*aXPOffset - 1)))
*aXPOffset += aForward ? 1 : -1;
return NS_OK;
}
PRInt32 startOffset, endOffset;
nsresult rv = frame->GetOffsets(startOffset, endOffset);
NS_ENSURE_SUCCESS(rv, rv);
if (*aXPOffset == PRUint32(startOffset) || *aXPOffset == PRUint32(endOffset))
return NS_OK;
if (frame->GetType() != nsGkAtoms::textFrame)
return NS_ERROR_FAILURE;
nsTextFrame* textFrame = static_cast<nsTextFrame*>(frame);
PRInt32 newOffsetInFrame = offsetInFrame;
newOffsetInFrame += aForward ? -1 : 1;
textFrame->PeekOffsetCharacter(aForward, &newOffsetInFrame);
*aXPOffset = startOffset + newOffsetInFrame;
return NS_OK;
}
nsresult
nsQueryContentEventHandler::SetRangeFromFlatTextOffset(
nsIRange* aRange,
PRUint32 aNativeOffset,
PRUint32 aNativeLength,
PRBool aExpandToClusterBoundaries)
{
nsCOMPtr<nsIContentIterator> iter;
nsresult rv = NS_NewContentIterator(getter_AddRefs(iter));
NS_ENSURE_SUCCESS(rv, rv);
NS_ASSERTION(iter, "NS_NewContentIterator succeeded, but the result is null");
rv = iter->Init(mRootContent);
NS_ENSURE_SUCCESS(rv, rv);
nsCOMPtr<nsIDOMRange> domRange(do_QueryInterface(aRange));
NS_ASSERTION(domRange, "aRange doesn't have nsIDOMRange!");
PRUint32 nativeOffset = 0;
PRUint32 nativeEndOffset = aNativeOffset + aNativeLength;
nsIContent* content = nsnull;
for (; !iter->IsDone(); iter->Next()) {
content = iter->GetCurrentNode();
if (!content)
continue;
PRUint32 nativeTextLength;
nativeTextLength = GetNativeTextLength(content);
if (nativeTextLength == 0)
continue;
if (nativeOffset <= aNativeOffset &&
aNativeOffset < nativeOffset + nativeTextLength) {
nsCOMPtr<nsIDOMNode> domNode(do_QueryInterface(content));
NS_ASSERTION(domNode, "aContent doesn't have nsIDOMNode!");
PRUint32 xpOffset =
content->IsNodeOfType(nsINode::eTEXT) ?
ConvertToXPOffset(content, aNativeOffset - nativeOffset) : 0;
if (aExpandToClusterBoundaries) {
rv = ExpandToClusterBoundary(content, PR_FALSE, &xpOffset);
NS_ENSURE_SUCCESS(rv, rv);
}
rv = domRange->SetStart(domNode, PRInt32(xpOffset));
NS_ENSURE_SUCCESS(rv, rv);
if (aNativeLength == 0) {
// Ensure that the end offset and the start offset are same.
rv = domRange->SetEnd(domNode, PRInt32(xpOffset));
NS_ENSURE_SUCCESS(rv, rv);
return NS_OK;
}
}
if (nativeEndOffset <= nativeOffset + nativeTextLength) {
nsCOMPtr<nsIDOMNode> domNode(do_QueryInterface(content));
NS_ASSERTION(domNode, "aContent doesn't have nsIDOMNode!");
PRUint32 xpOffset;
if (content->IsNodeOfType(nsINode::eTEXT)) {
xpOffset = ConvertToXPOffset(content, nativeEndOffset - nativeOffset);
if (aExpandToClusterBoundaries) {
rv = ExpandToClusterBoundary(content, PR_TRUE, &xpOffset);
NS_ENSURE_SUCCESS(rv, rv);
}
} else {
// Use first position of next node, because the end node is ignored
// by ContentIterator when the offset is zero.
xpOffset = 0;
iter->Next();
if (iter->IsDone())
break;
domNode = do_QueryInterface(iter->GetCurrentNode());
}
rv = domRange->SetEnd(domNode, PRInt32(xpOffset));
NS_ENSURE_SUCCESS(rv, rv);
return NS_OK;
}
nativeOffset += nativeTextLength;
}
if (nativeOffset < aNativeOffset)
return NS_ERROR_FAILURE;
nsCOMPtr<nsIDOMNode> domNode(do_QueryInterface(mRootContent));
NS_ASSERTION(domNode, "lastContent doesn't have nsIDOMNode!");
if (!content) {
rv = domRange->SetStart(domNode, 0);
NS_ENSURE_SUCCESS(rv, rv);
}
rv = domRange->SetEnd(domNode, PRInt32(mRootContent->GetChildCount()));
NS_ASSERTION(NS_SUCCEEDED(rv), "nsIDOMRange::SetEnd failed");
return rv;
}
nsresult
nsQueryContentEventHandler::OnQuerySelectedText(nsQueryContentEvent* aEvent)
{
nsresult rv = Init(aEvent);
if (NS_FAILED(rv))
return rv;
NS_ASSERTION(aEvent->mReply.mString.IsEmpty(),
"The reply string must be empty");
rv = GetFlatTextOffsetOfRange(mFirstSelectedRange, &aEvent->mReply.mOffset);
NS_ENSURE_SUCCESS(rv, rv);
PRBool isCollapsed;
rv = mSelection->GetIsCollapsed(&isCollapsed);
NS_ENSURE_SUCCESS(rv, rv);
if (!isCollapsed) {
nsCOMPtr<nsIDOMRange> domRange;
rv = mSelection->GetRangeAt(0, getter_AddRefs(domRange));
NS_ENSURE_SUCCESS(rv, rv);
NS_ASSERTION(domRange, "GetRangeAt succeeded, but the result is null");
nsCOMPtr<nsIRange> range(do_QueryInterface(domRange));
NS_ENSURE_TRUE(range, NS_ERROR_FAILURE);
rv = GenerateFlatTextContent(range, aEvent->mReply.mString);
NS_ENSURE_SUCCESS(rv, rv);
}
aEvent->mSucceeded = PR_TRUE;
return NS_OK;
}
nsresult
nsQueryContentEventHandler::OnQueryTextContent(nsQueryContentEvent* aEvent)
{
nsresult rv = Init(aEvent);
if (NS_FAILED(rv))
return rv;
NS_ASSERTION(aEvent->mReply.mString.IsEmpty(),
"The reply string must be empty");
nsCOMPtr<nsIRange> range = new nsRange();
NS_ENSURE_TRUE(range, NS_ERROR_OUT_OF_MEMORY);
rv = SetRangeFromFlatTextOffset(range, aEvent->mInput.mOffset,
aEvent->mInput.mLength, PR_FALSE);
NS_ENSURE_SUCCESS(rv, rv);
rv = GenerateFlatTextContent(range, aEvent->mReply.mString);
NS_ENSURE_SUCCESS(rv, rv);
aEvent->mSucceeded = PR_TRUE;
return NS_OK;
}
nsresult
nsQueryContentEventHandler::QueryRectFor(nsQueryContentEvent* aEvent,
nsIRange* aRange,
nsICaret* aCaret)
{
PRInt32 offsetInFrame;
nsIFrame* frame;
nsresult rv = GetStartFrameAndOffset(aRange, &frame, &offsetInFrame);
NS_ENSURE_SUCCESS(rv, rv);
nsPoint posInFrame;
rv = frame->GetPointFromOffset(aRange->StartOffset(), &posInFrame);
NS_ENSURE_SUCCESS(rv, rv);
aEvent->mReply.mRect.y = posInFrame.y;
aEvent->mReply.mRect.height = frame->GetSize().height;
if (aEvent->message == NS_QUERY_CHARACTER_RECT) {
nsPoint nextPos;
rv = frame->GetPointFromOffset(aRange->EndOffset(), &nextPos);
NS_ENSURE_SUCCESS(rv, rv);
aEvent->mReply.mRect.x = PR_MIN(posInFrame.x, nextPos.x);
aEvent->mReply.mRect.width = PR_ABS(posInFrame.x - nextPos.x);
} else {
aEvent->mReply.mRect.x = posInFrame.x;
aEvent->mReply.mRect.width = aCaret->GetCaretRect().width;
}
// The coordinates are app units here, they will be converted to system
// coordinates by view manager.
rv = ConvertToRootViewRelativeOffset(frame, aEvent->mReply.mRect);
NS_ENSURE_SUCCESS(rv, rv);
aEvent->mSucceeded = PR_TRUE;
return NS_OK;
}
nsresult
nsQueryContentEventHandler::OnQueryCharacterRect(nsQueryContentEvent* aEvent)
{
nsresult rv = Init(aEvent);
if (NS_FAILED(rv))
return rv;
nsCOMPtr<nsIRange> range = new nsRange();
NS_ENSURE_TRUE(range, NS_ERROR_OUT_OF_MEMORY);
rv = SetRangeFromFlatTextOffset(range, aEvent->mInput.mOffset, 1, PR_TRUE);
NS_ENSURE_SUCCESS(rv, rv);
if (range->Collapsed()) {
// There is no character at the offset.
return NS_OK;
}
return QueryRectFor(aEvent, range, nsnull);
}
nsresult
nsQueryContentEventHandler::OnQueryCaretRect(nsQueryContentEvent* aEvent)
{
nsresult rv = Init(aEvent);
if (NS_FAILED(rv))
return rv;
nsCOMPtr<nsICaret> caret;
rv = mPresShell->GetCaret(getter_AddRefs(caret));
NS_ENSURE_SUCCESS(rv, rv);
NS_ASSERTION(caret, "GetCaret succeeded, but the result is null");
// When the selection is collapsed and the queried offset is current caret
// position, we should return the "real" caret rect.
PRBool selectionIsCollapsed;
rv = mSelection->GetIsCollapsed(&selectionIsCollapsed);
NS_ENSURE_SUCCESS(rv, rv);
if (selectionIsCollapsed) {
PRUint32 offset;
rv = GetFlatTextOffsetOfRange(mFirstSelectedRange, &offset);
NS_ENSURE_SUCCESS(rv, rv);
if (offset == aEvent->mInput.mOffset) {
PRBool isCollapsed;
rv = caret->GetCaretCoordinates(nsICaret::eTopLevelWindowCoordinates,
mSelection, &aEvent->mReply.mRect,
&isCollapsed, nsnull);
NS_ENSURE_SUCCESS(rv, rv);
aEvent->mSucceeded = PR_TRUE;
return NS_OK;
}
}
// Otherwise, we should set the guessed caret rect.
nsCOMPtr<nsIRange> range = new nsRange();
NS_ENSURE_TRUE(range, NS_ERROR_OUT_OF_MEMORY);
rv = SetRangeFromFlatTextOffset(range, aEvent->mInput.mOffset, 0, PR_TRUE);
NS_ENSURE_SUCCESS(rv, rv);
return QueryRectFor(aEvent, range, caret);
}
nsresult
nsQueryContentEventHandler::GetFlatTextOffsetOfRange(nsIRange* aRange,
PRUint32* aNativeOffset)
{
NS_ASSERTION(aNativeOffset, "param is invalid");
nsCOMPtr<nsIRange> prev = new nsRange();
NS_ENSURE_TRUE(prev, NS_ERROR_OUT_OF_MEMORY);
nsCOMPtr<nsIDOMRange> domPrev(do_QueryInterface(prev));
NS_ASSERTION(domPrev, "nsRange doesn't have nsIDOMRange??");
nsCOMPtr<nsIDOMNode> rootDOMNode(do_QueryInterface(mRootContent));
domPrev->SetStart(rootDOMNode, 0);
nsINode* startNode = aRange->GetStartParent();
NS_ENSURE_TRUE(startNode, NS_ERROR_FAILURE);
PRInt32 startOffset = aRange->StartOffset();
nsCOMPtr<nsIDOMNode> startDOMNode(do_QueryInterface(startNode));
NS_ASSERTION(startDOMNode, "startNode doesn't have nsIDOMNode");
domPrev->SetEnd(startDOMNode, startOffset);
nsAutoString prevStr;
nsresult rv = GenerateFlatTextContent(prev, prevStr);
NS_ENSURE_SUCCESS(rv, rv);
*aNativeOffset = prevStr.Length();
return NS_OK;
}
nsresult
nsQueryContentEventHandler::GetStartFrameAndOffset(nsIRange* aRange,
nsIFrame** aFrame,
PRInt32* aOffsetInFrame)
{
NS_ASSERTION(aRange && aFrame && aOffsetInFrame, "params are invalid");
nsIContent* content = nsnull;
nsINode* node = aRange->GetStartParent();
if (node && node->IsNodeOfType(nsINode::eCONTENT))
content = static_cast<nsIContent*>(node);
NS_ASSERTION(content, "the start node doesn't have nsIContent!");
nsCOMPtr<nsFrameSelection> fs = mPresShell->FrameSelection();
*aFrame = fs->GetFrameForNodeOffset(content, aRange->StartOffset(),
fs->GetHint(), aOffsetInFrame);
NS_ENSURE_TRUE((*aFrame), NS_ERROR_FAILURE);
NS_ASSERTION((*aFrame)->GetType() == nsGkAtoms::textFrame,
"The frame is not textframe");
return NS_OK;
}
nsresult
nsQueryContentEventHandler::ConvertToRootViewRelativeOffset(nsIFrame* aFrame,
nsRect& aRect)
{
NS_ASSERTION(aFrame, "aFrame must not be null");
nsIView* view = nsnull;
nsPoint posInView;
aFrame->GetOffsetFromView(posInView, &view);
if (!view)
return NS_ERROR_FAILURE;
aRect += posInView + view->GetOffsetTo(nsnull);
return NS_OK;
}

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

File diff suppressed because it is too large Load Diff

View File

@@ -1,532 +0,0 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* ***** 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 Communicator client code, released
* March 31, 1998.
*
* 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 of 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 ***** */
/*
* JS math package.
*/
#include "jsstddef.h"
#include "jslibmath.h"
#include <stdlib.h>
#include "jstypes.h"
#include "jslong.h"
#include "prmjtime.h"
#include "jsapi.h"
#include "jsatom.h"
#include "jscntxt.h"
#include "jsconfig.h"
#include "jslock.h"
#include "jsmath.h"
#include "jsnum.h"
#include "jsobj.h"
#ifndef M_E
#define M_E 2.7182818284590452354
#endif
#ifndef M_LOG2E
#define M_LOG2E 1.4426950408889634074
#endif
#ifndef M_LOG10E
#define M_LOG10E 0.43429448190325182765
#endif
#ifndef M_LN2
#define M_LN2 0.69314718055994530942
#endif
#ifndef M_LN10
#define M_LN10 2.30258509299404568402
#endif
#ifndef M_PI
#define M_PI 3.14159265358979323846
#endif
#ifndef M_SQRT2
#define M_SQRT2 1.41421356237309504880
#endif
#ifndef M_SQRT1_2
#define M_SQRT1_2 0.70710678118654752440
#endif
static JSConstDoubleSpec math_constants[] = {
{M_E, "E", 0, {0,0,0}},
{M_LOG2E, "LOG2E", 0, {0,0,0}},
{M_LOG10E, "LOG10E", 0, {0,0,0}},
{M_LN2, "LN2", 0, {0,0,0}},
{M_LN10, "LN10", 0, {0,0,0}},
{M_PI, "PI", 0, {0,0,0}},
{M_SQRT2, "SQRT2", 0, {0,0,0}},
{M_SQRT1_2, "SQRT1_2", 0, {0,0,0}},
{0,0,0,{0,0,0}}
};
JSClass js_MathClass = {
js_Math_str,
JSCLASS_HAS_CACHED_PROTO(JSProto_Math),
JS_PropertyStub, JS_PropertyStub, JS_PropertyStub, JS_PropertyStub,
JS_EnumerateStub, JS_ResolveStub, JS_ConvertStub, JS_FinalizeStub,
JSCLASS_NO_OPTIONAL_MEMBERS
};
static JSBool
math_abs(JSContext *cx, uintN argc, jsval *vp)
{
jsdouble x, z;
x = js_ValueToNumber(cx, &vp[2]);
if (JSVAL_IS_NULL(vp[2]))
return JS_FALSE;
z = fd_fabs(x);
return js_NewNumberInRootedValue(cx, z, vp);
}
static JSBool
math_acos(JSContext *cx, uintN argc, jsval *vp)
{
jsdouble x, z;
x = js_ValueToNumber(cx, &vp[2]);
if (JSVAL_IS_NULL(vp[2]))
return JS_FALSE;
#if !JS_USE_FDLIBM_MATH && defined(SOLARIS) && defined(__GNUC__)
if (x < -1 || 1 < x) {
*vp = DOUBLE_TO_JSVAL(cx->runtime->jsNaN);
return JS_TRUE;
}
#endif
z = fd_acos(x);
return js_NewNumberInRootedValue(cx, z, vp);
}
static JSBool
math_asin(JSContext *cx, uintN argc, jsval *vp)
{
jsdouble x, z;
x = js_ValueToNumber(cx, &vp[2]);
if (JSVAL_IS_NULL(vp[2]))
return JS_FALSE;
#if !JS_USE_FDLIBM_MATH && defined(SOLARIS) && defined(__GNUC__)
if (x < -1 || 1 < x) {
*vp = DOUBLE_TO_JSVAL(cx->runtime->jsNaN);
return JS_TRUE;
}
#endif
z = fd_asin(x);
return js_NewNumberInRootedValue(cx, z, vp);
}
static JSBool
math_atan(JSContext *cx, uintN argc, jsval *vp)
{
jsdouble x, z;
x = js_ValueToNumber(cx, &vp[2]);
if (JSVAL_IS_NULL(vp[2]))
return JS_FALSE;
z = fd_atan(x);
return js_NewNumberInRootedValue(cx, z, vp);
}
static JSBool
math_atan2(JSContext *cx, uintN argc, jsval *vp)
{
jsdouble x, y, z;
x = js_ValueToNumber(cx, &vp[2]);
if (JSVAL_IS_NULL(vp[2]))
return JS_FALSE;
y = js_ValueToNumber(cx, &vp[3]);
if (JSVAL_IS_NULL(vp[3]))
return JS_FALSE;
#if !JS_USE_FDLIBM_MATH && defined(_MSC_VER)
/*
* MSVC's atan2 does not yield the result demanded by ECMA when both x
* and y are infinite.
* - The result is a multiple of pi/4.
* - The sign of x determines the sign of the result.
* - The sign of y determines the multiplicator, 1 or 3.
*/
if (JSDOUBLE_IS_INFINITE(x) && JSDOUBLE_IS_INFINITE(y)) {
z = fd_copysign(M_PI / 4, x);
if (y < 0)
z *= 3;
return js_NewDoubleInRootedValue(cx, z, vp);
}
#endif
#if !JS_USE_FDLIBM_MATH && defined(SOLARIS) && defined(__GNUC__)
if (x == 0) {
if (JSDOUBLE_IS_NEGZERO(y)) {
z = fd_copysign(M_PI, x);
return js_NewDoubleInRootedValue(cx, z, vp);
}
if (y == 0) {
z = x;
return js_NewDoubleInRootedValue(cx, z, vp);
}
}
#endif
z = fd_atan2(x, y);
return js_NewNumberInRootedValue(cx, z, vp);
}
static JSBool
math_ceil(JSContext *cx, uintN argc, jsval *vp)
{
jsdouble x, z;
x = js_ValueToNumber(cx, &vp[2]);
if (JSVAL_IS_NULL(vp[2]))
return JS_FALSE;
z = fd_ceil(x);
return js_NewNumberInRootedValue(cx, z, vp);
}
static JSBool
math_cos(JSContext *cx, uintN argc, jsval *vp)
{
jsdouble x, z;
x = js_ValueToNumber(cx, &vp[2]);
if (JSVAL_IS_NULL(vp[2]))
return JS_FALSE;
z = fd_cos(x);
return js_NewNumberInRootedValue(cx, z, vp);
}
static JSBool
math_exp(JSContext *cx, uintN argc, jsval *vp)
{
jsdouble x, z;
x = js_ValueToNumber(cx, &vp[2]);
if (JSVAL_IS_NULL(vp[2]))
return JS_FALSE;
#ifdef _WIN32
if (!JSDOUBLE_IS_NaN(x)) {
if (x == *cx->runtime->jsPositiveInfinity) {
*vp = DOUBLE_TO_JSVAL(cx->runtime->jsPositiveInfinity);
return JS_TRUE;
}
if (x == *cx->runtime->jsNegativeInfinity) {
*vp = JSVAL_ZERO;
return JS_TRUE;
}
}
#endif
z = fd_exp(x);
return js_NewNumberInRootedValue(cx, z, vp);
}
static JSBool
math_floor(JSContext *cx, uintN argc, jsval *vp)
{
jsdouble x, z;
x = js_ValueToNumber(cx, &vp[2]);
if (JSVAL_IS_NULL(vp[2]))
return JS_FALSE;
z = fd_floor(x);
return js_NewNumberInRootedValue(cx, z, vp);
}
static JSBool
math_log(JSContext *cx, uintN argc, jsval *vp)
{
jsdouble x, z;
x = js_ValueToNumber(cx, &vp[2]);
if (JSVAL_IS_NULL(vp[2]))
return JS_FALSE;
#if !JS_USE_FDLIBM_MATH && defined(SOLARIS) && defined(__GNUC__)
if (x < 0) {
*vp = DOUBLE_TO_JSVAL(cx->runtime->jsNaN);
return JS_TRUE;
}
#endif
z = fd_log(x);
return js_NewNumberInRootedValue(cx, z, vp);
}
static JSBool
math_max(JSContext *cx, uintN argc, jsval *vp)
{
jsdouble x, z = *cx->runtime->jsNegativeInfinity;
jsval *argv;
uintN i;
if (argc == 0) {
*vp = DOUBLE_TO_JSVAL(cx->runtime->jsNegativeInfinity);
return JS_TRUE;
}
argv = vp + 2;
for (i = 0; i < argc; i++) {
x = js_ValueToNumber(cx, &argv[i]);
if (JSVAL_IS_NULL(argv[i]))
return JS_FALSE;
if (JSDOUBLE_IS_NaN(x)) {
*vp = DOUBLE_TO_JSVAL(cx->runtime->jsNaN);
return JS_TRUE;
}
if (x == 0 && x == z && fd_copysign(1.0, z) == -1)
z = x;
else
z = (x > z) ? x : z;
}
return js_NewNumberInRootedValue(cx, z, vp);
}
static JSBool
math_min(JSContext *cx, uintN argc, jsval *vp)
{
jsdouble x, z = *cx->runtime->jsPositiveInfinity;
jsval *argv;
uintN i;
if (argc == 0) {
*vp = DOUBLE_TO_JSVAL(cx->runtime->jsPositiveInfinity);
return JS_TRUE;
}
argv = vp + 2;
for (i = 0; i < argc; i++) {
x = js_ValueToNumber(cx, &argv[i]);
if (JSVAL_IS_NULL(argv[i]))
return JS_FALSE;
if (JSDOUBLE_IS_NaN(x)) {
*vp = DOUBLE_TO_JSVAL(cx->runtime->jsNaN);
return JS_TRUE;
}
if (x == 0 && x == z && fd_copysign(1.0,x) == -1)
z = x;
else
z = (x < z) ? x : z;
}
return js_NewNumberInRootedValue(cx, z, vp);
}
static JSBool
math_pow(JSContext *cx, uintN argc, jsval *vp)
{
jsdouble x, y, z;
x = js_ValueToNumber(cx, &vp[2]);
if (JSVAL_IS_NULL(vp[2]))
return JS_FALSE;
y = js_ValueToNumber(cx, &vp[3]);
if (JSVAL_IS_NULL(vp[3]))
return JS_FALSE;
#if !JS_USE_FDLIBM_MATH
/*
* Because C99 and ECMA specify different behavior for pow(),
* we need to wrap the libm call to make it ECMA compliant.
*/
if (!JSDOUBLE_IS_FINITE(y) && (x == 1.0 || x == -1.0)) {
*vp = DOUBLE_TO_JSVAL(cx->runtime->jsNaN);
return JS_TRUE;
}
/* pow(x, +-0) is always 1, even for x = NaN. */
if (y == 0) {
*vp = JSVAL_ONE;
return JS_TRUE;
}
#endif
z = fd_pow(x, y);
return js_NewNumberInRootedValue(cx, z, vp);
}
static const int64 RNG_MULTIPLIER = 0x5DEECE66DLL;
static const int64 RNG_ADDEND = 0xBLL;
static const int64 RNG_MASK = (1LL << 48) - 1;
static const jsdouble RNG_DSCALE = (1LL << 53);
/*
* Math.random() support, lifted from java.util.Random.java.
*/
static inline void
random_setSeed(JSContext *cx, int64 seed)
{
cx->rngSeed = (seed ^ RNG_MULTIPLIER) & RNG_MASK;
}
void
js_InitRandom(JSContext *cx)
{
/*
* Set the seed from current time. Since we have a RNG per context and we often bring
* up several contexts at the same time, we xor in some additional values, namely
* the context and its successor. We don't just use the context because it might be
* possible to reverse engineer the context pointer if one guesses the time right.
*/
random_setSeed(cx,
(PRMJ_Now() / 1000) ^
(int64)(cx) ^
(int64)(cx->links.next));
}
static inline uint64
random_next(JSContext *cx, int bits)
{
uint64 nextseed = cx->rngSeed * RNG_MULTIPLIER;
nextseed += RNG_ADDEND;
nextseed &= RNG_MASK;
cx->rngSeed = nextseed;
return nextseed >> (48 - bits);
}
static inline jsdouble
random_nextDouble(JSContext *cx)
{
return (jsdouble)((random_next(cx, 26) << 27) + random_next(cx, 27)) / RNG_DSCALE;
}
static JSBool
math_random(JSContext *cx, uintN argc, jsval *vp)
{
jsdouble z = random_nextDouble(cx);
return js_NewNumberInRootedValue(cx, z, vp);
}
#if defined _WIN32 && !defined WINCE && _MSC_VER < 1400
/* Try to work around apparent _copysign bustage in VC6 and VC7. */
double
js_copysign(double x, double y)
{
jsdpun xu, yu;
xu.d = x;
yu.d = y;
xu.s.hi &= ~JSDOUBLE_HI32_SIGNBIT;
xu.s.hi |= yu.s.hi & JSDOUBLE_HI32_SIGNBIT;
return xu.d;
}
#endif
static JSBool
math_round(JSContext *cx, uintN argc, jsval *vp)
{
jsdouble x, z;
x = js_ValueToNumber(cx, &vp[2]);
if (JSVAL_IS_NULL(vp[2]))
return JS_FALSE;
z = fd_copysign(fd_floor(x + 0.5), x);
return js_NewNumberInRootedValue(cx, z, vp);
}
static JSBool
math_sin(JSContext *cx, uintN argc, jsval *vp)
{
jsdouble x, z;
x = js_ValueToNumber(cx, &vp[2]);
if (JSVAL_IS_NULL(vp[2]))
return JS_FALSE;
z = fd_sin(x);
return js_NewNumberInRootedValue(cx, z, vp);
}
static JSBool
math_sqrt(JSContext *cx, uintN argc, jsval *vp)
{
jsdouble x, z;
x = js_ValueToNumber(cx, &vp[2]);
if (JSVAL_IS_NULL(vp[2]))
return JS_FALSE;
z = fd_sqrt(x);
return js_NewNumberInRootedValue(cx, z, vp);
}
static JSBool
math_tan(JSContext *cx, uintN argc, jsval *vp)
{
jsdouble x, z;
x = js_ValueToNumber(cx, &vp[2]);
if (JSVAL_IS_NULL(vp[2]))
return JS_FALSE;
z = fd_tan(x);
return js_NewNumberInRootedValue(cx, z, vp);
}
#if JS_HAS_TOSOURCE
static JSBool
math_toSource(JSContext *cx, uintN argc, jsval *vp)
{
*vp = ATOM_KEY(CLASS_ATOM(cx, Math));
return JS_TRUE;
}
#endif
static JSFunctionSpec math_static_methods[] = {
#if JS_HAS_TOSOURCE
JS_FN(js_toSource_str, math_toSource, 0, 0, 0),
#endif
JS_FN("abs", math_abs, 1, 1, 0),
JS_FN("acos", math_acos, 1, 1, 0),
JS_FN("asin", math_asin, 1, 1, 0),
JS_FN("atan", math_atan, 1, 1, 0),
JS_FN("atan2", math_atan2, 2, 2, 0),
JS_FN("ceil", math_ceil, 1, 1, 0),
JS_FN("cos", math_cos, 1, 1, 0),
JS_FN("exp", math_exp, 1, 1, 0),
JS_FN("floor", math_floor, 1, 1, 0),
JS_FN("log", math_log, 1, 1, 0),
JS_FN("max", math_max, 0, 2, 0),
JS_FN("min", math_min, 0, 2, 0),
JS_FN("pow", math_pow, 2, 2, 0),
JS_FN("random", math_random, 0, 0, 0),
JS_FN("round", math_round, 1, 1, 0),
JS_FN("sin", math_sin, 1, 1, 0),
JS_FN("sqrt", math_sqrt, 1, 1, 0),
JS_FN("tan", math_tan, 1, 1, 0),
JS_FS_END
};
JSObject *
js_InitMathClass(JSContext *cx, JSObject *obj)
{
JSObject *Math;
Math = JS_DefineObject(cx, obj, js_Math_str, &js_MathClass, NULL, 0);
if (!Math)
return NULL;
if (!JS_DefineFunctions(cx, Math, math_static_methods))
return NULL;
if (!JS_DefineConstDoubles(cx, Math, math_constants))
return NULL;
return Math;
}

View File

@@ -1,60 +0,0 @@
/* ***** 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 Communicator client code, released
* March 31, 1998.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998-1999
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the terms of
* either of 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 ***** */
/* -*- Mode: C; tab-width: 8 -*-
* Copyright (C) 1998-1999 Netscape Communications Corporation, All Rights Reserved.
*/
#ifndef jsmath_h___
#define jsmath_h___
/*
* JS math functions.
*/
JS_BEGIN_EXTERN_C
extern JSClass js_MathClass;
extern JSObject *
js_InitMathClass(JSContext *cx, JSObject *obj);
extern void
js_InitRandom(JSContext *cx);
JS_END_EXTERN_C
#endif /* jsmath_h___ */

View File

@@ -1,109 +0,0 @@
#
# ***** 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 Communicator client code, released
# March 31, 1998.
#
# 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 of 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 *****
DEPTH = ../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
MODULE = liveconnect
LIBRARY_NAME = jsj
EXPORT_LIBRARY = 1
ifeq ($(OS_ARCH)$(MOZ_ENABLE_LIBXUL),WINNT)
LIBRARY_NAME = jsj$(MOZ_BITS)$(VERSION_NUMBER)
MAPFILE = $(LIBRARY_NAME).map
endif
JNI_GEN_DIR = _jni
GRE_MODULE = 1
LIBXUL_LIBRARY = 1
PACKAGE_FILE = liveconnect.pkg
REQUIRES = js \
xpcom \
xpconnect \
java \
caps \
necko \
string \
plugin \
oji \
$(NULL)
CSRCS = \
jsj.c \
jsj_JSObject.c \
jsj_JavaArray.c \
jsj_JavaClass.c \
jsj_JavaMember.c \
jsj_JavaObject.c \
jsj_JavaPackage.c \
jsj_array.c \
jsj_class.c \
jsj_convert.c \
jsj_field.c \
jsj_hash.c \
jsj_method.c \
jsj_utils.c \
$(NULL)
CPPSRCS = \
nsCLiveconnect.cpp \
nsCLiveconnectFactory.cpp \
$(NULL)
EXPORTS = \
$(srcdir)/jsjava.h \
$(srcdir)/$(JNI_GEN_DIR)/netscape_javascript_JSObject.h \
$(srcdir)/$(JNI_GEN_DIR)/netscape_javascript_JSException.h \
$(srcdir)/nsILiveconnect.h \
$(srcdir)/nsISecureLiveconnect.h \
$(srcdir)/nsISecurityContext.h \
$(NULL)
EXTRA_DSO_LDOPTS += \
$(LIBS_DIR) \
$(MOZ_JS_LIBS) \
$(MOZ_COMPONENT_LIBS) \
$(NULL)
include $(topsrcdir)/config/rules.mk

View File

@@ -1,876 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* ***** 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 Communicator client code, released
* March 31, 1998.
*
* 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 of 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 is part of the Java-vendor-neutral implementation of LiveConnect
*
* It contains the implementation providing nsIFactory XP-COM interface.
*
*/
#include <stdlib.h>
#include <string.h>
#include "prtypes.h"
#include "prprf.h"
#include "prlog.h"
#include "jsj_private.h"
#include "jsjava.h"
#include "jsdbgapi.h"
#include "jsarena.h"
#include "jsfun.h"
#include "jscntxt.h" /* For js_ReportErrorAgain().*/
#include "jsscript.h"
#include "netscape_javascript_JSObject.h" /* javah-generated headers */
#include "nsISecurityContext.h"
#include "nsIServiceManager.h"
#include "nsIJSContextStack.h"
#include "nsJVMManager.h"
#include "nsIPluginInstancePeer2.h"
PR_BEGIN_EXTERN_C
/* A captured JavaScript error, created when JS_ReportError() is called while
running JavaScript code that is itself called from Java. */
struct CapturedJSError {
char * message;
JSErrorReport report; /* Line # of error, etc. */
jthrowable java_exception; /* Java exception, error, or null */
CapturedJSError * next; /* Next oldest captured JS error */
};
PR_END_EXTERN_C
#include "nsCLiveconnect.h"
#include "jsinterp.h" // XXX private API so we can auto-push a JSStackFrame
#include "nsIScriptSecurityManager.h"
#include "nsIPrincipal.h"
#include "nsNetUtil.h"
#include "nsISecurityContext.h"
#include "prmem.h"
/***************************************************************************/
// A class to put on the stack to manage JS contexts when we are entering JS.
// This pushes and pops the given context
// with the nsThreadJSContextStack service as this object goes into and out
// of scope. It is optimized to not push/pop the cx if it is already on top
// of the stack. We need to push the JSContext when we enter JS because the
// JS security manager looks on the context stack for permissions information.
class AutoPushJSContext
{
public:
AutoPushJSContext(nsISupports* aSecuritySupports,
JSContext *cx);
~AutoPushJSContext();
nsresult ResultOfPush() { return mPushResult; }
private:
nsCOMPtr<nsIJSContextStack> mContextStack;
JSContext* mContext;
JSStackFrame mFrame;
JSFrameRegs mRegs;
nsresult mPushResult;
};
AutoPushJSContext::AutoPushJSContext(nsISupports* aSecuritySupports,
JSContext *cx)
: mContext(cx), mPushResult(NS_OK)
{
nsCOMPtr<nsIJSContextStack> contextStack =
do_GetService("@mozilla.org/js/xpc/ContextStack;1");
JS_BeginRequest(cx);
JSContext* currentCX;
if(contextStack &&
// Don't push if the current context is already on the stack.
(NS_FAILED(contextStack->Peek(&currentCX)) ||
cx != currentCX) )
{
if (NS_SUCCEEDED(contextStack->Push(cx)))
{
// Leave the reference in mContextStack to
// indicate that we need to pop it in our dtor.
mContextStack.swap(contextStack);
}
}
nsCOMPtr<nsIScriptSecurityManager> secMan(
do_GetService(NS_SCRIPTSECURITYMANAGER_CONTRACTID, &mPushResult));
if (NS_FAILED(mPushResult))
return;
nsCOMPtr<nsIPrincipal> principal;
mPushResult = secMan->GetPrincipalFromContext(cx, getter_AddRefs(principal));
if (NS_FAILED(mPushResult))
{
JS_ReportError(cx, "failed to get a principal");
return;
}
// See if JavaScript is enabled for the current window
PRBool jsEnabled = PR_FALSE;
mPushResult = secMan->CanExecuteScripts(cx, principal, &jsEnabled);
if (!jsEnabled)
mPushResult = NS_ERROR_FAILURE;
memset(&mFrame, 0, sizeof(mFrame));
if (NS_SUCCEEDED(mPushResult))
{
// See if there are any scripts on the stack.
// If not, we need to add a dummy frame with a principal.
PRBool hasScript = PR_FALSE;
JSStackFrame* tempFP = cx->fp;
while (tempFP)
{
if (tempFP->script)
{
hasScript = PR_TRUE;
break;
}
tempFP = tempFP->down;
};
if (!hasScript)
{
JSPrincipals* jsprinc;
principal->GetJSPrincipals(cx, &jsprinc);
JSFunction *fun = JS_CompileFunctionForPrincipals(cx, JS_GetGlobalObject(cx),
jsprinc, "anonymous", 0, nsnull,
"", 0, "", 1);
JSPRINCIPALS_DROP(cx, jsprinc);
if (fun)
{
JSScript *script = JS_GetFunctionScript(cx, fun);
mFrame.fun = fun;
mFrame.script = script;
mFrame.callee = JS_GetFunctionObject(fun);
mFrame.scopeChain = JS_GetParent(cx, mFrame.callee);
mFrame.down = cx->fp;
mRegs.pc = script->code + script->length
- JSOP_STOP_LENGTH;
mRegs.sp = NULL;
mFrame.regs = &mRegs;
cx->fp = &mFrame;
}
else
mPushResult = NS_ERROR_OUT_OF_MEMORY;
}
}
}
AutoPushJSContext::~AutoPushJSContext()
{
if (mContextStack)
mContextStack->Pop(nsnull);
if (mFrame.callobj)
js_PutCallObject(mContext, &mFrame);
if (mFrame.argsobj)
js_PutArgsObject(mContext, &mFrame);
JS_ClearPendingException(mContext);
if (mFrame.script)
mContext->fp = mFrame.down;
JS_EndRequest(mContext);
}
// nsILiveconnect methods (which constitute OJI's Java-to-JavaScript API) may
// call back into Java (using the OJI plugin's implementation of the
// nsISecureEnv interface). But these nsISecureEnv methods assume there is
// JavaScript on the stack, and Java code can call nsILiveconnect methods
// "spontaneously" (without any JavaScript on the stack). So the
// nsCLiveconnect methods below (those that implement the nsILiveconnect
// interface) always create an AutoPushJSContext object, which guarantees the
// presence on the JavaScript stack of at least a dummy frame with a principal.
//
// Ordinarily we rely on jsj_enter_js() to tell us which JSContext to pass to
// the AutoPushJSContext constructor, and really only need to create an
// AutoPushJSContext object after jsj_enter_js() has returned. But the first
// time jsj_enter_js() is called we initialize a bunch of Java classes and
// their methods and fields (in jsj.c's init_netscape_java_classes() and
// init_java_VM_reflection()). This involves calling into Java, and thus
// using the plugin's nsISecureEnv methods -- which assume there is JavaScript
// on the stack.
//
// So to deal with this edge case (to make sure jsj_enter_js() behaves
// properly the first time it's called) we need to create an AutoPushJSContext
// object *before* calling jsj_enter_js() -- which requires that we know which
// JSContex to pass to the AutoPushJSContext constructor before the call to
// jsj_enter_js();
//
// That's what this function does -- it tells us which JSContext the call to
// jsj_enter_js() will return (as a result of indirectly calling
// map_jsj_thread_to_js_context_impl() in lcglue.cpp).
static JSContext* JSContextForPluginInstance(nsIPluginInstance* pluginInstance)
{
JSContext* context = NULL;
if (pluginInstance) {
nsCOMPtr<nsIPluginInstancePeer> pluginPeer;
if (NS_SUCCEEDED(pluginInstance->GetPeer(getter_AddRefs(pluginPeer)))) {
nsresult rv;
nsCOMPtr<nsIPluginInstancePeer2> pluginPeer2 = do_QueryInterface(pluginPeer, &rv);
if (NS_SUCCEEDED(rv)) {
pluginPeer2->GetJSContext(&context);
}
}
}
return context;
}
////////////////////////////////////////////////////////////////////////////
// from nsISupports and AggregatedQueryInterface:
// Thes macro expands to the aggregated query interface scheme.
NS_IMPL_AGGREGATED(nsCLiveconnect)
NS_INTERFACE_MAP_BEGIN_AGGREGATED(nsCLiveconnect)
NS_INTERFACE_MAP_ENTRY(nsILiveconnect)
NS_INTERFACE_MAP_END
////////////////////////////////////////////////////////////////////////////
// from nsILiveconnect:
/**
* get member of a Native JSObject for a given name.
*
* @param jEnv - JNIEnv on which the call is being made.
* @param obj - A Native JS Object.
* @param name - Name of a member.
* @param pjobj - return parameter as a java object representing
* the member. If it is a basic data type it is converted to
* a corresponding java type. If it is a NJSObject, then it is
* wrapped up as java wrapper netscape.javascript.JSObject.
*/
NS_METHOD
nsCLiveconnect::GetMember(JNIEnv *jEnv, lcjsobject obj, const jchar *name, jsize length, void* principalsArray[],
int numPrincipals, nsISupports *securitySupports, jobject *pjobj)
{
if(jEnv == NULL || obj == 0)
{
return NS_ERROR_FAILURE;
}
JSJavaThreadState *jsj_env = NULL;
JSObjectHandle *handle = (JSObjectHandle*)obj;
JSObject *js_obj = handle->js_obj;
JSContext *cx = NULL;
jobject member = NULL;
jsval js_val;
int dummy_cost = 0;
JSBool dummy_bool = PR_FALSE;
JSErrorReporter saved_state = NULL;
cx = JSContextForPluginInstance(reinterpret_cast<nsIPluginInstance*>(mJavaClient));
if (!cx)
return NS_ERROR_FAILURE;
AutoPushJSContext autopush(securitySupports, cx);
if (NS_FAILED(autopush.ResultOfPush()))
return NS_ERROR_FAILURE;
jsj_env = jsj_enter_js(jEnv, mJavaClient, NULL, &cx, NULL, &saved_state, principalsArray, numPrincipals, securitySupports);
if (!jsj_env)
return NS_ERROR_FAILURE;
if (!name) {
JS_ReportError(cx, "illegal null member name");
member = NULL;
goto done;
}
if (!JS_GetUCProperty(cx, js_obj, name, length, &js_val))
goto done;
jsj_ConvertJSValueToJavaObject(cx, jEnv, js_val, jsj_get_jlObject_descriptor(cx, jEnv),
&dummy_cost, &member, &dummy_bool);
done:
if (!jsj_exit_js(cx, jsj_env, saved_state))
return NS_ERROR_FAILURE;
*pjobj = member;
return NS_OK;
}
/**
* get member of a Native JSObject for a given index.
*
* @param jEnv - JNIEnv on which the call is being made.
* @param obj - A Native JS Object.
* @param index - Index of a member.
* @param pjobj - return parameter as a java object representing
* the member.
*/
NS_METHOD
nsCLiveconnect::GetSlot(JNIEnv *jEnv, lcjsobject obj, jint slot, void* principalsArray[],
int numPrincipals, nsISupports *securitySupports, jobject *pjobj)
{
if(jEnv == NULL || obj == 0)
{
return NS_ERROR_FAILURE;
}
JSJavaThreadState *jsj_env = NULL;
JSObjectHandle *handle = (JSObjectHandle*)obj;
JSObject *js_obj = handle->js_obj;
JSContext *cx = NULL;
jobject member = NULL;
jsval js_val;
int dummy_cost = 0;
JSBool dummy_bool = PR_FALSE;
JSErrorReporter saved_state = NULL;
cx = JSContextForPluginInstance(reinterpret_cast<nsIPluginInstance*>(mJavaClient));
if (!cx)
return NS_ERROR_FAILURE;
AutoPushJSContext autopush(securitySupports, cx);
if (NS_FAILED(autopush.ResultOfPush()))
return NS_ERROR_FAILURE;
jsj_env = jsj_enter_js(jEnv, mJavaClient, NULL, &cx, NULL, &saved_state, principalsArray, numPrincipals, securitySupports);
if (!jsj_env)
return NS_ERROR_FAILURE;
// =-= sudu: check to see if slot can be passed in as is.
// Should it be converted to a jsint?
if (!JS_GetElement(cx, js_obj, slot, &js_val))
goto done;
if (!jsj_ConvertJSValueToJavaObject(cx, jEnv, js_val, jsj_get_jlObject_descriptor(cx, jEnv),
&dummy_cost, &member, &dummy_bool))
goto done;
done:
if (!jsj_exit_js(cx, jsj_env, saved_state))
return NS_ERROR_FAILURE;
*pjobj = member;
return NS_OK;
}
/**
* set member of a Native JSObject for a given name.
*
* @param jEnv - JNIEnv on which the call is being made.
* @param obj - A Native JS Object.
* @param name - Name of a member.
* @param jobj - Value to set. If this is a basic data type, it is converted
* using standard JNI calls but if it is a wrapper to a JSObject
* then a internal mapping is consulted to convert to a NJSObject.
*/
NS_METHOD
nsCLiveconnect::SetMember(JNIEnv *jEnv, lcjsobject obj, const jchar *name, jsize length, jobject java_obj, void* principalsArray[],
int numPrincipals, nsISupports *securitySupports)
{
if(jEnv == NULL || obj == 0)
{
return NS_ERROR_FAILURE;
}
JSJavaThreadState *jsj_env = NULL;
JSObjectHandle *handle = (JSObjectHandle*)obj;
JSObject *js_obj = handle->js_obj;
JSContext *cx = NULL;
jsval js_val;
JSErrorReporter saved_state = NULL;
cx = JSContextForPluginInstance(reinterpret_cast<nsIPluginInstance*>(mJavaClient));
if (!cx)
return NS_ERROR_FAILURE;
AutoPushJSContext autopush(securitySupports, cx);
if (NS_FAILED(autopush.ResultOfPush()))
return NS_ERROR_FAILURE;
jsj_env = jsj_enter_js(jEnv, mJavaClient, NULL, &cx, NULL, &saved_state, principalsArray, numPrincipals, securitySupports);
if (!jsj_env)
return NS_ERROR_FAILURE;
if (!name) {
JS_ReportError(cx, "illegal null member name");
goto done;
}
if (!jsj_ConvertJavaObjectToJSValue(cx, jEnv, java_obj, &js_val))
goto done;
JS_SetUCProperty(cx, js_obj, name, length, &js_val);
done:
jsj_exit_js(cx, jsj_env, saved_state);
return NS_OK;
}
/**
* set member of a Native JSObject for a given index.
*
* @param jEnv - JNIEnv on which the call is being made.
* @param obj - A Native JS Object.
* @param index - Index of a member.
* @param jobj - Value to set. If this is a basic data type, it is converted
* using standard JNI calls but if it is a wrapper to a JSObject
* then a internal mapping is consulted to convert to a NJSObject.
*/
NS_METHOD
nsCLiveconnect::SetSlot(JNIEnv *jEnv, lcjsobject obj, jint slot, jobject java_obj, void* principalsArray[],
int numPrincipals, nsISupports *securitySupports)
{
if(jEnv == NULL || obj == 0)
{
return NS_ERROR_FAILURE;
}
JSJavaThreadState *jsj_env = NULL;
JSObjectHandle *handle = (JSObjectHandle*)obj;
JSObject *js_obj = handle->js_obj;
JSContext *cx = NULL;
jsval js_val;
JSErrorReporter saved_state = NULL;
cx = JSContextForPluginInstance(reinterpret_cast<nsIPluginInstance*>(mJavaClient));
if (!cx)
return NS_ERROR_FAILURE;
AutoPushJSContext autopush(securitySupports, cx);
if (NS_FAILED(autopush.ResultOfPush()))
return NS_ERROR_FAILURE;
jsj_env = jsj_enter_js(jEnv, mJavaClient, NULL, &cx, NULL, &saved_state, principalsArray, numPrincipals, securitySupports);
if (!jsj_env)
return NS_ERROR_FAILURE;
if (!jsj_ConvertJavaObjectToJSValue(cx, jEnv, java_obj, &js_val))
goto done;
JS_SetElement(cx, js_obj, slot, &js_val);
done:
jsj_exit_js(cx, jsj_env, saved_state);
return NS_OK;
}
/**
* remove member of a Native JSObject for a given name.
*
* @param jEnv - JNIEnv on which the call is being made.
* @param obj - A Native JS Object.
* @param name - Name of a member.
*/
NS_METHOD
nsCLiveconnect::RemoveMember(JNIEnv *jEnv, lcjsobject obj, const jchar *name, jsize length, void* principalsArray[],
int numPrincipals, nsISupports *securitySupports)
{
if(jEnv == NULL || obj == 0)
{
return NS_ERROR_FAILURE;
}
JSJavaThreadState *jsj_env = NULL;
JSObjectHandle *handle = (JSObjectHandle*)obj;
JSObject *js_obj = handle->js_obj;
JSContext *cx = NULL;
jsval js_val;
JSErrorReporter saved_state = NULL;
cx = JSContextForPluginInstance(reinterpret_cast<nsIPluginInstance*>(mJavaClient));
if (!cx)
return NS_ERROR_FAILURE;
AutoPushJSContext autopush(securitySupports, cx);
if (NS_FAILED(autopush.ResultOfPush()))
return NS_ERROR_FAILURE;
jsj_env = jsj_enter_js(jEnv, mJavaClient, NULL, &cx, NULL, &saved_state, principalsArray, numPrincipals, securitySupports);
if (!jsj_env)
return NS_ERROR_FAILURE;
if (!name) {
JS_ReportError(cx, "illegal null member name");
goto done;
}
JS_DeleteUCProperty2(cx, js_obj, name, length, &js_val);
done:
jsj_exit_js(cx, jsj_env, saved_state);
return NS_OK;
}
/**
* call a method of Native JSObject.
*
* @param jEnv - JNIEnv on which the call is being made.
* @param obj - A Native JS Object.
* @param name - Name of a method.
* @param jobjArr - Array of jobjects representing parameters of method being caled.
* @param pjobj - return value.
*/
NS_METHOD
nsCLiveconnect::Call(JNIEnv *jEnv, lcjsobject obj, const jchar *name, jsize length, jobjectArray java_args, void* principalsArray[],
int numPrincipals, nsISupports *securitySupports, jobject *pjobj)
{
if(jEnv == NULL || obj == 0)
{
return NS_ERROR_FAILURE;
}
int i = 0;
int argc = 0;
int arg_num = 0;
jsval *argv = 0;
JSJavaThreadState *jsj_env = NULL;
JSObjectHandle *handle = (JSObjectHandle*)obj;
JSObject *js_obj = handle->js_obj;
JSContext *cx = NULL;
jsval js_val;
jsval function_val = 0;
int dummy_cost = 0;
JSBool dummy_bool = PR_FALSE;
JSErrorReporter saved_state = NULL;
jobject result = NULL;
cx = JSContextForPluginInstance(reinterpret_cast<nsIPluginInstance*>(mJavaClient));
if (!cx)
return NS_ERROR_FAILURE;
AutoPushJSContext autopush(securitySupports, cx);
if (NS_FAILED(autopush.ResultOfPush()))
return NS_ERROR_FAILURE;
jsj_env = jsj_enter_js(jEnv, mJavaClient, NULL, &cx, NULL, &saved_state, principalsArray, numPrincipals, securitySupports);
if (!jsj_env)
return NS_ERROR_FAILURE;
result = NULL;
if (!name) {
JS_ReportError(cx, "illegal null JavaScript function name");
goto done;
}
/* Allocate space for JS arguments */
argc = java_args ? jEnv->GetArrayLength(java_args) : 0;
if (argc) {
argv = (jsval*)JS_malloc(cx, argc * sizeof(jsval));
if (!argv)
goto done;
} else {
argv = 0;
}
/* Convert arguments from Java to JS values */
for (arg_num = 0; arg_num < argc; arg_num++) {
jobject arg = jEnv->GetObjectArrayElement(java_args, arg_num);
JSBool ret = jsj_ConvertJavaObjectToJSValue(cx, jEnv, arg, &argv[arg_num]);
jEnv->DeleteLocalRef(arg);
if (!ret)
goto cleanup_argv;
JS_AddRoot(cx, &argv[arg_num]);
}
if (!JS_GetUCProperty(cx, js_obj, name, length, &function_val))
goto cleanup_argv;
if (!JS_CallFunctionValue(cx, js_obj, function_val, argc, argv, &js_val))
goto cleanup_argv;
jsj_ConvertJSValueToJavaObject(cx, jEnv, js_val, jsj_get_jlObject_descriptor(cx, jEnv),
&dummy_cost, &result, &dummy_bool);
cleanup_argv:
if (argv) {
for (i = 0; i < arg_num; i++)
JS_RemoveRoot(cx, &argv[i]);
JS_free(cx, argv);
}
done:
if (!jsj_exit_js(cx, jsj_env, saved_state))
return NS_ERROR_FAILURE;
*pjobj = result;
return NS_OK;
}
NS_METHOD
nsCLiveconnect::Eval(JNIEnv *jEnv, lcjsobject obj, const jchar *script, jsize length, void* principalsArray[],
int numPrincipals, nsISupports *securitySupports, jobject *pjobj)
{
if(jEnv == NULL || obj == 0)
{
return NS_ERROR_FAILURE;
}
JSJavaThreadState *jsj_env = NULL;
JSObjectHandle *handle = (JSObjectHandle*)obj;
JSObject *js_obj = handle->js_obj;
JSContext *cx = NULL;
jsval js_val;
int dummy_cost = 0;
JSBool dummy_bool = PR_FALSE;
JSErrorReporter saved_state = NULL;
jobject result = NULL;
const char *codebase = NULL;
JSPrincipals *principals = NULL;
JSBool eval_succeeded = PR_FALSE;
cx = JSContextForPluginInstance(reinterpret_cast<nsIPluginInstance*>(mJavaClient));
if (!cx)
return NS_ERROR_FAILURE;
AutoPushJSContext autopush(securitySupports, cx);
if (NS_FAILED(autopush.ResultOfPush()))
return NS_ERROR_FAILURE;
jsj_env = jsj_enter_js(jEnv, mJavaClient, NULL, &cx, NULL, &saved_state, principalsArray, numPrincipals, securitySupports);
if (!jsj_env)
return NS_ERROR_FAILURE;
result = NULL;
if (!script) {
JS_ReportError(cx, "illegal null string eval argument");
goto done;
}
/* Set up security stuff */
if (JSJ_callbacks && JSJ_callbacks->get_JSPrincipals_from_java_caller)
principals = JSJ_callbacks->get_JSPrincipals_from_java_caller(jEnv, cx, principalsArray, numPrincipals, securitySupports);
codebase = principals ? principals->codebase : NULL;
/* Have the JS engine evaluate the unicode string */
eval_succeeded = JS_EvaluateUCScriptForPrincipals(cx, js_obj, principals,
script, length,
codebase, 0, &js_val);
if (!eval_succeeded)
goto done;
/* Convert result to a subclass of java.lang.Object */
jsj_ConvertJSValueToJavaObject(cx, jEnv, js_val, jsj_get_jlObject_descriptor(cx, jEnv),
&dummy_cost, &result, &dummy_bool);
done:
if (principals)
JSPRINCIPALS_DROP(cx, principals);
if (!jsj_exit_js(cx, jsj_env, saved_state))
return NS_ERROR_FAILURE;
*pjobj = result;
return NS_OK;
}
/**
* Get the window object for a plugin instance.
*
* @param jEnv - JNIEnv on which the call is being made.
* @param pJavaObject - Either a jobject or a pointer to a plugin instance
* representing the java object.
* @param pjobj - return value. This is a native js object
* representing the window object of a frame
* in which a applet/bean resides.
*/
NS_METHOD
nsCLiveconnect::GetWindow(JNIEnv *jEnv, void *pJavaObject, void* principalsArray[],
int numPrincipals, nsISupports *securitySupports, lcjsobject *pobj)
{
if(jEnv == NULL || JSJ_callbacks == NULL)
{
return NS_ERROR_FAILURE;
}
// associate this Java client with this LiveConnect connection.
mJavaClient = pJavaObject;
char *err_msg = NULL;
JSContext *cx = NULL;
JSObject *js_obj = NULL;
JSErrorReporter saved_state = NULL;
JSJavaThreadState *jsj_env = NULL;
JSObjectHandle *handle = NULL;
cx = JSContextForPluginInstance(reinterpret_cast<nsIPluginInstance*>(mJavaClient));
if (!cx)
return NS_ERROR_FAILURE;
AutoPushJSContext autopush(securitySupports, cx);
if (NS_FAILED(autopush.ResultOfPush()))
return NS_ERROR_FAILURE;
jsj_env = jsj_enter_js(jEnv, mJavaClient, NULL, &cx, NULL, &saved_state, principalsArray, numPrincipals, securitySupports);
if (!jsj_env)
return NS_ERROR_FAILURE;
err_msg = NULL;
js_obj = JSJ_callbacks->map_java_object_to_js_object(jEnv, mJavaClient, &err_msg);
if (!js_obj) {
if (err_msg) {
JS_ReportError(cx, err_msg);
free(err_msg);
}
goto done;
}
#ifdef PRESERVE_JSOBJECT_IDENTITY
*pobj = (jint)js_obj;
#else
/* FIXME: to handle PRESERVE_JSOBJECT_IDENTITY case, this needs to
just return a raw JSObject reference. FIXME !!! */
/* Create a tiny stub object to act as the GC root that points to the
JSObject from its netscape.javascript.JSObject counterpart. */
handle = (JSObjectHandle*)JS_malloc(cx, sizeof(JSObjectHandle));
if (handle != NULL)
{
handle->js_obj = js_obj;
handle->rt = JS_GetRuntime(cx);
}
*pobj = (lcjsobject)handle;
/* FIXME: what if the window is explicitly disposed of, how do we
notify Java? */
#endif
done:
if (!jsj_exit_js(cx, jsj_env, saved_state))
return NS_ERROR_FAILURE;
return NS_OK;
}
/**
* Get the window object for a plugin instance.
*
* @param jEnv - JNIEnv on which the call is being made.
* @param obj - A Native JS Object.
*/
NS_METHOD
nsCLiveconnect::FinalizeJSObject(JNIEnv *jEnv, lcjsobject obj)
{
if(jEnv == NULL || obj == 0)
{
return NS_ERROR_FAILURE;
}
JSObjectHandle *handle = (JSObjectHandle *)obj;
if (!handle)
return NS_ERROR_NULL_POINTER;
JS_RemoveRootRT(handle->rt, &handle->js_obj);
free(handle);
return NS_OK;
}
NS_METHOD
nsCLiveconnect::ToString(JNIEnv *jEnv, lcjsobject obj, jstring *pjstring)
{
if(jEnv == NULL || obj == 0)
{
return NS_ERROR_FAILURE;
}
JSJavaThreadState *jsj_env = NULL;
JSObjectHandle *handle = (JSObjectHandle*)obj;
JSObject *js_obj = handle->js_obj;
JSContext *cx = NULL;
JSErrorReporter saved_state = NULL;
jstring result = NULL;
JSString *jsstr = NULL;
cx = JSContextForPluginInstance(reinterpret_cast<nsIPluginInstance*>(mJavaClient));
if (!cx)
return NS_ERROR_FAILURE;
AutoPushJSContext autopush(nsnull, cx);
if (NS_FAILED(autopush.ResultOfPush()))
return NS_ERROR_FAILURE;
jsj_env = jsj_enter_js(jEnv, mJavaClient, NULL, &cx, NULL, &saved_state, NULL, 0, NULL );
if (!jsj_env)
return NS_ERROR_FAILURE;
result = NULL;
jsstr = JS_ValueToString(cx, OBJECT_TO_JSVAL(js_obj));
if (jsstr)
result = jsj_ConvertJSStringToJavaString(cx, jEnv, jsstr);
if (!result)
result = jEnv->NewStringUTF("*JavaObject*");
if (!jsj_exit_js(cx, jsj_env, saved_state))
return NS_ERROR_FAILURE;
*pjstring = result;
return NS_OK;
}
////////////////////////////////////////////////////////////////////////////
// from nsCLiveconnect:
nsCLiveconnect::nsCLiveconnect(nsISupports *aOuter)
: mJavaClient(NULL)
{
NS_INIT_AGGREGATED(aOuter);
#ifdef PRESERVE_JSOBJECT_IDENTITY
jsj_init_js_obj_reflections_table();
#endif
}
nsCLiveconnect::~nsCLiveconnect()
{
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,248 @@
#
### hostname: bl-bldlnx03.office.mozilla.org
### uname: Linux bl-bldlnx03.office.mozilla.org 2.6.18-1.2798.fc6 #1 SMP Mon Oct 16 14:54:20 EDT 2006 i686 i686 i386 GNU/Linux
##
#
#- tinder-config.pl - Tinderbox configuration file.
#- Uncomment the variables you need to set.
#- The default values are the same as the commented variables.
# $ENV{XPCOM_CC_DO_NOTHING}
#-----------------------------------------------------------------------------
# Default: 0
# Values: 0 | 1
# Purpose: Turn graydon's cycle collector on/off
#$ENV{XPCOM_CC_DO_NOTHING} = 0;
# $ENV{MOZ_PACKAGE_MSI}
#-----------------------------------------------------------------------------
# Default: 0
# Values: 0 | 1
# Purpose: Controls whether a MSI package is made.
# Requires: Windows and a local MakeMSI installation.
#$ENV{MOZ_PACKAGE_MSI} = 0;
# $ENV{MOZ_SYMBOLS_TRANSFER_TYPE}
#-----------------------------------------------------------------------------
# Default: scp
# Values: scp | rsync
# Purpose: Use scp or rsync to transfer symbols to the Talkback server.
# Requires: The selected type requires the command be available both locally
# and on the Talkback server.
#$ENV{MOZ_SYMBOLS_TRANSFER_TYPE} = "scp";
#- PLEASE FILL THIS IN WITH YOUR PROPER EMAIL ADDRESS
#$BuildAdministrator = "$ENV{USER}\@$ENV{HOST}";
#$BuildAdministrator = ($ENV{USER} || "cltbld") . "\@" . ($ENV{HOST} || "dhcp");
#- You'll need to change these to suit your machine's needs
#$DisplayServer = ':0.0';
#- Default values of command-line opts
#-
#$BuildDepend = 1; # Depend or Clobber
#$BuildDebug = 0; # Debug or Opt (Darwin)
#$ReportStatus = 1; # Send results to server, or not
#$ReportFinalStatus = 1; # Finer control over $ReportStatus.
#$UseTimeStamp = 1; # Use the CVS 'pull-by-timestamp' option, or not
#$BuildOnce = 0; # Build once, don't send results to server
$TestOnly = 1; # Only run tests, don't pull/build
#$BuildEmbed = 0; # After building seamonkey, go build embed app.
#$SkipMozilla = 0; # Use to debug post-mozilla.pl scripts.
#$SkipCheckout = 0; # Use to debug build process without checking out new source.
#$BuildLocales = 0; # Do l10n packaging?
# Tests
$CleanProfile = 1;
#$ResetHomeDirForTests = 1;
#$ProductName = "Mozilla";
$VendorName = 'mozilla';
#$RunMozillaTests = 1; # Allow turning off of all tests if needed.
$RegxpcomTest = 1;
$AliveTest = 1;
#$JavaTest = 0;
#$ViewerTest = 0;
#$BloatTest = 0; # warren memory bloat test
#$BloatTest2 = 0; # dbaron memory bloat test, require tracemalloc
#$DomToTextConversionTest = 0;
#$XpcomGlueTest = 0;
$CodesizeTest = 0; # Z, require mozilla/tools/codesighs
$EmbedCodesizeTest = 0; # mZ, require mozilla/tools/codesigns
#$MailBloatTest = 0;
#$EmbedTest = 0; # Assumes you wanted $BuildEmbed=1
$LayoutPerformanceTest = 1; # Tp
$LayoutPerformanceLocalTest = 1; # Tp
$DHTMLPerformanceTest = 1; # Tdhtml
#$QATest = 0;
$XULWindowOpenTest = 1; # Txul
$StartupPerformanceTest = 1; # Ts
$TestsPhoneHome = 1; # Should test report back to server?
$TestOnlyTinderbox = 1;
$DownloadBuildFile = 'firefox-3.0a7pre.en-US.linux-i686.tar.bz2';
$DownloadBuildURL = 'http://stage.mozilla.org/pub/mozilla.org/firefox/tinderbox-builds/fx-linux-tbox-trunk';
$DownloadBuildDir = 'firefox';
# If TestOnlyTinderbox is enabled, fetch the latest build info from tinderbox in a
# parseable format
$TinderboxServerURL = 'http://tinderbox.mozilla.org/showbuilds.cgi?tree=Firefox&quickparse=1';
$MatchBuildname = 'Linux fx-linux-tbox Depend Nightly';
$GraphNameOverride = "bl-bldlnx03_fx-linux-tbox-HEAD"; # Override name built from ::hostname() and $BuildTag
# $results_server
#----------------------------------------------------------------------------
# Server on which test results will be accessible. This was originally tegu,
# then became axolotl. Once we moved services from axolotl, it was time
# to give this service its own hostname to make future transitions easier.
# - cmp@mozilla.org
#$results_server = "build-graphs.mozilla.org";
$pageload_server = "spider.office.mozilla.org";
#
# Timeouts, values are in seconds.
#
#$CVSCheckoutTimeout = 3600;
#$CreateProfileTimeout = 45;
#$RegxpcomTestTimeout = 120;
$AliveTestTimeout = 5;
#$ViewerTestTimeout = 45;
#$EmbedTestTimeout = 45;
#$BloatTestTimeout = 120; # seconds
#$MailBloatTestTimeout = 120; # seconds
#$JavaTestTimeout = 45;
#$DomTestTimeout = 45; # seconds
#$XpcomGlueTestTimeout = 15;
#$CodesizeTestTimeout = 900; # seconds
#$CodesizeTestType = "auto"; # {"auto"|"base"}
#$LayoutPerformanceTestTimeout = 1200; # entire test, seconds
#$LayoutPerformanceLocalTestTimeout = 1200; # entire test, seconds
#$DHTMLPerformanceTestTimeout = 1200; # entire test, seconds
#$QATestTimeout = 1200; # entire test, seconds
#$LayoutPerformanceTestPageTimeout = 30000; # each page, ms
#$StartupPerformanceTestTimeout = 15; # seconds
#$XULWindowOpenTestTimeout = 150; # seconds
#$MozConfigFileName = 'mozconfig';
#$UseMozillaProfile = 1;
#$MozProfileName = 'default';
#- Set these to what makes sense for your system
#$Make = 'gmake'; # Must be GNU make
#$MakeOverrides = '';
#$mail = '/bin/mail';
#$CVS = 'cvs -q';
#$CVSCO = 'checkout -P';
# win32 usually doesn't have /bin/mail
#$blat = 'c:/nstools/bin/blat';
#$use_blat = 0;
# Set moz_cvsroot to something like:
# :pserver:$ENV{USER}%netscape.com\@cvs.mozilla.org:/cvsroot
# :pserver:anonymous\@cvs-mirror.mozilla.org:/cvsroot
#
# Note that win32 may not need \@, depends on ' or ".
# :pserver:$ENV{USER}%netscape.com@cvs.mozilla.org:/cvsroot
#$moz_cvsroot = $ENV{CVSROOT};
#- Set these proper values for your tinderbox server
#$Tinderbox_server = 'tinderbox-daemon@tinderbox.mozilla.org';
# Allow for non-client builds, e.g. camino.
#$moz_client_mk = 'client.mk';
#- Set if you want to build in a separate object tree
#$ObjDir = '';
# Extra build name, if needed.
$BuildNameExtra = "fx-linux-tbox perf test";
# User comment, eg. ip address for dhcp builds.
# ex: $UserComment = "ip = 208.12.36.108";
#$UserComment = 0;
#-
#- The rest should not need to be changed
#-
#- Minimum wait period from start of build to start of next build in minutes.
$BuildSleep = 1;
#- Until you get the script working. When it works,
#- change to the tree you're actually building
$BuildTree = 'MozillaExperimental';
$BuildTag = 'HEAD';
#$BuildConfigDir = 'mozilla/config';
#$Topsrcdir = 'mozilla';
$BinaryName = 'firefox-bin';
#
# For embedding app, use:
#$EmbedBinaryName = 'TestGtkEmbed';
#$EmbedDistDir = 'dist/bin'
#$ShellOverride = ''; # Only used if the default shell is too stupid
#$ConfigureArgs = '';
#$ConfigureEnvArgs = '';
#$Compiler = 'gcc';
#$NSPRArgs = '';
#$ShellOverride = '';
# Release build options
#$ReleaseBuild = 1;
#$clean_objdir = 1; # remove objdir when starting release cycle?
#$clean_srcdir = 1; # remove srcdir when starting release cycle?
#$shiptalkback = 1;
#$ReleaseToLatest = 1; # Push the release to latest-<milestone>?
#$ReleaseToDated = 1; # Push the release to YYYY-MM-DD-HH-<milestone>?
#$ReleaseGroup = ''; # group to set uploaded files to
#$build_hour = "8";
#$package_creation_path = "/xpinstall/packager";
# needs setting for mac + talkback: $mac_bundle_path = "/browser/app";
#$ssh_version = "2";
#$ssh_user = "cltbld";
#$ssh_server = "stage.mozilla.org";
#$ftp_path = "/home/ftp/pub/mozilla/nightly/experimental";
#$url_path = "http://ftp.mozilla.org/pub/mozilla.org/mozilla/nightly/experimental";
#$tbox_ftp_path = $ftp_path;
#$tbox_url_path = $url_path;
#$milestone = "trunk";
#$notify_list = "cmp\@mozilla.org";
#$stub_installer = 1;
#$sea_installer = 1;
#$archive = 0;
#$push_raw_xpis = 1;
# Reboot the OS at the end of build-and-test cycle. This is primarily
# intended for Win9x, which can't last more than a few cycles before
# locking up (and testing would be suspect even after a couple of cycles).
# Right now, there is only code to force the reboot for Win9x, so even
# setting this to 1, will not have an effect on other platforms. Setting
# up win9x to automatically logon and begin running tinderbox is left
# as an exercise to the reader.
#$RebootSystem = 0;
# LogCompression specifies the type of compression used on the log file.
# Valid options are 'gzip', and 'bzip2'. Please make sure the binaries
# for 'gzip' or 'bzip2' are in the user's path before setting this
# option.
#$LogCompression = '';
# LogEncoding specifies the encoding format used for the logs. Valid
# options are 'base64', and 'uuencode'. If $LogCompression is set above,
# this needs to be set to 'base64' or 'uuencode' to ensure that the
# binary data is transferred properly.
#$LogEncoding = '';
# Prevent Extension Manager from spawning child processes during tests
# - processes that tbox scripts cannot kill.
#$ENV{NO_EM_RESTART} = '1';

View File

@@ -0,0 +1,250 @@
#
#### hostname: bl-bldxp01.office.mozilla.org
#### uname: CYGWIN_NT-5.1 bl-bldxp01 1.5.19(0.150/4/2) 2006-01-20 13:28 i686 Cygwin
###
#
#- tinder-config.pl - Tinderbox configuration file.
#- Uncomment the variables you need to set.
#- The default values are the same as the commented variables.
# $ENV{XPCOM_CC_DO_NOTHING}
#-----------------------------------------------------------------------------
# Default: 0
# Values: 0 | 1
# Purpose: Turn graydon's cycle collector on/off
#$ENV{XPCOM_CC_DO_NOTHING} = 0;
# $ENV{MOZ_PACKAGE_MSI}
#-----------------------------------------------------------------------------
# Default: 0
# Values: 0 | 1
# Purpose: Controls whether a MSI package is made.
# Requires: Windows and a local MakeMSI installation.
#$ENV{MOZ_PACKAGE_MSI} = 0;
# $ENV{MOZ_SYMBOLS_TRANSFER_TYPE}
#-----------------------------------------------------------------------------
# Default: scp
# Values: scp | rsync
# Purpose: Use scp or rsync to transfer symbols to the Talkback server.
# Requires: The selected type requires the command be available both locally
# and on the Talkback server.
#$ENV{MOZ_SYMBOLS_TRANSFER_TYPE} = "scp";
#- PLEASE FILL THIS IN WITH YOUR PROPER EMAIL ADDRESS
#$BuildAdministrator = "$ENV{USER}\@$ENV{HOST}";
#$BuildAdministrator = ($ENV{USER} || "cltbld") . "\@" . ($ENV{HOST} || "dhcp");
#- You'll need to change these to suit your machine's needs
#$DisplayServer = ':0.0';
#- Default values of command-line opts
#-
#$BuildDepend = 1; # Depend or Clobber
#$BuildDebug = 0; # Debug or Opt (Darwin)
#$ReportStatus = 1; # Send results to server, or not
#$ReportFinalStatus = 1; # Finer control over $ReportStatus.
#$UseTimeStamp = 1; # Use the CVS 'pull-by-timestamp' option, or not
#$BuildOnce = 0; # Build once, don't send results to server
$TestOnly = 1; # Only run tests, don't pull/build
#$BuildEmbed = 0; # After building seamonkey, go build embed app.
#$SkipMozilla = 0; # Use to debug post-mozilla.pl scripts.
#$SkipCheckout = 0; # Use to debug build process without checking out new source.
#$BuildLocales = 0; # Do l10n packaging?
# Tests
$CleanProfile = 1;
#$ResetHomeDirForTests = 1;
#$ProductName = "Mozilla";
$VendorName = 'mozilla';
#$RunMozillaTests = 1; # Allow turning off of all tests if needed.
$RegxpcomTest = 0;
$AliveTest = 1;
#$JavaTest = 0;
#$ViewerTest = 0;
#$BloatTest = 0; # warren memory bloat test
#$BloatTest2 = 0; # dbaron memory bloat test, require tracemalloc
#$DomToTextConversionTest = 0;
#$XpcomGlueTest = 0;
$CodesizeTest = 0; # Z, require mozilla/tools/codesighs
$EmbedCodesizeTest = 0; # mZ, require mozilla/tools/codesigns
#$MailBloatTest = 0;
#$EmbedTest = 0; # Assumes you wanted $BuildEmbed=1
$LayoutPerformanceTest = 1; # Tp
$LayoutPerformanceLocalTest = 1; # Tp2
$DHTMLPerformanceTest = 1; # Tdhtml
#$QATest = 0;
$XULWindowOpenTest = 1; # Txul
$StartupPerformanceTest = 1; # Ts
$TestsPhoneHome = 1; # Should test report back to server?
# If TestOnlyTinderbox is enabled, fetch the latest build info from tinderbox in a
# parseable format
$TinderboxServerURL = 'http://tinderbox.mozilla.org/showbuilds.cgi?tree=MozillaExperimental&quickparse=1';
$MatchBuildname = 'WINNT 5.2 fxnewref-win32- Depend Fx-Newref';
#$GraphNameOverride = 'Fx-Trunk-win32-test1'; # Override name built from ::hostname() and $BuildTag
# $results_server
#----------------------------------------------------------------------------
# Server on which test results will be accessible. This was originally tegu,
# then became axolotl. Once we moved services from axolotl, it was time
# to give this service its own hostname to make future transitions easier.
# - cmp@mozilla.org
#$results_server = "build-graphs.mozilla.org";
$pageload_server = "spider.office.mozilla.org";
#
# Timeouts, values are in seconds.
#
#$CVSCheckoutTimeout = 3600;
#$CreateProfileTimeout = 45;
#$RegxpcomTestTimeout = 120;
$AliveTestTimeout = 45;
#$ViewerTestTimeout = 45;
#$EmbedTestTimeout = 45;
#$BloatTestTimeout = 120; # seconds
#$MailBloatTestTimeout = 120; # seconds
#$JavaTestTimeout = 45;
#$DomTestTimeout = 45; # seconds
#$XpcomGlueTestTimeout = 15;
#$CodesizeTestTimeout = 900; # seconds
#$CodesizeTestType = "auto"; # {"auto"|"base"}
#$LayoutPerformanceTestTimeout = 1200; # entire test, seconds
#$LayoutPerformanceLocalTestTimeout = 1200; # entire test, seconds
#$DHTMLPerformanceTestTimeout = 1200; # entire test, seconds
#$QATestTimeout = 1200; # entire test, seconds
#$LayoutPerformanceTestPageTimeout = 30000; # each page, ms
#$StartupPerformanceTestTimeout = 15; # seconds
#$XULWindowOpenTestTimeout = 150; # seconds
#$MozConfigFileName = 'mozconfig';
#$UseMozillaProfile = 1;
#$MozProfileName = 'default';
#- Set these to what makes sense for your system
#$Make = 'gmake'; # Must be GNU make
#$MakeOverrides = '';
#$mail = '/bin/mail';
#$CVS = 'cvs -q';
#$CVSCO = 'checkout -P';
# win32 usually doesn't have /bin/mail
#$blat = 'c:/nstools/bin/blat';
#$use_blat = 0;
# Set moz_cvsroot to something like:
# :pserver:$ENV{USER}%netscape.com\@cvs.mozilla.org:/cvsroot
# :pserver:anonymous\@cvs-mirror.mozilla.org:/cvsroot
#
# Note that win32 may not need \@, depends on ' or ".
# :pserver:$ENV{USER}%netscape.com@cvs.mozilla.org:/cvsroot
#$moz_cvsroot = $ENV{CVSROOT};
#- Set these proper values for your tinderbox server
#$Tinderbox_server = 'tinderbox-daemon@tinderbox.mozilla.org';
# Allow for non-client builds, e.g. camino.
#$moz_client_mk = 'client.mk';
#- Set if you want to build in a separate object tree
#$ObjDir = '';
# Extra build name, if needed.
$BuildNameExtra = 'fxnewref-win32-tbox perf test';
# User comment, eg. ip address for dhcp builds.
# ex: $UserComment = "ip = 208.12.36.108";
#$UserComment = 0;
#-
#- The rest should not need to be changed
#-
#- Minimum wait period from start of build to start of next build in minutes.
#$BuildSleep = 10;
#- Until you get the script working. When it works,
#- change to the tree you're actually building
$BuildTree = 'Firefox';
$BuildTag = 'HEAD';
#$BuildConfigDir = 'mozilla/config';
#$Topsrcdir = 'mozilla';
$BinaryName = 'firefox.exe';
#
# For embedding app, use:
#$EmbedBinaryName = 'TestGtkEmbed';
#$EmbedDistDir = 'dist/bin'
#$ShellOverride = ''; # Only used if the default shell is too stupid
#$ConfigureArgs = '';
#$ConfigureEnvArgs = '';
#$Compiler = 'gcc';
#$NSPRArgs = '';
#$ShellOverride = '';
# Release build options
#$ReleaseBuild = 1;
#$clean_objdir = 1; # remove objdir when starting release cycle?
#$clean_srcdir = 1; # remove srcdir when starting release cycle?
#$shiptalkback = 1;
#$ReleaseToLatest = 1; # Push the release to latest-<milestone>?
#$ReleaseToDated = 1; # Push the release to YYYY-MM-DD-HH-<milestone>?
#$ReleaseGroup = ''; # group to set uploaded files to
#$build_hour = "8";
#$package_creation_path = "/xpinstall/packager";
# needs setting for mac + talkback: $mac_bundle_path = "/browser/app";
#$ssh_version = "2";
#$ssh_user = "cltbld";
#$ssh_server = "stage.mozilla.org";
#$ftp_path = "/home/ftp/pub/mozilla/nightly/experimental";
#$url_path = "http://ftp.mozilla.org/pub/mozilla.org/mozilla/nightly/experimental";
#$tbox_ftp_path = $ftp_path;
#$tbox_url_path = $url_path;
#$milestone = "trunk";
#$notify_list = "cmp\@mozilla.org";
#$stub_installer = 1;
#$sea_installer = 1;
#$archive = 0;
#$push_raw_xpis = 1;
# Reboot the OS at the end of build-and-test cycle. This is primarily
# intended for Win9x, which can't last more than a few cycles before
# locking up (and testing would be suspect even after a couple of cycles).
# Right now, there is only code to force the reboot for Win9x, so even
# setting this to 1, will not have an effect on other platforms. Setting
# up win9x to automatically logon and begin running tinderbox is left
# as an exercise to the reader.
#$RebootSystem = 0;
# LogCompression specifies the type of compression used on the log file.
# Valid options are 'gzip', and 'bzip2'. Please make sure the binaries
# for 'gzip' or 'bzip2' are in the user's path before setting this
# option.
#$LogCompression = '';
# LogEncoding specifies the encoding format used for the logs. Valid
# options are 'base64', and 'uuencode'. If $LogCompression is set above,
# this needs to be set to 'base64' or 'uuencode' to ensure that the
# binary data is transferred properly.
#$LogEncoding = '';
# Prevent Extension Manager from spawning child processes during tests
# - processes that tbox scripts cannot kill.
#$ENV{NO_EM_RESTART} = '1';
# If tinderbox is running in a test-only mode, it needs to be able to download
# the latest build and unpack it rather than building it.
$TestOnlyTinderbox = 1;
$DownloadBuildFile = 'firefox-3.0a8pre.en-US.win32.zip';
$DownloadBuildURL = 'http://stage.mozilla.org/pub/mozilla.org/firefox/nightly/experimental/win32-newref/hourly-builds/latest-trunk';
$DownloadBuildDir = 'firefox';

File diff suppressed because it is too large Load Diff