diff --git a/weinre.build/build.properties b/weinre.build/build.properties index 14f8f76..1f3fdbf 100644 --- a/weinre.build/build.properties +++ b/weinre.build/build.properties @@ -8,7 +8,7 @@ #----------------------------------------------------------- # weinre version #----------------------------------------------------------- -WEINRE_VERSION: 1.4.0 +WEINRE_VERSION: 1.5.0 #----------------------------------------------------------- # some common locations used in the ant scripts diff --git a/weinre.build/build.xml b/weinre.build/build.xml index b6893b3..1826ebd 100644 --- a/weinre.build/build.xml +++ b/weinre.build/build.xml @@ -273,7 +273,7 @@ - + @@ -290,19 +290,21 @@ - - - - + + + + + + - + - + - + @@ -346,11 +348,11 @@ - + - + diff --git a/weinre.build/get-vendor.xml b/weinre.build/get-vendor.xml index 3b49f23..4e2b477 100644 --- a/weinre.build/get-vendor.xml +++ b/weinre.build/get-vendor.xml @@ -124,28 +124,28 @@ - + - + - + - + diff --git a/weinre.build/scripts/changelog.sh b/weinre.build/scripts/changelog.sh index 3b4c41c..af3a12f 100755 --- a/weinre.build/scripts/changelog.sh +++ b/weinre.build/scripts/changelog.sh @@ -8,7 +8,7 @@ # --- git log "--pretty=format:- %s" $1.. | \ - sed 's/#\([0-9]*\)/\issue \1\<\/a\>./' | + sed 's/#\([0-9]*\)/\issue \1\<\/a\>./' | sed 's/^-/\/' # sed 's/#\([0-9]*\)/[issue \1](https:\/\/github.com\/pmuellr\/weinre\/issues\/1)./' diff --git a/weinre.doc/ChangeLog.body.html b/weinre.doc/ChangeLog.body.html index 9429aba..432c26c 100644 --- a/weinre.doc/ChangeLog.body.html +++ b/weinre.doc/ChangeLog.body.html @@ -5,6 +5,52 @@ * Copyright (c) 2011 IBM Corporation --> + +

Downloads

+ +

https://github.com/phonegap/weinre/downloads + + +

2011/07/22 - version 1.5.0

+ +
    + +
  • The Resources panel now includes an active Databases section. For any WebSQL +database that you open, you should see an entry in the expanded section. For each database, +you'll see the list of tables owned by the database when the database section +is expanded. Note that you need to open +the database to see it listed here. Databases which you have previously created +in other browsing sessions will not be displayed until they are first opened. + +

    Clicking on a database table will dump the database contents to the panel. +Clicking on the database itself will provide a prompter for you to run SQL +commands against that database. For example, entering +"select * from YourTableNameHere" +will dump the table contents to the panel. + +

  • Some of the console functions, like console.log(), were not handling +object arguments correctly. You should now see a an object display. For example, +typing "window" or "console.log(window)" into the console +will show you the same object display for the window. + +

  • The ant build script did not have the correctly-cased file names for some +of the files, and the build failed. This has been fixed. You should be able +to do a build on Linux, and other case-sensitive file systems. + +

  • While weinre already removes some of the Web Inspector panels wholesale, +there were still a number of meaningless gee-gaws on the panels that we do show. +Those have been surgically removed with CSS. + +

+ +

issues closed: +

    +
  • issue 7 - support for WebSQL +
  • issue 8 - console.log() etal don't handle object parameters +
  • issue 12 - wrong-cased file names in ant scripts for Linux +
  • issue 16 - hide stuff in the Web Inspector UI that's not used +
+

2011/05/09 - version 1.4.0

    diff --git a/weinre.doc/Home.body.html b/weinre.doc/Home.body.html index 8812b72..5cf5dc2 100644 --- a/weinre.doc/Home.body.html +++ b/weinre.doc/Home.body.html @@ -10,6 +10,14 @@ Pronounced like the word "winery". Or maybe like the word "weiner". Who knows, really. +

    Interesting places: +

    +

    It's a debugger for web pages, like FireBug (for FireFox) and @@ -22,7 +30,9 @@ weinre reuses the user interface code from the Web Inspector project at WebKit, so if you've used Safari's Web Inspector or Chrome's Developer Tools, -weinre will be very familiar. +weinre will be very familiar. If you're not +familiar with Web Inspector, the link above to Google Chrome Developer Tools +provides some documentation Real Web Inspector, which weinre is based on. -

    Places

    - - -

    Supported Libraries and Platforms

    diff --git a/weinre.server/interfaces/WeinreClientCommands.idl b/weinre.server/interfaces/WeinreClientCommands.idl index b912cdf..d0f86cb 100644 --- a/weinre.server/interfaces/WeinreClientCommands.idl +++ b/weinre.server/interfaces/WeinreClientCommands.idl @@ -14,7 +14,7 @@ module weinre { void getTargets(out Object[] targets); void getClients(out Object[] clients); - + void connectTarget(in string clientId, in string targetId); void disconnectTarget(in string clientId); diff --git a/weinre.server/interfaces/WeinreExtraClientCommands.idl b/weinre.server/interfaces/WeinreExtraClientCommands.idl new file mode 100644 index 0000000..5d6fe5c --- /dev/null +++ b/weinre.server/interfaces/WeinreExtraClientCommands.idl @@ -0,0 +1,17 @@ +/* + * weinre is available under *either* the terms of the modified BSD license *or* the + * MIT License (2008). See http://opensource.org/licenses/alphabetical for full text. + * + * Copyright (c) 2011 IBM Corporation + */ + +// extra messages from the client to the target + +module weinre { + interface WeinreExtraClientCommands { + + void getDatabases(out Object[] databaseRecords); + + }; +} + diff --git a/weinre.server/interfaces/WeinreExtraTargetEvents.idl b/weinre.server/interfaces/WeinreExtraTargetEvents.idl new file mode 100644 index 0000000..58a6b72 --- /dev/null +++ b/weinre.server/interfaces/WeinreExtraTargetEvents.idl @@ -0,0 +1,17 @@ +/* + * weinre is available under *either* the terms of the modified BSD license *or* the + * MIT License (2008). See http://opensource.org/licenses/alphabetical for full text. + * + * Copyright (c) 2011 IBM Corporation + */ + +// extra messages from the target to the client + +module weinre { + interface WeinreExtraTargetEvents { + + void databaseOpened(in Object databaseRecord); + + }; +} + diff --git a/weinre.server/interfaces/WeinreTargetEvents.idl b/weinre.server/interfaces/WeinreTargetEvents.idl index 36af730..5326b4b 100644 --- a/weinre.server/interfaces/WeinreTargetEvents.idl +++ b/weinre.server/interfaces/WeinreTargetEvents.idl @@ -14,7 +14,7 @@ module weinre { void connectionDestroyed(string clientId, string targetId); void sendCallback(string callbackId, Object result); - + }; } diff --git a/weinre.web/client/weinre/client.css b/weinre.web/client/weinre/client.css index 0eccff5..196a9cb 100644 --- a/weinre.web/client/weinre/client.css +++ b/weinre.web/client/weinre/client.css @@ -19,6 +19,34 @@ font-family: Monaco, Consolas, Lucida Console, dejavu sans mono, monospace; } +.panel.resources .cookie-storage-tree-item { + display: none; +} + +.panel.resources .frame-storage-tree-item { + display: none; +} + +.panel.resources .application-cache-storage-tree-item { + display: none; +} + +.panel.timeline .resources-size-graph-sidebar-item { + display: none; +} + +#main-status-bar .timeline-category-rendering { + display: none; +} + +#search { + display: none; +} + +#search-toolbar-label { + display: none; +} + .weinre-connector-item { font-size: 140%; } diff --git a/weinre.web/demo/weinre-demo-pieces.html b/weinre.web/demo/weinre-demo-pieces.html index f572778..51b261f 100644 --- a/weinre.web/demo/weinre-demo-pieces.html +++ b/weinre.web/demo/weinre-demo-pieces.html @@ -9,10 +9,8 @@ weinre demo - - + - @@ -44,12 +42,17 @@ + + + + + diff --git a/weinre.web/demo/weinre-demo.js b/weinre.web/demo/weinre-demo.js index e0b95e3..32c72b5 100644 --- a/weinre.web/demo/weinre-demo.js +++ b/weinre.web/demo/weinre-demo.js @@ -12,6 +12,8 @@ var buttonStartStuff var buttonClearOutput var outputElement var storageIndex = 0 +var db +var otherDB // set the id based on the hash var hash = location.href.split("#")[1] @@ -25,6 +27,11 @@ function onLoad() { if (!outputElement) outputElement = document.getElementById("output") buttonStartStuff.addEventListener("click", function() { + lastClickTime = new Date().toString() + if (db) db.transaction(addClick) + + openTheOtherDatabase() + if (!started) { buttonStartStuff.value = "stop stuff" startStuff() @@ -40,6 +47,7 @@ function onLoad() { outputElement.innerHTML = "" }) + openTheDatabase() } //------------------------------------------------------------------------------ @@ -96,6 +104,64 @@ function intervalStuff() { } +//------------------------------------------------------------------------------ +function sqlSuccess(tx, resultSet) { + console.log("SQL Success!") +} + +//------------------------------------------------------------------------------ +function sqlError(tx, error) { + console.log("SQL Error " + error.code + ": " + error.message) +} + +//------------------------------------------------------------------------------ +var lastClickTime + +function addClick(tx) { + var sql = "insert into clicks (date) values (?)" + tx.executeSql(sql, [lastClickTime], null, sqlError) +} + +//------------------------------------------------------------------------------ +function clearDatabase(tx, resultSet) { + var sql = "delete from clicks" + tx.executeSql(sql, null, null, sqlError); +} + +//------------------------------------------------------------------------------ +function createDatabase(tx) { + var schema = "clicks (id integer primary key, date text)" + var sql = "create table if not exists " + schema + + tx.executeSql(sql, null, clearDatabase, sqlError); +} + +//------------------------------------------------------------------------------ +function createDatabase_other(tx) { + var schema = "clicks_other (id integer primary key, other text)" + var sql = "create table if not exists " + schema + + tx.executeSql(sql, null, null, sqlError); +} + +//------------------------------------------------------------------------------ +function openTheDatabase() { + if (window.openDatabase) { + db = window.openDatabase("clicks_db", "1.0", "clicks_db", 8192) + db.transaction(createDatabase) + } +} + +//------------------------------------------------------------------------------ +function openTheOtherDatabase() { + if (otherDB) return + + if (window.openDatabase) { + otherDB = window.openDatabase("clicks_other_db", "1.0", "clicks_other_db", 8192) + otherDB.transaction(createDatabase_other) + } +} + //------------------------------------------------------------------------------ function output(string) { var element = document.createElement("div") diff --git a/weinre.web/modules/weinre/client/Client.scoop b/weinre.web/modules/weinre/client/Client.scoop index f1368d8..73c499a 100644 --- a/weinre.web/modules/weinre/client/Client.scoop +++ b/weinre.web/modules/weinre/client/Client.scoop @@ -18,6 +18,7 @@ requireClass ../common/IDGenerator requireClass ./InspectorBackendImpl requireClass ./InspectorFrontendHostImpl requireClass ./WeinreClientEventsImpl +requireClass ./WeinreExtraTargetEventsImpl requireClass ./RemotePanel //----------------------------------------------------------------------------- @@ -47,7 +48,10 @@ method initialize // create the client commands proxy Weinre.WeinreClientCommands = messageDispatcher.createProxy("WeinreClientCommands") + Weinre.WeinreExtraClientCommands = messageDispatcher.createProxy("WeinreExtraClientCommands") + messageDispatcher.registerInterface("WeinreExtraTargetEvents", new WeinreExtraTargetEventsImpl(), false) + // register WebInspector interface messageDispatcher.registerInterface("WebInspector", WebInspector, false) diff --git a/weinre.web/modules/weinre/client/WeinreClientEventsImpl.scoop b/weinre.web/modules/weinre/client/WeinreClientEventsImpl.scoop index 459373d..7fd6a65 100644 --- a/weinre.web/modules/weinre/client/WeinreClientEventsImpl.scoop +++ b/weinre.web/modules/weinre/client/WeinreClientEventsImpl.scoop @@ -9,6 +9,8 @@ requireClass ../common/Callback requireClass ../common/Weinre +requireClass ./WeinreExtraTargetEventsImpl + //----------------------------------------------------------------------------- class WeinreClientEventsImpl(client) this.client = client @@ -67,6 +69,10 @@ method connectionCreated(/*int*/ clientChannel, /*int*/ targetChannel) WebInspector.inspectedURLChanged(target.url) + Weinre.WeinreExtraClientCommands.getDatabases(function(databaseRecords) { + WeinreExtraTargetEventsImpl.addDatabaseRecords(databaseRecords) + }) + //----------------------------------------------------------------------------- method connectionDestroyed(/*int*/ clientChannel, /*int*/ targetChannel) diff --git a/weinre.web/modules/weinre/client/WeinreExtraTargetEventsImpl.scoop b/weinre.web/modules/weinre/client/WeinreExtraTargetEventsImpl.scoop new file mode 100644 index 0000000..76abaad --- /dev/null +++ b/weinre.web/modules/weinre/client/WeinreExtraTargetEventsImpl.scoop @@ -0,0 +1,48 @@ + +/* + * weinre is available under *either* the terms of the modified BSD license *or* the + * MIT License (2008). See http://opensource.org/licenses/alphabetical for full text. + * + * Copyright (c) 2011 IBM Corporation + */ + +//----------------------------------------------------------------------------- +class WeinreExtraTargetEventsImpl + +//----------------------------------------------------------------------------- +method databaseOpened(databaseRecord) + WeinreExtraTargetEventsImpl.addDatabaseRecords([databaseRecord]) + +//----------------------------------------------------------------------------- +static method addDatabaseRecords(databaseRecords) + // databaseRecord.id + // databaseRecord.domain + // databaseRecord.name + // databaseRecord.version + + if (!WebInspector.panels) return + if (!WebInspector.panels.resources) return + if (!WebInspector.panels.resources._databases) return + + var existingDbs = WebInspector.panels.resources._databases + var existingDbNames = {} + + for (var i=0; i= context.steps.length) return + + context.tx = tx + + context.currentStep = context.nextStep + context.nextStep++ + + var step = context.steps[context.currentStep] + + step.call(this, resultSet) + +//----------------------------------------------------------------------------- +static method example(db, id) + function step1() { + this.executeSql("SELECT name FROM sqlite_master WHERE type='table'") + } + + function step2(resultSet) { + var rows = resultSet.rows + var result = [] + for (var i=0; i