Lines Matching refs:node

8     Array.prototype.forEach.call(parent.childNodes, function(node) {
9 checkedLayout |= checkSubtreeExpectedValues(t, node, prefix);
14 function checkAttribute(output, node, attribute)
16 var result = node.getAttribute && node.getAttribute(attribute);
28 function checkDataKeys(node) {
52 if (!node || !node.getAttributeNames)
55 for (let name of node.getAttributeNames()) {
61 function checkExpectedValues(t, node, prefix)
63 checkDataKeys(node);
66 var expectedWidth = checkAttribute(output, node, "data-expected-width");
68 assert_tolerance(node.offsetWidth, expectedWidth, prefix + "width");
71 var expectedHeight = checkAttribute(output, node, "data-expected-height");
73 assert_tolerance(node.offsetHeight, expectedHeight, prefix + "height");
76 var expectedOffset = checkAttribute(output, node, "data-offset-x");
78 assert_tolerance(node.offsetLeft, expectedOffset, prefix + "offsetLeft");
81 var expectedOffset = checkAttribute(output, node, "data-offset-y");
83 assert_tolerance(node.offsetTop, expectedOffset, prefix + "offsetTop");
86 var expectedWidth = checkAttribute(output, node, "data-expected-client-width");
88 assert_tolerance(node.clientWidth, expectedWidth, prefix + "clientWidth");
91 var expectedHeight = checkAttribute(output, node, "data-expected-client-height");
93 assert_tolerance(node.clientHeight, expectedHeight, prefix + "clientHeight");
96 var expectedWidth = checkAttribute(output, node, "data-expected-scroll-width");
98 assert_tolerance(node.scrollWidth, expectedWidth, prefix + "scrollWidth");
101 var expectedHeight = checkAttribute(output, node, "data-expected-scroll-height");
103 assert_tolerance(node.scrollHeight, expectedHeight, prefix + "scrollHeight");
106 var expectedWidth = checkAttribute(output, node, "data-expected-bounding-client-rect-width");
108 assert_tolerance(node.getBoundingClientRect().width, expectedWidth, prefix + "getBoundingClientRect().width");
111 var expectedHeight = checkAttribute(output, node, "data-expected-bounding-client-rect-height");
113 assert_tolerance(node.getBoundingClientRect().height, expectedHeight, prefix + "getBoundingClientRect().height");
116 var expectedOffset = checkAttribute(output, node, "data-total-x");
118 var totalLeft = node.clientLeft + node.offsetLeft;
120 "clientLeft+offsetLeft (" + node.clientLeft + " + " + node.offsetLeft + ")");
123 var expectedOffset = checkAttribute(output, node, "data-total-y");
125 var totalTop = node.clientTop + node.offsetTop;
127 "clientTop+offsetTop (" + node.clientTop + " + " + node.offsetTop + ")");
130 var expectedDisplay = checkAttribute(output, node, "data-expected-display");
132 var actualDisplay = getComputedStyle(node).display;
136 var expectedPaddingTop = checkAttribute(output, node, "data-expected-padding-top");
138 var actualPaddingTop = getComputedStyle(node).paddingTop;
144 var expectedPaddingBottom = checkAttribute(output, node, "data-expected-padding-bottom");
146 var actualPaddingBottom = getComputedStyle(node).paddingBottom;
152 var expectedPaddingLeft = checkAttribute(output, node, "data-expected-padding-left");
154 var actualPaddingLeft = getComputedStyle(node).paddingLeft;
160 var expectedPaddingRight = checkAttribute(output, node, "data-expected-padding-right");
162 var actualPaddingRight = getComputedStyle(node).paddingRight;
168 var expectedMarginTop = checkAttribute(output, node, "data-expected-margin-top");
170 var actualMarginTop = getComputedStyle(node).marginTop;
176 var expectedMarginBottom = checkAttribute(output, node, "data-expected-margin-bottom");
178 var actualMarginBottom = getComputedStyle(node).marginBottom;
184 var expectedMarginLeft = checkAttribute(output, node, "data-expected-margin-left");
186 var actualMarginLeft = getComputedStyle(node).marginLeft;
192 var expectedMarginRight = checkAttribute(output, node, "data-expected-margin-right");
194 var actualMarginRight = getComputedStyle(node).marginRight;
216 Array.prototype.forEach.call(nodes, function(node) {
218 var container = node.parentNode.className == 'container' ? node.parentNode : node;
223 checkedLayout |= checkExpectedValues(t, node.parentNode, prefix);
224 checkedLayout |= checkSubtreeExpectedValues(t, node, prefix);
234 if (node)
235 node.classList.add('testharness_error');