Fix NeedsFullRepaintForPositionedMovementLayout

The logic was just plain wrong: during a position movement layout,
we have to invalidate the old and new position as we are shifted.
The current code would generate incremental invalidation as it
fell down the wrong path.

Refactored the code to do what it's supposed to do and added
an invalidation test to cover a case where incremental
invalidation failed.

BUG=352050

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

git-svn-id: svn://svn.chromium.org/blink/trunk@169505 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Simplify EventTarget bindings generation

EventTarget has special-cased bindings generation, with several bugs.

This CL corrects and simplifies it in a few ways:
1. Remove duplicate |EventTarget* imp| initialization
Currently EventListener has |EventTarget* imp| initialized twice.
(With different names, |impl| and |imp|, so this compiles.)

Also rearranges the template code so that the special case
is more narrowly focused (instead of overall),
and check the interface name, not just method names,
which clarifies the special case.
(This also means we can remove the test cases,
as it's just a special-case for one interface.)

This does *not* change web behavior:
Unlike all other methods, addEventListener and removeEventListener do not check arguments length.
This is apparently required for legacy calls,
so I've opened a separate bug for this:
https://code.google.com/p/chromium/issues/detail?id=353484

Previously EventTarget skipped this, due to having an overall special case,
instead of just special-casing the method call itself;
we now have an explicit special-case in the template.

This was hit by 3 tests:
fast/dom/node-legacy-event-listener.html
fast/dom/XMLHttpRequest-legacy-event-listener.html
fast/dom/Window/window-legacy-event-listener.html
(More details at the bug.)

I've added more detailed tests on behavior, and other argument handling.

Follow-up CL:
* further reduce special case (use usual argument handling)

TBR=haraken
BUG=345503
BUG=353484

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

git-svn-id: svn://svn.chromium.org/blink/trunk@169506 bbb929c8-8fbe-4397-9dbb-9b2b20218538
[CSS Font Loading] Remove FontFace#ready, fold its functionality into FontFace#load

As per a discussion on www-style [1], FontFace#ready is removed from the
spec [2], and FontFace#load() is changed to return a Promise which
fulfills when the font is ready.

[1] http://lists.w3.org/Archives/Public/www-style/2014Mar/0069.html
[2] http://dev.w3.org/csswg/css-font-loading/

TEST=fast/css/fontface-methods.html
BUG=53213

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

git-svn-id: svn://svn.chromium.org/blink/trunk@169507 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Convert some repaint tests to not call display()

BUG=345027

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

git-svn-id: svn://svn.chromium.org/blink/trunk@169508 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Don't call Chrome::print() if there is a provisional DocumentLoader

In this case, the frame isn't done loading, and we may attempt to print something bogus.

BUG=339075
TEST=Manually, on a google presentation with --enable-print-preview

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

git-svn-id: svn://svn.chromium.org/blink/trunk@169509 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Measure XPath usage

We currently don't know how common xpath usage
is in the wild, but we should.

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

git-svn-id: svn://svn.chromium.org/blink/trunk@169510 bbb929c8-8fbe-4397-9dbb-9b2b20218538
[FastTextAutosizer] Refactor for understandability

This patch is a followup to [1] to cleanup the dependencies on
the old text autosizer. The largest change in this patch is to
remove the "container" concept and rely only on clusters and
blocks in the FastTextAutosizer.

The big changes in this patch include:
* formInputTags vector -> isFormInput(const Element*)
    Passing around a static vector was unnecessarily confusing. This
    patch refactors the formInput statics into a single function:
    isFormInput.
* isAutosizingContainer -> !isExemptFromAutosizer
    The logic of isAutosizingContainer has been switched in
    isExemptFromAutosizer and I think the new name better reflects
    what this function does.
* containerIsRowOfLinks -> blockContainsRowOfLinks
* contentHeightIsConstrained -> blockHeightConstrained
* containerContainsOneOfTags -> blockContainsFormInput
* containerShouldBeAutosized -> !blockPreventedFromAutosizing
    The logic of containerShouldBeAutosized has been switched in
    blockPreventedFromAutosizing. I think this better reflects what
    this function does.
* blockMightBecomeAutosizingCluster has been added.
* isFingerprintingCandidate has been removed in favor of
    blockMightBecomeAutosizingCluster

[1] https://codereview.chromium.org/200603002

BUG=302005

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

git-svn-id: svn://svn.chromium.org/blink/trunk@169511 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Auto-rebaseline for r169472

http://src.chromium.org/viewvc/blink?view=revision&revision=169472

TBR=fmalita@chromium.org

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

git-svn-id: svn://svn.chromium.org/blink/trunk@169513 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Revert "Get rid of unnecessary layouts on body elements with quirky children"

This reverts commit r169269. This is a speculative fix for the performance
tests timing out on the Win8 bot.

BUG=353275

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

git-svn-id: svn://svn.chromium.org/blink/trunk@169514 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Auto-rebaseline for r169478

http://src.chromium.org/viewvc/blink?view=revision&revision=169478

BUG=345027
TBR=enne@chromium.org

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

git-svn-id: svn://svn.chromium.org/blink/trunk@169515 bbb929c8-8fbe-4397-9dbb-9b2b20218538
ScriptPromise implementation for V8 Promises

Add the implementation for V8 Promises in ScriptPromise and ScriptPromiseResolver so that:
 - They can handle V8 Promises correctly.
 - ScriptPromise creates a V8 Promise if ScriptPromiseOnV8Promise turns on.

Add ScriptPromiseOnV8Promise runtime enabled flag which is always off.
Add Layout tests for ScriptPromise.

BUG=352552

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

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