diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-15 03:35:49 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-15 03:35:49 +0000 |
commit | d8bbc7858622b6d9c278469aab701ca0b609cddf (patch) | |
tree | eff41dc61d9f714852212739e6b3738b82a2af87 /widget/Theme.cpp | |
parent | Releasing progress-linux version 125.0.3-1~progress7.99u1. (diff) | |
download | firefox-d8bbc7858622b6d9c278469aab701ca0b609cddf.tar.xz firefox-d8bbc7858622b6d9c278469aab701ca0b609cddf.zip |
Merging upstream version 126.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'widget/Theme.cpp')
-rw-r--r-- | widget/Theme.cpp | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/widget/Theme.cpp b/widget/Theme.cpp index 1fcd3d4bc3..15bf68ec01 100644 --- a/widget/Theme.cpp +++ b/widget/Theme.cpp @@ -296,6 +296,9 @@ std::pair<sRGBColor, sRGBColor> Theme::ComputeButtonColors( bool isHovered = aState.HasState(ElementState::HOVER); nscolor backgroundColor = [&] { + if (aState.HasState(ElementState::AUTOFILL)) { + return aColors.SystemNs(StyleSystemColor::MozAutofillBackground); + } if (isDisabled) { return aColors.SystemNs(StyleSystemColor::MozButtondisabledface); } @@ -308,12 +311,6 @@ std::pair<sRGBColor, sRGBColor> Theme::ComputeButtonColors( return aColors.SystemNs(StyleSystemColor::Buttonface); }(); - if (aState.HasState(ElementState::AUTOFILL)) { - backgroundColor = NS_ComposeColors( - backgroundColor, - aColors.SystemNs(StyleSystemColor::MozAutofillBackground)); - } - const sRGBColor borderColor = ComputeBorderColor(aState, aColors, OutlineCoversBorder::Yes); return std::make_pair(sRGBColor::FromABGR(backgroundColor), borderColor); @@ -323,18 +320,15 @@ std::pair<sRGBColor, sRGBColor> Theme::ComputeTextfieldColors( const ElementState& aState, const Colors& aColors, OutlineCoversBorder aOutlineCoversBorder) { nscolor backgroundColor = [&] { + if (aState.HasState(ElementState::AUTOFILL)) { + return aColors.SystemNs(StyleSystemColor::MozAutofillBackground); + } if (aState.HasState(ElementState::DISABLED)) { return aColors.SystemNs(StyleSystemColor::MozDisabledfield); } return aColors.SystemNs(StyleSystemColor::Field); }(); - if (aState.HasState(ElementState::AUTOFILL)) { - backgroundColor = NS_ComposeColors( - backgroundColor, - aColors.SystemNs(StyleSystemColor::MozAutofillBackground)); - } - const sRGBColor borderColor = ComputeBorderColor(aState, aColors, aOutlineCoversBorder); return std::make_pair(sRGBColor::FromABGR(backgroundColor), borderColor); |