author | Ryan VanderMeulen <ryanvm@gmail.com> |
Fri, 13 Oct 2017 19:04:43 -0400 | |
changeset 432512 | 4a8c7830ff4822da140890800b401d462695ccc5 |
parent 432511 | d8aed408f78ab140803bb8d73248c7491c21ae9c |
child 432513 | 76b9a79e1fe540b3e7c15047264e79eccf91c150 |
push id | 7970 |
push user | ryanvm@gmail.com |
push date | Fri, 13 Oct 2017 23:05:15 +0000 |
treeherder | mozilla-beta@4a8c7830ff48 [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
bugs | 1406254 |
milestone | 57.0 |
backs out | e71e4cda4c2d8456a3240862ed29141f6275c693 704d8010a876103c4efadc220714bdccd65de35a |
deleted file mode 100644 --- a/layout/reftests/css-visited/color-on-visited-text-1-ref.html +++ /dev/null @@ -1,16 +0,0 @@ -<!DOCTYPE html> -<style> - .unvisited { - color: blue; - } - .visited { - color: purple; - } - .first-line { - color: green; - } -</style> -<div class="first-line">Visited</div> -<div class="first-line">Visited with span</div> -<div class="unvisited">Visited with inner unvisited</div> -<div class="visited">Visited with inner visited</div>
deleted file mode 100644 --- a/layout/reftests/css-visited/color-on-visited-text-1.html +++ /dev/null @@ -1,20 +0,0 @@ -<!DOCTYPE html> -<style> - a { - display: block; - text-decoration: none; - } - :link { - color: blue; - } - :visited { - color: purple; - } - .outer::first-line { - color: green; - } -</style> -<a class="outer" href>Visited</a> -<a class="outer" href><span>Visited with span</span></a> -<a class="outer" href><a href="unvisited-page.html">Visited with inner unvisited</a></a> -<a class="outer" href><a href>Visited with inner visited</a></a>
--- a/layout/style/test/moz.build +++ b/layout/style/test/moz.build @@ -55,18 +55,16 @@ TEST_HARNESS_FILES.testing.mochitest.tes '/layout/reftests/css-visited/color-on-link-1-ref.html', '/layout/reftests/css-visited/color-on-link-1.html', '/layout/reftests/css-visited/color-on-link-before-1.html', '/layout/reftests/css-visited/color-on-text-decoration-1-ref.html', '/layout/reftests/css-visited/color-on-text-decoration-1.html', '/layout/reftests/css-visited/color-on-visited-1-ref.html', '/layout/reftests/css-visited/color-on-visited-1.html', '/layout/reftests/css-visited/color-on-visited-before-1.html', - '/layout/reftests/css-visited/color-on-visited-text-1-ref.html', - '/layout/reftests/css-visited/color-on-visited-text-1.html', '/layout/reftests/css-visited/column-rule-1-notref.html', '/layout/reftests/css-visited/column-rule-1-ref.html', '/layout/reftests/css-visited/column-rule-1.html', '/layout/reftests/css-visited/content-before-1-ref.html', '/layout/reftests/css-visited/content-color-on-link-before-1-ref.html', '/layout/reftests/css-visited/content-color-on-link-before-1.html', '/layout/reftests/css-visited/content-color-on-visited-before-1-ref.html', '/layout/reftests/css-visited/content-color-on-visited-before-1.html',
--- a/layout/style/test/test_visited_reftests.html +++ b/layout/style/test/test_visited_reftests.html @@ -33,17 +33,16 @@ var gTests = [ // coloring on the TEST (first file) until the test passes. "== pseudo-classes-02.svg pseudo-classes-02-ref.svg", "needs-focus == caret-color-on-visited-1.html caret-color-on-visited-1-ref.html", "!= color-on-link-1-ref.html color-on-visited-1-ref.html", "== color-on-link-1.html color-on-link-1-ref.html", "== color-on-link-before-1.html color-on-link-1-ref.html", "== color-on-visited-1.html color-on-visited-1-ref.html", "== color-on-visited-before-1.html color-on-visited-1-ref.html", - "== color-on-visited-text-1.html color-on-visited-text-1-ref.html", "!= content-color-on-link-before-1-ref.html content-color-on-visited-before-1-ref.html", "== content-color-on-link-before-1.html content-color-on-link-before-1-ref.html", "== content-color-on-visited-before-1.html content-color-on-visited-before-1-ref.html", "== content-on-link-before-1.html content-before-1-ref.html", "== content-on-visited-before-1.html content-before-1-ref.html", "== color-on-text-decoration-1.html color-on-text-decoration-1-ref.html", "== color-on-bullets-1.html color-on-bullets-1-ref.html", // NOTE: background-color is tested by all the selector tests (and
--- a/servo/components/style/properties/gecko.mako.rs +++ b/servo/components/style/properties/gecko.mako.rs @@ -318,17 +318,17 @@ impl ComputedValuesInner { } /// Gets a reference to the visited style. Panic if no visited style exists. pub fn visited_style(&self) -> &ComputedValues { self.get_visited_style().unwrap() } /// Clone the visited style. Used for inheriting parent styles in - /// StyleBuilder::for_derived_style. + /// StyleBuilder::for_inheritance. pub fn clone_visited_style(&self) -> Option<Arc<ComputedValues>> { self.visited_style.as_ref().map(|x| x.clone_arc()) } /// Gets a reference to the custom properties map (if one exists). pub fn get_custom_properties(&self) -> Option<<&::custom_properties::CustomPropertiesMap> { self.custom_properties.as_ref().map(|x| &**x) }
--- a/servo/components/style/properties/properties.mako.rs +++ b/servo/components/style/properties/properties.mako.rs @@ -2165,17 +2165,17 @@ impl ComputedValuesInner { } /// Gets a reference to the visited style. Panic if no visited style exists. pub fn visited_style(&self) -> &ComputedValues { self.get_visited_style().unwrap() } /// Clone the visited style. Used for inheriting parent styles in - /// StyleBuilder::for_derived_style. + /// StyleBuilder::for_inheritance. pub fn clone_visited_style(&self) -> Option<Arc<ComputedValues>> { self.visited_style.clone() } // Aah! The << in the return type below is not valid syntax, but we must // escape < that way for Mako. /// Gets a reference to the custom properties map (if one exists). pub fn get_custom_properties(&self) -> Option<<&::custom_properties::CustomPropertiesMap> { @@ -2825,43 +2825,31 @@ impl<'a> StyleBuilder<'a> { /// Inherits style from the parent element, accounting for the default /// computed values that need to be provided as well. pub fn for_inheritance( device: &'a Device, parent: &'a ComputedValues, pseudo: Option<<&'a PseudoElement>, ) -> Self { - // Rebuild the visited style from the parent, ensuring that it will also - // not have rules. This matches the unvisited style that will be - // produced by this builder. This assumes that the caller doesn't need - // to adjust or process visited style, so we can just build visited - // style here for simplicity. - let visited_style = parent.visited_style().map(|style| { - Self::for_inheritance( - device, - style, - pseudo, - ).build() - }); // FIXME(emilio): This Some(parent) here is inconsistent with what we // usually do if `parent` is the default computed values, but that's // fine, and we want to eventually get rid of it. Self::new( device, Some(parent), Some(parent), pseudo, CascadeFlags::empty(), /* rules = */ None, parent.custom_properties(), parent.writing_mode, parent.font_computation_data, parent.flags, - visited_style, + parent.clone_visited_style() ) } /// Returns whether we have a visited style. pub fn has_visited_style(&self) -> bool { self.visited_style.is_some() }