Closed Bug 75189 Opened 23 years ago Closed 23 years ago

Scoped stylesheets don't always load

Categories

(Core :: XBL, defect)

x86
Windows 2000
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla0.9

People

(Reporter: hyatt, Assigned: hyatt)

Details

Attachments

(3 files)

Blocking hewitt's landing.  This bug deals with the tab widgets and other 
widgets not always showing up right on the first load.
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla0.9
Attached patch Fix.Splinter Review
r=jag

the |doneLoading| in that |else if| is redundant, but it documents the condition
clearly (though it should be obvious to anyone reading the code...) *shrug* Do
with it whatever you want.
Fixed.
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
What, no sr=?  Hyatt, you know I love to sr= XBL code.  *sniff* *cry*  I'm
reopening to get attention.

What's the bug number for the CSS loader bug that you're working around in that
XXX-commented gnarly code?

Jag's right, don't test a condition in an if, then its inverse in the first
clause of the very next else-if.

/be
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
There is no bug for the CSS loader issue.  It should probably be left alone.
Status: REOPENED → RESOLVED
Closed: 23 years ago23 years ago
Resolution: --- → FIXED
Can't work around the bug in the CSS loader after all.  I need to fix it.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
cc'ing attinasi and pierre.  I need to patch the CSS loader to fix the bug.  
Patch coming in a moment.
Status: REOPENED → ASSIGNED
Attached patch Patch #2 to XBLSplinter Review
Pierre and Marc, please review my one-line patch to the CSS loader.  The bug 
has to do with observer notification.  When the loader is not loading any 
stylesheets and if there's no parser to unblock, and when it gets a hit from 
the chrome cache, it adds the sheet to the pending array and then never does 
anything with it (since it never loads any more stylesheets).

This patch ensures that if you have a hit in the chrome cache and if the loader 
isn't busy at all (no loading sheets), then you just go ahead and insert the 
sheet into the doc right away.

Brendan and jag, feel free to review the XBL portion of the patch.  I cleaned 
it up and simplified it, since fixing the bug in the CSS loader lets me remove 
my workarounds.

css:
(Style?) nit: 0 == Count() ? Why not Count() == 0 for improved readability?

xbl:

So now that you're not calling StyleSheetLoaded from LoadResources any longer,
do you still need |mInLoadResourcesFunc|?

Nit: introducing spaces at the end of that line...

-        PRInt32 numSheets = doc->GetNumberOfStyleSheets();
+        PRInt32 numSheets = doc->GetNumberOfStyleSheets();      
jag, yes, I still need it.  The CSS loader calls it.
Hey David, the CSS change looks fine to me, but the comment is confusing (or at
least incomplete) now. Can you change it from

// stick it in now, parser is waiting for it

to

// stick it in now, parser is waiting for it OR no other sheets loading so flush


or somehting else you may like better. [s]r=attinasi
Fixed.
Status: ASSIGNED → RESOLVED
Closed: 23 years ago23 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: