mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +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
|
@ -63,7 +63,6 @@ pub mod system_colors {
|
|||
IMESelectedConvertedTextBackground IMESelectedConvertedTextForeground
|
||||
IMESelectedConvertedTextUnderline SpellCheckerUnderline""".split()
|
||||
%>
|
||||
use cssparser::Parser;
|
||||
use gecko_bindings::bindings::Gecko_GetLookAndFeelSystemColor;
|
||||
use gecko_bindings::structs::root::mozilla::LookAndFeel_ColorID;
|
||||
use std::fmt::{self, Write};
|
||||
|
@ -109,7 +108,7 @@ pub mod system_colors {
|
|||
}
|
||||
|
||||
impl SystemColor {
|
||||
pub fn parse<'i, 't>(input: &mut Parser<'i, 't>,) -> Result<Self, ()> {
|
||||
pub fn from_ident<'i, 't>(ident: &str) -> Result<Self, ()> {
|
||||
ascii_case_insensitive_phf_map! {
|
||||
color_name -> SystemColor = {
|
||||
% for color in system_colors:
|
||||
|
@ -118,7 +117,6 @@ pub mod system_colors {
|
|||
}
|
||||
}
|
||||
|
||||
let ident = input.expect_ident().map_err(|_| ())?;
|
||||
color_name(ident).cloned().ok_or(())
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue