Update web-platform-tests and CSS tests.

- Update CSS tests to revision e05bfd5e30ed662c2f8a353577003f8eed230180.
- Update web-platform-tests to revision a052787dd5c069a340031011196b73affbd68cd9.
This commit is contained in:
Ms2ger 2017-02-06 11:06:12 +01:00
parent fb4f421c8b
commit 296fa2512b
21852 changed files with 2080936 additions and 892894 deletions

View file

@ -50,34 +50,17 @@ Manifest.prototype = {
by_type:function(type) {
var ret = [] ;
if (this.data.items.hasOwnProperty(type)) {
ret = this.data.items[type].slice(0) ;
}
// local_changes.items in manifest is an Object just as
// items is. However, the properties of local_changes.items
// are Objects and the properties of items are Arrays.
// So we need to extract any relevant local changes by iterating
// over the Object and pulling out the referenced nodes as array items.
if (this.data.hasOwnProperty("local_changes")) {
var local = this.data.local_changes ;
// add in any local items
if (local.items.hasOwnProperty(type)) {
Object.keys(local.items[type]).forEach(function(ref) {
ret.push(local.items[type][ref][0]) ;
}.bind(this));
}
// remove any items that are locally deleted but not yet committed
// note that the deleted and deleted_reftests properties of the local_changes
// object are always present, even if they are empty
if (ret.length && local.deleted.length) {
// make a hash of the deleted to speed searching
var dels = {} ;
local.deleted.forEach(function(x) { dels[x] = true; } );
for (var j = ret.length-1; j >= 0; j--) {
if ( dels[ret[j].path] || (type === "reftest" && local.deleted_reftests[ret[j].path]) ){
// we have a match
ret.splice(j, 1) ;
}
for (var propertyName in this.data.items[type]) {
var arr = this.data.items[type][propertyName][0];
var item = arr[arr.length - 1];
item.path = propertyName;
if ('string' === typeof arr[0]) {
item.url = arr[0];
}
if (Array.isArray(arr[1])) {
item.references = arr[1];
}
ret.push(item);
}
}
return ret ;