Handle media queries in user style sheets

The implementation of user style sheets in crrev.com/c/641294 did not
account for media queries. As a result, once a user sheet's initial rule
set is generated, it is never updated based on changes in device type or
viewport dimensions. User rules intended for print, for example, have no
effect.

This patch fixes the issue by updating
StyleEngine::MediaQueryAffectingValueChanged to clear the rule sets for
any relevant user sheets and have them regenerated via
StyleEngine::UpdateActiveUserStyleSheets

CSSGlobalRuleSet now collects both user and scoped style features from
StyleEngine by calling StyleEngine::CollectFeaturesTo

BUG=632009

Change-Id: I38726d0e36f34cdeabcedb264d3e7c6bfac958f6
Reviewed-on: https://chromium-review.googlesource.com/789735
Commit-Queue: Manish Jethani <m.jethani@eyeo.com>
Reviewed-by: Rune Lillesveen <futhark@chromium.org>
Cr-Commit-Position: refs/heads/master@{#529707}
7 files changed