[Pkg-mozext-commits] [firebug] 40/68: Issue 4893: CSS panel doesn't display contents of CSS file after reload

David Prévot taffit at moszumanska.debian.org
Mon Mar 31 22:45:53 UTC 2014


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to tag fbtest-1.11.4
in repository firebug.

commit 01725d6ea006b690f007203b9b2b91a31e675384
Author: Jan Odvarko <odvarko at gmail.com>
Date:   Tue Feb 26 10:57:00 2013 +0100

    Issue 4893: CSS panel doesn't display contents of CSS file after reload
---
 extension/content/firebug/css/cssPanel.js | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)

diff --git a/extension/content/firebug/css/cssPanel.js b/extension/content/firebug/css/cssPanel.js
index b3bc987..3479b5a 100644
--- a/extension/content/firebug/css/cssPanel.js
+++ b/extension/content/firebug/css/cssPanel.js
@@ -24,13 +24,14 @@ define([
     "firebug/css/cssModule",
     "firebug/css/cssReps",
     "firebug/css/selectorEditor",
+    "firebug/lib/trace",
     "firebug/editor/editor",
     "firebug/editor/editorSelector",
     "firebug/chrome/searchBox"
 ],
 function(Obj, Firebug, Domplate, FirebugReps, Locale, Events, Url, SourceLink, Css, Dom, Win,
     Search, Str, Arr, Fonts, Xml, Persist, System, Menu, Options, CSSModule, CSSInfoTip,
-    SelectorEditor) {
+    SelectorEditor, FBTrace) {
 
 with (Domplate) {
 
@@ -984,7 +985,18 @@ Firebug.CSSStyleSheetPanel.prototype = Obj.extend(Firebug.Panel,
     updateLocation: function(styleSheet)
     {
         if (FBTrace.DBG_CSS)
-            FBTrace.sysout("css.updateLocation; " + (styleSheet ? styleSheet.href : "no stylesheet"));
+        {
+            FBTrace.sysout("css.updateLocation; " + (styleSheet ? styleSheet.href :
+                "no stylesheet"));
+        }
+
+        // We can properly update the view only if the page is fully loaded (see issue 4893).
+        var doc = this.context.window.document;
+        if (doc.readyState != "complete")
+        {
+            this.context.setTimeout(Obj.bindFixed(this.updateLocation, this, styleSheet), 200);
+            return;
+        }
 
         var rules = [];
         if (styleSheet)

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/firebug.git



More information about the Pkg-mozext-commits mailing list