[EFL] Improve previous temporary fix against drawing (0,0) position before rendering content of next web page
https://bugs.webkit.org/show_bug.cgi?id=138305

Reviewed by Gyuyoung Kim.

WebKit2 has freezed layer tree until frame load completion since r101838.
In EFL port, we unfreeze it when PageViewportController::pageTransitionViewportReady() is called though,
UIProcess on EFL port updates cairo surface during the freezing time of layer tree.
Thus UIProcess should not update the layer trees until the layerTreeState is unfrozen.

* UIProcess/API/efl/EwkView.h: Removed previous workarounds.
(EwkView::setWaitingForNewPage): Deleted.
(EwkView::waitingForNewPage): Deleted.
(EwkView::didCommitNewPage): Deleted.
* UIProcess/CoordinatedGraphics/PageViewportController.cpp:
(WebKit::PageViewportController::PageViewportController):
(WebKit::PageViewportController::didCommitLoad):
(WebKit::PageViewportController::didRenderFrame):
(WebKit::PageViewportController::syncVisibleContents):
* UIProcess/CoordinatedGraphics/PageViewportController.h:
* UIProcess/efl/PageLoadClientEfl.cpp:
(WebKit::PageLoadClientEfl::didCommitLoadForFrame):
* UIProcess/efl/PageViewportControllerClientEfl.cpp:
(WebKit::PageViewportControllerClientEfl::didChangeVisibleContents):
* UIProcess/efl/ViewClientEfl.cpp:
(WebKit::ViewClientEfl::didRenderFrame):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@175669 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[filters2] Support for backdrop-filter
https://bugs.webkit.org/show_bug.cgi?id=138384
<rdar://problem/18874494>

Reviewed by Simon Fraser.

Source/WebCore:

Add prototype support for backdrop-filter
http://dev.w3.org/fxtf/filters-2/#BackdropFilterProperty

This adds support for parsing the new CSS property, adding
the value to RenderStyle, noticing that on the layer tree,
and the platform code in GraphicsLayer to render a backdrop
and apply an effect to the result.

Some things are missing:
- animation of the backdrop-filter is not yet supported
- backdrops will not work in cloned layers yet (e.g. reflections)

Tests: css3/filters/backdrop/backdropfilter-property-computed-style.html
       css3/filters/backdrop/backdropfilter-property-parsing-invalid.html
       css3/filters/backdrop/backdropfilter-property-parsing.html
       css3/filters/backdrop/backdropfilter-property.html
       css3/filters/backdrop/effect-hw.html

* WebCore.exp.in: Export the setBackdropFilters method so it can
be used from WebKit.

* css/CSSComputedStyleDeclaration.cpp: New property name.
(WebCore::isLayoutDependent):
(WebCore::ComputedStyleExtractor::propertyValue): Use the existing valueForFilter method.

* css/CSSParser.cpp:
(WebCore::CSSParser::parseValue): Piggyback on the filter parser.

* css/CSSPropertyNames.in: Add -webkit-backdrop-filter.

* css/StyleResolver.cpp:
(WebCore::StyleResolver::adjustRenderStyle): Add test for backdrop.
(WebCore::StyleResolver::applyProperty): Support new property.

* platform/graphics/GraphicsLayer.h:
(WebCore::GraphicsLayer::needsBackdrop): New method to test for existence of values.
(WebCore::GraphicsLayer::backdropFilters): Keeps the list of filters.
(WebCore::GraphicsLayer::setBackdropFilters):
(WebCore::GraphicsLayer::clearBackdropFilters):

* platform/graphics/ca/GraphicsLayerCA.cpp: This adds a new m_backdropLayer CALayer
that will sit behind the contents layer and provide the element's backdrop.
(WebCore::GraphicsLayerCA::willBeDestroyed):
(WebCore::GraphicsLayerCA::moveOrCopyAnimations):
(WebCore::GraphicsLayerCA::setBackdropFilters): Set a custom appearance so
remote layer hosts will notice the special layer. Also set the actual
layer properties.
(WebCore::GraphicsLayerCA::addAnimation): Remove whitespace.
(WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers): Update backdrop if necessary.
(WebCore::GraphicsLayerCA::updateLayerNames): Give the new layer a name.
(WebCore::GraphicsLayerCA::updateSublayerList):
(WebCore::GraphicsLayerCA::updateGeometry): Make the backdrop layer match the contents
layer geometry.
(WebCore::GraphicsLayerCA::updateBackdropFilters): Create the backdrop layer if necessary,
and copy the filter values to any clones.
(WebCore::GraphicsLayerCA::ensureStructuralLayer): We need a structural layer if we
have backdrop filters.
(WebCore::GraphicsLayerCA::structuralLayerPurpose):
(WebCore::GraphicsLayerCA::createAnimationFromKeyframes):
(WebCore::GraphicsLayerCA::swapFromOrToTiledLayer):
* platform/graphics/ca/GraphicsLayerCA.h: New StructuralLayerPurpose, new LayerChangeFlag.

* platform/graphics/ca/PlatformCALayer.h: New LayerType.

* platform/graphics/ca/mac/PlatformCALayerMac.mm: Define CABackdropLayer.
(PlatformCALayerMac::PlatformCALayerMac): Create the correct CALayer type.

* rendering/RenderElement.h:
(WebCore::RenderElement::createsGroup):
(WebCore::RenderElement::hasBackdropFilter): This method is always around, but
only can return true when FILTERS_LEVEL_2 is enabled.

* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::paintsWithFilters): Remove an unnecessary comment.
(WebCore::RenderLayer::calculateClipRects):

* rendering/RenderLayer.h: Add hasBackdropFilter.

* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::RenderLayerBacking):
(WebCore::RenderLayerBacking::createPrimaryGraphicsLayer): Update the backdrop filters.
(WebCore::RenderLayerBacking::updateBackdropFilters): Set the filters on the GraphicsLayer.
(WebCore::RenderLayerBacking::updateGeometry):
* rendering/RenderLayerBacking.h:

* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::requiresOwnBackingStore): Needs backingstore if it has a backdrop filter.
(WebCore::RenderLayerCompositor::reasonsForCompositing):
(WebCore::RenderLayerCompositor::requiresCompositingForFilters): Return early if we have
a backdrop filter, because currently we absolutely require compositing.

* rendering/RenderLayerModelObject.cpp:
(WebCore::RenderLayerModelObject::styleWillChange): Add hasBackdropFilter().

* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::changeRequiresLayout): Check backdrops for change.

* rendering/style/RenderStyle.h: Add the backdropFilter style stuff.
* rendering/style/StyleRareNonInheritedData.cpp:
(WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
(WebCore::StyleRareNonInheritedData::operator==):
(WebCore::StyleRareNonInheritedData::hasBackdropFilters):
* rendering/style/StyleRareNonInheritedData.h:

Source/WebKit2:

* Shared/mac/RemoteLayerBackingStore.mm:
(WebKit::RemoteLayerBackingStore::drawInContext): Handle LayerTypeBackdropLayer in the switch.
* Shared/mac/RemoteLayerTreeTransaction.mm:
(WebKit::RemoteLayerTreeTransaction::description): Describe a backdrop layer.
* UIProcess/ios/RemoteLayerTreeHostIOS.mm:
(+[WKBackdropView layerClass]): Define CABackdropLayer and use it as the class.
(WebKit::RemoteLayerTreeHost::createLayer):
* UIProcess/mac/RemoteLayerTreeHost.mm: Ditto.
(WebKit::RemoteLayerTreeHost::createLayer):

LayoutTests:

Tests for backdrop-filter. These are skipped on non-Apple platforms.

* platform/win/TestExpections: Skip these tests.
* platform/efl/TestExpections:
* platform/gtk/TestExpections:
* platform/mac-mavericks/TestExpectations: Yosemite only.

* css3/filters/backdrop/backdropfilter-property-computed-style-expected.txt: Added.
* css3/filters/backdrop/backdropfilter-property-computed-style.html: Added.
* css3/filters/backdrop/backdropfilter-property-expected.txt: Added.
* css3/filters/backdrop/backdropfilter-property-parsing-expected.txt: Added.
* css3/filters/backdrop/backdropfilter-property-parsing-invalid-expected.txt: Added.
* css3/filters/backdrop/backdropfilter-property-parsing-invalid.html: Added.
* css3/filters/backdrop/backdropfilter-property-parsing.html: Added.
* css3/filters/backdrop/backdropfilter-property.html: Added.
* css3/filters/backdrop/effect-hw-expected.html: Added.
* css3/filters/backdrop/effect-hw.html: Added.
* css3/filters/backdrop/script-tests/backdropfilter-property-computed-style.js: Added.
(testComputedFilterRule):
* css3/filters/backdrop/script-tests/backdropfilter-property-parsing-invalid.js: Added.
(testInvalidFilterRule):
* css3/filters/backdrop/script-tests/backdropfilter-property-parsing.js: Added.
(jsWrapperClass):
(shouldBeType):
(testFilterRule):
* css3/filters/backdrop/script-tests/backdropfilter-property.js: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@175672 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Tried to fix the Windows build after removing the deletion UI.

* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* editing/EditingAllInOne.cpp:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@175676 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit:
Removed references to deletion UI resources that have been removed.

* WebKit.vcxproj/WebKit/WebKit.vcxproj:
* WebKit.vcxproj/WebKit/WebKit.vcxproj.filters:

Source/WebKit2:
Tried to fix the GTK build.

* PlatformGTK.cmake: Removed references to deletion UI resources that have been removed.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@175678 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix crash introduced in r175656
https://bugs.webkit.org/show_bug.cgi?id=138453

Reviewed by Dan Bernstein.

repaintContainer can be null sometimes.

Covered by existing tests.

* rendering/RenderLayerCompositor.cpp:
(WebCore::styleChangeRequiresLayerRebuild):

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