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 229999 - NetBeans integration in Chrome breaks style of a document
Summary: NetBeans integration in Chrome breaks style of a document
Status: RESOLVED WONTFIX
Alias: None
Product: web
Classification: Unclassified
Component: Inspection (show other bugs)
Version: 7.4
Hardware: All All
: P2 normal (vote)
Assignee: Jan Stola
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-05-20 14:05 UTC by Petr Jiricka
Modified: 2013-05-20 14:28 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Petr Jiricka 2013-05-20 14:05:31 UTC
1. Create an empty HTML5 application
2. Replace index.html with the following content:

<!DOCTYPE html>
<html>
    <head>
        <title>Program 1</title>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <style>
            h1{color:black}
            p{color:blue;}
            p:last-child{color: gold;}
           
        </style>
    </head>
    <body>
        <h1>
            A p l i k a c e  3
        </h1>
        <p>odstavec 1</p>
        <p>odstavec 2</p>
    </body>
</html>

3. Run the application in Chrome without NB integration, and then in Chrome with NB integration

=> The page looks different in each browser. The correct behavior is that the second paragraph is gold, but in browser with NB integration it is in fact blue. There is the same problem in embedded browser.
Comment 1 Jan Stola 2013-05-20 14:28:12 UTC
The second paragraph is matched by 'p:last-child' rule. Unfortunately, this rule doesn't match the paragraph when the page is run under page inspection.

The page inspection injects a CANVAS element into the inspected page. This injected element is crucial for the whole page inspection. It helps us to intercept various events and paint all visual information/feedback. Hence, it cannot be avoided.

The element has to be injected somewhere in the DOM and no matter where the element is injected you can always create a CSS rule with a selector that is matched when the CANVAS is not there and is not matched when the CANVAS is injected. Hence, I don't see how this issue can be fixed => I am closing this issue as 'will not fix'. Let's hope that such situations are rare in real world apps.