Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

style: sync changes from mozilla-central #23503

Merged
merged 17 commits into from Jun 4, 2019
Merged
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

style: Remove nsStyleColor moving the color property to nsStyleText.

I think this is a good change regardless of other discussion in bug 1552587. If
we decide to move `mColor` to the top-level of the struct that can be done
separately.

Differential Revision: https://phabricator.services.mozilla.com/D32726
  • Loading branch information
emilio committed Jun 4, 2019
commit 6722e2ce6cc12a163e5baa82de5195c26f378955
@@ -718,7 +718,7 @@ pub trait MatchMethods: TElement {
let device = context.shared.stylist.device();

// Needed for the "inherit from body" quirk.
let text_color = new_primary_style.get_color().clone_color();
let text_color = new_primary_style.get_inherited_text().clone_color();
device.set_body_text_color(text_color);
}
}
@@ -25,7 +25,6 @@
"background",
"border",
"box",
"color",
"column",
"counters",
"effects",
@@ -3355,9 +3355,6 @@ clip-path
}
</%self:impl_trait>

<%self:impl_trait style_struct_name="Color">
</%self:impl_trait>

<%self:impl_trait style_struct_name="InheritedUI" skip_longhands="cursor">
pub fn set_cursor(&mut self, v: longhands::cursor::computed_value::T) {
self.gecko.mCursor = v.keyword;

This file was deleted.

@@ -6,6 +6,16 @@
<% from data import Keyword %>
<% data.new_style_struct("InheritedText", inherited=True, gecko_name="Text") %>

${helpers.predefined_type(
"color",
"ColorPropertyValue",
"::cssparser::RGBA::new(0, 0, 0, 255)",
animation_value_type="AnimatedRGBA",
flags="APPLIES_TO_FIRST_LETTER APPLIES_TO_FIRST_LINE APPLIES_TO_PLACEHOLDER",
ignored_when_colors_disabled="True",
spec="https://drafts.csswg.org/css-color/#color",
)}

${helpers.predefined_type(
"line-height",
"LineHeight",
@@ -2832,7 +2832,7 @@ impl ComputedValues {
/// style.resolve_color(style.get_border().clone_border_top_color());
#[inline]
pub fn resolve_color(&self, color: computed::Color) -> RGBA {
color.to_rgba(self.get_color().clone_color())
color.to_rgba(self.get_inherited_text().clone_color())
}
}

@@ -645,7 +645,7 @@ impl ToComputedValue for ColorPropertyValue {
fn to_computed_value(&self, context: &Context) -> RGBA {
self.0
.to_computed_value(context)
.to_rgba(context.builder.get_parent_color().clone_color())
.to_rgba(context.builder.get_parent_inherited_text().clone_color())
}

#[inline]
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.