ferrum 0.20.0 → 0.20.1
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/ferrum/page/frames.rb +1 -0
- data/lib/ferrum/page.rb +6 -8
- data/lib/ferrum/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 1429a2443d8b287c0bdb7db1589c702e2d808acce61d6341cb7f29c3de84dcfd
|
|
4
|
+
data.tar.gz: a48d3e136ebbf422b5efdbbe5516f7b93d33150158e337c32afc92c55db26bb7
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c927ede51c9c40a54918410fb217b5f7a26e4a1d39574268443fee0cb9966f1dd7d00508d892fb2190b3cf6b23b4c0f05f7ad5221755414edc8c105dd2083511
|
|
7
|
+
data.tar.gz: afbde35727cad16c84bce0420d6c5e26244bb9efeee9fef7e6324534cfc7e2a3b878016520dc697788976ab4e4b595feffebda6acc6fe71f50153e9a67185ae3
|
data/lib/ferrum/page/frames.rb
CHANGED
data/lib/ferrum/page.rb
CHANGED
|
@@ -191,14 +191,12 @@ module Ferrum
|
|
|
191
191
|
#
|
|
192
192
|
# @param [Float] scale_factor device scale factor value. 0 disables the override
|
|
193
193
|
#
|
|
194
|
-
# @param [Boolean] mobile
|
|
194
|
+
# @param [Boolean, nil] mobile `true` emulates a mobile device with touch, `false` a desktop without touch, `nil`
|
|
195
|
+
# a desktop and leaves touch emulation as is. Turning touch off resets hover and pointer to the detected input
|
|
196
|
+
# devices, which undoes `--blink-settings` overrides until the next navigation
|
|
195
197
|
#
|
|
196
|
-
def set_viewport(width: 0, height: 0, scale_factor: 0, mobile:
|
|
197
|
-
command(
|
|
198
|
-
"Emulation.setTouchEmulationEnabled",
|
|
199
|
-
enabled: mobile,
|
|
200
|
-
maxTouchPoints: 1
|
|
201
|
-
)
|
|
198
|
+
def set_viewport(width: 0, height: 0, scale_factor: 0, mobile: nil)
|
|
199
|
+
command("Emulation.setTouchEmulationEnabled", enabled: mobile, maxTouchPoints: 1) unless mobile.nil?
|
|
202
200
|
|
|
203
201
|
command(
|
|
204
202
|
"Emulation.setDeviceMetricsOverride",
|
|
@@ -206,7 +204,7 @@ module Ferrum
|
|
|
206
204
|
width: width,
|
|
207
205
|
height: height,
|
|
208
206
|
deviceScaleFactor: scale_factor,
|
|
209
|
-
mobile: mobile
|
|
207
|
+
mobile: mobile || false
|
|
210
208
|
)
|
|
211
209
|
end
|
|
212
210
|
|
data/lib/ferrum/version.rb
CHANGED