mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Auto merge of #20240 - emilio:special-color-fix, r=upsuper
style: Fix special color keywords. They're -moz-activehyperlinktext and -moz-visitedhyperlinktext. This fixes https://bugzilla.mozilla.org/show_bug.cgi?id=1444059. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/20240) <!-- Reviewable:end -->
This commit is contained in:
commit
212c321145
2 changed files with 12 additions and 12 deletions
|
@ -52,8 +52,8 @@ mod gecko {
|
|||
MozDefaultColor,
|
||||
MozDefaultBackgroundColor,
|
||||
MozHyperlinktext,
|
||||
MozActiveHyperlinktext,
|
||||
MozVisitedHyperlinktext,
|
||||
MozActivehyperlinktext,
|
||||
MozVisitedhyperlinktext,
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -160,12 +160,14 @@ impl Parse for Color {
|
|||
Err(e) => {
|
||||
#[cfg(feature = "gecko")]
|
||||
{
|
||||
if let Ok(system) = input.try(SystemColor::parse) {
|
||||
return Ok(Color::System(system));
|
||||
}
|
||||
if let Ok(ident) = input.expect_ident() {
|
||||
if let Ok(system) = SystemColor::from_ident(ident) {
|
||||
return Ok(Color::System(system));
|
||||
}
|
||||
|
||||
if let Ok(c) = gecko::SpecialColorKeyword::parse(input) {
|
||||
return Ok(Color::Special(c));
|
||||
if let Ok(c) = gecko::SpecialColorKeyword::from_ident(ident) {
|
||||
return Ok(Color::Special(c));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -368,8 +370,8 @@ impl Color {
|
|||
Keyword::MozDefaultColor => pres_context.mDefaultColor,
|
||||
Keyword::MozDefaultBackgroundColor => pres_context.mBackgroundColor,
|
||||
Keyword::MozHyperlinktext => pres_context.mLinkColor,
|
||||
Keyword::MozActiveHyperlinktext => pres_context.mActiveLinkColor,
|
||||
Keyword::MozVisitedHyperlinktext => pres_context.mVisitedLinkColor,
|
||||
Keyword::MozActivehyperlinktext => pres_context.mActiveLinkColor,
|
||||
Keyword::MozVisitedhyperlinktext => pres_context.mVisitedLinkColor,
|
||||
})
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue