Remove certain computed values from output style
Summary: Remove output properties from computed styles as they will be computed to their output values before we can read them. Only include them if they are explicitly set by the user. Reviewed By: IanChilds Differential Revision: D3770917 fbshipit-source-id: e55996cf8744073496debea19c36a188d2e5086c
This commit is contained in:
committed by
Facebook Github Bot 7
parent
ccbfee3841
commit
f65febb1af
@@ -93,8 +93,20 @@ function setupTestTree(node, nodeName, parentName, index) {
|
||||
];
|
||||
|
||||
for (var style in node.style) {
|
||||
|
||||
// Skip position info for root as it messes up tests
|
||||
if (node.declaredStyle[style] === "" &&
|
||||
(style == 'position' ||
|
||||
style == 'left' ||
|
||||
style == 'top' ||
|
||||
style == 'right' ||
|
||||
style == 'bottom' ||
|
||||
style == 'width' ||
|
||||
style == 'height')) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (node.style[style] !== getDefaultStyleValue(style)) {
|
||||
var TODO = '';
|
||||
switch (style) {
|
||||
case 'direction':
|
||||
lines.push('CSSNodeSetDirection(' + nodeName + ', ' +
|
||||
@@ -337,6 +349,7 @@ function calculateTree(root) {
|
||||
height: child.offsetHeight,
|
||||
children: calculateTree(child),
|
||||
style: getCSSLayoutStyle(child),
|
||||
declaredStyle: child.style,
|
||||
});
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user