Skip to content

Move -servo-display-for-hypothetical-box outside of mako. #19697

Closed

Description

@CYBAI

I'll take this one as a sub-issue of #19015

Activity

  1. emilio commented on Jan 5, 2018

    @emilio
    Member

    This is great! Do you have any particular plan for it? My idea for this is getting rid of the custom_cascade stuff, and unify how it works with Gecko.

    Gecko uses mOriginalDisplay for this, and sets that from gecko.mako.rs. I planned to unify it setting it in StyleAdjuster::adjust, something like:

    if let Some(mut box) = self.style.get_box_if_mutated() {
        // Save the display value without style adjustments now, which we need for hypothetical boxes.
        let display = box.clone_display();
        box.set_original_display(display);
    }

    And we can remove set_adjusted_display, since now it's just set_display, and remove the whole -servo-display-for-hypothetical-box, which is just get_original_display, or something like that.

  2. CYBAI commented on Jan 5, 2018

    @CYBAI
    MemberAuthor

    @emilio No, I didn't have my own plan. However, after you mentioned, I searched custom_cascade in Servo. Then, I found it's only used for -servo-text-decorations-in-effect and -servo-display-for-hypothetical-box. I'm willing to help to get rid of it and make it unify with Gecko.

    So, after removing all set_adjusted_display methods and setting display inside StyleAdjuster::adjust, then we don't have the attribute, -servo-display-for-hypothetical-box, because it's just get_original_display.

  3. added 5 commits that reference this issue on Jan 10, 2018
    da7fe9c
    730ff59
    a8fa2f3
    580afb8
    1b46e2e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions