Closed Bug 1012413 Opened 10 years ago Closed 6 years ago

computed style from an iframe that became display:none after the getComputedStyle call throws NS_ERROR_NOT_AVAILABLE when you try to ask for computed property values (no presshell)

Categories

(Core :: DOM: CSS Object Model, defect)

30 Branch
x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 1467722

People

(Reporter: markelog, Unassigned)

References

(Blocks 1 open bug)

Details

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1847.137 Safari/537.36

Steps to reproduce:

Go to http://jsfiddle.net/2fEYL/


Actual results:

"Component is not available" error was thrown


Expected results:

"ltr" value of CSS property "direction" should have been returned.

Corresponding issues in jQuery bug tracker – http://bugs.jquery.com/ticket/15098
and wikimedia bug tracker – https://bugzilla.wikimedia.org/show_bug.cgi?id=65373
Component: Untriaged → DOM: CSS Object Model
Product: Firefox → Core
Status: UNCONFIRMED → NEW
Ever confirmed: true
Summary: THROWS NS_ERROR_NOT_AVAILABLE from defaultView.getComputedStyle → computed style from an iframe that became display:none after the getComputedStyle call throws NS_ERROR_NOT_AVAILABLE when you try to ask for computed property values (no presshell)
Oh, and the testcase is basically this:

  <iframe></iframe>
  <script>
    var i = document.querySelector("iframe");
    var c = i.contentWindow.getComputedStyle(i.contentDocument.body);
    i.style.display = "none";
    try {
      alert(c.getPropertyValue("direction"));
    } catch(e) {
      alert("Exception thrown: " + e);
    }
  </script>
Related to bug 548397 , I presume
See Also: → 548397
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.