Move code from StyleResolver to ViewportStyleResolver.

@viewport rule collection is moved to ViewportStyleResolver. This removes
the last StyleResolver dependency from ScopedStyleResolver.

Removed an unnecessary null check for m_document in ViewportStyleResolver
which should always be non-null.

Moved resetAuthorStyle() to skip the call when the ScopedStyleResolver is
deleted immediately afterwards.

Load the viewport UA style into CSSDefaultStyleSheets once instead
of parsing it from InspectorPageAgent every time it is applied. Also
apply the UA style from ViewportStyleResolver instead of the
InspectorPageAgent to remove resolver dependencies from the inspector
code. The application of the UA style is controlled by a setting instead
of and OS(ANDROID) #if in Blink.

The introduction of the setting is a two-sided patch with this CL and [1].
[2] removes the OS(ANDROID) check completely.

[1] https://codereview.chromium.org/989963002/
[2] https://codereview.chromium.org/989973002/

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

git-svn-id: svn://svn.chromium.org/blink/trunk@191747 bbb929c8-8fbe-4397-9dbb-9b2b20218538
18 files changed
tree: 97c9f1cafd9268227829719731443f12e707035e
  1. third_party/