Only schedule a widget update when necessary

The vast majority of the Timers scheduled in Blink come
from this one call in performPostLayoutTasks, at least
according to my survey of the key_silk_cases.

However updateWidget() already early-returns if
there are no widgets to update.  This moves the
timer scheduling into its own function (so that the
FROM_HERE result is more descriptive) and also
checks the same early-return as updateWidget, just
before bothering to schedule the timer.

I do not expect this to have a performance impact, since
scheduling a timer should be cheap and in the common case
(no plugins) these timers would always just immediately
exit on firing but at least removing this timer schedule
will reduce chatter in our trace files if nothing else.

NOTRY=true
BUG=350592
R=abarth@chromium.org

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

git-svn-id: svn://svn.chromium.org/blink/trunk@168883 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Encrypted Media: Convert unprefixed syntax layout test to use testharness.js.

BUG=224791

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

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