Introduce use counters for Blink specific CSS classes for editing

This patch introduces Blink specific CSS classes for editing for
  - Apple-interchange-newline
  - Apple-converted-space
  - Apple-paste-as-quotation
  - Apple-style-span
  - Apple-tab-span
These CSS classes are defined in "core/editing/HTMLInterchange.h"

We would like to deprecate these Blink specific CSS classes for browser
compatibility, if possible.

BUG=383677
TEST=n/a

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

git-svn-id: svn://svn.chromium.org/blink/trunk@176171 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Don't move uneditable paragraph contents in CompositeEditCommand::moveParagraphContentsToNewBlockIfNecessary

This patch makes CompositeEditCommand::moveParagraphContentsToNewBlockIfNecessary
not to move uneditable paragraph contents.

In attached test case, Blink tried to move contents in uneditable ABBR element.

BUG=381076, 383811
TEST=LayoutTests/editing/execCommand/justy-center-with-uneditable-crash.html

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

git-svn-id: svn://svn.chromium.org/blink/trunk@176172 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Remove redundant calls to FrameLoader::frameDetached().

Page::willBeDestroyed() detachs any frames remaining in the frame tree,
so there's no need to do this before calling willBeDestroyed().

In addition, since frameDetached() recursively detaches all frames,
eliminate the loop inside Page::willBeDestroyed() to detach all frames.

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

git-svn-id: svn://svn.chromium.org/blink/trunk@176173 bbb929c8-8fbe-4397-9dbb-9b2b20218538
GN: Enable blink platform heap targets, put all tests behind flag

This puts the blink heap asm targets in the GN build set and enables
both blink platform test targets behind a single flag. They compile, link
and run successfully on mac but (probably) don't link yet on linux due
to ffmpeg deps.

R=brettw@chromium.org

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

git-svn-id: svn://svn.chromium.org/blink/trunk@176174 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Removing using declarations that import names in the C++ Standard library.

The original CL https://codereview.chromium.org/329183002/ got reverted in
https://codereview.chromium.org/330933002/ as it was causing failures on the
Chromium Linux Tsan v2 bot.

The problem was that std::abs(int) is found in <cstdlib> but we apparently only
include <cmath> everywhere. So the compiler only knows about std::abs(float) and
variants.

There were two ways of fixing this:
1. include <cstdlib> whereever std::abs(int) is used.
2. use abs() as it was done earlier.

Because we already include <cmath> everywhere, and Since C++11, additional
overloads are provided in the header <cmath> for the integral types as well, so
its better to directly just use abs() rather than including an extra header file
This CL uses the second way.

BUG=None

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

git-svn-id: svn://svn.chromium.org/blink/trunk@176179 bbb929c8-8fbe-4397-9dbb-9b2b20218538
fast/forms/submit-change-fragment.html is flaky on all platforms.

BUG=384950
TBR=

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

git-svn-id: svn://svn.chromium.org/blink/trunk@176180 bbb929c8-8fbe-4397-9dbb-9b2b20218538
virtual/implsidepainting/inspector/timeline/timeline-script-tag-1.html is flaky.

BUG=384956
TBR=

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

git-svn-id: svn://svn.chromium.org/blink/trunk@176181 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Remove unused method setZoomWithoutReturnValue

When the third parameter to PropertyWrapper was removed in
https://codereview.chromium.org/139273007 (legacy animation engine
removal) setZoomWithoutReturnValue lost its last caller.

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

git-svn-id: svn://svn.chromium.org/blink/trunk@176182 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Replace ContentSecurityPolicy::client() with a method returning an ExecutionContext

As bug305497 is marked WontFix, I'd like to merge back
ExecutionContextClient to ExecutionContext for readability. This is 1st
step for that.

Note about behavior change induced by this CL

addConsoleMessage():
When addConsoleMessage() is called via ExecutionContextClient, it just
calls addMessage(). But ExecutionContext has non-virtual
addConsoleMessage() which checks if m_client is non-NULL. We'll call
the latter after this CL. If this change breaks something, that means
such an addConsoleMessage() call has been invalid since it's called
on an ExecutionContext that is already partially destructed.

isDocument():
OK for the same reason.

disableEval():
OK for the same reason.

securityContext() and reportBlockedScriptExecutionToInspector():
No change as ExecutionContext doesn't have a non-virtual override for it.

contextURL() and contextCompleteURL():
No change as they're implemented only on ExecutionContextClient.

BUG=305497

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

git-svn-id: svn://svn.chromium.org/blink/trunk@176183 bbb929c8-8fbe-4397-9dbb-9b2b20218538
DevTools: Dont allow editing internal object properties in console.

Internal properties inherently are not writeable, thus they should behave so in the frontend.

R=vsevik

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

git-svn-id: svn://svn.chromium.org/blink/trunk@176184 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Oilpan: GC_TRACING: Improve object path dump

We frequently saw object path dump like:

    Path to 1d6ec5d8 of WebCore::Node
    <- 7abc4660 of Persistent

Then, we needed to investigate what this Persistent is. It took much time.

This CL introduces 'tracing name' property to Persistent if
ENABLE(GC_TRACING). The property is automatically filled with
backtrace of a Persistent constructor. We'll get dump like:

    Path to 1bd56220 of WebCore::Node
    <- 1bd55ff8 of WebCore::Node
    <- 1bd55dc8 of WebCore::Node
    <- 7d046600 of Persistent ... Backtrace:
            Persistent<HTMLSelectElement, ThreadLocalPersistents<(ThreadAffinity)1> >::Persistent(HTMLSelectElement*)
            v8::Handle<v8::Object> V8DOMWrapper::associateObjectWithWrapper<V8HTMLSelectElement, HTMLSelectElement>(HTMLSelectElement*, WrapperTypeInfo const*, v8::Handle<v8::Object>, v8::Isolate*, WrapperConfiguration::Lifetime)
            v8::Handle<v8::Object> V8DOMWrapper::associateObjectWithWrapper<V8HTMLSelectElement, HTMLSelectElement>(WTF::RawPtr<HTMLSelectElement>, WrapperTypeInfo const*, v8::Handle<v8::Object>, v8::Isolate*, WrapperConfiguration::Lifetime)
            V8HTMLSelectElement::createWrapper(WTF::RawPtr<HTMLSelectElement>, v8::Handle<v8::Object>, v8::Isolate*)

Additional improvement of the object path dump:
* Correct host info name for heap collections
* Don't try to dump unknown objects.

BUG=

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

git-svn-id: svn://svn.chromium.org/blink/trunk@176185 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Initial implementation of ServiceWorkerGlobalScope.fetch()

BUG=373120

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

git-svn-id: svn://svn.chromium.org/blink/trunk@176186 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Removed unused toV8Value and createFromV8Value from WebArrayBufferConverter.

Since r276361 made chromium side not to use the methods, now we can remove these methods from Blink.

c.f. https://codereview.chromium.org/301883002 and svn://svn.chromium.org/chrome/trunk/src@276361

BUG=369451

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

git-svn-id: svn://svn.chromium.org/blink/trunk@176187 bbb929c8-8fbe-4397-9dbb-9b2b20218538
DevTools: Deleting object property in console would just assign it to undefined.

Evaluate explicit "delete this[p]" to delete a property.

R=vsevik

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

git-svn-id: svn://svn.chromium.org/blink/trunk@176188 bbb929c8-8fbe-4397-9dbb-9b2b20218538
VectorComparer should check null.

We use VectorComparer to compare WTF::Vector<T>.
If T is not primitive type, we use std::equal to compare.
By the way, we use the WTF::VectorBufferBase class for a base class of Vector.  VectorBufferBase doesn't alloc a array if we init it without a size argument.
As a conclusion, we pass NULL object to std::equal when we compare Vectors with the default constructor.
It is asserted especially on a Windows debug build.

BUG=

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

git-svn-id: svn://svn.chromium.org/blink/trunk@176189 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Expose WebCrypto's lookupAlgorithmInfo.

Will allow reuse of this function in the implementation of the enterprise.platfromKeys Chrome extension API.

BUG=364435

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

git-svn-id: svn://svn.chromium.org/blink/trunk@176190 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Minor change: use single quote for JavaScript code in layout tests.

R=tkent@chromium.org
BUG=None

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

git-svn-id: svn://svn.chromium.org/blink/trunk@176191 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Change a FrameSelection::setSelectedRange argument type from bool to enum.

Let's use FrameSelection::DirectoinalOption instead of bool.


BUG=

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

git-svn-id: svn://svn.chromium.org/blink/trunk@176192 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Fix computation of animated transform w/ different from/to transform types

Calculating the animated value between two transforms of differing types
would give random results (and ASSERT in debug.)
Fix by requiring the effective 'from' value to have the same type as the
'to' value. If the types are not the same, then use a "zero transform" as
the 'from' value.

Also adjust the behavior of animateTransform additive to-animations in
this case by clearing the list in these cases too (matching Presto and
Gecko in this particular case.)

BUG=231409

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

git-svn-id: svn://svn.chromium.org/blink/trunk@176193 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Use v8::Promise::Then in ScriptPromise::then.

ScriptPromise::then should use v8::Promise::Then in order to handle
multiply-wrapped Promises correctly.

BUG=371288

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

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