Skip to content

Commit

Permalink
layout: Fix servo build.
Browse files Browse the repository at this point in the history
  • Loading branch information
emilio committed Jun 4, 2019
1 parent aa03bf2 commit 2e5078e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions components/layout/display_list/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1489,7 +1489,7 @@ impl Fragment {
state.add_display_item(DisplayItem::Rectangle(CommonDisplayItem::new(
base,
webrender_api::RectangleDisplayItem {
color: self.style().get_color().color.to_layout(),
color: self.style().get_inherited_text().color.to_layout(),
},
)));
}
Expand Down Expand Up @@ -1967,9 +1967,9 @@ impl Fragment {
// TODO(emilio): Allow changing more properties by ::selection
// Paint the text with the color as described in its styling.
let text_color = if text_fragment.selected() {
self.selected_style().get_color().color
self.selected_style().get_inherited_text().color
} else {
self.style().get_color().color
self.style().get_inherited_text().color
};

// Determine the orientation and cursor to use.
Expand Down
2 changes: 1 addition & 1 deletion components/layout/fragment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1519,7 +1519,7 @@ impl Fragment {
}

pub fn color(&self) -> Color {
self.style().get_color().color
self.style().get_inherited_text().color
}

/// Returns the text decoration line of this fragment, according to the style of the nearest ancestor
Expand Down
2 changes: 1 addition & 1 deletion components/script/dom/canvasrenderingcontext2d.rs
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ impl CanvasState {

match canvas_element.style() {
Some(ref s) if canvas_element.has_css_layout_box() => {
Ok(s.get_color().color)
Ok(s.get_inherited_text().color)
},
_ => Ok(RGBA::new(0, 0, 0, 255)),
}
Expand Down

0 comments on commit 2e5078e

Please sign in to comment.