[ServiceWorker] Implement Headers class.

I will replace HeaderMap class with this in another change.

http://fetch.spec.whatwg.org/#headers-class

BUG=373120

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

git-svn-id: svn://svn.chromium.org/blink/trunk@177088 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Simplify (and optimize) SVGTextQuery::characterNumberAtPositionCallback

This method needs to iterate the glyphs within a fragment and check if the
queried point is contained within any of them.
Currently a fragment offset is converted to a offset that's suitable for
passing to mapStartEndPositionsIntoFragmentCoordinates - which then in
turn maps it into a text box-relative offset and then runs (the costly)
modifyStartEndPositionsRespectingLigatures to check if the current range
happen to fall within a "multicharacter glyph" (ligatures etc.), and then
expand the range appropriately.
This is a lot of work, that is better performed by finding the index within
the text metrics list for the corresponding RenderSVGInlineText object,
and then step through the fragment using the lengths of the individual
glyphs.
The impact on performance will vary with the length of fragments and the
length of the text content.
For a case like:

  <text ...>(AAAAAAAAAA ){99}AAAAAAAAAA</text>

  (100 groups of ten A's separated by a single whitespace)

with a negative query, the speed-up is ~1.2x. With 'word-spacing' added
(to get more fragments) the speed-up becomes ~8.7x.

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

git-svn-id: svn://svn.chromium.org/blink/trunk@177089 bbb929c8-8fbe-4397-9dbb-9b2b20218538
IDL: Merge duplicating local variable assignment in attribute_getter

|cpp_type| can be non-*Ptr type so it seems that we can't always use
local variables if we want to merge local variable assignment.
Following Jens' suggestion[1] to merge local variable assignment.

[1] https://codereview.chromium.org/359703002/diff/1/Source/bindings/templates/attributes.cpp#newcode51

BUG=345503

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

git-svn-id: svn://svn.chromium.org/blink/trunk@177090 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Make it possible to set the HTTP origin header from content

The goal is to eventually have an empty HTTP origin header added if needed in
content rather than in FrameFetchContext::addAdditionalRequestHeaders.

BUG=376025

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

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