Closed Bug 810584 Opened 12 years ago Closed 10 years ago

parent.parentNode.ownerDocument.defaultView.getComputedStyle(parent.parentNode, null); stopped working

Categories

(Firefox :: Extension Compatibility, defect)

18 Branch
x86_64
Windows 7
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: mayhemer, Unassigned)

References

Details

(Keywords: regression)

Reporting as unconfirmed since I don't know whether this is caused by a silent extension update or by a bug in Firefox.  I'm not 100% sure when this stopped working, but sure it is recent regression.  I'll try with older versions of the extension first.

STR:
- install LastTab extension
- set it up or check it is setup to show a list of all tabs when switching (it is similar to what OS'es do when you are pressing Alt-Tab) ; the list usually appears with a small delay like 500ms after you release Tab and while you still hold Ctrl

The bug:
- no list is shown
- in the error console:
Error: TypeError: htmlStyle is null
Source File: chrome://lasttab/content/services.js
Line: 415

Few lines above is line:
let htmlStyle = parent.parentNode.ownerDocument.defaultView.getComputedStyle(parent.parentNode, null);
OK, just a quick look at my add-ons page, I'm still using LastTab 3.0t3.1 from Oct 4, 2011.  So this is not caused by an extension update.

Confirming.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Can you find the regression window?  The most likely reason for getComputedStyle to return null is if there is no presshell, and the most likely reason for that given the extension name is something like bug 776928.... But that was a while back.
Yeah, that range contains the fix for bug 776928.

We could create a computed style here, but it would have to throw on access to any of the actual properties... Not sure that would help the addon much.
Blocks: 776928
Component: DOM: Core & HTML → Extension Compatibility
Product: Core → Firefox
I found out, that this bug doesn't manifest in a secondary Firefox window.

Just in my main, older, window (opened sooner).
Presumably the newly opened window doesn't have yet-to-be-restored tabs, which is what would cause this.
(In reply to :Gavin Sharp (use gavin@gavinsharp.com for email) from comment #6)
> Presumably the newly opened window doesn't have yet-to-be-restored tabs,
> which is what would cause this.

Yes, I can confirm that.
Timothy, can you fix this in LastTab? I imagine this may just be a matter of null-checking the return value of getComputedStyle, or not trying to get previews of tabs with the "pending" attribute.
See previous Comment.
Flags: needinfo?(zzhumphreyt)
The extension seems to be incompatible as of Firefox 20 (see bug 830823).
Status: NEW → RESOLVED
Closed: 10 years ago
Flags: needinfo?(zzhumphreyt)
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.