Bug 1474959 part 4 - Remove now unused ComputedValueFlags::IS_RELEVANT_LINK_VISITED. r?emilio draft
authorXidorn Quan <me@upsuper.org>
Thu, 12 Jul 2018 21:52:47 +1000
changeset 817334 4a75f87f670f3a5cf558346e7134bc91e317aa2a
parent 817333 589ef910cbc71ebd1ed83c40bde81e0fc4c2add5
child 817335 fa4195fb2cb239c3adf6304e56d46e04b3fff125
push id116022
push userxquan@mozilla.com
push dateThu, 12 Jul 2018 12:09:47 +0000
reviewersemilio
bugs1474959
milestone63.0a1
Bug 1474959 part 4 - Remove now unused ComputedValueFlags::IS_RELEVANT_LINK_VISITED. r?emilio MozReview-Commit-ID: 3Yl7QDgdUoM
servo/components/style/properties/computed_value_flags.rs
servo/ports/geckolib/glue.rs
--- a/servo/components/style/properties/computed_value_flags.rs
+++ b/servo/components/style/properties/computed_value_flags.rs
@@ -29,19 +29,17 @@ bitflags! {
         /// It is currently used by ruby to make its content unbreakable.
         const SHOULD_SUPPRESS_LINEBREAK = 1 << 1;
 
         /// A flag used to mark text that that has text-combine-upright.
         ///
         /// This is used from Gecko's layout engine.
         const IS_TEXT_COMBINED = 1 << 2;
 
-        /// A flag used to mark styles under a relevant link that is also
-        /// visited.
-        const IS_RELEVANT_LINK_VISITED = 1 << 3;
+        // const UNUSED_BIT = 1 << 3;
 
         /// A flag used to mark styles which are a pseudo-element or under one.
         const IS_IN_PSEUDO_ELEMENT_SUBTREE = 1 << 4;
 
         /// Whether this style inherits the `display` property.
         ///
         /// This is important because it may affect our optimizations to avoid
         /// computing the style of pseudo-elements, given whether the
@@ -66,17 +64,16 @@ bitflags! {
     }
 }
 
 impl ComputedValueFlags {
     /// Flags that are unconditionally propagated to descendants.
     #[inline]
     fn inherited_flags() -> Self {
         ComputedValueFlags::IS_STYLE_IF_VISITED |
-        ComputedValueFlags::IS_RELEVANT_LINK_VISITED |
         ComputedValueFlags::CAN_BE_FRAGMENTED |
         ComputedValueFlags::IS_IN_PSEUDO_ELEMENT_SUBTREE |
         ComputedValueFlags::HAS_TEXT_DECORATION_LINES
     }
 
     /// Flags that may be propagated to descendants.
     #[inline]
     fn maybe_inherited_flags() -> Self {
--- a/servo/ports/geckolib/glue.rs
+++ b/servo/ports/geckolib/glue.rs
@@ -3123,19 +3123,16 @@ pub unsafe extern "C" fn Servo_ComputedV
 }
 
 #[no_mangle]
 pub extern "C" fn Servo_ComputedValues_GetStyleBits(values: ComputedStyleBorrowed) -> u8 {
     use style::properties::computed_value_flags::ComputedValueFlags;
     // FIXME(emilio): We could do this more efficiently I'm quite sure.
     let flags = values.flags;
     let mut result = 0;
-    if flags.contains(ComputedValueFlags::IS_RELEVANT_LINK_VISITED) {
-        result |= structs::ComputedStyleBit_RelevantLinkVisited;
-    }
     if flags.contains(ComputedValueFlags::HAS_TEXT_DECORATION_LINES) {
         result |= structs::ComputedStyleBit_HasTextDecorationLines;
     }
     if flags.contains(ComputedValueFlags::SHOULD_SUPPRESS_LINEBREAK) {
         result |= structs::ComputedStyleBit_SuppressLineBreak;
     }
     if flags.contains(ComputedValueFlags::IS_TEXT_COMBINED) {
         result |= structs::ComputedStyleBit_IsTextCombined;