Avoid calling markAncestorsWithChildNeedsStyleRecalc() constantly in childrenChanged

This shows up in the Shadow DOM benchmark where childrenChanged is 2% of
the profile because we're calling into inActiveDocument() which is not
inline and then doing markAncestorsWithChildNeedsStyleRecalc() which is
also not inline without checking if the ancestor marking is actually needed.

markAncestorsWithChildNeedsStyleRecalc() also blindly calls
document().scheduleRenderTreeUpdate() which is not inline and does a bunch
of work.

This patch fixes the checks in ::childrenChanged to check the childNeedsStyleRecalc()
bit before calling markAncestorsWithChildNeedsStyleRecalc. This is equivalent to
checking inActiveDocument() as well since all nodes not in the tree have this bit set,
and all nodes in an inactive document will also have this bit set, so we'd never call
into markAncestorsWithChildNeedsStyleRecalc() in those trees.

It also adds an early  out so we don't call into scheduleRenderTreeUpdate() so often
when invalidating  style.

R=eseidel@chromium.org,abarth@chromium.org
BUG=357087

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

git-svn-id: svn://svn.chromium.org/blink/trunk@170705 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Use RenderStyle::isCollapsibleWhiteSpace when renderer is available.

This patch replaces isCollapsibleWhitespace() with RenderStyle::isCollapsibleWhiteSpace
in places where renderer is available. The latter provides more accurate decision so we
should always use it when possible. Some test results require rebaseline but none of
them failed the test really and the new behavior is correct.

BUG=357226

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

git-svn-id: svn://svn.chromium.org/blink/trunk@170706 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Mark animations/play-state-initially-paused as pass/fail

TBR=shans
BUG=248938

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

git-svn-id: svn://svn.chromium.org/blink/trunk@170707 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Prevent implicit WebInputEvent construction from WebInputEvent::Type

All concrete WebInputEvent derivatives currently accept an unsigned size
parameter in the constructor, used to zero-initialize the object.  This can
lead to unexpected runtime behavior, e.g., a WebInputEvent::Type value can
implicitly construct a WebInputEvent object.  Prevent this by making the
size-accepting constructor protected for all types, and preventing naked
construction of a base WebInputEvent instance.

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

git-svn-id: svn://svn.chromium.org/blink/trunk@170708 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Auto-rebaseline for r170660

http://src.chromium.org/viewvc/blink?view=revision&revision=170660

BUG=320139
TBR=dsinclair@chromium.org

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

git-svn-id: svn://svn.chromium.org/blink/trunk@170709 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Deflake fast/css-generated-content/malformed-url.html

This test was flaky because it would sometimes print the url of the blocked
resource and sometimes not depending on when the navigation happened.

Instead we should wait for onload so that the url is always printed.

TBR=ojan@chromium.org

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

git-svn-id: svn://svn.chromium.org/blink/trunk@170710 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Auto-rebaseline for r170660

http://src.chromium.org/viewvc/blink?view=revision&revision=170660

BUG=320139,355463
TBR=dsinclair@chromium.org

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

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