mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-24 08:07:30 +09:00
Issue #2790 - Cleanup: Remove debugging lines
This commit is contained in:
parent
156c755085
commit
459ed6ea85
6 changed files with 1 additions and 63 deletions
|
|
@ -1270,13 +1270,11 @@ ComputeSelectorStateDependence(nsCSSSelector& aSelector)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
// --- BEGIN PATCH: Explicit autofill state dependence ---
|
|
||||||
if (pseudoClass->mType == CSSPseudoClassType::autofill ||
|
if (pseudoClass->mType == CSSPseudoClassType::autofill ||
|
||||||
pseudoClass->mType == CSSPseudoClassType::mozAutofillHighlight) {
|
pseudoClass->mType == CSSPseudoClassType::mozAutofillHighlight) {
|
||||||
states |= NS_EVENT_STATE_AUTOFILL;
|
states |= NS_EVENT_STATE_AUTOFILL;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
// --- END PATCH ---
|
|
||||||
|
|
||||||
auto idx = static_cast<CSSPseudoClassTypeBase>(pseudoClass->mType);
|
auto idx = static_cast<CSSPseudoClassTypeBase>(pseudoClass->mType);
|
||||||
states |= nsCSSPseudoClasses::sPseudoClassStateDependences[idx];
|
states |= nsCSSPseudoClasses::sPseudoClassStateDependences[idx];
|
||||||
|
|
|
||||||
|
|
@ -576,7 +576,6 @@ nsCSSRuleUtils::StateSelectorMatches(Element* aElement,
|
||||||
for (nsPseudoClassList* pseudoClass = aSelector->mPseudoClassList;
|
for (nsPseudoClassList* pseudoClass = aSelector->mPseudoClassList;
|
||||||
pseudoClass;
|
pseudoClass;
|
||||||
pseudoClass = pseudoClass->mNext) {
|
pseudoClass = pseudoClass->mNext) {
|
||||||
// --- Autofill explicit matching ---
|
|
||||||
if (pseudoClass->mType == CSSPseudoClassType::autofill ||
|
if (pseudoClass->mType == CSSPseudoClassType::autofill ||
|
||||||
pseudoClass->mType == CSSPseudoClassType::mozAutofillHighlight) {
|
pseudoClass->mType == CSSPseudoClassType::mozAutofillHighlight) {
|
||||||
// Match if the element has the autofill state, regardless of focus
|
// Match if the element has the autofill state, regardless of focus
|
||||||
|
|
@ -585,7 +584,6 @@ nsCSSRuleUtils::StateSelectorMatches(Element* aElement,
|
||||||
}
|
}
|
||||||
continue; // This pseudo-class matches
|
continue; // This pseudo-class matches
|
||||||
}
|
}
|
||||||
// --- End autofill explicit matching ---
|
|
||||||
auto idx = static_cast<CSSPseudoClassTypeBase>(pseudoClass->mType);
|
auto idx = static_cast<CSSPseudoClassTypeBase>(pseudoClass->mType);
|
||||||
EventStates statesToCheck = nsCSSPseudoClasses::sPseudoClassStates[idx];
|
EventStates statesToCheck = nsCSSPseudoClasses::sPseudoClassStates[idx];
|
||||||
if (!statesToCheck.IsEmpty() && !StateSelectorMatches(aElement,
|
if (!statesToCheck.IsEmpty() && !StateSelectorMatches(aElement,
|
||||||
|
|
|
||||||
|
|
@ -82,24 +82,8 @@ label {
|
||||||
/* Note: Values in nsNativeTheme IsWidgetStyled function
|
/* Note: Values in nsNativeTheme IsWidgetStyled function
|
||||||
need to match textfield background/border values here */
|
need to match textfield background/border values here */
|
||||||
|
|
||||||
/* Autofill persistent highlight styles */
|
|
||||||
input:-moz-autofill {
|
|
||||||
background-color: #FFEB3B !important;
|
|
||||||
background-image: none !important;
|
|
||||||
color: fieldtext !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
input:-moz-autofill:hover,
|
|
||||||
input:-moz-autofill:focus,
|
|
||||||
input:-moz-autofill:active {
|
|
||||||
background-color: #FFEB3B !important;
|
|
||||||
background-image: none !important;
|
|
||||||
color: fieldtext !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
input {
|
input {
|
||||||
-moz-appearance: textfield;
|
-moz-appearance: textfield;
|
||||||
appearance: textfield;
|
|
||||||
/* The sum of border and padding on block-start and block-end
|
/* The sum of border and padding on block-start and block-end
|
||||||
must be the same here, for buttons, and for <select> (including its
|
must be the same here, for buttons, and for <select> (including its
|
||||||
internal padding magic) */
|
internal padding magic) */
|
||||||
|
|
@ -107,22 +91,6 @@ input {
|
||||||
border: 2px inset ThreeDLightShadow;
|
border: 2px inset ThreeDLightShadow;
|
||||||
background-color: -moz-Field;
|
background-color: -moz-Field;
|
||||||
color: -moz-FieldText;
|
color: -moz-FieldText;
|
||||||
}
|
|
||||||
|
|
||||||
/* Autofill styles - make highlighting persist */
|
|
||||||
input:-moz-autofill {
|
|
||||||
background-color: #FFEB3B !important;
|
|
||||||
color: fieldtext !important;
|
|
||||||
background-image: none !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Ensure highlight persists on focus/hover/active states */
|
|
||||||
input:-moz-autofill:hover,
|
|
||||||
input:-moz-autofill:focus,
|
|
||||||
input:-moz-autofill:active {
|
|
||||||
background-color: #FFEB3B !important;
|
|
||||||
color: fieldtext !important;
|
|
||||||
background-image: none !important;
|
|
||||||
font: -moz-field;
|
font: -moz-field;
|
||||||
text-rendering: optimizeLegibility;
|
text-rendering: optimizeLegibility;
|
||||||
line-height: normal;
|
line-height: normal;
|
||||||
|
|
|
||||||
|
|
@ -250,29 +250,7 @@ FormHandler.prototype = {
|
||||||
}
|
}
|
||||||
fieldDetail.element.value = field.value;
|
fieldDetail.element.value = field.value;
|
||||||
|
|
||||||
// Add event listeners for debugging
|
|
||||||
// try {
|
|
||||||
// fieldDetail.element.addEventListener('focus', () => console.log('[JS] input focused'));
|
|
||||||
// fieldDetail.element.addEventListener('blur', () => console.log('[JS] input blurred'));
|
|
||||||
// fieldDetail.element.addEventListener('input', () => console.log('[JS] input event, value:', fieldDetail.element.value));
|
|
||||||
// } catch (e) {
|
|
||||||
// console.log('[JS] Could not add event listeners:', e);
|
|
||||||
// }
|
|
||||||
|
|
||||||
// if (typeof fieldDetail.element.setAutofilled === 'function') {
|
|
||||||
// if (field.value) {
|
|
||||||
// console.log('AUTOFILL: Calling setAutofilled(true) on element');
|
|
||||||
// fieldDetail.element.setAutofilled(true);
|
|
||||||
// console.log('AUTOFILL: setAutofilled(true) called successfully');
|
|
||||||
// } else {
|
|
||||||
// console.log('AUTOFILL: Calling setAutofilled(false) on element (empty value)');
|
|
||||||
// fieldDetail.element.setAutofilled(false);
|
|
||||||
// }
|
|
||||||
// } else {
|
|
||||||
// console.log('AUTOFILL: setAutofilled is not a function on this element');
|
|
||||||
// }
|
|
||||||
|
|
||||||
// Highlight: Set autofilled state for all autofilled fields
|
|
||||||
if (typeof fieldDetail.element.setAutofilled === 'function') {
|
if (typeof fieldDetail.element.setAutofilled === 'function') {
|
||||||
fieldDetail.element.setAutofilled(!!field.value);
|
fieldDetail.element.setAutofilled(!!field.value);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1220,7 +1220,7 @@ var LoginManagerContent = {
|
||||||
};
|
};
|
||||||
log("Saving autoFilledLogin", autoFilledLogin.guid, "for", form.rootElement);
|
log("Saving autoFilledLogin", autoFilledLogin.guid, "for", form.rootElement);
|
||||||
this.stateForDocument(doc).fillsByRootElement.set(form.rootElement, autoFilledLogin);
|
this.stateForDocument(doc).fillsByRootElement.set(form.rootElement, autoFilledLogin);
|
||||||
// Patch: Set autofilled state if value is present
|
// Set autofilled state if value is present
|
||||||
if (typeof passwordField.setAutofilled === "function" && passwordField.value) {
|
if (typeof passwordField.setAutofilled === "function" && passwordField.value) {
|
||||||
passwordField.setAutofilled(true);
|
passwordField.setAutofilled(true);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1347,10 +1347,6 @@ nsFormFillController::StopControllingInput()
|
||||||
nsresult rv;
|
nsresult rv;
|
||||||
nsCOMPtr <nsIFormAutoComplete> formAutoComplete =
|
nsCOMPtr <nsIFormAutoComplete> formAutoComplete =
|
||||||
do_GetService("@mozilla.org/satchel/form-autocomplete;1", &rv);
|
do_GetService("@mozilla.org/satchel/form-autocomplete;1", &rv);
|
||||||
if (formAutoComplete) {
|
|
||||||
// PATCH: Do NOT call StopControllingInput here, so autofill state is NOT cleared on blur/focus.
|
|
||||||
// formAutoComplete->StopControllingInput(mFocusedInput);
|
|
||||||
}
|
|
||||||
|
|
||||||
mFocusedInputNode = nullptr;
|
mFocusedInputNode = nullptr;
|
||||||
mFocusedInput = nullptr;
|
mFocusedInput = nullptr;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue