Avoid looking at invalidation sets in a SubtreeStyleChange subtree

We were matching all the rulesets in a subtree even after finding a ruleset
that would invalidate the whole subtree which is wasted work. We were also
storing all the invalidation sets for an element even after one of them
would have invalidated the entire subtree.

This patch makes us only ever store one invalidation set for an element once
one of them would invalidate the whole subtree. It also removes the
foundInvalidationSet() bit since that's identical to just checking if the
Vector of invalidation sets is non-empty.

I also removed an ASSERT(renderer->style()), all renderers have a style, so
there's no reason to check this.

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

git-svn-id: svn://svn.chromium.org/blink/trunk@171417 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Use ScriptPromiseResolverWithContext.

Use ScriptPromiseResolverWithContext instead of a pair of
ScriptPromiseResolver and NewScriptState.
This CL doen't change the behavior in many cases: The only exception
is when the resolution / rejection happens on the suspended or stopped
ExecutionContext. In such a case, ScriptPromiseResolver suspends or stops
resolution or rejection.

R=ksakamoto@chromium.org
BUG=352552

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

git-svn-id: svn://svn.chromium.org/blink/trunk@171418 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Oilpan: Enable Oilpan in modules/encoding

BUG=340522

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

git-svn-id: svn://svn.chromium.org/blink/trunk@171419 bbb929c8-8fbe-4397-9dbb-9b2b20218538
[FastTextAutosizer] Do not pre-inflate nested tables

Instead of pre-inflating all children in inflateTable(), this patch only
pre-inflates non-table children. This fixes a bug where nested tables
had their cell widths inflated with their parent table's multiplier but
ended up not being inflated at all--leading to extra wide cells.

This fixes a bug on codereview.chromium.org where people's names would
have extra space around them (http://pr.gg/tablewidth.png).

There is the potential for regressions with this change if a table has
enough text to autosize but where the width ends up being less than
100% of the containing <td>. The real world impact script showed no
changes on the top 100 websites and hackernews (the canonical nested-
table mess) renders fine after this change.

BUG=362930

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

git-svn-id: svn://svn.chromium.org/blink/trunk@171420 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Fix deps problems in Jinja template use in build/scripts

Three targets are missing correct Jinja template dependencies:
* MediaFeatureNames
* MediaFeatures
* MediaTypeNames
This fixes them, so they rebuild properly.

Also minor style/order fixes.

R=abarth

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

git-svn-id: svn://svn.chromium.org/blink/trunk@171421 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Simplify whitespace handling in build/ Jinja templates

No change to generated code, just cleanup.

This adds the flags:
lstrip_blocks=True
trim_blocks=True
...to the Jinja environment setup

This means we don't need {%- everywhere, and also allows us to indent control blocks.

(Other than that, a few consistency fixes of {{ foo() }} => {{foo()}} and " => ')

This CL does not change generated code, to simplify testing and review.
This turned up lots of minor whitespace errors or warts, which I've marked
with FIXME and will fix in a followup.

R=abarth

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

git-svn-id: svn://svn.chromium.org/blink/trunk@171422 bbb929c8-8fbe-4397-9dbb-9b2b20218538