From 501ed5778499489df80013799d5fbbac806750d3 Mon Sep 17 00:00:00 2001 From: Emil Sjolander Date: Mon, 17 Oct 2016 06:27:59 -0700 Subject: [PATCH] Only look at computed style if key was not set inline Summary: Prefer inline style to computed style as inline style should be the source of truth and computed style may differ Reviewed By: gkassabli Differential Revision: D4029373 fbshipit-source-id: 39ce9d577f295c2361dc384212d7467418c63c33 --- gentest/gentest.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gentest/gentest.js b/gentest/gentest.js index 4f01a627..ccd00062 100755 --- a/gentest/gentest.js +++ b/gentest/gentest.js @@ -479,7 +479,7 @@ function getCSSLayoutStyle(node) { 'min-height', 'max-height', ].reduce(function(map, key) { - map[key] = getComputedStyle(node, null).getPropertyValue(key); + map[key] = node.style[key] || getComputedStyle(node, null).getPropertyValue(key); return map; }, {}); }