Skip to content

getComputedStyle should take Element, not HTMLElement. #7268

Closed

Description

@Ms2ger

Code:

  • components/script/dom/webidls/Window.webidl (use the commented-out line, keep the [NewObject] annotation)
  • components/script/dom/window.rs (update the GetComputedStyle implementation)
  • components/script/dom/cssstyledeclaration.rs (change the owner field to JS<Element> and fallout, including removing PrivateCSSStyleDeclarationHelpers)

I suspect there's no test yet. You'll have to write one that creates a non-HTML element (such as with document.createElementNS("http://www.example.com/", "a")), pass it to window.getComputedStyle() and check that it works. Add the file under tests/wpt/mozilla/tests/css/, and then run ./mach test-wpt _mozilla/css --manifest-update to update the manifest. There's documentation at http://testthewebforward.org/docs/ to help with writing the test.

Activity

  1. added
    A-content/css
    E-less-complex
    I-wrong
    on Aug 18, 2015
  2. added a commit that references this issue on Aug 19, 2015
    c7f74b5
  3. added
    C-assigned
    on Aug 19, 2015
  4. frewsxcv commented on Aug 19, 2015

    @frewsxcv
    Contributor

    Marking as assigned. @mdibaiee is working on this

  5. added 2 commits that reference this issue on Aug 21, 2015
    8a3775b
    b7d2515
  6. added 2 commits that reference this issue on Aug 22, 2015
    f6b1834
    6e06cae
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

    A-content/cssC-assignedE-less-complexI-wrong

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions