[CSS Shapes] Image valued shape can fail

Correct the handling of image valued shapes that extend into or beyond the margin box. This can happen when object-fit causes one dimension of the shape to be greater than the corresponding margin box dimension.

Made some simplifications in RasterShapeIntervals::computeShapeMarginIntervals() by making the shapeMargin parameter an int, removing some unnecessary variables.

Revised the RasterShapeIntervals class. It's now a just a list of size() interval-lists, with valid indices: -offset() <= y < size() - offset(), or minY() to maxY(). If margin-top and shape-margin are specified, then offset() is the larger of shape-margin and margin-top. Similarly size() is the vertical size of the margin-box or the content-box expanded by shape-margin, whichever is larger. See computeShapeMarginIntervals().

BUG=339122

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

git-svn-id: svn://svn.chromium.org/blink/trunk@168872 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Make non-merged SharedBuffer instances able to be purgeable.

This is needed to make PNG images purgeable since the PNG decoder doesn't merge
the SharedBuffer's segments and discardable memory is only used for the flat
buffer (resulting from the merge).

BUG=290193

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

git-svn-id: svn://svn.chromium.org/blink/trunk@168873 bbb929c8-8fbe-4397-9dbb-9b2b20218538
DOMDataStore should be cleared when shutting down worker threads

- The essence of this CL is to call DOMWrapperWorld::dispose() when shutting down WorkerScriptController. This makes sure that DOMDataStore is cleared when shutting down the worker thread.

- This CL also fixes misused RefPtr<DOMWrapperWorld> and DOMWrapperWorld*. In general, we should use RefPtr<DOMWrapperWorld> when we store DOMWrapperWorld in heap-allocated objects and when we want to pass ownership around. Otherwise, we should use DOMWrapperWorld*.

BUG=341032

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

git-svn-id: svn://svn.chromium.org/blink/trunk@168874 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Remove support for legacy WebKit Notifications

All the instances of ENABLE_LEGACY_NOTIFICATIONS has been removed.

BUG=348019

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

git-svn-id: svn://svn.chromium.org/blink/trunk@168875 bbb929c8-8fbe-4397-9dbb-9b2b20218538
[CSS Shapes] Serialize circle/ellipse positions

Circle/ellipse positions should always be present when serialized, and should
only have the 2 or 4-valued form. Keywords are converted to percentages
and simplified where possible. This patch adds some additional processing
that converts the parsed position into the serialized format, before
converting it to text. See http://dev.w3.org/csswg/css-shapes/#basic-shape-serialization.

Ported from:
https://bugs.webkit.org/show_bug.cgi?id=129404
https://bugs.webkit.org/show_bug.cgi?id=129726

BUG=322165

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

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