pixel-perfect-firefox icon indicating copy to clipboard operation
pixel-perfect-firefox copied to clipboard

Selecting/adding overlay works - but not displayed (PixelPerfect 2.0.1)

Open neufeind opened this issue 13 years ago • 1 comments

I notied that for Firebug 1.10.x there were already fixes added quite some time ago. And in the dist-folder there is is build 2.0.1 available. I tried that out and that seems to make it work with the newer Firebug-API (ability to add an overlay, ...). Using Firebug itself then I can also see that the pp_overlay is added to the HTML etc. but the image doesn't display. Giving that overlay a background-color shows that it's position correctly etc. And the background-image displays as a thumbnail in Firebug (when hovering over the CSS-code) as well. It's just that Firefox doens't want to display it as defined via CSS in property "background". Maybe some security-thing because that image is loaded via a chrome-URL?

Using Firefox 15.0 and Firebug 1.10.3 here.

neufeind avatar Sep 09 '12 12:09 neufeind

Hey people,

I really miss this add-on and spend lot's of hours searching this weekend where the problem is. Now I only have a little experience with firefox add-on but I think I have isolated the problem to this bit of code around line 90 of PixelPerfectUtilsModule.js

    //FIXME: Make sure js element does not already exist to avoid duplicates
    loadRequiredJsIntoToMainBrowserOverlay: function() {
        var doc = window._content.document;
        var pageHead = doc.getElementsByTagName("head")[0];
        var scripts = ['dom-drag.js', 'publicDocumentEvents.js'];
        for(i=0; i<scripts.length; i++) {
            pageHead.appendChild(this.createJsElement('chrome://pixelperfect/content/browserscripts/' + scripts[i], doc));
        }
    }

First off the _content seems to be deprecated, but even then if you try to get the url of the window it always passes along about:blank in my case. So I think the script is just inserted too early.

If you try to debug the add-on you see it gives an error on the not existing of the Drag object in the page.

Have been trying different things to fix it, but I am not closer to a solution. So I thought to just share it, maybe there's another programmer around who sees the solution directly :)

killerog avatar Dec 09 '12 21:12 killerog