happo 2.7.4 → 2.7.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/happo/public/happo-runner.js +15 -2
- data/lib/happo/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 80c0b6b398d484f5ed1cc3fda76d24c5d038f184
|
4
|
+
data.tar.gz: adcca757456079200cd1d322acc1269de56c66cc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 392c63412bcc3a919d36735c0fbcde7ede071f096af776046a40b17342761282022e414ad7d61cd4c920ef731222a0e0a68fdec55a170b790d7d38625c020931
|
7
|
+
data.tar.gz: 2faafe9d4c0144d35a4e460c14a3bd9812495cb61955ce0a5625a252dbe31ec53c6691451cc38d6828548e7f3cea9b2e31c2bebf39645b86f9a7448f6a288c8c
|
@@ -202,6 +202,17 @@ window.happo = {
|
|
202
202
|
}
|
203
203
|
},
|
204
204
|
|
205
|
+
/**
|
206
|
+
* Gets the DOM elements that we will use as source for the snapshot. The
|
207
|
+
* default version simply gets the direct children of document.body, but you
|
208
|
+
* can override this method to better control the root nodes.
|
209
|
+
*
|
210
|
+
* @return Array|NodeList
|
211
|
+
*/
|
212
|
+
getRootNodes: function getRootNodes() {
|
213
|
+
return document.body.children;
|
214
|
+
},
|
215
|
+
|
205
216
|
// This function gets the full size of children in the document body,
|
206
217
|
// including all descendent nodes. This allows us to ensure that the
|
207
218
|
// screenshot includes absolutely positioned elements. It is important that
|
@@ -215,11 +226,13 @@ window.happo = {
|
|
215
226
|
top: 0,
|
216
227
|
};
|
217
228
|
|
229
|
+
var rootNodes = this.getRootNodes();
|
230
|
+
|
218
231
|
// If there are any children, we want to iterate over them recursively,
|
219
232
|
// mutating our box object along the way to expand to include all descendent
|
220
233
|
// nodes.
|
221
|
-
for (var i = 0; i <
|
222
|
-
var node =
|
234
|
+
for (var i = 0; i < rootNodes.length; i++) {
|
235
|
+
var node = rootNodes[i];
|
223
236
|
|
224
237
|
this.getFullRectRecursive(node, box);
|
225
238
|
|
data/lib/happo/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: happo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.7.
|
4
|
+
version: 2.7.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Henric Trotzig
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2016-09-
|
12
|
+
date: 2016-09-13 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: chunky_png
|