mirror of
https://forge.fsky.io/oneflux/omegafox.git
synced 2026-02-10 04:52:03 -08:00
clean up trajectory code
This commit is contained in:
parent
c7ce5a9a30
commit
f70c1e0c11
2 changed files with 6 additions and 24 deletions
|
|
@ -2,6 +2,7 @@
|
||||||
ac_add_options --enable-application=browser
|
ac_add_options --enable-application=browser
|
||||||
ac_add_options --enable-jxl
|
ac_add_options --enable-jxl
|
||||||
ac_add_options --enable-release
|
ac_add_options --enable-release
|
||||||
|
mk_add_options MOZ_MAKE_FLAGS="-j$(nproc)"
|
||||||
export CC=clang
|
export CC=clang
|
||||||
export CXX=clang++
|
export CXX=clang++
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@ index 52f0af76ec..2a7a9ae4fc 100644
|
||||||
double ChromeUtils::DateNow(GlobalObject&) { return JS_Now() / 1000.0; }
|
double ChromeUtils::DateNow(GlobalObject&) { return JS_Now() / 1000.0; }
|
||||||
|
|
||||||
/* static */
|
/* static */
|
||||||
@@ -2141,6 +2161,77 @@ void ChromeUtils::GetAllPossibleUtilityActorNames(GlobalObject& aGlobal,
|
@@ -2141,6 +2161,66 @@ void ChromeUtils::GetAllPossibleUtilityActorNames(GlobalObject& aGlobal,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -98,18 +98,7 @@ index 52f0af76ec..2a7a9ae4fc 100644
|
||||||
+ aRetVal.Clear();
|
+ aRetVal.Clear();
|
||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
+/* static */
|
|
||||||
+void ChromeUtils::CamouGetMouseTrajectory(GlobalObject& aGlobal, long aFromX,
|
|
||||||
+ long aFromY, long aToX, long aToY,
|
|
||||||
+ nsTArray<int32_t>& aPoints) {
|
|
||||||
+ HumanizeMouseTrajectory trajectory(std::make_pair(aFromX, aFromY),
|
|
||||||
+ std::make_pair(aToX, aToY));
|
|
||||||
+ std::vector<int> flattenedPoints = trajectory.getPoints();
|
|
||||||
+
|
|
||||||
+ aPoints.Clear();
|
|
||||||
+ aPoints.AppendElements(flattenedPoints.data(), flattenedPoints.size());
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
/* static */
|
/* static */
|
||||||
bool ChromeUtils::ShouldResistFingerprinting(
|
bool ChromeUtils::ShouldResistFingerprinting(
|
||||||
GlobalObject& aGlobal, JSRFPTarget aTarget,
|
GlobalObject& aGlobal, JSRFPTarget aTarget,
|
||||||
|
|
@ -128,7 +117,7 @@ index 138b9c3f80..c7c7ce74bf 100644
|
||||||
static double DateNow(GlobalObject&);
|
static double DateNow(GlobalObject&);
|
||||||
|
|
||||||
static void EnsureJSOracleStarted(GlobalObject&);
|
static void EnsureJSOracleStarted(GlobalObject&);
|
||||||
@@ -314,6 +318,24 @@ class ChromeUtils {
|
@@ -314,6 +318,20 @@ class ChromeUtils {
|
||||||
static void GetAllPossibleUtilityActorNames(GlobalObject& aGlobal,
|
static void GetAllPossibleUtilityActorNames(GlobalObject& aGlobal,
|
||||||
nsTArray<nsCString>& aNames);
|
nsTArray<nsCString>& aNames);
|
||||||
|
|
||||||
|
|
@ -146,10 +135,7 @@ index 138b9c3f80..c7c7ce74bf 100644
|
||||||
+ static void CamouGetStringList(GlobalObject& aGlobal, const nsAString& aVarName,
|
+ static void CamouGetStringList(GlobalObject& aGlobal, const nsAString& aVarName,
|
||||||
+ nsTArray<nsString>& aRetVal);
|
+ nsTArray<nsString>& aRetVal);
|
||||||
+
|
+
|
||||||
+ static void CamouGetMouseTrajectory(GlobalObject& aGlobal, long aFromX,
|
|
||||||
+ long aFromY, long aToX, long aToY,
|
|
||||||
+ nsTArray<int32_t>& aPoints);
|
|
||||||
+
|
|
||||||
static bool ShouldResistFingerprinting(
|
static bool ShouldResistFingerprinting(
|
||||||
GlobalObject& aGlobal, JSRFPTarget aTarget,
|
GlobalObject& aGlobal, JSRFPTarget aTarget,
|
||||||
const Nullable<uint64_t>& aOverriddenFingerprintingSettings);
|
const Nullable<uint64_t>& aOverriddenFingerprintingSettings);
|
||||||
|
|
@ -171,7 +157,7 @@ index 6a99703db1..82415eba19 100644
|
||||||
/**
|
/**
|
||||||
* Starts the JSOracle process for ORB JavaScript validation, if it hasn't started already.
|
* Starts the JSOracle process for ORB JavaScript validation, if it hasn't started already.
|
||||||
*/
|
*/
|
||||||
@@ -761,6 +768,36 @@ partial namespace ChromeUtils {
|
@@ -761,6 +768,31 @@ partial namespace ChromeUtils {
|
||||||
[ChromeOnly]
|
[ChromeOnly]
|
||||||
readonly attribute unsigned long aliveUtilityProcesses;
|
readonly attribute unsigned long aliveUtilityProcesses;
|
||||||
|
|
||||||
|
|
@ -199,11 +185,6 @@ index 6a99703db1..82415eba19 100644
|
||||||
+ * Get a list of strings from Omegafox MaskConfig.
|
+ * Get a list of strings from Omegafox MaskConfig.
|
||||||
+ */
|
+ */
|
||||||
+ sequence<DOMString> camouGetStringList(DOMString varName);
|
+ sequence<DOMString> camouGetStringList(DOMString varName);
|
||||||
+
|
|
||||||
+ /**
|
|
||||||
+ * Calculate a human-like mouse trajectory between two points.
|
|
||||||
+ */
|
|
||||||
+ sequence<long> camouGetMouseTrajectory(long fromX, long fromY, long toX, long toY);
|
|
||||||
+
|
+
|
||||||
/**
|
/**
|
||||||
* Get a list of all possible Utility process Actor Names ; mostly useful to
|
* Get a list of all possible Utility process Actor Names ; mostly useful to
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue