[iOS WebKit2] Crashes on swipe
<rdar://problem/16440867>

Reviewed by Benjamin Poulain.

* UIProcess/ios/ViewGestureControllerIOS.mm:
(WebKit::ViewGestureController::beginSwipeGesture):
Get the IOSurfaceRef from the WebCore::IOSurface.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@166336 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Replay: disable page cache during capture/replay
https://bugs.webkit.org/show_bug.cgi?id=130672

Reviewed by Timothy Hatcher.

Save, set, and restore page cache settings at the correct times.

No new tests. If this code fails, then the tests for network replay will fail.

* replay/ReplayController.cpp:
(WebCore::ReplayController::setForceDeterministicSettings): Added.
(WebCore::ReplayController::startCapturing):
(WebCore::ReplayController::stopCapturing):
(WebCore::ReplayController::cancelPlayback):
(WebCore::ReplayController::replayToPosition):
* replay/ReplayController.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@166337 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Rename a delegate method to -webView:didFinishNavigation:
https://bugs.webkit.org/show_bug.cgi?id=130814

Reviewed by Sam Weinig.

* UIProcess/API/Cocoa/WKNavigationDelegate.h:
* UIProcess/Cocoa/NavigationState.h:
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::setNavigationDelegate):
(WebKit::NavigationState::LoaderClient::didFinishLoadForFrame):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@166338 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Make sure childContainmentLayer is parented
https://bugs.webkit.org/show_bug.cgi?id=130808

Reviewed by Tim Horton.

m_childContainmentLayer was never parented if the page
created no other compositing layers, which left a dangling
GraphicsLayer which in turn confused UI-side compositing a little.
Fix by always parenting this layer.

* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::createPrimaryGraphicsLayer):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@166339 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add a _WKScriptWorld class
https://bugs.webkit.org/show_bug.cgi?id=130817

Reviewed by Dan Bernstein.

* UIProcess/API/Cocoa/_WKScriptWorld.h: Added.
* UIProcess/API/Cocoa/_WKScriptWorld.mm: Added.
(generateWorldID):
(+[_WKScriptWorld defaultWorld]):
(-[_WKScriptWorld init]):
(-[_WKScriptWorld _initWithWorldID:]):
* WebKit2.xcodeproj/project.pbxproj:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@166340 268f45cc-cd09-0410-ab3c-d52691b4dbfc
FEGaussianBlur: unify and const-ify calculateKernelSize
https://bugs.webkit.org/show_bug.cgi?id=130779

Some methods can benefit of using const refs as also make sense to
unify the interface (i.e. parameters) in calculateKernelSize/Unscaled.

FilterEffect::filter() will now return a reference, which helps since
its descendants were accessing methods into the pointer without testing
for it.

Reviewed by Simon Fraser.

No new tests, no changes on behavior.

* platform/graphics/filters/FEDisplacementMap.cpp:
(WebCore::FEDisplacementMap::platformApplySoftware):
* platform/graphics/filters/FEDropShadow.cpp:
(WebCore::FEDropShadow::determineAbsolutePaintRect):
(WebCore::FEDropShadow::platformApplySoftware):
* platform/graphics/filters/FEGaussianBlur.cpp:
(WebCore::FEGaussianBlur::calculateUnscaledKernelSize):
(WebCore::FEGaussianBlur::calculateKernelSize):
(WebCore::FEGaussianBlur::determineAbsolutePaintRect):
(WebCore::FEGaussianBlur::platformApplySoftware):
* platform/graphics/filters/FEGaussianBlur.h:
* platform/graphics/filters/FEMorphology.cpp:
(WebCore::FEMorphology::determineAbsolutePaintRect):
(WebCore::FEMorphology::platformApplySoftware):
* platform/graphics/filters/FEOffset.cpp:
(WebCore::FEOffset::determineAbsolutePaintRect):
(WebCore::FEOffset::platformApplySoftware):
* platform/graphics/filters/FETile.cpp:
(WebCore::FETile::platformApplySoftware):
* platform/graphics/filters/FETurbulence.cpp:
(WebCore::FETurbulence::fillRegion):
* platform/graphics/filters/Filter.h:
(WebCore::Filter::applyHorizontalScale):
(WebCore::Filter::applyVerticalScale):
* platform/graphics/filters/FilterEffect.h:
(WebCore::FilterEffect::filter):
* platform/graphics/filters/SourceAlpha.cpp:
(WebCore::SourceAlpha::determineAbsolutePaintRect):
(WebCore::SourceAlpha::platformApplySoftware):
* platform/graphics/filters/SourceGraphic.cpp:
(WebCore::SourceGraphic::determineAbsolutePaintRect):
(WebCore::SourceGraphic::platformApplySoftware):
* rendering/svg/RenderSVGResourceFilterPrimitive.cpp:
(WebCore::RenderSVGResourceFilterPrimitive::determineFilterPrimitiveSubregion):
* svg/graphics/filters/SVGFEImage.cpp:
(WebCore::FEImage::determineAbsolutePaintRect):
(WebCore::FEImage::platformApplySoftware):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@166341 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Make _processText and _traverseNode in HTMLConverter more efficient
https://bugs.webkit.org/show_bug.cgi?id=130769

Reviewed by Sam Weinig.

Rewrote a bunch of code in C++ and avoided creating wrappers.
This reduces the runtime of Interactive/CopyAll.html from ~16.5s to 15s.

* editing/cocoa/HTMLConverter.mm:
(HTMLConverterCaches::isAncestorsOfStartToBeConverted):
(HTMLConverter::HTMLConverter):
(HTMLConverter::~HTMLConverter):
(HTMLConverter::_processElement):
(HTMLConverter::_processText):
(HTMLConverter::_traverseNode):
(HTMLConverter::_traverseFooterNode):
(HTMLConverterCaches::cacheAncestorsOfStartToBeConverted):
(HTMLConverter::_loadFromDOMRange):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@166342 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[iOS][WK2] <rdar://problem/16265272> REGRESSION (WebKit2): Some pages appear blank until you scroll
https://bugs.webkit.org/show_bug.cgi?id=130819

Patch by Benjamin Poulain <bpoulain@apple.com> on 2014-03-26
Reviewed by Tim Horton.

When loading a new page, we never define the unobscured rect and exposed rect on the new frame.
As a result, there is nothing to render.

It uses to work thanks to dumb luck and a bug in Safari updating the visibleContentRects from
the UIProcess. Now that the bug is gone, "dumb luck" is not reliable enough to get the content rects :)

What this patch does is save if we have ever received new rects from the UI. If we have not, create them
based on the minimum layout size. This works because we know Safari shows the minimum layout size by default
and will tell us if it changes the obscured rects.

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
(WebKit::WebPage::didCommitLoad):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::viewportConfigurationChanged):
(WebKit::WebPage::updateVisibleContentRects):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@166343 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix iOS build.

* editing/cocoa/HTMLConverter.mm:
(_font):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@166344 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Parse stackmaps liveOuts
https://bugs.webkit.org/show_bug.cgi?id=130801

Reviewed by Geoffrey Garen.
        
This just adds the code to parse them but doesn't do anything with them, yet.

* ftl/FTLLocation.cpp:
(JSC::FTL::Location::forStackmaps):
* ftl/FTLLocation.h:
(JSC::FTL::Location::forRegister):
(JSC::FTL::Location::forIndirect):
* ftl/FTLStackMaps.cpp:
(JSC::FTL::StackMaps::Location::parse):
(JSC::FTL::StackMaps::Location::dump):
(JSC::FTL::StackMaps::LiveOut::parse):
(JSC::FTL::StackMaps::LiveOut::dump):
(JSC::FTL::StackMaps::Record::parse):
(JSC::FTL::StackMaps::Record::dump):
* ftl/FTLStackMaps.h:



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