mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
style: Remove the last usage of lossy currentcolor.
We don't have lossy currentcolor in the style system anymore, except for a single property -moz-font-smoothing-background-color. I could've converted it into a proper StyleColor and thread down all the necessary information to the font metrics code. But it doesn't really seem worth it given it's not exposed to the web, so I just did the simplest thing, which is making currentcolor compute to transparent to that specific property. This patch also removes the stores_complex_colors_lossily code and related, since now we always can cache computed colors. Differential Revision: https://phabricator.services.mozilla.com/D26187
This commit is contained in:
parent
681f861018
commit
5d2724994c
8 changed files with 24 additions and 78 deletions
|
@ -11,14 +11,14 @@ use cssparser::{Color as CSSParserColor, RGBA};
|
|||
use std::fmt;
|
||||
use style_traits::{CssWriter, ToCss};
|
||||
|
||||
/// Computed value type for the specified RGBAColor.
|
||||
pub type RGBAColor = RGBA;
|
||||
|
||||
/// The computed value of the `color` property.
|
||||
pub type ColorPropertyValue = RGBA;
|
||||
|
||||
/// The computed value of `-moz-font-smoothing-background-color`.
|
||||
pub type MozFontSmoothingBackgroundColor = RGBA;
|
||||
|
||||
/// A computed value for `<color>`.
|
||||
pub type Color = GenericColor<RGBAColor>;
|
||||
pub type Color = GenericColor<RGBA>;
|
||||
|
||||
impl Color {
|
||||
/// Returns a complex color value representing transparent.
|
||||
|
|
|
@ -43,7 +43,7 @@ pub use self::box_::{Appearance, BreakBetween, BreakWithin, Clear, Float};
|
|||
pub use self::box_::{Display, Overflow, OverflowAnchor, TransitionProperty};
|
||||
pub use self::box_::{OverflowClipBox, OverscrollBehavior, Perspective, Resize};
|
||||
pub use self::box_::{ScrollSnapAlign, ScrollSnapType, TouchAction, VerticalAlign, WillChange};
|
||||
pub use self::color::{Color, ColorOrAuto, ColorPropertyValue, RGBAColor};
|
||||
pub use self::color::{Color, ColorOrAuto, ColorPropertyValue};
|
||||
pub use self::column::ColumnCount;
|
||||
pub use self::counters::{Content, ContentItem, CounterIncrement, CounterSetOrReset};
|
||||
pub use self::easing::TimingFunction;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue