XHR: compliant event sequencing on request errors and aborts.

Implement the event sequencing that the XHR spec now mandates for
request errors and abort()s. For request errors over async requests,
the following steps and sequence of events should now be dispatched:

  - readyState transitions to state DONE, dispatching a
    readystatechange event.

  - The ordered event triple (progress, <event type>, loadend) is
    dispatched to the upload event listeners, if any.

  - The ordered event triple (progress, <event type>, loadend) is
    dispatched to the regular/download event listeners.

  - readyState transitions to UNSENT.

where <event type> is one of {'error', 'timeout', 'abort'}.

Same steps for abort(), for both sync and async requests.

The required dispatching of 'progress' here is a relatively new
addition to the specification, late 2012.

A behavioral implementation change is the fourth step of transitioning
to UNSENT. This was previously done as step two (after dispatching
readystatechange), an out-of-spec and incorrect quirk.

For the above sequence, to allow for the delivery of
'readystatechange' on transitioning to DONE, but delay the delivery of
the final 'progress', we carefully only flush any deferred 'progress'
event before that 'readystatechange' event, but do not issue new. That
dispatch happens after the upload progress events have been dealt
with.

To make the correspondence clearer to the underlying spec text, the
request error steps have been factored out into a separate method.

R=tyoshino,abarth
BUG=315488

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

git-svn-id: svn://svn.chromium.org/blink/trunk@162340 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Blink side changes for adding Writing direction to the context menu for linux gtk

Chromium side CL is here https://codereview.chromium.org/73963004/

BUG=91178

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

git-svn-id: svn://svn.chromium.org/blink/trunk@162341 bbb929c8-8fbe-4397-9dbb-9b2b20218538
IndexedDB: Add support for "binary" keys in public API

Extend public and internal enums and types with support for "binary"
keys, i.e. using Uint8Array() as a key type. This will be exposed
to script behind an experimental features flag, but the Chromium
back-end support must be landed first.

(This is part 2 of a 4 part landing sequence.)

BUG=297304
R=alecflett@chromium.org

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

git-svn-id: svn://svn.chromium.org/blink/trunk@162342 bbb929c8-8fbe-4397-9dbb-9b2b20218538
[DoNotCheckSecurity=Getter] => [DoNotCheckSecurity] for readonly attribute

IDL cleanup.

Docs updated:
https://sites.google.com/a/chromium.org/dev/blink/webidl/blink-idl-extended-attributes#TOC-DoNotCheckSecurity-m-a-

TBR=haraken

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

git-svn-id: svn://svn.chromium.org/blink/trunk@162343 bbb929c8-8fbe-4397-9dbb-9b2b20218538
NoOp Document::open shouldn't be reported to Inspector.

Otherwise Inspector erroneously thinks that frame was navigated.

BUG=315618

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

git-svn-id: svn://svn.chromium.org/blink/trunk@162344 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Web Animations CSS: Adds the pauseForTestingOnCompositor method.

R=dstockwell@chromium.org

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

git-svn-id: svn://svn.chromium.org/blink/trunk@162345 bbb929c8-8fbe-4397-9dbb-9b2b20218538
XHR: reset error flag on aborting request that restarts.

Close a small window in internal abort logic that takes care of
repeated uses of the XHR object upon cancellation.

The possibility existed that such a repeated use might reset the error
flag, so that upon return to the outer request (the one that is
aborting), it was left as 'false'. Spot this and (re) set the error
flag to 'true'.

Not a common use of XHR; added test coverage.

R=
BUG=315488

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

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