summaryrefslogtreecommitdiffstats
path: root/toolkit/actors
diff options
context:
space:
mode:
Diffstat (limited to 'toolkit/actors')
-rw-r--r--toolkit/actors/AutoCompleteParent.sys.mjs3
-rw-r--r--toolkit/actors/AutoScrollChild.sys.mjs30
-rw-r--r--toolkit/actors/FindBarChild.sys.mjs7
-rw-r--r--toolkit/actors/PictureInPictureChild.sys.mjs12
-rw-r--r--toolkit/actors/SelectChild.sys.mjs12
-rw-r--r--toolkit/actors/SelectParent.sys.mjs2
6 files changed, 37 insertions, 29 deletions
diff --git a/toolkit/actors/AutoCompleteParent.sys.mjs b/toolkit/actors/AutoCompleteParent.sys.mjs
index 27f3dcbe07..611677a84f 100644
--- a/toolkit/actors/AutoCompleteParent.sys.mjs
+++ b/toolkit/actors/AutoCompleteParent.sys.mjs
@@ -503,7 +503,8 @@ export class AutoCompleteParent extends JSWindowActorParent {
* that the open popup should be focused.
*/
requestFocus() {
- // Bug 1582722 - See the response in AutoCompleteChild.jsm for why this disabled.
+ // Bug 1582722 - See the response in AutoCompleteChild.sys.mjs for why this
+ // disabled.
/*
if (this.openedPopup) {
this.sendAsyncMessage("FormAutoComplete:Focus");
diff --git a/toolkit/actors/AutoScrollChild.sys.mjs b/toolkit/actors/AutoScrollChild.sys.mjs
index 25e2ae77a5..11324b4eaa 100644
--- a/toolkit/actors/AutoScrollChild.sys.mjs
+++ b/toolkit/actors/AutoScrollChild.sys.mjs
@@ -215,8 +215,14 @@ export class AutoScrollChild extends JSWindowActorChild {
return;
}
- Services.els.addSystemEventListener(this.document, "mousemove", this, true);
- Services.els.addSystemEventListener(this.document, "mouseup", this, true);
+ this.document.addEventListener("mousemove", this, {
+ capture: true,
+ mozSystemGroup: true,
+ });
+ this.document.addEventListener("mouseup", this, {
+ capture: true,
+ mozSystemGroup: true,
+ });
this.document.addEventListener("pagehide", this, true);
this._startX = event.screenX;
@@ -254,18 +260,14 @@ export class AutoScrollChild extends JSWindowActorChild {
this._scrollable.mozScrollSnap();
this._scrollable = null;
- Services.els.removeSystemEventListener(
- this.document,
- "mousemove",
- this,
- true
- );
- Services.els.removeSystemEventListener(
- this.document,
- "mouseup",
- this,
- true
- );
+ this.document.removeEventListener("mousemove", this, {
+ capture: true,
+ mozSystemGroup: true,
+ });
+ this.document.removeEventListener("mouseup", this, {
+ capture: true,
+ mozSystemGroup: true,
+ });
this.document.removeEventListener("pagehide", this, true);
if (this._autoscrollHandledByApz) {
Services.obs.removeObserver(
diff --git a/toolkit/actors/FindBarChild.sys.mjs b/toolkit/actors/FindBarChild.sys.mjs
index 645456ad1f..8aed35a769 100644
--- a/toolkit/actors/FindBarChild.sys.mjs
+++ b/toolkit/actors/FindBarChild.sys.mjs
@@ -141,11 +141,8 @@ export class FindBarChild extends JSWindowActorChild {
return false;
}
- if (
- (win.HTMLIFrameElement.isInstance(elt) && elt.mozbrowser) ||
- win.XULFrameElement.isInstance(elt)
- ) {
- // If we're targeting a mozbrowser iframe or an embedded XULFrameElement
+ if (win.XULFrameElement.isInstance(elt)) {
+ // If we're targeting an embedded XULFrameElement
// (e.g. about:addons extensions inline options page), do not activate
// fast find.
return false;
diff --git a/toolkit/actors/PictureInPictureChild.sys.mjs b/toolkit/actors/PictureInPictureChild.sys.mjs
index 62dc6cdfff..2a415df32d 100644
--- a/toolkit/actors/PictureInPictureChild.sys.mjs
+++ b/toolkit/actors/PictureInPictureChild.sys.mjs
@@ -1225,11 +1225,11 @@ export class PictureInPictureToggleChild extends JSWindowActorChild {
let shadowRoot = video.openOrClosedShadowRoot;
if (shadowRoot.firstChild && video != oldOverVideo) {
- if (video.getTransformToViewport().a == -1) {
- shadowRoot.firstChild.setAttribute("flipped", true);
- } else {
- shadowRoot.firstChild.removeAttribute("flipped");
- }
+ // TODO: Maybe this should move to videocontrols.js somehow.
+ shadowRoot.firstChild.toggleAttribute(
+ "flipped",
+ video.getTransformToViewport().a == -1
+ );
}
// It seems from automated testing that if it's still very early on in the
@@ -1812,7 +1812,7 @@ export class PictureInPictureChild extends JSWindowActorChild {
* 4) all active cues with VTTCue.line integer have VTTCue.snapToLines = true
* 5) all active cues with VTTCue.line percentage have VTTCue.snapToLines = false
*
- * vtt.jsm currently sets snapToLines to false if line is a percentage value, but
+ * vtt.sys.mjs currently sets snapToLines to false if line is a percentage value, but
* cues are still ordered by line. In most cases, snapToLines is set to true by default,
* unless intentionally overridden.
* @param allCuesArray {Array<VTTCue>} array of active cues
diff --git a/toolkit/actors/SelectChild.sys.mjs b/toolkit/actors/SelectChild.sys.mjs
index a6d96d1b79..1bc80001ae 100644
--- a/toolkit/actors/SelectChild.sys.mjs
+++ b/toolkit/actors/SelectChild.sys.mjs
@@ -15,7 +15,7 @@ ChromeUtils.defineESModuleGetters(lazy, {
const kStateActive = 0x00000001; // ElementState::ACTIVE
const kStateHover = 0x00000004; // ElementState::HOVER
-// Duplicated in SelectParent.jsm
+// Duplicated in SelectParent.sys.mjs
// Please keep these lists in sync.
const SUPPORTED_OPTION_OPTGROUP_PROPERTIES = [
"direction",
@@ -277,7 +277,7 @@ SelectContentHelper.prototype = {
InspectorUtils.removeContentState(this.element, kStateHover);
break;
- case "Forms:MouseUp":
+ case "Forms:MouseUp": {
let win = this.element.ownerGlobal;
if (message.data.onAnchor) {
this.dispatchMouseEvent(win, this.element, "mouseup");
@@ -287,6 +287,7 @@ SelectContentHelper.prototype = {
this.dispatchMouseEvent(win, this.element, "click");
}
break;
+ }
case "Forms:SearchFocused":
this._closeAfterBlur = false;
@@ -346,6 +347,13 @@ function getComputedStyles(element) {
function supportedStyles(cs, supportedProps) {
let styles = {};
for (let property of supportedProps) {
+ if (property == "font-size") {
+ let usedSize = cs.usedFontSize;
+ if (usedSize >= 0.0) {
+ styles[property] = usedSize + "px";
+ continue;
+ }
+ }
styles[property] = cs.getPropertyValue(property);
}
return styles;
diff --git a/toolkit/actors/SelectParent.sys.mjs b/toolkit/actors/SelectParent.sys.mjs
index 6d14807e44..5382b35ab3 100644
--- a/toolkit/actors/SelectParent.sys.mjs
+++ b/toolkit/actors/SelectParent.sys.mjs
@@ -32,7 +32,7 @@ const PROPERTIES_RESET_WHEN_ACTIVE = [
"text-shadow",
];
-// Duplicated in SelectChild.jsm
+// Duplicated in SelectChild.sys.mjs
// Please keep these lists in sync.
const SUPPORTED_OPTION_OPTGROUP_PROPERTIES = [
"direction",