This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 219189 - CSS Style Summary and Rule Editor sync issues
Summary: CSS Style Summary and Rule Editor sync issues
Status: RESOLVED FIXED
Alias: None
Product: web
Classification: Unclassified
Component: CSS Visual Tools (show other bugs)
Version: 7.3
Hardware: PC Windows 7
: P2 normal (vote)
Assignee: Marek Fukala
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-09-28 15:13 UTC by peppertech
Modified: 2012-10-03 12:11 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
IDE log (67.80 KB, text/plain)
2012-09-28 15:13 UTC, peppertech
Details

Note You need to log in before you can comment on or make changes to this bug.
Description peppertech 2012-09-28 15:13:41 UTC
Product Version = NetBeans IDE Dev (Build web-main-8702-on-20120928)
Operating System = Windows 7 version 6.1 running on amd64
Java; VM; Vendor = 1.7.0_07
Runtime = Java HotSpot(TM) 64-Bit Server VM 23.3-b01

There are very long delays between clicking on one of the values in the Style Summary panel and when the sync'd results are displayed in the Rules Editor.

There is also an issue with strike through content being shown in the Rules Editor when it should not be.

A screencast showing the issues is located here:
http://screencast.com/t/NBuPFoQ4lhco
Comment 1 peppertech 2012-09-28 15:13:47 UTC
Created attachment 125072 [details]
IDE log
Comment 2 Marek Fukala 2012-09-28 17:56:04 UTC
both problems seems to be web.inspect
Comment 3 Vladimir Riha 2012-09-28 19:24:29 UTC
The slowness could be related to issue 217515, I haven't seen such a long delay but I can imagine it highly depends on used css code
Comment 4 Jan Stola 2012-10-01 14:30:22 UTC
Thank you for the screencast showing the problems. Unfortunately, I am not able to reproduce the problems without the corresponding project. Could you, please, attach it to this issue or send it to me privately. Thank you in advance.
Comment 5 peppertech 2012-10-01 16:06:45 UTC
Sorry about not attaching the project file.

You can get the project template from here: http://jupiter.cz.oracle.com/wiki/pub/Netbeans/EaselDemoScriptJavaOne2012/EaselDemo_Template.zip

Create a new HTML project using this template and you will be in good shape.
Comment 6 Jan Stola 2012-10-02 16:04:38 UTC
The delayed refresh of Rule Editor is caused by long parsing of a large CSS file. There are some issues (like issue 217515) that cover this problem. So, let's keep this issue about the second problem, i.e., about some properties marked as overriden incorrectly.

> both problems seems to be web.inspect

In fact, the problem with incorrectly marked overriden properties seems to be caused by some problematic caching of Rule Editor. I was able to reproduce it with the following simple HTML file:

<!DOCTYPE html>
<html>
    <head>
        <style>
            @media (max-width: 5000px) {
                div {
                    color: red;
                }
            }
            @media (min-width: 10px) {
                div {
                    color: green;
                }
            }
        </style>
    </head>
    <body>
        <div>DIV</div>
    </body>
</html>

Execute it (as a part of some HTML 5 Application) and select the DIV element. There are two rules that are matching it. The first one is overriden by the second one. Both the rules are shown in CSS Styles view (when the DIV is selected).

If you select the first rule then the color property is marked as overriden correctly. However, when you select the second rule after that then it is also marked as overriden.

If you select the second rule (when the Rule Editor is empty) then the color property is not marked as overriden (correctly). However, when you select the first rule after that then it is also marked as not overriden (incorrectly).

I have verified that CSS Styles view is passing correct information about overriden properties in both cases. Hence, I am reassigning the issue to Rule Editor.
Comment 7 Marek Fukala 2012-10-03 09:57:13 UTC
changeset:   234913:d0a53bb1d487
summary:     #219189 - fixing bug in RuleEditor Node's PropertySets merging. I had to also patch a PropertySheet a bit to be able to repaint properly changes in property's displayName. I'll file  a new issue against platform to verify the patch.

As there's the issue 217515 for the delayed refresh of Rule Editor caused by long parsing of a large CSS file I'm closing the issue as fixed for the problem with incorrectly marked overridden properties is fixed by the changeset above.

Thanks Honzo for the evaluation, I have just glimpsed at the issue before reassigning to you and concluded there's something bad in the DOM logic. I'm sorry.
Comment 8 Marek Fukala 2012-10-03 12:11:25 UTC
The issue I've filled for the property sheet patch is: [Bug 219443] New: How to force the PS to repaint property after its displayName change?