happo 2.1.1 → 2.2.0
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 +10 -0
- 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: 4b912c9e59c1a784e22ccf182a2cae6e3c33b3d4
|
4
|
+
data.tar.gz: fdf5aae7d6c23ac0aa719fd10f3c08b166b231b3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 727b0821666fa7ee2bf500be9f7a03cb1fa973fa55197ae71df73b8cc22b796abdcec385f0f108d31c76b9642e393474762c4fbe793b4d3a4a47dcffcb10fccb
|
7
|
+
data.tar.gz: c0b3764ab83e2872ae99ea45daeaac9d17bd24cef8f8fc3e83dc089647fe5598ec5a1913da390393f4e10ef67c82ce7b903ec9e463b8516cb9fcae94f1c27907
|
@@ -182,6 +182,16 @@ window.happo = {
|
|
182
182
|
top: rect.top,
|
183
183
|
};
|
184
184
|
|
185
|
+
// getBoundingClientRect does not include margin, so we need to use
|
186
|
+
// getComputedStyle. Since this is slow and the margin of descendent
|
187
|
+
// elements is significantly less likely to matter, let's include the margin
|
188
|
+
// only from the topmost node.
|
189
|
+
var computedStyle = window.getComputedStyle(node);
|
190
|
+
box.bottom += parseInt(computedStyle.getPropertyValue('margin-bottom'), 10);
|
191
|
+
box.left -= parseInt(computedStyle.getPropertyValue('margin-left'), 10);
|
192
|
+
box.right += parseInt(computedStyle.getPropertyValue('margin-right'), 10);
|
193
|
+
box.top -= parseInt(computedStyle.getPropertyValue('margin-top'), 10);
|
194
|
+
|
185
195
|
// If there are any children, we want to iterate over them recursively,
|
186
196
|
// mutating our box object along the way to expand to include all descendent
|
187
197
|
// nodes.
|
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.
|
4
|
+
version: 2.2.0
|
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-08-
|
12
|
+
date: 2016-08-16 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: chunky_png
|