WKContentViewInteraction isn't cleaned up when the Web Content process crashes
https://bugs.webkit.org/show_bug.cgi?id=134080
<rdar://problem/17387652> and <rdar://problem/16848360>

Reviewed by Benjamin Poulain.

* UIProcess/ios/WKContentView.mm:
(-[WKContentView _processDidExit]):
Tear down WKContentViewInteraction when the process crashes.

(-[WKContentView _didRelaunchProcess]):
Set WKContentViewInteraction back up when the process is relaunched.

* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView cleanupInteraction]):
Clear the SmartMagnificationController, which is a message receiver and thus must be re-created with the new page.
Remove all gesture recognizers from the content view.
Clear _fileUploadPanel, else we'll get an assert the next time we try to open one.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::resetStateAfterProcessExited):
Give the PageClient a chance to clean up *before* we clean up internals;
it is at a higher level and some cleanup depends on WebPageProxy members
not having been cleared yet.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@170178 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayerPool’d PlatformCALayerRemote/RemoteLayerBackingStore can have stale context pointers
https://bugs.webkit.org/show_bug.cgi?id=134050
<rdar://problem/17315114>

Reviewed by Simon Fraser.

* WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
(WebKit::PlatformCALayerRemote::recursiveBuildTransaction):
(WebKit::PlatformCALayerRemote::layerPool):
* WebProcess/WebPage/mac/PlatformCALayerRemote.h:
* WebProcess/WebPage/mac/RemoteLayerTreeContext.h:
(WebKit::RemoteLayerTreeContext::layerPool):
* WebProcess/WebPage/mac/RemoteLayerTreeContext.mm:
(WebKit::RemoteLayerTreeContext::buildTransaction):
Ensure that layers being committed are always in the context that is committing them.
Use a LayerPool per RemoteLayerTreeContext, to avoid moving layers between contexts.

* WebCore.exp.in:
* WebCore.xcodeproj/project.pbxproj:
* platform/cocoa/MemoryPressureHandlerCocoa.mm:
(WebCore::MemoryPressureHandler::platformReleaseMemory):
Drain all LayerPools upon memory pressure.

* platform/graphics/ca/LayerPool.cpp:
(WebCore::LayerPool::LayerPool):
(WebCore::LayerPool::~LayerPool):
(WebCore::LayerPool::allLayerPools):
(WebCore::LayerPool::sharedPool): Deleted.
* platform/graphics/ca/LayerPool.h:
* platform/graphics/ca/PlatformCALayer.cpp:
(WebCore::PlatformCALayer::createCompatibleLayerWithSize):
Add createCompatibleLayerWithSize, which optionally tries to take said layer from the LayerPool.

(WebCore::PlatformCALayer::moveToLayerPool):
Add moveToLayerPool, which moves the layer to the LayerPool.

(WebCore::PlatformCALayer::layerPool):
The LayerPool for each layer is obtained via PlatformCALayer::layerPool(), which subclasses can override for special behaviors.
The base class uses a global LayerPool.

* platform/graphics/ca/PlatformCALayer.h:
* platform/graphics/ca/TileController.cpp:
(WebCore::TileController::createTileLayer):
* platform/graphics/ca/TileGrid.cpp:
(WebCore::TileGrid::removeTiles):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@170179 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed. Fix GTK+ debug build after r170174.

* bindings/gobject/WebKitDOMNodeFilter.cpp:
(WebKit::nodeFilterObjectDestroyedCallback):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@170180 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL] Add gstreamer as dependecy of EFL after r169785
https://bugs.webkit.org/show_bug.cgi?id=134066

Patch by Eva Balazsfalvi <evab.u-szeged@partner.samsung.com> on 2014-06-20
Reviewed by Gyuyoung Kim.

* efl/jhbuild.modules:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@170181 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CSS Grid Layout] Add GridSpan::iterator
https://bugs.webkit.org/show_bug.cgi?id=134058

Reviewed by Bem Jones-Bey.

Once that GridResolvedPosition has been introduced in r169934, this
patch adds a GridSpan::iterator which allows to simplify the loops over
GridResolvedPositions.
From now on we could use range-based for loops.

No new tests as it is already covered by current tests
(fast/css-grid-layout/).

* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::computeNormalizedFractionBreadth): Change loop to
ranged-based for.
(WebCore::RenderGrid::insertItemIntoGrid): Ditto.
(WebCore::RenderGrid::gridAreaBreadthForChild): Ditto.
* rendering/style/GridCoordinate.h: Define GridSpan::iterator.
(WebCore::GridSpan::begin): Return resolved initial position.
(WebCore::GridSpan::end): Return next to resolved final position.
* rendering/style/GridResolvedPosition.h:
(WebCore::GridResolvedPosition::operator*): Add operator required by
range-based for loops.
(WebCore::GridResolvedPosition::operator!=): Add not equal operator.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@170182 268f45cc-cd09-0410-ab3c-d52691b4dbfc
PluginProcessMainUnix should only scan for plugins when X11 plugin architecture is enabled
https://bugs.webkit.org/show_bug.cgi?id=134098

Reviewed by Carlos Garcia Campos.

* PluginProcess/unix/PluginProcessMainUnix.cpp: Guard the call to NetscapePluginModule::scanPlugin()
with PLUGIN_ARCHITECTURE(X11) since the declaration has the same build guard. In case the X11 plugin
architecture is not enabled the program exits with EXIT_FAILURE.


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