Bug 143266

Summary: Avoid applying invalid media attribute
Product: WebKit Reporter: Yoav Weiss <yoav>
Component: New BugsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED DUPLICATE    
Severity: Normal CC: cdumez
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Description Yoav Weiss 2015-03-31 09:30:36 PDT
Avoid applying invalid media attribute
Comment 1 Yoav Weiss 2015-03-31 09:37:31 PDT
Created attachment 249825 [details]
Patch
Comment 2 Yoav Weiss 2015-03-31 09:39:09 PDT
When <link rel=stylesheet> with an invalid media attribute was part of the HTML, I saw that it resulted in a non-empty MediaQuerySet, containing a single query with no expressions. (which didn't have its m_ignored flag on)

Therefore I added an extra check that makes sure that the queries handled by MediaQueryEvaluator::eval have expressions, and if not, they are treated as ignored.
Comment 3 Yoav Weiss 2015-03-31 09:51:31 PDT
I accidentally filed that as a separate issue, when I should have added a patch on the original bug.

*** This bug has been marked as a duplicate of bug 143262 ***