Web Animations CSS: Support animation of word-spacing

BUG=257591

Review URL: https://chromiumcodereview.appspot.com/23876023

git-svn-id: svn://svn.chromium.org/blink/trunk@158402 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Rename Node::attached() to confusingAndOftenMisusedAttached()

According to Elliot's talk at BlinkOn, the attached() function is confusing and
often misused. We should call that out in the name while we audit all the callers.

Most callers want inDocument() && document().renderView() or just inDocument().
The ones inside the recalcStyle machinery probably need some kind of
styleChangeType() check.

R=esprehn
BUG=299011

Review URL: https://chromiumcodereview.appspot.com/24773003

git-svn-id: svn://svn.chromium.org/blink/trunk@158403 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Greatly trim down what HistoryController::restoreDocumentState does.

It has a lot of complex rules that we don't use. We just want to restore form
state if there's form state saved and it's a back/forward navigation.

BUG=none

Review URL: https://chromiumcodereview.appspot.com/24787004

git-svn-id: svn://svn.chromium.org/blink/trunk@158404 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Remove *LegacyEncryptedMedia* from WebRuntimeFeatures.

This was replaced by *PrefixedEncryptedMedia*. See: https://codereview.chromium.org/24294004/

BUG=none

Review URL: https://chromiumcodereview.appspot.com/24813004

git-svn-id: svn://svn.chromium.org/blink/trunk@158405 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Preserve original document URL for XSSAuditor reports.

Otherwise, a history.replaceState() may erase the injected vector.

BUG=299132
R=abarth@chromium.org

Review URL: https://chromiumcodereview.appspot.com/24816003

git-svn-id: svn://svn.chromium.org/blink/trunk@158406 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Simplify the styleResolverThrowAwayTimer

Around 1% of the time during style recalc is spent inside WTF::currentTime()
inside didAccessStyleResolver. This patch changes that method to be a simple
inline increment of a value and simplifies the logic for throwing away the
resolver.

Now every 30 seconds we'll look to see if any style recalc has happened, and
if none has discard the resolver. 

BUG=295262
R=ojan@chromium.org,eseidel@chromium.org

Review URL: https://chromiumcodereview.appspot.com/24249005

git-svn-id: svn://svn.chromium.org/blink/trunk@158407 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Revert 157959 "Introduce a new reference graph to SVG*TearOffs."
Revert 158014 "Hold onto contextElement() from SVGAnimated* wrap..."

TBR=pdr@chromium.org,haraken@chromium.org
BUG=270000
BUG=294464

Review URL: https://chromiumcodereview.appspot.com/24863002

git-svn-id: svn://svn.chromium.org/blink/trunk@158408 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Devirtualize the Clipboard implementation.

Similar to the DataTransferItem/DataTransferItemList patch, there's no
need to separate the non-Chromium and Chromium parts, since we can just
use the platform abstraction directly.

Other incidental cleanups:
- Clipboard no longer inherits from CachedImageClient.
- m_dragStarted was unused and removed

BUG=298987
R=tony@chromium.org

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

git-svn-id: svn://svn.chromium.org/blink/trunk@158409 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Add a clearHTTPHeaderField method to ResourceResponse and ResourceRequest.

This addresses two nearly identical FIXMEs.

BUG=None
TEST=None
R=abarth@chromium.org,darin@chromium.org

Review URL: https://chromiumcodereview.appspot.com/24873003

git-svn-id: svn://svn.chromium.org/blink/trunk@158410 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Make sense of ContainerNode::takeAllChildrenFrom

takeAllChildrenFrom does a bunch of suspicious things like calling
removeDetachedChildren and then checking if nodes are attached and detaching
them in the following loop. Looking at the primary caller of this function (the
adoption agency) it's clear that normally these nodes _are_ attached as well so
calling removeDetachedChildren as not safe. This would also make us 
render objects on nodes that were no longer in the DOM which is bad.

The code also did document().adoptNode() asserting no exception _after_ calling
removeDetachedChildren, which meant the removeChild inside adoptNode would never
run and the exception throwing logic would never run making the call to
adoptNode identical to adoptIfNeeded. Knowing that we can just never call
adoptNode and only call adoptIfNeeded.

We can also skip the mutation record code and just depend on parserRemoveChild
to do it for us. While this will enqueue more mutation records from the
adoption agency algorithm that shouldn't matter since it's rare and the number
of nodes moved are also usually quite small. It's also unlikely to matter since
the parser is adding a record for every node it appends so a few more removals
is unlikely to matter.

This patch massively simplifies what this function was doing and renames it
parserTakeAllChildrenFrom since that's what it really should do.  It also exposes
that editing is doing something weird and appending nodes to a Document
that normally should not be there.

Review URL: https://chromiumcodereview.appspot.com/24424003

git-svn-id: svn://svn.chromium.org/blink/trunk@158411 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Implement Promise.all

Implement Promise.all static function. It is introduced in the Promises
latest draft and Promise.every is replaced with it.

BUG=295420

Review URL: https://chromiumcodereview.appspot.com/24641003

git-svn-id: svn://svn.chromium.org/blink/trunk@158412 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Fix vertical CJK ideographics alignment issue on Linux/Android.

Vertical CJK ideographics are drawn horizontally to keep their original
orientation. However, the ascent is applied vertically as in horizontal
text which is incorrect (making the ideographics look shifted to the
bottom-right direction).

Compensate the position of vertical CJK ideographics so that the ascent
will look like to be applied horizontally.

BUG=297729
TEST=Existing fast/writing-mode/vertical-baseline-alignment.html and fast/text/justify-ideograph-vertical.html rebaselined on linux.

Review URL: https://chromiumcodereview.appspot.com/24658002

git-svn-id: svn://svn.chromium.org/blink/trunk@158413 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Add static attributes to IDL compiler

BUG=239771

Review URL: https://chromiumcodereview.appspot.com/24867002

git-svn-id: svn://svn.chromium.org/blink/trunk@158414 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Clean up Document::recalcStyle

We can add some early returns and avoid null checks and the goto inside Document::recalcStyle.

Review URL: https://chromiumcodereview.appspot.com/23532039

git-svn-id: svn://svn.chromium.org/blink/trunk@158415 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Switch ResizerAreaSet to use RenderBoxes

As part of moving the resizer logic to RenderLayerScrollableArea,
we need to move ResizerAreaSet away from holding RenderLayer. As
we don't want to tie non-rendering to internal details, it was
moved to RenderBox.

One step-back from this change is that we have to check that
the renderer is a RenderBox in RenderLayer. Once the switch to
RenderLayerScrollableArea, this check will be removed for good.

BUG=260899

Review URL: https://chromiumcodereview.appspot.com/24659002

git-svn-id: svn://svn.chromium.org/blink/trunk@158416 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Use DEFINE_CSS_VALUE_TYPE_CASTS instead of using manual type cast function for CSSShaderValue

This cl changes isCSSShaderValue() to isShaderValue() in order to use DEFINE_CSS_VALUE_TYPE_CASTS template.
Besides this cl checks if CSSValue is CSSShaderValue before doing a type cast so that it has same behavior with other
type cast function.

BUG=N/A

Review URL: https://chromiumcodereview.appspot.com/24932003

git-svn-id: svn://svn.chromium.org/blink/trunk@158418 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Generate toCSSFooValue for CSSFunctionValue and CSSSVGDocumentValue

toCSSFooValue() will help to detect bad-casts as well as improve readibility.
To use DEFINE_CSS_VALUE_TYPE_CASTS, *CSS* is removed from isCSSSVGDocument()
as well as remove existing manual type cast functions.

BUG=N/A

Review URL: https://chromiumcodereview.appspot.com/24954002

git-svn-id: svn://svn.chromium.org/blink/trunk@158419 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Cleanup: Remove keygenMenu*GradeKeySize functions.

This is a leftover of r158372.

BUG=298020
TEST=none; no behavior changes.

Review URL: https://chromiumcodereview.appspot.com/24734002

git-svn-id: svn://svn.chromium.org/blink/trunk@158420 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Cleanup: Move imageTitle() from LocalizedStrings to ImageDocument.

Our implmenetation of imageTitle() is locale-independent.

BUG=298020
TEST=none; no behavior changes.

Review URL: https://chromiumcodereview.appspot.com/24878005

git-svn-id: svn://svn.chromium.org/blink/trunk@158421 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Use toCSSFooValue() generation macro for CSSInheritedValue, CSSVariableValue and CSSGridTemplateValue

This cl uses DEFINE_CSS_VALUE_TYPE_CASTS instead of using manual type cast functions.

BUG=N/A

Review URL: https://chromiumcodereview.appspot.com/24906003

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