Skip to content

Commit

Permalink
Merge branch 'release/1.3.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
pmuellr committed Apr 5, 2011
2 parents 9fef782 + 4b39dee commit ec52f52
Show file tree
Hide file tree
Showing 22 changed files with 636 additions and 136 deletions.
2 changes: 1 addition & 1 deletion weinre.build/build.properties
Expand Up @@ -8,7 +8,7 @@
#-----------------------------------------------------------
# weinre version
#-----------------------------------------------------------
WEINRE_VERSION: 1.2.0
WEINRE_VERSION: 1.3.0

#-----------------------------------------------------------
# some common locations used in the ant scripts
Expand Down
4 changes: 3 additions & 1 deletion weinre.build/debug.sh
Expand Up @@ -10,4 +10,6 @@ java \
-Dfile.encoding=UTF-8 \
-classpath $CP \
weinre.server.Main \
--verbose true
--verbose true \
--deathTimeout 120

12 changes: 6 additions & 6 deletions weinre.build/vendor.properties
Expand Up @@ -42,7 +42,7 @@ JSON4J_SRC_URL: ${JSON4J_URL_PREFIX}/${JSON4J_VERSION}/apache-wink-${JSON4J_V
#-----------------------------------------------------------

JETTY_VERSION: 7.1.6.v20100715
JETTY_URL_PREFIX: http://repo1.maven.org/maven2/org/eclipse/jetty
JETTY_URL_PREFIX: https://oss.sonatype.org/content/groups/jetty/org/eclipse/jetty/

JETTY_SRC_JAR_NAME: jetty-all-server-${JETTY_VERSION}-sources.jar
JETTY_SRC_URL: ${JETTY_URL_PREFIX}/aggregate/jetty-all-server/${JETTY_VERSION}/${JETTY_SRC_JAR_NAME}
Expand All @@ -54,20 +54,20 @@ JETTY_BIN_URL: ${JETTY_URL_PREFIX}/aggregate/jetty-all-server/${JET
# location of servlet API
#-----------------------------------------------------------

JAVAX_SERVLET_VERSION: 2.5
JAVAX_SERVLET_VERSION: 2.5-20110124
JAVAX_SERVLET_VERSION_IMPL: 6.1H.8
JAVAX_SERVLET_URL_PREFIX: http://repo1.maven.org/maven2/org/mortbay/jetty
JAVAX_SERVLET_URL_PREFIX: https://oss.sonatype.org/content/groups/jetty/org/mortbay/jetty/servlet-api/

JAVAX_SERVLET_JAR_NAME: servlet-api-${JAVAX_SERVLET_VERSION}-${JAVAX_SERVLET_VERSION_IMPL}.jar
JAVAX_SERVLET_URL: ${JAVAX_SERVLET_URL_PREFIX}/servlet-api-${JAVAX_SERVLET_VERSION}/${JAVAX_SERVLET_VERSION_IMPL}/${JAVAX_SERVLET_JAR_NAME}
JAVAX_SERVLET_JAR_NAME: servlet-api-${JAVAX_SERVLET_VERSION}.jar
JAVAX_SERVLET_URL: ${JAVAX_SERVLET_URL_PREFIX}/${JAVAX_SERVLET_VERSION}/${JAVAX_SERVLET_JAR_NAME}

#-----------------------------------------------------------
# location of Eclipse SWT
#-----------------------------------------------------------

SWT_VERSION_MAJOR: 3.6
SWT_VERSION: ${SWT_VERSION_MAJOR}-201006080911
SWT_URL_PREFIX: http://download.eclipse.org/eclipse/downloads/drops/R-${SWT_VERSION}
SWT_URL_PREFIX: http://archive.eclipse.org/eclipse/downloads/drops/R-${SWT_VERSION}

#-----------------------------------------------------------
# location of scooj
Expand Down
17 changes: 17 additions & 0 deletions weinre.doc/ChangeLog.body.html
Expand Up @@ -5,6 +5,23 @@
* Copyright (c) 2011 IBM Corporation
-->

<!-- ======================================================================= -->
<h2>2011/04/05 - version 1.3.0</h2>
<ul>
<li> style editing now enabled in Elements panel
<li> localStorage and sessionStorage views enabled in Resources panel
<li> URLs to vendor repos updated for the weinre build
<li> check for bad versions of Prototype.js
</ul>

<p>issues closed:
<ul>
<li><a href="https://github.com/pmuellr/weinre/issues/21">issue 21</a> - add support for localStorage
<li><a href="https://github.com/pmuellr/weinre/issues/35">issue 35</a> - testing local files on IOS
<li><a href="https://github.com/pmuellr/weinre/issues/36">issue 36</a> - element.style cannot be edited
<li><a href="https://github.com/pmuellr/weinre/issues/44">issue 44</a> - update vendor repos
</ul>

<!-- ======================================================================= -->
<h2>2011/03/12 - version 1.2.0</h2>
<ul>
Expand Down
29 changes: 17 additions & 12 deletions weinre.doc/Home.body.html
Expand Up @@ -97,32 +97,37 @@
how to use it, visit the <a href="TestDrive.html">Test Drive</a>.

<!-- ======================================================== -->
<h2>Supported Platforms</h2>
<h2>Supported Libraries and Platforms</h2>

<p>Generally version numbers listed here are the earliest
versions of the relevant thing that have been tested.
Later versions of those things are also hopefully supported,
but let us know.

<h3>Libraries not supported</h3>

<ul>
<li>versions of Prototype.js before version 1.7 are not supported,
as they do not support the <tt>JSON.stringify()</tt> API correctly. You
will get an <tt>alert()</tt> in the web page you are debugging if you
attempt to debug it with weinre and you are using an unsupported
version of Prototype.js.
</ul>

<h3>Debug client - the browser where the debugger user interface runs</h3>

<ul>
<li>weinre Mac application - Mac OS X 10.6 64-bit
<li>Google Chrome 8.x beta
<li>Google Chrome 8.x
<li>Apple Safari 5.x
<li>others? please set us know
</ul>

<h3>Debug target - the browser with the page you are debugging</h3>

<ul>
<li>Android 2.3 Browser application
<li>Android 2.3 w/PhoneGap 0.9.2
<li>Android 2.2 Browser application
<li>Android 2.2 w/PhoneGap 0.9.2
<li>iOS 4.2.x Mobile Safari application
<li>BlackBerry v6.x simulator
<li>others? please set us know
</ul>

<h3>Platforms that do not work</h3>

<ul>
<li>others? please set us know
</ul>

1 change: 0 additions & 1 deletion weinre.web/demo/weinre-demo-min.html
Expand Up @@ -14,7 +14,6 @@

<script type="text/javascript">
require("weinre/common/Weinre").showNotImplemented()
require("weinre/target/Target").main()
</script>

<script src="weinre-demo.js"></script>
Expand Down
3 changes: 2 additions & 1 deletion weinre.web/demo/weinre-demo-pieces.html
Expand Up @@ -26,6 +26,7 @@
<script src="/weinre/common/IDGenerator.transportd.js"></script>
<script src="/weinre/target/Console.transportd.js"></script>
<script src="/add-css-properties.js"></script>
<script src="/weinre/target/CheckForProblems.transportd.js"></script>
<script src="/weinre/target/WiConsoleImpl.transportd.js"></script>
<script src="/weinre/target/WiCSSImpl.transportd.js"></script>
<script src="/weinre/target/WiDatabaseImpl.transportd.js"></script>
Expand All @@ -45,7 +46,7 @@

<script type="text/javascript">
require("weinre/common/Weinre").showNotImplemented()
require("weinre/target/Target").main()
require('weinre/target/Target').main()
</script>

<script src="weinre-demo.js"></script>
Expand Down
6 changes: 5 additions & 1 deletion weinre.web/demo/weinre-demo.css
Expand Up @@ -6,7 +6,11 @@
*/

h1 {
color: green;
color: green;
margin: 0.5em;
margin-left: 1.0em;
padding: 0.4em;
padding-left : 0.8em;
}

.blue {
Expand Down
1 change: 0 additions & 1 deletion weinre.web/demo/weinre-demo.html
Expand Up @@ -14,7 +14,6 @@

<script type="text/javascript">
require("weinre/common/Weinre").showNotImplemented()
require("weinre/target/Target").main()
</script>

<script src="weinre-demo.js"></script>
Expand Down
18 changes: 18 additions & 0 deletions weinre.web/demo/weinre-demo.js
Expand Up @@ -11,6 +11,7 @@ var started = false
var buttonStartStuff
var buttonClearOutput
var outputElement
var storageIndex = 0

//------------------------------------------------------------------------------
function onLoad() {
Expand Down Expand Up @@ -40,6 +41,11 @@ function onLoad() {
var interval

function startStuff() {
if (window.localStorage) window.localStorage.clear()
if (window.sessionStorage) window.sessionStorage.clear()

storageIndex = 0

interval = setInterval(intervalStuff, 1000)
}

Expand All @@ -58,6 +64,18 @@ function intervalStuff() {
// add a timeline marker
console.markTimeline(message)

// write to local- and sessionStorage
if (window.localStorage) {
var smessage = message + " (local)"
window.localStorage.setItem( "item-" + storageIndex, smessage)
}

if (window.sessionStorage) {
var smessage = message + " (session)"
window.sessionStorage.setItem("item-" + storageIndex, smessage)
}
storageIndex++

// write the message to the page
output(message)

Expand Down
Expand Up @@ -23,7 +23,8 @@ method localizedStringsURL

//-----------------------------------------------------------------------------
method hiddenPanels
return "audits,profiles,resources,network"
// return "audits,profiles,resources,network"
return "audits,profiles,network"
// return "audits,profiles,resources,scripts,timeline,network"

//-----------------------------------------------------------------------------
Expand Down
Expand Up @@ -54,6 +54,7 @@ method connectionCreated(/*int*/ clientId, /*int*/ targetId)

WebInspector.panels.elements.reset()
WebInspector.panels.timeline._clearPanel()
WebInspector.panels.resources.reset()

//-----------------------------------------------------------------------------
method connectionDestroyed(/*int*/ clientId, /*int*/ targetId)
Expand Down
33 changes: 31 additions & 2 deletions weinre.web/modules/weinre/common/IDGenerator.scoop
Expand Up @@ -12,9 +12,38 @@ class IDGenerator
//-----------------------------------------------------------------------------
init
var nextId = 1
var idName = "__weinre__id"

//-----------------------------------------------------------------------------
static method next
static method checkId(object)
return object[idName]

//-----------------------------------------------------------------------------
static method getId(object, map)
var id = IDGenerator.checkId(object)

if (!id) {
id = next()

// note:
// attempted to use Object.defineProperty() to make
// the id property non-enumerable, etc, but doesn't
// work in JSC (TypeError), and still shows up in
// Web Inspector property views anyway.
object[idName] = id
}

if (map) {
if (map[id] != object) {
map[id] = object
}
}

return id

//-----------------------------------------------------------------------------
function next
var result = nextId
nextId += 1
return result
return result

37 changes: 24 additions & 13 deletions weinre.web/modules/weinre/common/Native.scoop
Expand Up @@ -13,17 +13,28 @@ class Native
init
Native.original = {}

Native.original.clearInterval = window.clearInterval
Native.original.clearTimeout = window.clearTimeout
Native.original.setTimeout = window.setTimeout
Native.original.setInterval = window.setInterval
Native.original.XMLHttpRequest = window.XMLHttpRequest
Native.original.XMLHttpRequest_open = window.XMLHttpRequest.prototype.open
Native.original.clearInterval = window.clearInterval
Native.original.clearTimeout = window.clearTimeout
Native.original.setTimeout = window.setTimeout
Native.original.setInterval = window.setInterval
Native.original.XMLHttpRequest = window.XMLHttpRequest
Native.original.XMLHttpRequest_open = window.XMLHttpRequest.prototype.open
Native.original.LocalStorage_setItem = window.localStorage ? window.localStorage.setItem : null
Native.original.LocalStorage_removeItem = window.localStorage ? window.localStorage.removeItem : null
Native.original.LocalStorage_clear = window.localStorage ? window.localStorage.clear : null
Native.original.SessionStorage_setItem = window.sessionStorage ? window.sessionStorage.setItem : null
Native.original.SessionStorage_removeItem = window.sessionStorage ? window.sessionStorage.removeItem : null
Native.original.SessionStorage_clear = window.sessionStorage ? window.sessionStorage.clear : null

Native.clearInterval = function() { return Native.original.clearInterval.apply( window, [].slice.call(arguments))}
Native.clearTimeout = function() { return Native.original.clearTimeout.apply( window, [].slice.call(arguments))}
Native.setInterval = function() { return Native.original.setInterval.apply( window, [].slice.call(arguments))}
Native.setTimeout = function() { return Native.original.setTimeout.apply( window, [].slice.call(arguments))}
Native.XMLHttpRequest = function() { return new Native.original.XMLHttpRequest()}
Native.XMLHttpRequest_open = function() { return Native.original.XMLHttpRequest_open.apply(this, [].slice.call(arguments))}

Native.clearInterval = function() { return Native.original.clearInterval.apply( window, [].slice.call(arguments))}
Native.clearTimeout = function() { return Native.original.clearTimeout.apply( window, [].slice.call(arguments))}
Native.setInterval = function() { return Native.original.setInterval.apply( window, [].slice.call(arguments))}
Native.setTimeout = function() { return Native.original.setTimeout.apply( window, [].slice.call(arguments))}
Native.XMLHttpRequest = function() { return new Native.original.XMLHttpRequest()}
Native.XMLHttpRequest_open = function() { return Native.original.XMLHttpRequest_open.apply(this, [].slice.call(arguments))}
Native.LocalStorage_setItem = function() { return Native.original.LocalStorage_setItem.apply( window.localStorage, [].slice.call(arguments))}
Native.LocalStorage_removeItem = function() { return Native.original.LocalStorage_removeItem.apply( window.localStorage, [].slice.call(arguments))}
Native.LocalStorage_clear = function() { return Native.original.LocalStorage_clear.apply( window.localStorage, [].slice.call(arguments))}
Native.SessionStorage_setItem = function() { return Native.original.SessionStorage_setItem.apply( window.sessionStorage, [].slice.call(arguments))}
Native.SessionStorage_removeItem = function() { return Native.original.SessionStorage_removeItem.apply( window.sessionStorage, [].slice.call(arguments))}
Native.SessionStorage_clear = function() { return Native.original.SessionStorage_clear.apply( window.sessionStorage, [].slice.call(arguments))}

0 comments on commit ec52f52

Please sign in to comment.