Last Comment Bug 500017 - Incorrect processing of CSS "@media print" when JSView addon is installed
: Incorrect processing of CSS "@media print" when JSView addon is installed
Status: UNCONFIRMED
:
Product: Core
Classification: Components
Component: CSS Parsing and Computation (show other bugs)
: 1.9.1 Branch
: x86 Windows XP
: -- major (vote)
: ---
Assigned To: Nobody; OK to take it and work on it
:
:
Mentors:
http://bugzilla.mozilla.org/
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-06-23 11:56 PDT by Sergey Spatar
Modified: 2010-05-01 22:38 PDT (History)
2 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments

Description Sergey Spatar 2009-06-23 11:56:34 PDT
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.9.1) Gecko/20090616 Firefox/3.5
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.9.1) Gecko/20090616 Firefox/3.5

An element which have a CSS rule "display: hidden" for media=print hid when adding a new non-empty <style> element into document's <head> element.

Reproducible: Always

Steps to Reproduce:
1. Open your http://bugzilla.mozilla.org/
2. Paste the following JavaScript code in address bar and press Enter:

javascript:var style = document.createElement("style"); style.type = "text/css"; style.appendChild(document.createTextNode("#there_is_no_such_id {}")); document.getElementsByTagName("head")[0].appendChild(style); void(0);

Actual Results:  
1. Page opened
2. Page header (div#header) hid

Expected Results:  
1. Page should open
2. Nothing should change

You can get the same error when using Firebug and moving your cursor above `<div id="header">' element in Firebug's HTML tab.

The error is somehow connected with the following CSS declaration in https://bugzilla.mozilla.org/skins/standard/global.css:

/* Rules specific for printing */
@media print {
    #header, #footer {
        display: none;
    }

    body {
        background-image: none;
        background-color: #fff;
    }
}
Comment 1 Michael Ryan 2009-06-23 17:41:48 PDT
I can't reproduce this with Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1pre) Gecko/20090622 Shiretoko/3.5pre.
Comment 2 Sergey Spatar 2009-06-23 22:44:12 PDT
Probably, it is an add-on bug. It is reproducible only with JSView 2.0.5 add-on installed and enabled (https://addons.mozilla.org/en-US/firefox/addon/2076).
Comment 3 David Baron :dbaron: ⌚️UTC-7 2010-05-01 09:58:21 PDT
Have you contacted the author of the JSView addon about the problem?

Note You need to log in before you can comment on or make changes to this bug.