DevTools: make extension server a part of core, panels' code should depend on it.

drive-by removal of random selection-related undocumented extensions api capabilities.

BUG=424951

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

git-svn-id: svn://svn.chromium.org/blink/trunk@183969 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Revert of TextRun::length() should return an unsigned (patchset #2 id:190001 of https://codereview.chromium.org/652483002/)

Reason for revert:
breaks FindInPageControllerTest.FindInPageFormsTextAreas

Original issue's description:
> TextRun::length() should return an unsigned.
> 
> Tightened int types to unsigned in TextRun to make it easier to reason about the code and in the process removed some casts and some ASSERTS that are no longer needed.
> 
> Also made the getter type consistent with the corresponding member type for for consistency where applicable.
> 
> Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=183934

TBR=eae@chromium.org,mlamouri@chromium.org,l.gombos@samsung.com
NOTREECHECKS=true
NOTRY=true

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

git-svn-id: svn://svn.chromium.org/blink/trunk@183970 bbb929c8-8fbe-4397-9dbb-9b2b20218538
[ServiceWorker] Add test for the hanging bug in loading ServiceWorker script.

Chromium side fix patch: https://codereview.chromium.org/640923003

BUG=419999

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

git-svn-id: svn://svn.chromium.org/blink/trunk@183971 bbb929c8-8fbe-4397-9dbb-9b2b20218538
bindings: Adds DOMArrayBuffer, etc. as thin wrappers for ArrayBuffer, etc.
and make them inherit from ScriptWrappable.

This CL adds:
- DOMArrayBuffer
- DOMArrayBufferView
- DOM<TYPE>Array
  where TYPE is {Int,Uint}{8,16,32}, Float{32,64},
  and Uint8Clamped.
- DOMDataView
- DOMArrayPiece

Each class corresponds to WTF::CLASSNAME where CLASSNAME is
the class name without the prefix DOM (say, ArrayBuffer).

DOMxxx classes have a similar class hierarchy as the original
Xxx classes.  i.e. DOM<TYPE>Array and DOMDataView inherit from
DOMArrayBufferView.

BUG=235436
NOPRESUBMIT=true
R=haraken@chromium.org, tkent@chromium.org

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

git-svn-id: svn://svn.chromium.org/blink/trunk@183972 bbb929c8-8fbe-4397-9dbb-9b2b20218538
DevTools: do not suggest mapping workspace to itself, remove workspace mapping tip from behind experiments.

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

git-svn-id: svn://svn.chromium.org/blink/trunk@183973 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Web MIDI: add blink APIs to notify device connection events

Add different versions of APIs of didAddInputPort() and didAddOutputPort()
that have a active flag. Old versions will be deprecated once Chromium
side is changed to use the new APIs.

Also, add didSetInputPortState() and didSetOutputPortState() to notify
device status changes.

These updates are needed to manage device connections and disconnections
in consistent between Chromium and Blink.

BUG=279097
TEST=LayoutTets and manual tests

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

git-svn-id: svn://svn.chromium.org/blink/trunk@183974 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Simplify CSSParserToken::textForUnitTests by using more WTF helpers

Instead of manually handling char arrays and using sprintf in converting
CSSParserTokens to strings, we should just concatenate Strings and use
String::number. I didn't bother using StringBuilder here since the
function is only used in unit tests and it's a bit more readable this way.

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

git-svn-id: svn://svn.chromium.org/blink/trunk@183975 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Oilpan: fix build after r183972.

With Oilpan, ScriptWrappable has no destructor, so we need to provide
a virtual destructor for RefCounted<DOMArrayBufferView> instead.

TBR=oilpan-reviews,haraken
BUG=235436
NOTRY=true

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

git-svn-id: svn://svn.chromium.org/blink/trunk@183976 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Move the v8::Isolate* parameter to the first parameter of various binding methods in third_party/WebKit/Source/bindings

This step is to move the v8::Isolate* parameter to the first parameter of various binding methods in third_party/WebKit/Source/bindings
(Ref: method changed: Node* V8GCController::opaqueRootForGC(Node* node, v8::Isolate*))

BUG=424446

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

git-svn-id: svn://svn.chromium.org/blink/trunk@183977 bbb929c8-8fbe-4397-9dbb-9b2b20218538
CSS Tokenizer: Fix edge cases in number parsing

This patch fixes a couple of small issues in the css-syntax number
parsing routine:

1) We shouldn't consume a "." if the next character isn't a digit
2) If any exponent argument is present we should use a 'number'
type (in the code we just check if we consumed anything after the
integer portion)

http://dev.w3.org/csswg/css-syntax/#consume-number

BUG=424988

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

git-svn-id: svn://svn.chromium.org/blink/trunk@183979 bbb929c8-8fbe-4397-9dbb-9b2b20218538
DevTools: Fix build after r183969

The "extensions" module is now autostarted.

TBR=pfeldman

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

git-svn-id: svn://svn.chromium.org/blink/trunk@183980 bbb929c8-8fbe-4397-9dbb-9b2b20218538
DevTools: [CSS] cache lineEndings in InspectorStyleSheet

lineEndings are used for creation of source range in the protocol
CSS domain. This significantly speeds up all CSS domain protocol methods.

BUG=423823
R=vsevik, pfeldman

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

git-svn-id: svn://svn.chromium.org/blink/trunk@183981 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Move special code for 'shape-outside' out of StyleBuilderFunctions.cpp.tmpl.

There should not be special code generation for a single property, at
least not in cases where a converter can easily be used instead.

Changes:

 * Assume that 'value' is either 'none', an image value, or a list of
   values.
 * Use primitive value mapping for CSSBoxType, since parser ensures
   that only valid values go though.

R=timloh@chromium.org

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

git-svn-id: svn://svn.chromium.org/blink/trunk@183982 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Fix SVGResources::hasResourceData predicate to match method name

Current predicate is "has-no-resource-data". Negate, and negate users.

BUG=420022

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

git-svn-id: svn://svn.chromium.org/blink/trunk@183983 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Reland: Refactor Script(Loader|Runner): don't access Resources all over the place...

... but use proper layering instead.

PendingScript holds a Resource, and many places in the code are using both the
PendingScript and the underlying Resource. For example, ScriptRunner holds a
collection of PendingScripts, and ScriptLoaders then listen to the underlying
Resources. This is confusing and error prone.

The Resource - ScriptLoader - PendingScript - Element love quadrangle is messy
in general.  Both ScriptLoader and PendingScript refer to the Resource. The way
to get ScriptLoader from PendingScript is via Element which PendingScript also
holds. But there's no way to get PendingScript from ScriptLoader.

This CL makes ScriptRunner access the ScriptLoaders directly and moves the
PendingScript to ScriptLoader. In addition, it makes ScriptRunner not access the
Resource of the ScriptLoader directly.

This CL also cancels the hack from https://bugs.webkit.org/show_bug.cgi?id=92211
(r139942) where it was speculated that a crash can be caused by ScriptLoader
getting the notifyFinished notification twice because it doesn't unsubscribe yet
when it gets the first one. The speculative fix was to made it nullify
ScriptLoader::m_resource and check for the nullity later. This is pretty
surprising, since the obvious solution would've been to just unsubscribe early
enough (which is done by this CL).

Note a behavioral change: It's OK to call Resource::addClient even if the
Resource is finished, and in that case, the client will be notified
immediately. But PendingScript used to ASSERT that the Resource is not
finished. This CL removes that restriction (the underlying Resource already
handles adding clients to finished resources + made ScriptStreamer handle it
too).

First version: https://codereview.chromium.org/656113002/

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

git-svn-id: svn://svn.chromium.org/blink/trunk@183984 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Fix unhandled promise console message to show stack trace of a DOMException.

BUG=393913
R=pfeldman@chromium.org, yurys@chromium.org

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

git-svn-id: svn://svn.chromium.org/blink/trunk@183985 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Made SuspendableTimer smaller (removed redudant m_active field)

And fixed the FIXME in SuspendableTimer::resume()

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

git-svn-id: svn://svn.chromium.org/blink/trunk@183986 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Move the v8::Isolate* parameter to the first parameter of various binding methods in third_party/WebKit/Source/bindings

This step is to move the v8::Isolate* parameter to the first parameter of various binding methods in third_party/WebKit/Source/bindings
(Ref: binding-methods changed:
NPObject* npCreateV8ScriptObject(NPP, v8::Handle<v8::Object>, LocalDOMWindow*, v8::Isolate*)
void disposeUnderlyingV8Object(NPObject*, v8::Isolate*)
static void interruptAndRun(PassOwnPtr<Task>, v8::Isolate*)
static bool extractTransferables(v8::Local<v8::Value>, int, MessagePortArray&, ArrayBufferArray&, ExceptionState&, v8::Isolate*))

BUG=424446

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

git-svn-id: svn://svn.chromium.org/blink/trunk@183987 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Oilpan:fix build after r183981.

TBR=oilpan-reviews,haraken
BUG=423823
NOTRY=true

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

git-svn-id: svn://svn.chromium.org/blink/trunk@183988 bbb929c8-8fbe-4397-9dbb-9b2b20218538
CSS Tokenizer: Consume a single whitespace after escapes if present

The css-syntax spec says to consume a single whitespace after a
hex-digit escape if present.

http://dev.w3.org/csswg/css-syntax/#consume-escaped-code-point

BUG=424988

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

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