2020-10-20 21:32 BST

View Revisions: Issue #1874

Summary 0001874: Better media descriptor parsing
Revision 2013-12-24 12:07 by Vincent Sanders
Description Hi,

Your browser looks really promising, at least when it comes to CSS rendering. Many real sites render perfectly or close to perfectly. However, the way you parse media descriptors is not forwards-compatible with media queries, so I made a patch to fix this. It's my first patch so it might need some adjustments :)

Detailed description:
NetSurf currently just looks for substrings in the media attribute of <link rel="stylesheet"> tags, and this causes media queries with "all" or "screen" in them to always match. This patch makes the parsing compliant with HTML4 section 6.13 so extensions to the standard can be ignored correctly.
Revision 2008-12-22 02:19 by samuellb
Description Hi,

Your browser looks really promising, at least when it comes to CSS rendering. Many real sites render perfectly or close to perfectly. However, the way you parse media descriptors is not forwards-compatible with media queries, so I made a patch to fix this. It's my first patch so it might need some adjustments :)

Detailed description:
NetSurf currently just looks for substrings in the media attribute of <link rel="stylesheet"> tags, and this causes media queries with "all" or "screen" in them to always match. This patch makes the parsing compliant with HTML4 section 6.13 so extensions to the standard can be ignored correctly.