[patch + test-case] problems with stylesheets + ecma

Luís Pedro Coelho luis at luispedro.org
Fri Nov 14 13:48:29 GMT 2003


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

This is related to #67453 and friends, but those pages trigger other problems 
as well (which I haven't thoroughly looked at yet).

Still, the attached HTML file causes a crash on HEAD and the attached patch 
fixes it.

Can someone review, please?

A few notes on the implementation:

The logic on parseAttribute()/case ATTR_DISABLED (grep for "Check #") was a 
bit broken before. This obviously needs fixing.

Also, at the end of the day, the number of calls to 
getDocument()->addPendingSheet() should be the same as the number of calls to 
getDocument()->styleSheetLoaded().

Given the interactions between using "alternate stylesheet" (which doesn't 
cause an addPendingSheet) and the possibility of setting the disabled flag on 
the stylesheet through ecma (which causes one of the above calls), I don't 
think there is another way to avoid balance these calls other than by 
explicitly setting a flag.

Going a bit further than I did, perhaps one should forget about some of the 
other checks in the code before calling removeRegistered() [in sheetLoaded, 
for example], but since <understatement>I am not 100% familiar with the 
code</understatement>, I didn't do it myself.

HTH,
- -- 
Luis Pedro Coelho

The carrot tax, see:
http://luispedro.org/

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE/tN08GpBAvyRwXdgRAgGKAJ9M7lDRljpoWX5AUbgQ6KBN6CZxOwCeI1eB
+CTiLPYL2vahQre4Z8R/8Ds=
=dbb8
-----END PGP SIGNATURE-----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch-without-debug
Type: text/x-diff
Size: 5056 bytes
Desc: not available
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20031114/2c6d7e23/attachment.diff>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20031114/2c6d7e23/attachment.html>


More information about the kfm-devel mailing list