Improve the reliability and accuracy of SVG getTotalLength

The existing code for SVG path.getTotalLength had two problems when
subdividing curves to estimate length. The subdivision terminated when
the straight-line vs curved length was within a fixed limit, regardless
of the scale of the curve. The termination condition for infinite loops
also failed to stop on infinite loops.

This patch fixes both issues. The subdivision threshold now accounts for
the magnitude of the values, so that we give more resolution on very small
curves and less on very large curves. This is consistent with the actual
precision we have in floating point numbers. The infinite loop termination
tracks and examines the total number of subdivisions thus far, terminating
after 20 (which is more than enough - most curves do no more than 10
subdivisions).

We also remove two unused variables and a FIXME that makes little sense and that we won't ever fix.

R=fmalita@chromium.org, pdr@chromium.org, fs@opera.com
BUG=349873

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

git-svn-id: svn://svn.chromium.org/blink/trunk@172519 bbb929c8-8fbe-4397-9dbb-9b2b20218538
WebGL: Don't destroy mailbox textures in the destructor until they're released.

This CL fixes the bug that WebGL makes the compositor get following gl error.
[20074:20074:0317/145233:1532049594488:ERROR:gles2_cmd_decoder.cc(10071)]
[.Compositor-0x731c2a2e9a0]GL ERROR :GL_INVALID_OPERATION :
glConsumeTextureCHROMIUM: invalid mailbox name

Currently, DrawingBuffer deletes all textures, even if some textures are
used by the clients. This CL makes "release callback" be able to delete remaining
textures even after the DrawingBuffer is destructed.

This pattern is very similar to that used by accelerated 2d canvas and HW Video. See Canvas2DLayerBridge.

TEST=DrawingBufferTest.verifyDestructionCompleteAfterAllMailboxesReleased,
Reload http://browsertests.herokuapp.com/webgl/webglPerformance.html in all platforms.
BUG=344393

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

git-svn-id: svn://svn.chromium.org/blink/trunk@172520 bbb929c8-8fbe-4397-9dbb-9b2b20218538
DevTools: do not recognize inline sourceURL, require it to end with the crlf.

BUG=366595
R=vsevik@chromium.org

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

git-svn-id: svn://svn.chromium.org/blink/trunk@172522 bbb929c8-8fbe-4397-9dbb-9b2b20218538
DevTools: collect JS frames only when capture stacks is enabled

BUG=363976

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

git-svn-id: svn://svn.chromium.org/blink/trunk@172523 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Revert 172495 "Make window.screen property non replaceable"

This broke the Maps pixel test on the GPU bots, because it is setting
window.screen to null to work around a bug in the (somewhat old) version of
the Maps team's code. We will work with the Maps team to get an updated
version of the test ASAP, but in the meantime to prevent these bots from
being red for a day or more I am reverting this change. Sorry.

http://build.chromium.org/p/chromium.webkit/builders/GPU%20Mac10.7%20%28dbg%29/builds/24997

> Make window.screen property non replaceable
> 
> Make window.screen property non replaceable for consistency with other
> browsers (tested with Firefox 28 and IE11).
> 
> This CL also adds an internals.setOverrideScreenData() utility function for
> Layout tests as the fast/forms/page-popup/page-popup-adjust-rect.html test
> needs to be able to override the screen object.
> 
> BUG=364937
> TEST=fast/dom/Window/get-set-properties.html
> 
> Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=172134
> 
> Review URL: https://codereview.chromium.org/243173004

TBR=ch.dumez@samsung.com

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

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