Closed Bug 1366157 Opened 7 years ago Closed 7 years ago

stylo: Implement Window.getDefaultComputedStyle

Categories

(Core :: CSS Parsing and Computation, enhancement, P1)

53 Branch
enhancement

Tracking

()

RESOLVED FIXED
mozilla55
Tracking Status
firefox55 --- fixed

People

(Reporter: xidorn, Assigned: heycam)

References

Details

Attachments

(1 file, 1 obsolete file)

Apparently we failed to remove it in bug 1355683, so Stylo needs to implement it.
Attachment #8870704 - Flags: review?(emilio+bugs)
Assignee: nobody → cam
Priority: -- → P1
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 on attachment 8870703 [details]
Bug 1366157 - stylo: Implement getDefaultComputedStyle.

https://reviewboard.mozilla.org/r/142188/#review146036
Attachment #8870703 - Flags: review?(emilio+bugs) → review+
Attachment #8870704 - Attachment is obsolete: true
Pushed by cmccormack@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/7ff936cd4cf4
stylo: Implement getDefaultComputedStyle. r=emilio
https://hg.mozilla.org/mozilla-central/rev/7ff936cd4cf4
https://hg.mozilla.org/mozilla-central/rev/02bdc7d39a54
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: