Remove now-unused paintContents methods with out-param opaque rect.

R=abarth
BUG=413479

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

git-svn-id: svn://svn.chromium.org/blink/trunk@182419 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Script streaming enhancements: suppress streaming for small scripts.

It doesn't make sense to start the streaming for scripts which are so small that
all data will come in one chunk. As a heuristic, if the first data chunk is
small, we assume there won't be another one (getting this information for real
requires a considerable amount of refactoring).

In addition, when the streaming is suppressed (for whatever reason), we don't
need to wait for the background task (if any) to complete, but we can resume the
non-streaming code path right when the loading finishes.

R=haraken@chromium.org
BUG=

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

git-svn-id: svn://svn.chromium.org/blink/trunk@182420 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Revert 182399 "Oilpan: Move MediaStreamSource, MediaStreamCompon..."

This caused memory leakage in LSan bots:
https://code.google.com/p/chromium/issues/detail?id=416466


> Oilpan: Move MediaStreamSource, MediaStreamComponent and MediaStreamDescriptor
> to oilpan's heap
> 
> - MediaStreamSource, MediaStreamComponent and MediaStreamDescriptor must be moved
> to oilpan's heap in one go because their lifetime are tightly coupled.
> 
> - Removed m_descriptor->setClient(0) from MediaStream's destructor. This is OK
> because MediaStreamDescriptor has a strong Member back to the Client
> (i.e., MediaStream).
> 
> - Removed m_component->source()->removeObserver(this) from MediaStreamTrack's
> destructor. This is OK because this CL made the observers weak
> (i.e., MediaStreamSource::m_observers is a hash set of weak members to
> MediaStreamTrack objects).
> 
> - Removed WebMediaStreamTrack::ExtraData::m_owner because it's unused.
> 
> - Introduced MediaStreamComponentDisposer to delay the destruction of
> MediaStreamComponent::m_extraData. The ExtraData is exposed to the web
> and some Chromium objects inherit from the ExtraData. If we clear the
> m_extraData in the MediaStreamComponent's destructor, those Chromium-side
> objects are also destructed in the MediaStreamComponent's destructor.
> This is problematic because the destructors of the Chromium-side classes
> can touch other on-heap objects in the Blink side. To avoid the issue,
> we need to delay the destruction of the ExtraData to thread-specific
> weak processing. The disposer pattern actually makes the deletion of
> the extra data happen earlier and not later. The disposer makes sure
> that the extra data is destructed in weak processing which is run before
> sweeping and therefore all the objects are still alive and can be touched.
> 
> 
> - The same problem arises for MediaStreamDescriptor and MediaStreamSource.
> This CL adds MediaStreamDescriptorDisposer and MediaStreamSourceDisposer.
> 
> - This CL depends on https://codereview.chromium.org/543603003/ and https://codereview.chromium.org/549153002.
> 
> BUG=340522
> 
> Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=181702
> 
> Review URL: https://codereview.chromium.org/552653005

TBR=haraken@chromium.org

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

git-svn-id: svn://svn.chromium.org/blink/trunk@182421 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Remove HTMLMediaElement::setPausedInternal()

The bits in updatePlayState() could have been inlined into stop(), but
none of it is useful:

 - isPlaying is always false because of userCancelledLoad() ->
   clearMediaPlayer(), so webMediaPlayer()->pause() is dead code.

 - refreshCachedTime() will do nothing for the same reason.

 - m_playbackProgressTimer.stop() is done by stopPeriodicTimers().

 - mediaControls()->playbackStopped() is pointless because the document
   is no longer doing layout/rendering.

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

git-svn-id: svn://svn.chromium.org/blink/trunk@182422 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Expose fractional scroll offsets to JS

We've tried in the past to expose fractional scroll offsets and
positioning to the web, but hit web compatibility problems (see http://crbug.com/360889).

We'd like to try again to expose just fractional scroll OFFSETS
(eg. scrollLeft/scrollTop) without changing the higher-risk
position/measurement APIs (offsetTop, scrollHeight, etc.).

This CL exposes the fractions we have today in blink (for the
special case of browser zoom) to the scroll offset properties
and scrolling methods.  This will become much more usefull (eg.
for high-dpi) when http://crbug.com/414283 is complete.

Intent to ship: https://groups.google.com/a/chromium.org/forum/#!searchin/blink-dev/subpixel$20scrollTop/blink-dev/_Q7A4AQBFKY/S4ahQ5iE28QJ

BUG=373731

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

git-svn-id: svn://svn.chromium.org/blink/trunk@182423 bbb929c8-8fbe-4397-9dbb-9b2b20218538
DevTools: test for WebInspector.TempStorageCleaner

BUG=

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

git-svn-id: svn://svn.chromium.org/blink/trunk@182424 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Setup a full blink test environment for blink_heap_unittests target.

This makes Platform::current available in the blink heap unit tests.
That allows us to use the threading APIs available through the
Platform object. Those threading APIs are used internally in the
Oilpan infrastructure as well for parallel marking/sweeping and
therefore we can now write tests of that multi-threaded code as
part of the unit tests.

No change in the tests in this patch. Updates to use the Platform
threading APIs will follow.

R=jochen@chromium.org, wibling@chromium.org, zerny@chromium.org, oilpan-reviews@chromium.org
BUG=416376

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

git-svn-id: svn://svn.chromium.org/blink/trunk@182425 bbb929c8-8fbe-4397-9dbb-9b2b20218538
[DevTools] Add emulation presets for iPhone 6.

BUG=415959

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

git-svn-id: svn://svn.chromium.org/blink/trunk@182426 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Expanding Type Traits to make Vector use mem ops more.

Vector has several code paths depending on whether the encapsulated
object can be handled with memmove/memcpu/memset or not, and those
are used by many objects. Unfortunately that requires manual hinting
in each class because the type traits used are not strong enough.

By using type trait functions available in all modern compilers it's
possible to more intelligently select the most optimal code path.

Preferably the code would use the new type traits in C++ 11 but
unfortunately that requires a modern c++ library. Luckily, those
libraries are mostly just thin wrappers on top of de facto-standard
compiler extension functions anyway.

With clang this cuts away 105 KB of machine code in blink. Mostly by 
no longer needing copy constructor and assignment operators in many
classes so those can be stripped from the binary. 

With gcc the changes are differently. The binary is smaller but only 
by 5 KB. It's clear that many Vector methods have become more compact but
it seems gcc compensated by spending that space elsewhere (more inlining?).

I don't have as good measurement tools for Visual Studio but there was no
huge difference in footprint.

Performance, all this is from a noisy development computer with a 
non-stable cpu clock frequency (turbo ftl...):

In LayoutTests most changes are within noise levels. But it looks like 
large tables and flexboxes might be 1-5% faster. In ParserTests 
html5-full-render (macro-benchmark) became 2-3% faster.

clang footprint numbers:
Total change: -109940 bytes
===========================
  14 added, totalling +3397 bytes across 8 sources
  19 removed, totalling -13302 bytes across 6 sources
  8 grown, for a net change of +578 bytes (2268 bytes before, 2846 bytes after) across 6 sources
  230 shrunk, for a net change of -100613 bytes (190909 bytes before, 90296 bytes after) across 49 sources

Biggest changes:
 -84410 - Source: /home/bratell/src/chromium/src/third_party/WebKit/Source/wtf/Vector.h - (gained 784, lost 85194)
  -6934 - Source: /home/bratell/src/chromium/src/third_party/WebKit/Source/wtf/Deque.h - (gained 0, lost 6934)
  -2267 - Source: /home/bratell/src/chromium/src/third_party/WebKit/Source/core/animation/css/CSSAnimationData.cpp - (gained 904, lost 3171)
...
   +245 - Source: /home/bratell/src/chromium/src/third_party/WebKit/Source/core/svg/animation/SVGSMILElement.cpp - (gained 245, lost 0)

BUG=
R=jochen@chromium.org

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

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