Rename createCallbackTask to createCrossThreadTask

The purposes of createCallbackTask and createCrossThreadTask are the same,
and thus these functions should have the same name.

BUG=390851

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

git-svn-id: svn://svn.chromium.org/blink/trunk@177890 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Limit the size of images rendered for shape-outside

Ignore attemps to create shape-outside image shapes when the size of the rendered image in bytes is greater than 2^32. On platforms with lower limits for maxDecodedImageSize() we use the lower platform limit.

BUG=389729

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

git-svn-id: svn://svn.chromium.org/blink/trunk@177892 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Fix wasteful ScrollAnimator creation in EventHandler::handleGestureShowPress

This replaces a call to ScrollableArea::scrollAnimator (which creates a
ScrollAnimator if one doesn't already exist) with a call to
ScrollableArea::existingScrollAnimator (which returns null if one doesn't
already exist). Since EventHandler::handleGestureShowPress is just trying
to cancel any in-progress animations, there's no need to create a
ScrollAnimator if one doesn't already exist.

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

git-svn-id: svn://svn.chromium.org/blink/trunk@177893 bbb929c8-8fbe-4397-9dbb-9b2b20218538
'.constructor' in private scripts should not be called multiple times

This is just a subtle bug fix. |isInitialized| should be set when initializeHolderIfNeeded runs at the first time.

BUG=341031

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

git-svn-id: svn://svn.chromium.org/blink/trunk@177894 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Gardening: update some expectations

fast/dom/HTMLScriptElement/dont-load-unknown-type.html -> passes
svg/as-object/sizing/svg-in-object-placeholder-height-auto.html -> widen
svg/custom/resource-client-removal.svg -> add failure

BUG=380649,392640,393087
TBR=junov

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

git-svn-id: svn://svn.chromium.org/blink/trunk@177895 bbb929c8-8fbe-4397-9dbb-9b2b20218538
ServiceWorker: Add a new entry for LayoutTests into WATCHLISTS 


BUG=n/a
TEST=n/a
NOTRY=true

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

git-svn-id: svn://svn.chromium.org/blink/trunk@177896 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Update a comment in CrossThreadTask.h

Elaborated on why ExecutionContextTask is holding a RawPtr to on-heap objects.

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

git-svn-id: svn://svn.chromium.org/blink/trunk@177898 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Replace more off-heap collections of Node* pointers with on-heap collections

This is a trivial CL.

BUG=340522

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

git-svn-id: svn://svn.chromium.org/blink/trunk@177899 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Gardening: update some TestExpectations

Many of these were in FlakyTests for [ Win7 Release] but Win7 Debug also is
failing.

BUG=393098,378716,393094,393095,393096
TBR=junov

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

git-svn-id: svn://svn.chromium.org/blink/trunk@177900 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Garden-O-Matic: Add support for leak bot

BUG=359024
NOTRY=true

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

git-svn-id: svn://svn.chromium.org/blink/trunk@177901 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Always emits an object replacement char when computing a range

This is a followup of my previous CL https://codereview.chromium.org/297003003/ that emits an object replacement char in InputMethodController::setSelectionOffsets. The previous CL was intended to fix the issue 311448 that an image element cannot be easily deleted with android keyboard. Unfortunately the previous CL did not fix the issue 311448 completely, and introduced regressions.

The reason is that Chrome only emits object replacement chars for replaced elements in InputMethodController::setSelectionOffsets, and ignores replaced elements in all other cases, thus

1. IME still does not see the image element, thus (in most cases) Chrome still can not delete an image element. Try the test case at http://jsfiddle.net/CuDUL/2/ with android default english keyboard on canary, put the caret after the image and press 'Backspace', you will see Chrome move the caret before the image instead of deleting the image.

2. Chrome internally has inconsistent knowledge about plain text offsets when the input contains replaced elements. InputMethodController::setSelectionOffsets assumes the input plain text offsets include replaced elements, while everywhere else plain text offsets exclude replaced elements, thus the offsets are often incorrectly used. Try http://jsfiddle.net/CuDUL/7/, put the cursor at the end of 'hello', you will see Chrome automatically move the caret left by 1.

To fix the issue, Chrome should always emit an object replacement char when computing a range or plainTextRange.

BUG=311448

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

git-svn-id: svn://svn.chromium.org/blink/trunk@177903 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Add resolve(void) and reject(void) to ScriptPromiseResolver.

They are abbreviations for resolve(undefined) and reject(undefined).

BUG=390894

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

git-svn-id: svn://svn.chromium.org/blink/trunk@177904 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Move DocumentMarker to oilpan's heap

This is a left-over of erik's CL (https://codereview.chromium.org/289323003/). It's weird to use raw pointers in heap vectors, so this CL moves DocumentMarker to the heap and replace the raw pointers with Members.

BUG=340522

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

git-svn-id: svn://svn.chromium.org/blink/trunk@177905 bbb929c8-8fbe-4397-9dbb-9b2b20218538
MediaSource should not use deprecated {,un}setPendingActivity

This change also changes MediaSource to
RefCountedGarbageCollectedWillBeGarbageCollectedFinalized, as
we don't {,de}ref() ourselves anymore.

Bonus: Fix scope of variable |sourceOpened| on the LayoutTest. It needs to be on a global scope to be referenced from both funcs.

BUG=354845

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

git-svn-id: svn://svn.chromium.org/blink/trunk@177906 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Map all ContextDestroyed custom element exceptions to InvalidStateError.

For the exceptions that document.registerElement() may throw due to the
context having gone away, map them all to InvalidStateError.

Specifically, map ContextDestroyedRegisteringDefinition to InvalidStateError
rather than NotSupportedError.

R=haraken@chromium.org,ager@chromium.org,dominicc@chromium.org
BUG=

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

git-svn-id: svn://svn.chromium.org/blink/trunk@177907 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Split Dictionary's get and convert into DictionaryHelper.

Dictionary's get and convert depends on both core and modules code.
So the get and convert logic is split into DictionaryHelper.

DictionaryHelper is a class which has static template methods: get and convert:
- the methods are implemented in DictionaryHelperForCore.cpp and DictionaryHelperForModules.cpp.
- DictionaryHelperForCore.cpp has get and convert for core code.
- DictionaryHelperForModules.cpp has get and convert for modules code.

BUG=358074

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

git-svn-id: svn://svn.chromium.org/blink/trunk@177908 bbb929c8-8fbe-4397-9dbb-9b2b20218538
EventSource should not use deprecated {,un}setPendingActivity

BUG=354845

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

git-svn-id: svn://svn.chromium.org/blink/trunk@177909 bbb929c8-8fbe-4397-9dbb-9b2b20218538
WebAudio: Remove AudioNode::RefType.

The motivation of this CL is to reduce manual ref()/deref().

AudioNode has two types of ref()/deref(); RefTypeNormal and RefTypeConnection.
It made the code complex, and we couldn't use RefPtr<> for the connection type
references.

This CL removes AudioNode::RefType.
 - m_normalRefCount and m_connectionRefCount were updated independently. After
   this CL, connection type references updates both of them.
 - We use RefPtr<> for connection type references, and call
   AudioNode::makeConnection() and AudioNode::breakConnection() explicitly when
   connections are updated.

BUG=392788
TEST=none; This CL should not have behavior changes.

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

git-svn-id: svn://svn.chromium.org/blink/trunk@177910 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Make WebGLRenderingContext.getSupportedExtensions()'s return type nullable

This allows it to return null when the context is lost, without resorting
to a custom binding for the method.

BUG=390780

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

git-svn-id: svn://svn.chromium.org/blink/trunk@177911 bbb929c8-8fbe-4397-9dbb-9b2b20218538
IDL clean-up: Rename is_nullable_simple => is_implicit_nullable

... and introduce is_explicit_nullable that is mutually exclusive (for
nullable types.)

It turns out that the only actual use of is_implicit_nullable right now
is in the definition of is_explicit_nullable, but having both is fine,
for symmetry.

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

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