Commit 30f4c25d by Geoffrey Keating Committed by Geoffrey Keating

widget.html: Mark as HTML 4.01, which it now is, rather than XHTML, which it never was.

	* GCC_Regression_Tester.wdgt/widget.html: Mark as HTML 4.01,
	which it now is, rather than XHTML, which it never was.
	(<head>): Mark as UTF-8.  Add title.  Move CSS to top of
	document, specify type.  Mark script as 'defer'.
	(updateContents): If loaded from HTTP, look for status in same
	place as widget.
	(gotContents): Use DOM methods to change text rather than innerHTML.
	(<body>): Eliminate unnecessary DIV element.
	* GCC_Regression_Tester.wdgt/Info.plist: Update version, copyright
	notice.

From-SVN: r131145
parent 6eddcb0d
2007-12-22 Geoff Keating <geoffk@geoffk.org>
* GCC_Regression_Tester.wdgt/widget.html: Mark as HTML 4.01,
which it now is, rather than XHTML, which it never was.
(<head>): Mark as UTF-8. Add title. Move CSS to top of
document, specify type. Mark script as 'defer'.
(updateContents): If loaded from HTTP, look for status in same
place as widget.
(gotContents): Use DOM methods to change text rather than innerHTML.
(<body>): Eliminate unnecessary DIV element.
* GCC_Regression_Tester.wdgt/Info.plist: Update version, copyright
notice.
2006-09-05 Geoffrey Keating <geoffk@apple.com> 2006-09-05 Geoffrey Keating <geoffk@apple.com>
* btest-gcc.sh: .bad_compare has moved to toplevel from gcc/. * btest-gcc.sh: .bad_compare has moved to toplevel from gcc/.
......
...@@ -11,9 +11,9 @@ ...@@ -11,9 +11,9 @@
<key>CFBundleName</key> <key>CFBundleName</key>
<string>GCC Regr. Tester</string> <string>GCC Regr. Tester</string>
<key>CFBundleShortVersionString</key> <key>CFBundleShortVersionString</key>
<string>1.0.1</string> <string>1.0.2</string>
<key>CFBundleVersion</key> <key>CFBundleVersion</key>
<string>1.0.1</string> <string>1.0.2</string>
<key>CloseBoxInsetX</key> <key>CloseBoxInsetX</key>
<integer>0</integer> <integer>0</integer>
<key>CloseBoxInsetY</key> <key>CloseBoxInsetY</key>
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
<key>MainHTML</key> <key>MainHTML</key>
<string>widget.html</string> <string>widget.html</string>
<key>NSHumanReadableCopyright</key> <key>NSHumanReadableCopyright</key>
<string>Copyright © 2005 Free Software Foundation, Inc.</string> <string>Copyright © 2005, 2007 Free Software Foundation, Inc.</string>
<key>Width</key> <key>Width</key>
<integer>261</integer> <integer>261</integer>
</dict> </dict>
......
<!-- Get and update the GCC regression tester's web page. <!-- Get and update the GCC regression tester's web page.
Copyright (C) 2005 Free Software Foundation, Inc. Copyright (C) 2005, 2007 Free Software Foundation, Inc.
This file is part of GCC. This file is part of GCC.
...@@ -17,15 +17,28 @@ You should have received a copy of the GNU General Public License ...@@ -17,15 +17,28 @@ You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING. If not, write to the Free along with GCC; see the file COPYING. If not, write to the Free
Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA. --> 02110-1301, USA. -->
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
<!DOCTYPE html "http://www.w3.org/TR/html4/strict.dtd">
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<META http-equiv="Content-Script-Type" content="text/javascript">
<head> <head>
<script type='text/javascript'> <meta http-equiv="Content-Script-Type" content="text/javascript">
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<title>Regression Tester Status</title>
<style type='text/css'>
body {
margin: 0px;
padding: 0px;
}
pre {
font-family: Monaco;
font-size: 9px;
margin: 0px;
padding: 1px 2px 1px 2px;
color: black;
background-color: white;
opacity: 0.8;
}
</style>
<script type='text/javascript' defer>
// A string representing NUM, with a leading zero if it would be 1 digit long // A string representing NUM, with a leading zero if it would be 1 digit long
function dig2 (num) function dig2 (num)
{ {
...@@ -64,6 +77,9 @@ function fromISO (str, key) ...@@ -64,6 +77,9 @@ function fromISO (str, key)
// Update the data // Update the data
function updateContents () { function updateContents () {
var url = 'http://gcc.gnu.org/regtest/HEAD/status.txt'; var url = 'http://gcc.gnu.org/regtest/HEAD/status.txt';
if (document.URL && document.URL.substring (0,5) == 'http:') {
url = document.URL.replace ('widget.html','status.txt');
}
var xml_request = new XMLHttpRequest(); var xml_request = new XMLHttpRequest();
xml_request.onload = function(e) xml_request.onload = function(e)
...@@ -82,12 +98,7 @@ function gotContents (event, request) { ...@@ -82,12 +98,7 @@ function gotContents (event, request) {
if (! request.responseText) if (! request.responseText)
return; return;
var txt = (request.responseText var txt = request.responseText;
.replace (/&/g,"&amp;")
.replace (/</g,"&lt;")
.replace (/&quot;/g,"&quot;")
.replace (/>;/g,"&gt;"));
var today = new Date(); var today = new Date();
var date_r = fromISO (txt, "Date"); var date_r = fromISO (txt, "Date");
var completed_r = fromISO (txt, "Test-Completed"); var completed_r = fromISO (txt, "Test-Completed");
...@@ -102,7 +113,9 @@ function gotContents (event, request) { ...@@ -102,7 +113,9 @@ function gotContents (event, request) {
} }
var val = txt + "Now: " + getISO (today) + '\n' + eta; var val = txt + "Now: " + getISO (today) + '\n' + eta;
document.getElementById ("contents").innerHTML = "<pre>"+val+"<\/pre>"; var contEl = document.getElementById ("contents");
contEl.removeChild(contEl.firstChild);
contEl.appendChild (document.createTextNode (val));
} }
var mainTimer = null; var mainTimer = null;
...@@ -132,24 +145,9 @@ function myOnLoad () ...@@ -132,24 +145,9 @@ function myOnLoad ()
myOnShow(); myOnShow();
} }
</script> </script>
<style>
body {
margin: 0px;
padding: 0px;
}
pre {
font-family: Monaco;
font-size: 9px;
margin: 0px;
padding: 1px 2px 1px 2px;
color: black;
background-color: white;
opacity: 0.8;
}
</style>
</head> </head>
<body onLoad='myOnLoad();'> <body onLoad='myOnLoad();'>
<div id="contents">Loading...</div> <pre id="contents">Loading...</pre>
</body> </body>
</html> </html>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment