From 2e5078e9c50b58873b199297be5ccae672c14c6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Mon, 3 Jun 2019 08:44:57 -0400 Subject: [PATCH] layout: Fix servo build. --- components/layout/display_list/builder.rs | 6 +++--- components/layout/fragment.rs | 2 +- components/script/dom/canvasrenderingcontext2d.rs | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/components/layout/display_list/builder.rs b/components/layout/display_list/builder.rs index cc2585c3043..08fad71b4ea 100644 --- a/components/layout/display_list/builder.rs +++ b/components/layout/display_list/builder.rs @@ -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(), }, ))); } @@ -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. diff --git a/components/layout/fragment.rs b/components/layout/fragment.rs index d3e9dbb6779..72029fb2484 100644 --- a/components/layout/fragment.rs +++ b/components/layout/fragment.rs @@ -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 diff --git a/components/script/dom/canvasrenderingcontext2d.rs b/components/script/dom/canvasrenderingcontext2d.rs index 2a26a1c5752..039ff1039f9 100644 --- a/components/script/dom/canvasrenderingcontext2d.rs +++ b/components/script/dom/canvasrenderingcontext2d.rs @@ -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)), }