Remove AutodrainedPool

Remove AutodrainedPool since it is never used.

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

git-svn-id: svn://svn.chromium.org/blink/trunk@166062 bbb929c8-8fbe-4397-9dbb-9b2b20218538
[FastTextAutosizer] Implement narrow descendant autosizing

This patch enables autosizing for blocks that are significantly narrower
than their parent's DBCAT[1]. For example:
<div width="800px">
[text that should be autosized with some multiplier]
<div width="150px">
[text that should be autosized independently] <-- ths patch handles this.
</div>
</div>

This builds on [2] and follows a very similar approach of using a
heuristic and validating that heuristic inside computeMultiplier.
The approach here differs from TextAutosizer in two ways:
1) maxAllowedDifferenceFromTextWidth is static in FastTextAutosizer
instead of changing as narrow descendants are encountered. I'm not
sure TextAutosizer's approach is a good idea yet, but we can easily
implement it as a followup if needed. For this reason, we do not
pass narrow-descendants-combined.html.
2) TextAutosizer collects narrow descendants and processes them
together. This is not possible in a single-pass autosizer and
we will need to investigate alternatives.

With this patch we pass 1 additional test, and fail 1 test that
we erroneously passed before.

[1] "Deepest Block Containing All Text".
[2] https://codereview.chromium.org/147843002/

BUG=302005

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

git-svn-id: svn://svn.chromium.org/blink/trunk@166063 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Make HTMLParserThread creation/destruction explicit

It's theoretically possible during shutdown for the
HTMLParserThread still to be running.  We've seen a
couple stacks which look like they could be caused by
this in the wild.

Now we explicitly create and destroy the HTMLParserThread object
during init() and shutdown() but lazily start the thread.

This makes will ensure both that the thread is fully terminated
before Platform::current goes away, as well as that any
attempts to access HTMLParserThread::shared() before init()
or after shutdown() would just crash on a null pointer.

BUG=338675

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

git-svn-id: svn://svn.chromium.org/blink/trunk@166064 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Replace ASSERT by null-check in InsertedNodes::lastLeafInserted()

Replace ASSERT by null-check in InsertedNodes::lastLeafInserted() as
m_lastNodeInserted can be null when this method is called. This ASSERT was
added in r161096 and we started hitting it in ClusterFuzz. This is also
consistent with InsertedNodes::pastLastLeaf() which already had a null
check.

R=adamk
BUG=338982
TEST=editing/execCommand/replaceSelectorCommand-crash.html

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

git-svn-id: svn://svn.chromium.org/blink/trunk@166065 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Insert path-to-bison at head, rather than tail

Per https://groups.google.com/a/chromium.org/d/msg/chromium-dev/HNwefOwoWwU/5GRlD9gATscJ

R=thakis@chromium.org
BUG=123026

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

git-svn-id: svn://svn.chromium.org/blink/trunk@166066 bbb929c8-8fbe-4397-9dbb-9b2b20218538
DevTools: Fix watch expressions layout in split panel vertically mode.

BUG=339080

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

git-svn-id: svn://svn.chromium.org/blink/trunk@166067 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Autosize list markers.

The RenderListMarker is added to the render tree during layout by RenderListItem::updateMarkerLocation, and it must be autosized *before* this happens.  To facilitate this we add FastTextAutosizer::inflateListItem.

To ensure we have a valid multiplier in inflateListItem, the logic for findDeepestBlockContainingAllText is modified to treat list items as text (with a corresponding test).

BUG=302005

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

git-svn-id: svn://svn.chromium.org/blink/trunk@166068 bbb929c8-8fbe-4397-9dbb-9b2b20218538
When reloading with an override url, clear the referrer

We would need to change the header according to the URL. However, it's
unclear which referrer policy should apply.

BUG=338948
R=japhet@chromium.org

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

git-svn-id: svn://svn.chromium.org/blink/trunk@166069 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Add UseCounter entry for SVGSVGElementInDocument.

SVG elements not in the document may be skewing our SVG UseCounter
numbers. This patch adds a new counter entry, SVGSVGElementInDocument,
which will not trigger on SVG elements not in the document.

I've uploaded a few testcases at http://pr.gg/svgcount and manually
verified this usecounter entry does not fire on the Modernizr case
but does fire in: inline, standalone, and image contexts.

I'm leaving in the SVGSVGElement UseCounter to see how our numbers are
skewed by Modernizr and similar scripts. We also try to not change
existing UseCounter entries so that we have stable historical data.

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

git-svn-id: svn://svn.chromium.org/blink/trunk@166070 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Blink side of adding a command-line flag for the TargetedStyleRecalc runtime flag.
BUG=335247

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

git-svn-id: svn://svn.chromium.org/blink/trunk@166071 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Remove a bunch of redundant code from CompositedLayerMapping

There are 3 changes here:
1.  Removing some unecessary locals for FloatPoint().
2.  Removing unecessary removeFromParent calls (addChild takes care of that).
3.  Restructuring updateOverflowControlsLayers to use a (way simpler!) helper.

BUG=338896

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

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