Move WebScrollbarThemeGeometryNative to platform/

BUG=297477

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

git-svn-id: svn://svn.chromium.org/blink/trunk@163795 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Implement new focusing steps for modal <dialog>.

When a modal <dialog> is opened, then
1) The first autofocusable element in the dialog gets focus, or else
2) The first focusable element in the dialog gets focus, or else
3) The dialog itself gets focus, if it's focusable, or else
4) Focus is cleared (effectively, document.body gets focus)

I chose to do (4) since the the previous implementation
relied on CheckFocusedElementTask to clear focus, which
isn't great because "dialog.showModal(); document.activeElement"
was a race condition. One problem with (4) is it will
remove focus from a non-inert ancestor, but the spec also recently
changed to make ancestors inert so that's the direction to take.
We can't make that change immediately though since:
a) it would make document.body inert, which violates
assumptions of document.body getting default focus when
nothing else can have focus, and
b) it would prune the modal <dialog> out of the accessibility
tree

As per the recent spec change:
http://html5.org/r/8338

BUG=298078,324401

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

git-svn-id: svn://svn.chromium.org/blink/trunk@163796 bbb929c8-8fbe-4397-9dbb-9b2b20218538
canvas: arc can never cover an angle greater than 2pi radians.

Recently, the Canvas spec was changed as title.
Currently, arc in Blink can cover greater than 2pi radians. So Blink needs to
follow the spec change.

W3 discussion: https://www.w3.org/Bugs/Public/show_bug.cgi?id=23050

New spec about arc :
http://www.whatwg.org/specs/web-apps/current-work/#dom-context-2d-arc
If the anticlockwise argument is false and endAngle-startAngle is equal to or
greater than 2pi, or, if the anticlockwise argument is true and
startAngle-endAngle is equal to or greater than 2pi, then the arc is the whole
circumference of this ellipse, and the point at startAngle along this circle's
circumference, measured in radians clockwise from the ellipse's semi-major axis,
acts as both the start point and the end point.

Otherwise, the points at startAngle and endAngle along this circle's
circumference, measured in radians clockwise from the ellipse's semi-major axis,
are the start and end points respectively, and the arc is the path along the
circumference of this ellipse from the start point to the end point, going
anti-clockwise if the anticlockwise argument is true, and clockwise otherwise.
Since the points are on the ellipse, as opposed to being simply angles from
zero, the arc can never cover an angle greater than 2pi radians.

Even if the arc covers the entire circumference of the ellipse and there are no
other points in the subpath, the path is not closed unless the closePath()
method is appropriately invoked.

TEST=following tests cover this change.
fast/canvas/canvas-arc-circumference-fill.html,
fast/canvas/canvas-arc-circumference.html,
fast/canvas/canvas-ellipse-circumference-fill.html,
fast/canvas/canvas-ellipse-circumference.html,
fast/canvas/canvas-ellipse-zero-lineto.html
BUG=324045

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

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