stylo: Implement Window.getDefaultComputedStyle

RESOLVED FIXED in Firefox 55

Status

()

P1
normal
RESOLVED FIXED
2 years ago
2 years ago

People

(Reporter: xidorn, Assigned: heycam)

Tracking

(Blocks: 1 bug)

53 Branch
mozilla55
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox55 fixed)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Reporter)

Description

2 years ago
Apparently we failed to remove it in bug 1355683, so Stylo needs to implement it.
Comment hidden (mozreview-request)
Comment hidden (mozreview-request)
(Assignee)

Updated

2 years ago
Attachment #8870704 - Flags: review?(emilio+bugs)
Assignee: nobody → cam
Priority: -- → P1

Comment 4

2 years ago
mozreview-review
Comment on attachment 8870704 [details]
style: Add support for resolving default computed styles.

https://reviewboard.mozilla.org/r/142190/#review146032

::: servo/components/style/gecko/wrapper.rs:431
(Diff revision 1)
>  
> +    /// Sets the specified element data, return any existing data.
> +    ///
> +    /// Like `ensure_data`, only safe to call with exclusive access to the
> +    /// element.
> +    pub unsafe fn set_data(&self, new_element_data: Option<ElementData>) -> Option<ElementData> {

perhaps `replace_data`? That'd be consistent with the naming in the standard library for similar methods I think.

::: servo/components/style/traversal.rs:627
(Diff revision 1)
> +          F: Fn(E),
> +          G: Fn(E, Option<ElementData>) -> Option<ElementData>,
> +          H: FnOnce(&ElementStyles)
> +{
> +    // Save and clear out element data from the element and its ancestors.
> +    let mut old_data: Vec<(E, Option<ElementData>)> = vec![];

nit: Perhaps a `SmallVec` would be nice to have here.
Attachment #8870704 - Flags: review?(emilio+bugs) → review+

Comment 5

2 years ago
mozreview-review
Comment on attachment 8870703 [details]
Bug 1366157 - stylo: Implement getDefaultComputedStyle.

https://reviewboard.mozilla.org/r/142188/#review146036
Attachment #8870703 - Flags: review?(emilio+bugs) → review+
Comment hidden (mozreview-request)
(Assignee)

Updated

2 years ago
Attachment #8870704 - Attachment is obsolete: true
Comment hidden (mozreview-request)

Comment 9

2 years ago
Pushed by cmccormack@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/7ff936cd4cf4
stylo: Implement getDefaultComputedStyle. r=emilio

Comment 11

2 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/7ff936cd4cf4
https://hg.mozilla.org/mozilla-central/rev/02bdc7d39a54
Status: NEW → RESOLVED
Last Resolved: 2 years ago
status-firefox55: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
Duplicate of this bug: 1366636
You need to log in before you can comment on or make changes to this bug.