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 250054 - Netbeans Chrome Connector CSS/JS issues
Summary: Netbeans Chrome Connector CSS/JS issues
Status: VERIFIED FIXED
Alias: None
Product: web
Classification: Unclassified
Component: Inspection (show other bugs)
Version: 8.0.2
Hardware: PC Windows 7 x64
: P2 normal with 2 votes (vote)
Assignee: Jan Stola
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-01-27 15:16 UTC by mikerowe81
Modified: 2015-02-19 13:48 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Screenshot (192.36 KB, image/jpeg)
2015-01-27 15:16 UTC, mikerowe81
Details

Note You need to log in before you can comment on or make changes to this bug.
Description mikerowe81 2015-01-27 15:16:27 UTC
Created attachment 151700 [details]
Screenshot

When I inspect an element using the Netbeans Connector in Chrome, the CSS filename is "null" in the Applied Styles window, however it does show the correct line number of the file, "null:109"

Also, any editing of the CSS file in Netbeans is not automatically reflected in the browser. I have to do a manual refresh.

I do not have either of the problems with the Embedded Webkit Browser and I would use this, but when I float the Embedded browser on my second screen to make it a full-size window it becomes semi-transparent when it is not the active window--I guess that could be a feature request.

I have tried two different computers, one Windows 7 and one Windows 8.1. I have also tried a fresh install of 8.0.2 as I had originally upgraded 8.0.1 to 8.0.2. Both computers have the same version of Chrome.

Product Version: NetBeans IDE 8.0.2 (Build 201411181905)
Java: 1.7.0_51; Java HotSpot(TM) 64-Bit Server VM 24.51-b03
Runtime: Java(TM) SE Runtime Environment 1.7.0_51-b13
System: Windows 7 version 6.1 running on amd64; Cp1252; en_US (nb)


Google Chrome	40.0.2214.93 (Official Build) m
Revision	c675f6a38876b473472b2581b549e6fa72caa11f-refs/branch-heads/2214_85@{#5}
OS	Windows 
Blink	537.36 (@188344)
JavaScript	V8 3.30.33.15
Flash	16.0.0.296
User Agent	Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.93 Safari/537.36
Command Line	"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --profile-directory="Profile 1" --flag-switches-begin --silent-debugger-extension-api --flag-switches-end
Comment 1 Vladimir Riha 2015-01-27 15:43:39 UTC
Seems like there is some change in latest Chrome. CSS Styles show "null" instead of names of css files and the refresh on save does not work either (also does not work for JS file). Thank you for reporting.



Product Version: NetBeans IDE Dev (Build web-main-1841-on-20150127)
Java: 1.8.0_25; Java HotSpot(TM) Client VM 25.25-b02
Runtime: Java(TM) SE Runtime Environment 1.8.0_25-b17
System: Linux version 3.13.0-35-generic running on i386; UTF-8; en_US (nb)
Comment 2 Jan Stola 2015-02-18 14:50:31 UTC
> When I inspect an element using the Netbeans Connector in Chrome, the CSS
> filename is "null" in the Applied Styles window, however it does show the
> correct line number of the file, "null:109"

The file names of the stylesheets come from CSS.styleSheetAdded events. Unfortunately, these events are not delivered from Chrome 40 to NetBeans 8.0.2.

The log file shows the reason:

14:20:28:582 blocking send {"id":4,"method":"CSS.enable"}
14:20:28:620 response {"id":4,"error":"{\"message\":\"{\\\"code\\\":-32000,\\\"message\\\":\\\"DOM agent needs to be enabled first.\\\"}\"}"}

i.e. the events from the CSS domain are not enabled because the latest version of Chrome contains a new method: DOM.enable that must be called before CSS.enable (for the latter to succeed):

14:58:58:641 blocking send {"id":4,"method":"DOM.enable"}
14:58:58:654 response {"id":4,"result":{}}
14:58:58:656 blocking send {"id":5,"method":"CSS.enable"}
14:58:58:669 response {"id":5,"result":{}}

I have added the new DOM.enable/disable methods into our API and modified the start of the inspection to call DOM.enable before CSS.enable.

Modified files: https://hg.netbeans.org/web-main/rev/c838c3455a9a

> Also, any editing of the CSS file in Netbeans is not automatically reflected
> in the browser. I have to do a manual refresh.

This is a consequence of the missing events about the stylesheets. NetBeans were not able to match the local files with the stylesheets in the browser without these events.

> I do not have either of the problems with the Embedded Webkit Browser and
> I would use this, but when I float the Embedded browser on my second screen
> to make it a full-size window it becomes semi-transparent when it is not
> the active window

I am sorry, I am not able to reproduce this problem. My Embedded Webkit Browser is always opaque. Feel free to report a separate issue about this problem, but try to provide some additional information (like a screenshot) then.

> refresh on save does not work either (also does not work for JS file)

Lada, I am not able to reproduce the problem with the JS file. If you are still able to reproduce it then please fill a separate issue with exact steps. Thank you in advace.
Comment 3 Vladimir Riha 2015-02-18 15:00:18 UTC
I'll try it later today with web-main build containing the fix. Thank you
Comment 4 Quality Engineering 2015-02-19 07:52:05 UTC
Integrated into 'main-silver', will be available in build *201502190509* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/c838c3455a9a
User: Jan Stola <jstola@netbeans.org>
Log: #250054: CSS agent does not receive any events unless DOM agent is enabled first (using its new DOM.enable method).
Comment 5 Vladimir Riha 2015-02-19 08:08:17 UTC
Verified, file name is displayed, changes are being propagated to browser. Thank you

BTW the opaque embedded browser is already reported, issue 236961


Thank you

Product Version: NetBeans IDE Dev (Build web-main-1959-on-20150219)
Java: 1.8.0_25; Java HotSpot(TM) Client VM 25.25-b02
Runtime: Java(TM) SE Runtime Environment 1.8.0_25-b17
System: Linux version 3.13.0-35-generic running on i386; UTF-8; en_US (nb)
Comment 6 Jan Stola 2015-02-19 10:00:11 UTC
> BTW the opaque embedded browser is already reported, issue 236961

I don't think that the problem described by the reporter of this issue is a duplicate of issue 236961. Issue 236961 seems to be specific to Linux, but  mikerowe81 is using Windows. Also the symptoms look different. mikerowe81 writes about transparent window, not about a black one.