Fix lint error in TimelinePanel.js due to 'energy' variable.

This error was introduced in: https://codereview.chromium.org/220963002

BUG=

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

git-svn-id: svn://svn.chromium.org/blink/trunk@171434 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Check isUserActionElement() instead of separate hover/active/focus checks in supportsStyleSharing()

Since we check all the different states of being a user action element we
should just check the primary bit instead. This function is super hot so
avoiding some branches helps.

This will make us not share for elements in the "active chain", but in the 
common case that's the same as the regular :active elements unless you mutate
the elements in the :active state inside an action (ex. click)

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

git-svn-id: svn://svn.chromium.org/blink/trunk@171435 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Replace Selection.collapse() with Selection.removeAllRanges() in layout tests.

There are some tests calling Selection.collapse(null).
Selection.collapse(null) clears the current selection and its behavior is essentially same as Selection.removeAllRanges().
However, the Selection.collapse method is intended to create a range forming a caret:
https://dvcs.w3.org/hg/editing/raw-file/tip/editing.html#dom-selection-collapse
Calling Selection.collapse(null) to clear the selection is non-standard and I'm going to change Selection.idl to restrict such a usage.

BUG=361941

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

git-svn-id: svn://svn.chromium.org/blink/trunk@171436 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Mark virtual/gpu/fast/canvas/canvas-composite-stroke-alpha.html as flaky in WebKit Win Oilpan (dbg), WebKit Win7 (dbg)

This test looks flaky for a long time in [WebKit Win Oilpan (dbg), WebKit Win7 (dbg)].

I can't tell the exact possible revision from the dashboard:
http://test-results.appspot.com/dashboards/flakiness_dashboard.html#tests=virtual%2Fgpu%2Ffast%2Fcanvas%2Fcanvas-composite-stroke-alpha.html

TBR=leviw@chromium.org
BUG=363029

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

git-svn-id: svn://svn.chromium.org/blink/trunk@171437 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Simplify CRC2D winding rule handling

Since the bindings already check the enumeration, there's no need to
check that the value passed is valid. Make the parseWinding helper function
just return the translated value instead of a status boolean.

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

git-svn-id: svn://svn.chromium.org/blink/trunk@171438 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Web Animations: Fix effect change calculation when player is cancelled but not held

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

git-svn-id: svn://svn.chromium.org/blink/trunk@171439 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Avoid using cross RenderView selection rendering

This patch makes sure we pass |RenderObject| belong to RenderView in
|RenderView::setSelection|, which takes two |RenderObject|s for start and end of
selection, in |FrameSeleciton::updateAppearance|.

The bug is caused by |VisibleSelection::base| and |VisibleSelection::start|
are in different document, |base| points to IFRAME and |start| points |TextNode|
in IFRAME. This causes |RenderView|, which holds |RenderObject|s of selection
start points and end points, have dangling |RenderObject|'s. Because,
|RenderView| doesn't know destructed |RenderObject| belongs to another
|RenderView|.

BUG=356690
TEST=LayoutTests/undo/execCommand/crash-redo-with-iframes.html

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

git-svn-id: svn://svn.chromium.org/blink/trunk@171440 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Use document's contentSize when the HTML element is selected.

HTMLHtmlElement's size might not be the size of the document, such as
HTMLBodyElement's size, so when the selection root in the html element,
the best thing we can do is get the size of the content because <html>
and <body> might have a different size.

BUG=361927

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

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