[Pkg-javascript-commits] [dojo] 85/149: Run code to correct style values on all browsers. Fixes failure on Edge. Fixes #18725.
David Prévot
taffit at moszumanska.debian.org
Sat Feb 27 03:13:50 UTC 2016
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository dojo.
commit eaaaa2287584c2bc2f091b3e4e843c10584b316b
Author: Bill Keese <bill at dojotoolkit.org>
Date: Thu Oct 1 10:18:36 2015 +0900
Run code to correct style values on all browsers.
Fixes failure on Edge. Fixes #18725.
---
dom-style.js | 23 ++++++++++++-----------
1 file changed, 12 insertions(+), 11 deletions(-)
diff --git a/dom-style.js b/dom-style.js
index 0c871ba..04a8e33 100644
--- a/dom-style.js
+++ b/dom-style.js
@@ -199,19 +199,20 @@ define(["./sniff", "./dom"], function(has, dom){
function _toStyleValue(node, type, value){
//TODO: should we really be doing string case conversion here? Should we cache it? Need to profile!
type = type.toLowerCase();
- if(has("ie") || has("trident")){
- if(value == "auto"){
- if(type == "height"){ return node.offsetHeight; }
- if(type == "width"){ return node.offsetWidth; }
- }
- if(type == "fontweight"){
- switch(value){
- case 700: return "bold";
- case 400:
- default: return "normal";
- }
+
+ // Adjustments for IE and Edge
+ if(value == "auto"){
+ if(type == "height"){ return node.offsetHeight; }
+ if(type == "width"){ return node.offsetWidth; }
+ }
+ if(type == "fontweight"){
+ switch(value){
+ case 700: return "bold";
+ case 400:
+ default: return "normal";
}
}
+
if(!(type in _pixelNamesCache)){
_pixelNamesCache[type] = _pixelRegExp.test(type);
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/dojo.git
More information about the Pkg-javascript-commits
mailing list