[FileReader] Create ProgressEvent with lengthComputable false when the total size is unknown

This CL introduces ArrayBufferBuilder that abstracts all the ArrayBuffer
building operation and makes fix equivalent to the following:

Make totalBytes() return non-negative value when the total length is
determined, and -1 otherwise, so that we can use it to compute parameters for
ProgressEvent.

Use m_rawData->byteLength() directly instead of storing the size of
m_rawData in m_totalBytes and using it. m_totalBytes will be used to hold a
value to be returned by totalBytes().

Update m_totalBytes in didFinishLoading() only when m_variableLength is set.
Otherwise, return value of totalBytes() may rewind. This should be better
behavior.

Bug fixes
- Fix a bug in buffer growing code. When increasing the size of buffer, it
  drops data if
  (new data size) + (current buffer used) > 2 * (current buffer capacity)
- Don't check buffer size limit in ReadByClient mode. ReadByClient mode
  doesn't use m_rawData, so this is unnecessary.

Clean ups not changing user facing behavior:
- Rename "length" in didReceivedData() for readability
- Factor out the code saving new data to m_rawData into a separate method
- Factor out buffer expanding code into a separate method

BUG=none

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

git-svn-id: svn://svn.chromium.org/blink/trunk@159855 bbb929c8-8fbe-4397-9dbb-9b2b20218538
IDL compiler: remove special case capitalization (cssText, xmllang, xmlbase, xmlspace)

There are a few capitalization exceptions in the IDL compiler for setter names.
They are inconsistent and brittle; this removes them, simplifying the compiler.

This is just a bindings change, so setter names are now correctly capitalized,
e.g., setCssText => setCSSText.
(This does not change IDL files; they have capitalization as in standard.)

2 cases:
1. CssText => CSSText (for attribute cssText) is straightforward; various uses.
2. XML exceptions (Xmllang => XMLlang, Xmlbase => XMLbase, Xmlspace => XMLspace)
are a few exceptions for lowercase attributes, e.g.,
SVGElement.idl has attribute |xmllang| (for xml:lang), not *|xmlLang|.

BUG=239771

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

git-svn-id: svn://svn.chromium.org/blink/trunk@159856 bbb929c8-8fbe-4397-9dbb-9b2b20218538
De-flake LayoutTest animations/play-state.html

The flakiness arises from the fact that the animation start event is sometimes
fired very late. In this test however, we're only interested in whether the
animation is correctly paused and unpaused, not exact timing. This patch avoids
waiting for the start event to trigger the pausing and unpausing, and relaxes
tolerances where appropriate.

R=dstockwell

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

git-svn-id: svn://svn.chromium.org/blink/trunk@159857 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Align the start of useful allocation space in partition pages to 64 bytes.

This eliminates (admittedly as yet unsubstantiated) concerns about cacheline
bouncing. It also ensures alignment >= 16 for the larger quantized bucket
sizes, which can give better performance on various CPUs.

This ups page header based "waste" to 0.4% of allocation space. That's still
way better than tcmalloc, and will go back down again when I increase the
partition page size in an upcoming CL.

R=tsepez@chromium.org

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

git-svn-id: svn://svn.chromium.org/blink/trunk@159858 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Add shared GlobalEventHandlers IDL

The GlobalEventHandlers.h is empty because the code generator
includes it, but empty until the C++ bits are also shared.

BUG=305112

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

git-svn-id: svn://svn.chromium.org/blink/trunk@159859 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Use shrink-to-fit for width for Button, input, select, textarea, and legend treat width value of 'auto' as 'intrinsic'.

Per CSS 2.1 section 10.3.8, the width should be the width an input would normally have (rule 1 in 10.3.8), and the 'right' value should be ignored because the values are over-constrained (rule 6 in 10.3.8).

BUG=281380

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

git-svn-id: svn://svn.chromium.org/blink/trunk@159860 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Implement new Blink IDL attribute [SetReference]

SetReference is a new Blink IDL attribute which can be used to specify dependency from a wrapper to another. This is implemented by calling v8::Isolate::SetReference on minor GC prologues. This has a lower overhead compared to old technique using SetHiddenValueTo.

BUG=307341

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

git-svn-id: svn://svn.chromium.org/blink/trunk@159861 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Refactoring of WebKit::WebData

Refactoring of WebKit::WebData:
- using of WebPrivatePtr and hence simplifiction of most of the WebData class methods
- removal of unnecessary 'operator RefPtr<WebCore::SharedBuffer>() const'

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

git-svn-id: svn://svn.chromium.org/blink/trunk@159862 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Fix crash in ResourceLoader::requestSychronously.

This was caused by http://src.chromium.org/viewvc/blink/?revision=159159&view=revision

BUG=306346
TEST=The cluster fuzz repro doesn't seem to crash in content_shell :(

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

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