Plug-in snapshotting code always accepts first snapshot
https://bugs.webkit.org/show_bug.cgi?id=110495

Reviewed by Tim Horton.

When we detect a plugin that can be snapshotted we start capturing
images until we find one that we believe isn't blank, or we timeout.
I introduced a regression recently where we swap renderers as
soon as the snapshot arrives, whether or not is is blank.

The fix was to have the embedder (currently only WK2) be the one
who tells the HTMLPlugInElement to start displaying snapshots.

Source/WebCore:

* html/HTMLPlugInElement.h:
(WebCore::HTMLPlugInElement::setDisplayState): Make this a virtual function.
* html/HTMLPlugInImageElement.cpp:
(WebCore::HTMLPlugInImageElement::setDisplayState): Override to call the
    base class version, but swap renderers if we should move to the snapshot.
(WebCore::HTMLPlugInImageElement::updateSnapshot): Don't swap renderers here any more.
* html/HTMLPlugInImageElement.h: New virtual version of setDisplayState.

Source/WebKit2:

* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::pluginSnapshotTimerFired): When we find a
snapshot that we like, tell the HTMLPlugInElement to move to
the snapshot view.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@143650 268f45cc-cd09-0410-ab3c-d52691b4dbfc