Bug 143266 - Avoid applying invalid media attribute
Summary: Avoid applying invalid media attribute
Status: RESOLVED DUPLICATE of bug 143262
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-03-31 09:30 PDT by Yoav Weiss
Modified: 2015-03-31 12:37 PDT (History)
1 user (show)

See Also:


Attachments
Patch (3.84 KB, patch)
2015-03-31 09:37 PDT, Yoav Weiss
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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 ***