allow style sharing across distributed elements

In StyleResolver::styleForElement remove the check for
!state.distributedToInsertionPoint() for style sharing,
and in SharedStyleFinder::canShareStyleWithElement
do the checks on the composed tree.

This change improves the perf in
shadow-style-share-with-distribution.html by 25%.

BUG=314296

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

git-svn-id: svn://svn.chromium.org/blink/trunk@166643 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Avoid unnecessary save/restore in rendering code

There are several cases where we save state that is only needed if the
zoom is non-identity. And some other similar situations.

R=
BUG=334904

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

git-svn-id: svn://svn.chromium.org/blink/trunk@166644 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Use isFinishedParsingChildren() in HTMLMediaElement

Remove HTMLMediaElement::m_parsingInProgress.

There is no runtime change, as isFinishedParsingChildren() is true per
default, even for script-created elements, and only returns false
between the beginParsingChildren() and finishParsingChildren().

BUG=341414

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

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