Skip lots of display checks in adjustRenderStyle when possible

1.5% of the time in the peacekeeper benchmark (and 2% of the recalcStyle
time) is spent inside adjustRenderStyle. This patch is the start of
trying to make adjustRenderStyle do less work in the common cases.

This patch moves the logic for adjusting the style based on the display
property out into a function and adds an early return for when the
element is display: block and is not floating since none of the other
sections of the function are needed then.

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

git-svn-id: svn://svn.chromium.org/blink/trunk@169425 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Use an unsigned of flags in ElementRareData

Instead of exposing tons of getters and setters on Element we can use an
enum of flags and treat the bits inside ElementRareData as just a flag
field like we do in Node. This removes a lot of boilerplate code and also
makes the check for style sharing a lot simpler since now we can just
OR the flags that disable sharing together. That's good since that check
is super hot in profiles.

This also lets us make all the other "flag reading" methods into simple
inline getters that call hasElementFlag() which early outs on not having
any rare data.

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

git-svn-id: svn://svn.chromium.org/blink/trunk@169426 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Swich to the new CpuProfiler api that returns non-const CpuProfile

BUG=v8:3213

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

git-svn-id: svn://svn.chromium.org/blink/trunk@169427 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Oilpan: Prepare to move SQLTransactionBackendSync and SQLTransactionSync to Oilpan heap.

We need to rollback a transaction if SQLTransactionBackendSync is dying and its
transaction is in progress. However Oilpan architecture doesn't allow us to
touch associated DatabaseSync in ~SQLTransactionBackendSync.

This CL adds a PersistentHeapHashMap<WeakMember<T>, U> to
DatabaseSync to manage SQLTransactionSync, and it makes possible
to call SQLTransactionSync::rollbackIfInProgress before the destruction.

Note:
- m_database->executionContext() can be null in some functions because on-heap
  objects can live after dissociation of ExecutionContext.
- Change the argument of DatabaseSync::rollbackTransaction to a reference
  because PassRefPtr is unnecessary here and the argument is always non-null.

BUG=347902

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

git-svn-id: svn://svn.chromium.org/blink/trunk@169428 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Ignore MediaController in the video fullscreen button logic

There were three problems:

 1. When fullScreenEnabled() was false, HTMLMediaElement's
    enterFullscreen() was used as a fallback, but that function checks
    the setting and does nothing. This has been the case since cleanup
    from April 2013, r149489: https://codereview.chromium.org/14670004

 2. MediaController's hasVideo() returned true if any of the slave
    elements had video, which could show the button for a video element
    with no video.

 3. The fullscreen button didn't do anything for slaved media elements.

The added tests verify that (1) no fullscreen button is shown when the
fullscreen feature is disabled or (2) when there is no video track, and
(3) that clicking the fullscreen button actually enters fullscreen.

BUG=351661

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

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

BUG=353087

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

git-svn-id: svn://svn.chromium.org/blink/trunk@169430 bbb929c8-8fbe-4397-9dbb-9b2b20218538
ReplaceSelectionCommand::makeInsertedContentRoundTrippableWithHTMLTreeBuilder should take a const reference to InsertedNodes

This method doesn't modify InsertedNodes object so that it can take a const reference.

BUG=

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

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