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 243853 - CSS Inspection not working
Summary: CSS Inspection not working
Status: VERIFIED FIXED
Alias: None
Product: web
Classification: Unclassified
Component: Inspection (show other bugs)
Version: 8.0
Hardware: All All
: P1 normal (vote)
Assignee: Jan Stola
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-04-15 23:00 UTC by dreagon
Modified: 2014-04-28 07:50 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
webkit log after changing color property in CSS Styles window (1.55 MB, text/plain)
2014-04-16 07:57 UTC, Vladimir Riha
Details
IDE log (53.72 KB, text/plain)
2014-04-16 07:58 UTC, Vladimir Riha
Details

Note You need to log in before you can comment on or make changes to this bug.
Description dreagon 2014-04-15 23:00:23 UTC
CSS Previewer has stopped updating chrome with changes on the fly.  Page has to be saved and refreshed to see changes.  Recently installed 8.0, also have 7.3 and does not work with either or any projects, even simple one page projects.  Uninstalled both Chrome and Netbeans to attempt to resolve and still having same issue.
Comment 1 dreagon 2014-04-15 23:01:10 UTC
Have searched everywhere I could and have not found a solution
Comment 2 Vladimir Riha 2014-04-16 07:55:21 UTC
Thank you for reporting, reproducible. 

Changing CSS via CSS Styles or in css editor does not populate the changes to browser, one has to manually reload page.

I think it is related to some change in Chrome. I tried it first with older Chrome version and it was working OK. Then I updated to Chrome 34.0.1847.116 and it stopped working.



Product Version: NetBeans IDE 8.0 (Build 201403101706)
Java: 1.8.0; Java HotSpot(TM) Client VM 25.0-b70
Runtime: Java(TM) SE Runtime Environment 1.8.0-b132
System: Linux version 3.2.0-60-generic-pae running on i386; UTF-8; en_US (nb)
Comment 3 Vladimir Riha 2014-04-16 07:57:34 UTC
Created attachment 146775 [details]
webkit log after changing color property in CSS Styles window
Comment 4 Vladimir Riha 2014-04-16 07:58:10 UTC
Created attachment 146776 [details]
IDE log
Comment 5 Jan Stola 2014-04-18 07:55:10 UTC
CSS inspection is based on an unofficial API (CSS domain of WebKit Remote Debugging API). Unfortunately, this API may change in an incompatible way at any time. And this is what has happened in this case.

The implementation of the CSS reload uses CSS.getAllStyleSheets() method to find all stylesheets of the document. Unfortunately, this method has been removed from the API recently and replaced by styleSheetAdded and styleSheetRemoved events, see http://src.chromium.org/viewvc/blink?view=revision&revision=166228
Comment 6 Jan Stola 2014-04-18 10:34:10 UTC
I have modified the corresponding code such that it handles well both situations - when the CSS.getAllStyleSheets method returns data correctly and when it fails. The first case is important for browsers that use the old version of the protocol (like the embedded browser). In the second case the CSS.getAllStyleSheets() method in our Java wrapper is implemented on top of the new styleSheetAdded and styleSheetRemoved events. Hence, the clients of the Java wrapper may choose whether to use the events directly or whether to continue to use getAllStyleSheets() method.

Modified files:
https://hg.netbeans.org/web-main/rev/fdcbb9d5eab3
https://hg.netbeans.org/web-main/rev/a82a45f3570e
Comment 7 Vladimir Riha 2014-04-18 10:36:12 UTC
Thank you, I'll verify it in 1st trunk build.
Comment 8 Vladimir Riha 2014-04-22 06:10:51 UTC
It seems to work fine with Chrome, but I'm getting issue 243981 when running in embedded browser every time I click on some element in embedded browser while having inspect mode turned on. Could you please evaluate if this is related to this fix (whether it will affect 8.0 patch1 or not)? Thanks



Product Version: NetBeans IDE Dev (Build 201404220001)
Java: 1.8.0; Java HotSpot(TM) Client VM 25.0-b70
Runtime: Java(TM) SE Runtime Environment 1.8.0-b132
System: Linux version 3.2.0-60-generic-pae running on i386; UTF-8; en_US (nb)
Comment 9 Jan Stola 2014-04-22 09:03:17 UTC
(In reply to Vladimir Riha from comment #8)
> It seems to work fine with Chrome, but I'm getting issue 243981 when running
> in embedded browser every time I click on some element in embedded browser
> while having inspect mode turned on. Could you please evaluate if this is
> related to this fix (whether it will affect 8.0 patch1 or not)?

No, the issue 243981 is a consequence of the fix of issue 241098.
Comment 10 Vladimir Riha 2014-04-22 09:14:40 UTC
Verifying then, thank you.
Comment 11 Jan Stola 2014-04-22 16:51:05 UTC
The fix has been integrated into release80 branch:
http://hg.netbeans.org/releases/rev/1f4b84efac55
http://hg.netbeans.org/releases/rev/16e42b3fc7a8
Comment 12 Vladimir Riha 2014-04-28 07:50:07 UTC
verified in patch1

Product Version: NetBeans IDE 8.0 (Build 201403101706)
Updates: NetBeans IDE is updated to version NetBeans 8.0 Patch 1
Java: 1.8.0_05; Java HotSpot(TM) Client VM 25.5-b02
Runtime: Java(TM) SE Runtime Environment 1.8.0_05-b13
System: Linux version 3.2.0-60-generic-pae running on i386; UTF-8; en_US (nb)