From 459ed6ea85942bc0aa2e10d91b606a9a5f3bc074 Mon Sep 17 00:00:00 2001 From: MeladJM Date: Sat, 26 Jul 2025 04:07:54 +0800 Subject: [PATCH] Issue #2790 - Cleanup: Remove debugging lines --- layout/style/RuleCascadeData.cpp | 2 -- layout/style/nsCSSRuleUtils.cpp | 2 -- layout/style/res/forms.css | 32 ------------------- .../FormAutofillContentService.js | 22 ------------- .../passwordmgr/LoginManagerContent.jsm | 2 +- .../satchel/nsFormFillController.cpp | 4 --- 6 files changed, 1 insertion(+), 63 deletions(-) diff --git a/layout/style/RuleCascadeData.cpp b/layout/style/RuleCascadeData.cpp index 349f2ca6ff..da6a4e70de 100644 --- a/layout/style/RuleCascadeData.cpp +++ b/layout/style/RuleCascadeData.cpp @@ -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(pseudoClass->mType); states |= nsCSSPseudoClasses::sPseudoClassStateDependences[idx]; diff --git a/layout/style/nsCSSRuleUtils.cpp b/layout/style/nsCSSRuleUtils.cpp index bbba88fbea..1b987cbab8 100644 --- a/layout/style/nsCSSRuleUtils.cpp +++ b/layout/style/nsCSSRuleUtils.cpp @@ -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(pseudoClass->mType); EventStates statesToCheck = nsCSSPseudoClasses::sPseudoClassStates[idx]; if (!statesToCheck.IsEmpty() && !StateSelectorMatches(aElement, diff --git a/layout/style/res/forms.css b/layout/style/res/forms.css index d0f2c101fd..bc07a8ff4a 100644 --- a/layout/style/res/forms.css +++ b/layout/style/res/forms.css @@ -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