Bug 106785 - [testcase] CSS rules list incomplete
Summary: [testcase] CSS rules list incomplete
Status: RESOLVED UNMAINTAINED
Alias: None
Product: konqueror
Classification: Applications
Component: khtml ecma (show other bugs)
Version: 3.4
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-06-04 18:33 UTC by kirun
Modified: 2012-06-18 14:09 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Minimal testcase (785 bytes, text/html)
2005-06-04 18:39 UTC, kirun
Details
insertRule testcase (636 bytes, text/html)
2005-06-19 20:26 UTC, kirun
Details

Note You need to log in before you can comment on or make changes to this bug.
Description kirun 2005-06-04 18:33:31 UTC
Version:            (using KDE KDE 3.4.0)
Installed from:    SuSE RPMs
OS:                Linux

When iterating over an element's .cssRules, sometimes not all items present in the page are in the list. This can happen if:

* A rule contains no CSS properties
* The rule contains only CSS properties unsupported by KHTML

It may be useful to have these present, as a script may be adding the relevant valid properties to the rules.
Comment 1 kirun 2005-06-04 18:39:26 UTC
Created attachment 11321 [details]
Minimal testcase

This testcase iterates over the various rules, and outputs their selectors. All
five of the included selectors should be displayed, rather than the three which
are.

Additionally, the selector div:first-child is displayed incorrectly. I'm not
sure if this is part of the same bug, or a separate one.
Comment 2 kirun 2005-06-19 20:26:27 UTC
Created attachment 11515 [details]
insertRule testcase

I have now tracked down a similar problem with .insertRule which I suspect has
the same underlying cause.

Inserting a rule set which only contains a comment fails, giving a syntax
error. The spec ( http://www.w3.org/TR/CSS21/syndata.html#q10 ) says "... In
between there must be a list of zero or more semicolon-separated (;)
declarations. ...", indicating that just having a comment should be fine.

As the example stands, the error text doesn't appear bold, which may at first
glance make it appear the first of the insertRule lines is the faulty one. This
can be disproved by alternately commenting them out, or uncommenting the final
.style.color = "black" line, which seems to trigger the change. This is, of
course, another bug for another day.

I'm not sure whether to leave this report as-is and make another one for the
insertRule problem, or turn this bug into a more general bug about scripting
rule sets with no declarations.
Comment 3 Philip Rodrigues 2006-09-02 23:19:19 UTC
Same behaviour for the first testcase here (only three items shown). FF shows five, so I suppose this can be confirmed.
Comment 4 Allan Sandfeld 2006-09-02 23:50:06 UTC
Correct. Konqueror only have representation of valid rules. Rules that are ignored are are not supported are ignored at parsing rather than going through a second level of filter.

Fixing this will require a new parsing framework that doesn't use flex.
Comment 5 FiNeX 2008-04-06 23:52:04 UTC
Tested on Konqueror4. The first testcase doesn't show anything.
The second testcase display a "TypeError: Value undefined (result of expression document.styleSheets.item) is not object." error.
Comment 6 Maksim Orlovich 2009-01-28 23:38:33 UTC
The issue in comment #1 was fixed by Germain a bit back, one of 4.1.x releases, I think, so that testcase passes now.
Comment 7 Myriam Schweingruber 2012-06-18 14:09:07 UTC
Message from the Bugsquad and Konqueror teams:
This bug is closed as outdated, as we do not have the manpower to maintain the KDE3 version anymore.
If you still can reproduce this issue with Konqueror 4.8.4 or later, please open a new report.
Thank you for your understanding.