Issue #2790 - Cleanup: Remove debugging lines

This commit is contained in:
MeladJM 2025-07-26 04:07:54 +08:00 • committed by roytam1
commit 459ed6ea85
6 changed files with 1 additions and 63 deletions

View file

@ -1270,13 +1270,11 @@ ComputeSelectorStateDependence(nsCSSSelector& aSelector)
continue;
}
// --- BEGIN PATCH: Explicit autofill state dependence ---
if (pseudoClass->mType == CSSPseudoClassType::autofill ||
pseudoClass->mType == CSSPseudoClassType::mozAutofillHighlight) {
states |= NS_EVENT_STATE_AUTOFILL;
continue;
}
// --- END PATCH ---
auto idx = static_cast<CSSPseudoClassTypeBase>(pseudoClass->mType);
states |= nsCSSPseudoClasses::sPseudoClassStateDependences[idx];

View file

@ -576,7 +576,6 @@ nsCSSRuleUtils::StateSelectorMatches(Element* aElement,
for (nsPseudoClassList* pseudoClass = aSelector->mPseudoClassList;
pseudoClass;
pseudoClass = pseudoClass->mNext) {
// --- Autofill explicit matching ---
if (pseudoClass->mType == CSSPseudoClassType::autofill ||
pseudoClass->mType == CSSPseudoClassType::mozAutofillHighlight) {
// Match if the element has the autofill state, regardless of focus
@ -585,7 +584,6 @@ nsCSSRuleUtils::StateSelectorMatches(Element* aElement,
}
continue; // This pseudo-class matches
}
// --- End autofill explicit matching ---
auto idx = static_cast<CSSPseudoClassTypeBase>(pseudoClass->mType);
EventStates statesToCheck = nsCSSPseudoClasses::sPseudoClassStates[idx];
if (!statesToCheck.IsEmpty() && !StateSelectorMatches(aElement,

View file

@ -82,24 +82,8 @@ label {
/* Note: Values in nsNativeTheme IsWidgetStyled function
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 {
-moz-appearance: textfield;
appearance: textfield;
/* The sum of border and padding on block-start and block-end
must be the same here, for buttons, and for <select> (including its
internal padding magic) */
@ -107,22 +91,6 @@ input {
border: 2px inset ThreeDLightShadow;
background-color: -moz-Field;
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;
text-rendering: optimizeLegibility;
line-height: normal;