Remove some commented out code
authorPatrick Walton <pwalton@mozilla.com>
Sat, 25 Sep 2010 10:50:07 +0200
changeset 2049 9130e60c4f9ba2673ec1489ab18a23181de810f6
parent 2048 0d4ea22d5728fa226f89baca700079493bfa011b
child 2050 fc60eea6e09c2ca863e9efdd0360c006e560aafb
push id925
push userpwalton@mozilla.com
push dateSat, 25 Sep 2010 08:51:13 +0000
Remove some commented out code
dryice/boot.js
--- a/dryice/boot.js
+++ b/dryice/boot.js
@@ -64,39 +64,16 @@ var getCSSProperty = function(element, c
                                         getPropertyValue(property);
 
     if (!ret || ret == 'auto' || ret == 'intrinsic') {
         ret = container.style[property];
     }
     return ret;
 };
 
-/**
- * Returns the sum of all passed property values. Calls internal getCSSProperty
- * to get the value of the individual peroperties.
-  */
-// var sumCSSProperties = function(element, container, props) {
-//     var ret = document.defaultView.getComputedStyle(element, '').
-//                                         getPropertyValue(props[0]);
-//
-//     if (!ret || ret == 'auto' || ret == 'intrinsic') {
-//         return container.style[props[0]];
-//     }
-//
-//     var sum = props.map(function(item) {
-//         var cssProp = getCSSProperty(element, container, item);
-//         // Remove the 'px; and parse the property to a floating point.
-//         return parseFloat(cssProp.replace('px', ''));
-//     }).reduce(function(a, b) {
-//         return a + b;
-//     });
-//
-//     return sum;
-// };
-
 bespin.useBespin = function(element, options) {
     var util = bespin.tiki.require('bespin:util/util');
 
     var baseConfig = %s;
     var baseSettings = baseConfig.settings;
     options = options || {};
     for (var key in options) {
         baseConfig[key] = options[key];
@@ -163,22 +140,16 @@ bespin.useBespin = function(element, opt
                 // getCSSProperty will return the relativ dimensions as they
                 // are set on the element (in the case of width, 95<percent>).
                 // Making the sum of pixel vaules (e.g. padding) and realtive
                 // values (e.g. <percent>) is not possible. As such the padding styles
                 // are ignored.
 
                 // The complete width is the width of the textarea + the padding
                 // to the left and right.
-                // var width = sumCSSProperties(element, container, [
-                //     'width', 'padding-left', 'padding-right'
-                // ]) + 'px';
-                // var height = sumCSSProperties(element, container, [
-                //     'height', 'padding-top', 'padding-bottom'
-                // ]) + 'px';
                 var width = getCSSProperty(element, container, 'width');
                 var height = getCSSProperty(element, container, 'height');
                 style += 'height:' + height + ';width:' + width + ';';
 
                 // Set the display property to 'inline-block'.
                 style += 'display:inline-block;';
                 container.setAttribute('style', style);
             };