1
0
mirror of https://github.com/bitwarden/browser.git synced 2025-02-14 01:01:31 +01:00

[PM-8027] Cleaning up implementation details

This commit is contained in:
Cesar Gonzalez 2024-05-31 15:10:19 -05:00
parent ff96fc1773
commit dafdb43731
No known key found for this signature in database
GPG Key ID: 3381A5457F8CCECF

View File

@ -125,21 +125,6 @@ class CollectAutofillContentService implements CollectAutofillContentServiceInte
return pageDetails;
}
private setupInlineMenuListeners(pageDetails: AutofillPageDetails) {
if (!this.autofillOverlayContentService) {
return;
}
const formFieldElements = Array.from(this.autofillFieldElements.keys());
for (const element of formFieldElements) {
void this.autofillOverlayContentService.setupAutofillOverlayListenerOnField(
element,
this.autofillFieldElements.get(element),
pageDetails,
);
}
}
/**
* Find an AutofillField element by its opid, will only return the first
* element if there are multiple elements with the same opid. If no
@ -470,10 +455,6 @@ class CollectAutofillContentService implements CollectAutofillContentServiceInte
if (elementIsSpanElement(element)) {
this.cacheAutofillFieldElement(index, element, autofillFieldBase);
// void this.autofillOverlayContentService?.setupAutofillOverlayListenerOnField(
// element,
// autofillFieldBase,
// );
return autofillFieldBase;
}
@ -513,10 +494,6 @@ class CollectAutofillContentService implements CollectAutofillContentServiceInte
};
this.cacheAutofillFieldElement(index, element, autofillField);
// void this.autofillOverlayContentService?.setupAutofillOverlayListenerOnField(
// element,
// autofillField,
// );
return autofillField;
};
@ -1455,6 +1432,20 @@ class CollectAutofillContentService implements CollectAutofillContentServiceInte
}
};
private setupInlineMenuListeners(pageDetails: AutofillPageDetails) {
if (!this.autofillOverlayContentService) {
return;
}
this.autofillFieldElements.forEach((autofillField, formFieldElement) => {
void this.autofillOverlayContentService.setupAutofillOverlayListenerOnField(
formFieldElement,
autofillField,
pageDetails,
);
});
}
/**
* Destroys the CollectAutofillContentService. Clears all
* timeouts and disconnects the mutation observer.