diff -r 000000000000 -r 6474c204b198 browser/metro/base/content/bindings/grid.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/browser/metro/base/content/bindings/grid.xml Wed Dec 31 06:09:35 2014 +0100 @@ -0,0 +1,1125 @@ + + + + + + + + + + + + + + + + + + + + null + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1) { + verbSet.add('clear'); + } + // returns Set + return verbSet; + ]]> + + + + + + null + + + + + + + + + + + + + + + + + + + = 0) { + let selected = this.getItemAtIndex(val); + this.selectItem(selected); + } else { + this.selectNone(); + } + ]]> + + + + + + + + + + + + + + cnode.getAttribute("value")); + ]]> + + + + + + + + slotCount) { + let orphanNode = child; + child = orphanNode.nextSibling; + this.removeChild(orphanNode); + continue; + } + if (child.hasAttribute("value")) { + this._releaseSlot(child); + } + child = child.nextSibling; + childIndex++; + } + // create our quota of item slots + for (let count = this.childElementCount; count < slotCount; count++) { + this.appendChild( this._createItemElement() ); + } + + if (!aSkipArrange) + this.arrangeItems(); + ]]> + + + + + + + 0; count--) { + this.appendChild( this._createItemElement() ); + } + return this.children[anIndex]; + ]]> + + + + + + + + + + + + + + + + + + + + + + + 0 && !this.children[childIndex-1].hasAttribute("value")) { + insertedItem = this.children[childIndex-1]; + } else { + insertedItem = this.insertBefore(this._createItemElement(),existing); + } + } + if (!insertedItem) { + insertedItem = this._slotAt(anIndex); + } + insertedItem.setAttribute("value", aValue); + insertedItem.setAttribute("label", aLabel); + if (!aSkipArrange) + this.arrangeItems(); + return insertedItem; + ]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + = lowerBound && + this.selectedIndex < higherBound; + ]]> + + + + + + + + + + + + + + + + + + + + 0 + + 0 + + + + + + + + + + + + + + + + + null + 0 + 5 + + + + + this._scheduledArrangeItemsTries + ) { + this._scheduledArrangeItemsTimerId = setTimeout(this.arrangeItems.bind(this), aTime || 0); + // track how many times we've attempted arrangeItems + this._scheduledArrangeItemsTries++; + } + ]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + "tiles.css" + + + width/height values + // The keys in this object are string-matched against the selectorText + // of rules in our stylesheet. Quoted values in a selector will always use " not ' + let typeSelectors = { + 'richgriditem' : "default", + 'richgriditem[tiletype="thumbnail"]': "thumbnail", + 'richgriditem[search]': "search", + 'richgriditem[compact]': "compact" + }; + let rules, sheet; + for (let i=0; (sheet=sheets[i]); i++) { + if (sheet.href && sheet.href.endsWith( this._tileStyleSheetName )) { + rules = sheet.cssRules; + break; + } + } + if (rules) { + // walk the stylesheet rules until we've matched all our selectors + for (let i=0, rule;(rule=rules[i]); i++) { + let type = rule.selectorText && typeSelectors[rule.selectorText]; + if (type) { + let sizes = typeSizes[type] = {}; + typeSelectors[type] = null; + delete typeSelectors[type]; + // we assume px unit for tile dimension values + sizes.width = parseInt(rule.style.getPropertyValue("width")); + sizes.height = parseInt(rule.style.getPropertyValue("height")); + } + if (!Object.keys(typeSelectors).length) + break; + } + } else { + throw new Error("Failed to find stylesheet to parse out richgriditem dimensions\n"); + } + return typeSizes; + ]]> + + + + + + + = 0 && anIndex < this.itemCount; + ]]> + + + + + + + + + + + + + + + + + + + + + + y) { + if (1 - y > x) { + angle = Math.ceil((.5 - y) * deflectY); + bendNode.style.transform = "perspective("+perspective+") rotateX(" + angle + "deg)"; + bendNode.style.transformOrigin = "center bottom"; + } else { + angle = Math.ceil((x - .5) * deflectX); + bendNode.style.transform = "perspective("+perspective+") rotateY(" + angle + "deg)"; + bendNode.style.transformOrigin = "left center"; + } + } else { + if (1 - y < x) { + angle = -Math.ceil((y - .5) * deflectY); + bendNode.style.transform = "perspective("+perspective+") rotateX(" + angle + "deg)"; + bendNode.style.transformOrigin = "center top"; + } else { + angle = -Math.ceil((.5 - x) * deflectX); + bendNode.style.transform = "perspective("+perspective+") rotateY(" + angle + "deg)"; + bendNode.style.transformOrigin = "right center"; + } + } + // mark when bend effect is applied + aItem.setAttribute("bending", true); + ]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + null + + + + + + + + + + + + + + + + + + + + + + + + +