Bug 1474959 part 4 - Remove now unused ComputedValueFlags::IS_RELEVANT_LINK_VISITED. r?emilio
MozReview-Commit-ID: 3Yl7QDgdUoM
--- 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;