Bug 169629 - Nested @media rules should be parsed as an error
Summary: Nested @media rules should be parsed as an error
Status: VERIFIED FIXED
Alias: None
Product: konqueror
Classification: Applications
Component: khtml (show other bugs)
Version: 4.1.0
Platform: Microsoft Windows Microsoft Windows
: NOR normal (vote)
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-08-23 00:38 UTC by Gérard Talbot (no longer involved)
Modified: 2008-12-06 20:38 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
patch (73.05 KB, patch)
2008-08-29 16:32 UTC, Germain Garand
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gérard Talbot (no longer involved) 2008-08-23 00:38:28 UTC
Version:            (using KDE 4.1.0)
Compiler:          cc 
OS:                Linux
Installed from:    Ubuntu Packages

Bug entry:
http://www.gtalbot.org/BrowserBugsSection/MSIE7Bugs/#bug83

Screenshot (actual results):

http://browsershots.org/http://www.gtalbot.org/BrowserBugsSection/MSIE7Bugs/NestedMediaRules.html

http://browsershots.org/screenshots/d18196d33b39680029cf31ff8957cece/

http://api.browsershots.org/png/original/d1/d18196d33b39680029cf31ff8957cece.png

Testcase:
http://www.gtalbot.org/BrowserBugsSection/MSIE7Bugs/NestedMediaRules.html

Code explanation:

  @media all
  {
  p {background-color: white; color: green;}
  @media screen
    {
    p {background-color: white; color: red;}
    }
  }

  <p>This should be green.</p>

should be parsed as an error. The CSS validator will report such parsing error and will give

@media all  {
p {
background-color : white;
color : green;
}
} 

as resulting valid CSS information.

Konqueror does not parse correctly as the tested <p> is not green.

Regards, Gérard
Comment 1 Gérard Talbot (no longer involved) 2008-08-23 00:53:26 UTC
See also
https://bugs.webkit.org/show_bug.cgi?id=16013
Comment 2 Germain Garand 2008-08-29 16:32:21 UTC
Created attachment 27126 [details]
patch
Comment 3 Germain Garand 2008-08-31 17:10:34 UTC
SVN commit 855321 by ggarand:

do proper error handling inside @media blocks

BUG: 169629


 M  +490 -475  parser.cpp  
 M  +9 -1      parser.y  
Comment 4 Gérard Talbot (no longer involved) 2008-12-06 20:38:55 UTC
The testcase is passed with Konqueror 4.1.2

Marking as VERIFIED