Cleanup GraphicsContext by removing unused functions

This patch removes the following unused functions:
const SkBitmap* bitmap() const;
const SkBitmap& layerBitmap(AccessMode = ReadOnly) const;
void drawImage(Image*, const IntPoint& destPoint, const IntRect& srcRect, CompositeOperator = CompositeSourceOver, RespectImageOrientationEnum = DoNotRespectImageOrientation);
bool hasShadow() const;
static void addCornerArc(SkPath*, const SkRect&, const IntSize&, int);

BUG=

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

git-svn-id: svn://svn.chromium.org/blink/trunk@168072 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Start to implement FetchEvent for ServiceWorker

Now a service worker can handle a fetch event and call event.respondWith
to pass a response back.

Currently dispatching the event and receiving the response is not hooked
up in Chromium side. The plan is to use the Response object from the
service worker's script to create a ServiceWorkerFetchResponse that
is sent in an IPC message back to the browser.

No test is added. It will be tested in ServiceWorkerVersionBrowserTest
once hooked up in Chrome (I've done this locally). Testing
Response in a layout test would be ideal but we currently don't have
a way to do a layout test in the service worker's context.

BUG=342301

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

git-svn-id: svn://svn.chromium.org/blink/trunk@168073 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Fix egregious MessagePort memory leak

This fixed a regression from https://src.chromium.org/viewvc/blink?view=rev&revision=162054

That patch was almost completely correct, but removed one bit of boolean
logic from MessagePort::hasPendingActivity. The old code was delegating
to MessagePortChannel::hasPendingActivity, which was effectively checking
whether close() had been called on the MessagePort. The check got removed
then MessagePortChannel was deleted in r162054, and didn't get properly
replaced with anything. This meant that entangled MessagePorts would leak
the entire ExecutionContext (usually the Document).

My fix restores the has-close-been-called check by delegating to isEntangled(),
which expands to the expression "!m_closed && m_entangledChannel".

R=abarth@chromium.org
BUG=345702
TEST=open task manager, open gmail, reload 10 times; memory usage should be stable (instead of growing unbounded)

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

git-svn-id: svn://svn.chromium.org/blink/trunk@168074 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Revert 168061 "Revert 168053 "Fix a crash when spell checker is ..."

Did not seem to fix crashes.

> Revert 168053 "Fix a crash when spell checker is triggered for a..."
> 
> May have caused crashes on Android bot.
> 
> > Fix a crash when spell checker is triggered for an editable element which is in an author ShadowRoot of an INPUT element.
> > 
> > enclosingTextFormControl() should handle only elements in UA ShadowRoot.
> > 
> > BUG=343040
> > TEST=automated
> > 
> > Review URL: https://codereview.chromium.org/181273002
> 
> TBR=tkent@chromium.org
> 
> Review URL: https://codereview.chromium.org/183793005

TBR=pkasting@chromium.org



git-svn-id: svn://svn.chromium.org/blink/trunk@168075 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Add an explicit virtual destructor to WebScrollbarBehavior.

This fixes a clang warning on the Chrome side when trying to compile
scoped_ptr<WebScrollbarBehavior> about "delete called on class with virtual
functions but non-virtual destructor".

BUG=337919
TEST=none
TBR=abarth

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

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