Empty @viewport should not override legacy viewport.

@viewport styles should not be considered present in author styles if there is
not a single descriptor present. This is not specified anywhere, though.

Marking the ViewportStyleResolver with author styles present when there were
no descriptors caused an assert to trigger (see mentioned BUG). This is fixed
by always require at least one descriptor to be present in order to set the
flag for author style presence, keeping the assert.

As part of this fix, collectViewportRules was refactored into
ViewportStyleResolver to resolve a FIXME in the StyleResolver.

BUG=299719

Review URL: https://codereview.chromium.org/25257003

git-svn-id: svn://svn.chromium.org/blink/trunk@158625 bbb929c8-8fbe-4397-9dbb-9b2b20218538
7 files changed
tree: 70191fcf97e04059ae3f7633ebe7ff7975a700b1
  1. third_party/