Implement a custom appearance for the snapshotted plugin background
https://bugs.webkit.org/show_bug.cgi?id=108368

Reviewed by NOBODY (OOPS!).

Source/WebCore:

After https://bugs.webkit.org/show_bug.cgi?id=108284 (r142507), a
snapshotted plugin was no longer drawing the background of the
label blurred. Since the snapshot content was now a shadow tree,
it wasn't feasible to pre-blur a region of the snapshot: the label
could be any size and in any location, with ports being able to
override the appearance through their UA style sheet.

Instead we now use one of the elements in the tree, the snapshot-overlay,
as a hook where ports can add any effect they want. This could be simply
a border, or a transparent mask, or even a CSS filter. We introduce a custom
CSS appearance "snapshotted-plugin-overlay", which could be added to the
element in the injected UA stylesheet. This calls into RenderTheme in
the same way that custom controls do.

Meanwhile, in RenderThemeMac, we implement the appearance by drawing the
content of the plugin snapshot into the background of the element. That
way we can add effects in CSS.

Test: plugins/snapshot-appearance.html

* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Handle SnapshottedPluginOverlayPart.
* css/CSSValueKeywords.in: New appearance value snapshotted-plugin-overlay.
* platform/ThemeTypes.h: New value SnapshottedPluginOverlayPart.
* html/HTMLPlugInElement.h:
(WebCore::toHTMLPlugInElement): Add safer casting helpers.
* html/HTMLPlugInImageElement.h:
(WebCore::toHTMLPlugInImageElement): Ditto.
* rendering/RenderSnapshottedPlugIn.cpp: Remove the code for handling
    the blur directly in the renderer.
(WebCore::RenderSnapshottedPlugIn::paint): Simplify the paint logic since we're
    no longer trying to blur here.
(WebCore::RenderSnapshottedPlugIn::paintSnapshot): Ditto.
* rendering/RenderSnapshottedPlugIn.h: Remove the methods that were trying
    to blur the image directly.
* rendering/RenderTheme.cpp:
(WebCore::RenderTheme::paint): Call paintSnapshottedPluginOverlay.
* rendering/RenderTheme.h:
(WebCore::RenderTheme::paintSnapshottedPluginOverlay): New virtual method with default implementation.
* rendering/RenderThemeMacShared.h:
(RenderThemeMacShared): Override paintSnapshottedPluginOverlay.
* rendering/RenderThemeMacShared.mm:
(WebCore::RenderThemeMacShared::paintSnapshottedPluginOverlay): Implement a custom render path
    that takes the snapshot image from the node's parent, and draws it into the background.
    Along the way make sure we're actually using the right type of element (an HTMLPlugInImageElement).

LayoutTests:

Toggles our new snapshotted-plugin-overlay appearance, to make sure it
isn't getting applied to non-plugins.

* plugins/snapshot-appearance-expected.html: Added.
* plugins/snapshot-appearance.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@145196 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove dead label code in snapshotted plugin
https://bugs.webkit.org/show_bug.cgi?id=111781

Reviewed by Tim Horton.

Since ports can use the shadow tree to do label display,
there is no need for the hardcoded timers in RenderSnapshottedPlugin.

* rendering/RenderSnapshottedPlugIn.cpp: Remove label flags and timers.
(WebCore::RenderSnapshottedPlugIn::RenderSnapshottedPlugIn):
(WebCore::RenderSnapshottedPlugIn::~RenderSnapshottedPlugIn):
(WebCore::RenderSnapshottedPlugIn::updateSnapshot):
(WebCore::RenderSnapshottedPlugIn::handleEvent):
* rendering/RenderSnapshottedPlugIn.h:
(RenderSnapshottedPlugIn):

Conflicts:
	Source/WebCore/rendering/RenderSnapshottedPlugIn.cpp

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@145197 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed GTK gardening.

Skipping the tests in inspector-protocol/layers as they rely on compositing support
which is not available on the GTK builders.
Adding failure expectations for tests that regressed with r145100.

* platform/gtk/TestExpectations:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@145198 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] Remove media stream support from the configuration options
https://bugs.webkit.org/show_bug.cgi?id=111813

Reviewed by Philippe Normand.

Remove the media-stream configuration flag. The feature is incomplete and
thus unsupported, so it really shouldn't be possible to enable it.

* Source/autotools/PrintBuildConfiguration.m4:
* Source/autotools/ReadCommandLineArguments.m4:
* Source/autotools/SetupAutomake.m4:
* Source/autotools/SetupWebKitFeatures.m4:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@145199 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] Enable Web Audio in development builds
https://bugs.webkit.org/show_bug.cgi?id=111831

Reviewed by Philippe Normand.

Web Audio is already quite well supported on the GTK port but still has a few issues
that must be addressed before it is enabled by default. Despite that it should be enabled
in development builds just so we are up-to-date with future feature infrastructure changes.
The Web Audio-related layout tests are not run yet due to missing support in DRT/WKTR, but
that's an obvious goal before enabling the feature in release builds.

* Scripts/webkitperl/FeatureList.pm:


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