Cleanup notASequence exception handling

A few changes:
* simpler, better-factored code
* fix function name to agree with error message
(maybe this should be "not an array or sequence"?)
* index < 0 is not used (0 = value, > 0 = index),
  and is safe anyway (ok to convert negative numbers to string)
* fuller list of ordinal exceptions:
(up to 19 should be plenty; we have up to 10 arguments in real IDLs,
CanvasRenderingContext2D.idl::drawImage
so also including 12 gives us plenty of room)
http://en.wikipedia.org/wiki/English_numerals#Ordinal_numbers

Followup to:
IDL compiler: Array and sequence types for methods
https://codereview.chromium.org/50623003/

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

git-svn-id: svn://svn.chromium.org/blink/trunk@160912 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Optimize the texture upload for texImage2D from WebGL by doing a GPU->GPU textures copy instead of with CPU readback involved.

For PerformanceTests/Canvas/upload-webgl-to-texture.html, the performance(runs/s) can have 15x ~ 20x speedup for Windows, Mac, Linux and Android.  

BUG=306497

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

git-svn-id: svn://svn.chromium.org/blink/trunk@160913 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Revert "Move innerHTML and outerHTML to Element"

This reverts commit 160869 as it broke ActivityLogApiTest.TriggerEvent browser test:
http://test-results.appspot.com/dashboards/flakiness_dashboard.html#group=%40ToT%20Blink&testType=browser_tests&tests=ActivityLogApiTest.TriggerEvent

I'm not sure how severe the problem is so I'd rather revert the offending change than disable the test on Blink roll.

BUG=311080
TBR=davve@opera.com

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

git-svn-id: svn://svn.chromium.org/blink/trunk@160914 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Rename functions and members in ShadowRoot and ShadowRootRareData.

1. Use 'descendant' rather than 'child'.
   Some functions are actually used to track descendant elements rather than direct child elements of the shadow root.
2. Prefix 'did' to some functions.
   Using 'did' looks an established convention for this kind of functions.
3. Other renaming for consistency.

BUG=None
Test=None; No behavior change;

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

git-svn-id: svn://svn.chromium.org/blink/trunk@160915 bbb929c8-8fbe-4397-9dbb-9b2b20218538
IDL compiler: 3 special types for methods

This adds support for 3 special types:
* DOMStringList (already supported by v8_types)
* NodeFilter
* XPathNSResolver

This leaves 2 other special cases that I'm aware of:
* Dictionary
* SerializedScriptValue

BUG=239771
NOTRY=true

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

git-svn-id: svn://svn.chromium.org/blink/trunk@160916 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Simplify Document object construction by passing DOMWindow.

This change passes DOMWindow to Document class constructor
via DocumentInit object and gets rid of Document::setDOMwindow().
This wasn't possible due to the need of frame tree traversal
in Document::initSecurityContext(). This change pre-populates
required values in DocumentInit before free tree change
and passed these values to Document ctor.

This change allows DOMWindow to create its own Document.
So DOMWindow::setDOMWindow(Document*) becomes DOMWindow::setNewDocument(),
which creates a Document for its own. This clarifies the Document-DOMWindow
relationship: DOMWindow creates and owns Document.

This is another preparation for Document-ExecutionContext decoupling.
It wants to access DOMWindow in Document ctor.

BUG=305497
R=abarth, dglazkov, japhet@chromium.org

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

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