flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aha...@apache.org
Subject [16/50] [abbrv] git commit: [flex-asjs] [refs/heads/core_js_to_as] - can't use getComputedStyle here because FF returns 0 instead of null or auto
Date Thu, 08 Oct 2015 18:51:18 GMT
can't use getComputedStyle here because FF returns 0 instead of null or auto


Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/029ee8c1
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/029ee8c1
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/029ee8c1

Branch: refs/heads/core_js_to_as
Commit: 029ee8c1e17bbc9ebb42b0d5a0502085b4d98151
Parents: 9941802
Author: Alex Harui <aharui@apache.org>
Authored: Sun Sep 13 14:51:11 2015 -0700
Committer: Alex Harui <aharui@apache.org>
Committed: Sun Sep 13 14:51:11 2015 -0700

----------------------------------------------------------------------
 .../Core/js/src/org/apache/flex/core/UIBase.js       | 15 ++++++---------
 1 file changed, 6 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/029ee8c1/frameworks/projects/Core/js/src/org/apache/flex/core/UIBase.js
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/js/src/org/apache/flex/core/UIBase.js b/frameworks/projects/Core/js/src/org/apache/flex/core/UIBase.js
index 7cec9fd..ef667c9 100644
--- a/frameworks/projects/Core/js/src/org/apache/flex/core/UIBase.js
+++ b/frameworks/projects/Core/js/src/org/apache/flex/core/UIBase.js
@@ -804,12 +804,10 @@ org.apache.flex.core.UIBase.prototype.isWidthSizedToContent = function()
 {
   if (!isNaN(this.explicitWidth_) || !isNaN(this.percentWidth_))
     return false;
-
-  var scv = window.getComputedStyle(/** @type {Element} */ (this.positioner));
+  var left = org.apache.flex.core.ValuesManager.valuesImpl.getValue(this, 'left');
+  var right = org.apache.flex.core.ValuesManager.valuesImpl.getValue(this, 'right');
   // not sized to content if both left and right are specified
-  if (scv.left !== '' && scv.left != 'auto' && scv.right !== '' &&
scv.right != 'auto')
-    return false;
-  return true;
+  return (left === undefined || right === undefined);
 };
 
 
@@ -821,11 +819,10 @@ org.apache.flex.core.UIBase.prototype.isHeightSizedToContent = function()
 {
   if (!isNaN(this.explicitHeight_) || !isNaN(this.percentHeight_))
     return false;
-  var scv = window.getComputedStyle(/** @type {Element} */ (this.positioner));
+  var top = org.apache.flex.core.ValuesManager.valuesImpl.getValue(this, 'top');
+  var bottom = org.apache.flex.core.ValuesManager.valuesImpl.getValue(this, 'bottom');
   // not sized to content if both top and bottom are specified
-  if (scv.top !== '' && scv.top != 'auto' && scv.bottom !== '' &&
scv.bottom != 'auto')
-    return false;
-  return true;
+  return (top === undefined || bottom === undefined);
 };
 
 


Mime
View raw message