[Safari] Crash with opacity + drop shadow filter + child element extending beyond filter outsets
https://bugs.webkit.org/show_bug.cgi?id=107467

Source/WebCore:

Reviewed by Dean Jackson.

The filter code plays games with the current GraphicsContext, replacing the current
context with one which will get filtered.

This doesn't play nicely with the RenderLayer code which lazily starts transparency
layers. If we don't start a transparency layer until painting a child of the filtered
layer, then the transparency layer is started using the wrong context.

Fix by eagerly starting transparency layers if we have both a filter and opacity.

Test: css3/filters/filter-with-opacity-and-children.html

* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::paintLayerContents):

LayoutTests:

Reviewed by Dean Jackson.

Testcase with filtered element with opacity, and layer child.

* css3/filters/filter-with-opacity-and-children-expected.txt: Added.
* css3/filters/filter-with-opacity-and-children.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@143655 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Don't make an overhang shadow layer when the WKView has a transparent background
https://bugs.webkit.org/show_bug.cgi?id=110429

Reviewed by Anders Carlsson.

When in coordinated scrolling mode, RenderLayerCompositor makes a layer to show
the shadow around the content when rubber-banding. However, if the view is
transparent, we don't want to make this layer, since it darkens the entire view.

* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateRootLayerConfiguration): Code was moved
into viewHasTransparentBackground(), so just call that here.
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::requiresContentShadowLayer): Don't make
a shadow layer when the view is transparent.
(WebCore::RenderLayerCompositor::viewHasTransparentBackground): Return
true if the view is transparent or has a non-opaque background color,
and optionally return that color.
* rendering/RenderLayerCompositor.h:

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