Fix build.

* UIProcess/API/mac/WKView.mm:
(-[WKView selectedRangeWithCompletionHandler:]):
(-[WKView markedRangeWithCompletionHandler:]):
(-[WKView hasMarkedTextWithCompletionHandler:]):
(-[WKView attributedSubstringForProposedRange:completionHandler:]):
(-[WKView firstRectForCharacterRange:completionHandler:]):
(-[WKView characterIndexForPoint:completionHandler:]):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@169971 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Masks disappear when layers become tiled
https://bugs.webkit.org/show_bug.cgi?id=133892
<rdar://problem/17309793>

Reviewed by Tim Horton.

Source/WebCore:
There were several problems with tiled mask layers.

First, when a layer became tiled it failed to re-apply the platform layer
for its mask; fixed by adding MaskLayerChanged to the set of flags in
swapFromOrToTiledLayer().

Secondly, in CA, a mask layer's superlayer is the layer which is it masking,
so the if (oldLayer->superlayer())... code in swapFromOrToTiledLayer() would
erroneously try to swap out a sublayer on the superlayer with the mask.

Thirdly, the mask layer is updated after its host layer, but when the mask layer
become tiled, there was no code that updated the mask platform layer on its
host layer. Fix by:
    1. setting a bit on a layer to note that it's being used as a mask.
    2. setting the parent of such a layer to its host layer (mimicking CA)
    3. when the mask becomes tiled, dirtying the MaskLayerChanged bit on
       its parent and adding a clause to commitLayerChangesAfterSublayers()
       to update the mask layer.

Finally, ASSERTION FAILED: owningGraphicsLayer()->isCommittingChanges() would
fire because we failed to set the m_isCommittingChanges flag while committing
the mask layer. Fix by moving the TemporaryChange<bool> that sets this flag
into commitLayerChangesBeforeSublayers() and commitLayerChangesAfterSublayers().

Also used safe casts in more places in GraphicsLayerCA.

Tests: compositing/masks/become-tiled-mask.html
       compositing/masks/cease-tiled-mask.html
       compositing/masks/tiled-mask.html

* platform/graphics/GraphicsLayer.cpp:
(WebCore::GraphicsLayer::GraphicsLayer):
(WebCore::GraphicsLayer::removeFromParent):
(WebCore::GraphicsLayer::setMaskLayer):
* platform/graphics/GraphicsLayer.h:
(WebCore::GraphicsLayer::setIsMaskLayer):
(WebCore::GraphicsLayer::isMaskLayer):
(WebCore::GraphicsLayer::setMaskLayer): Deleted.
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::removeFromParent):
(WebCore::GraphicsLayerCA::setMaskLayer):
(WebCore::GraphicsLayerCA::recursiveVisibleRectChangeRequiresFlush):
(WebCore::GraphicsLayerCA::recursiveCommitChanges):
(WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers):
(WebCore::GraphicsLayerCA::commitLayerChangesAfterSublayers):
(WebCore::GraphicsLayerCA::updateSublayerList):
(WebCore::GraphicsLayerCA::ensureStructuralLayer):
(WebCore::GraphicsLayerCA::updateMaskLayer):
(WebCore::GraphicsLayerCA::replicatedLayerRoot):
(WebCore::GraphicsLayerCA::createFilterAnimationsFromKeyframes):
(WebCore::GraphicsLayerCA::swapFromOrToTiledLayer):
(WebCore::GraphicsLayerCA::propagateLayerChangeToReplicas):
(WebCore::GraphicsLayerCA::fetchCloneLayers):

LayoutTests:
Tests for masking as they go into and out of tiled mode.

* compositing/masks/become-tiled-mask-expected.html: Added.
* compositing/masks/become-tiled-mask.html: Added.
* compositing/masks/cease-tiled-mask-expected.html: Added.
* compositing/masks/cease-tiled-mask.html: Added.
* compositing/masks/tiled-mask-expected.html: Added.
* compositing/masks/tiled-mask.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@169972 268f45cc-cd09-0410-ab3c-d52691b4dbfc
operationCreateArguments could cause a GC during OSR exit
https://bugs.webkit.org/show_bug.cgi?id=133905

Reviewed by Filip Pizlo.

Defer GC via new wrapper functions for operationCreateArguments and operationCreateInlinedArguments
for use by OSR exit stubs.

* dfg/DFGOSRExitCompilerCommon.cpp:
(JSC::DFG::ArgumentsRecoveryGenerator::generateFor):
* dfg/DFGOperations.cpp:
* dfg/DFGOperations.h:
* jit/JITOperations.cpp:
* jit/JITOperations.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@169973 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add a ResourceRequestBase::setHTTPHeaderField overload that takes a HTTPHeaderName
https://bugs.webkit.org/show_bug.cgi?id=133881

Reviewed by Sam Weinig.

* WebCore.exp.in:
* fileapi/FileReaderLoader.cpp:
(WebCore::FileReaderLoader::start):
* inspector/InspectorResourceAgent.cpp:
(WebCore::InspectorResourceAgent::willSendRequest):
* loader/CrossOriginAccessControl.cpp:
(WebCore::createAccessControlPreflightRequest):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::addExtraFieldsToRequest):
* loader/PingLoader.cpp:
(WebCore::PingLoader::loadImage):
(WebCore::PingLoader::sendPing):
* loader/appcache/ApplicationCacheGroup.cpp:
(WebCore::ApplicationCacheGroup::createResourceHandle):
* loader/cache/CachedResource.cpp:
(WebCore::CachedResource::load):
* page/EventSource.cpp:
(WebCore::EventSource::connect):
* platform/network/BlobResourceHandle.cpp:
(WebCore::BlobResourceHandle::doStart):
* platform/network/HTTPHeaderNames.in:
* platform/network/ResourceRequestBase.cpp:
(WebCore::ResourceRequestBase::httpHeaderField):
(WebCore::ResourceRequestBase::setHTTPHeaderField):
(WebCore::ResourceRequestBase::httpContentType):
(WebCore::ResourceRequestBase::setHTTPContentType):
(WebCore::ResourceRequestBase::httpReferrer):
(WebCore::ResourceRequestBase::setHTTPReferrer):
(WebCore::ResourceRequestBase::httpOrigin):
(WebCore::ResourceRequestBase::setHTTPOrigin):
(WebCore::ResourceRequestBase::httpUserAgent):
(WebCore::ResourceRequestBase::setHTTPUserAgent):
(WebCore::ResourceRequestBase::httpAccept):
(WebCore::ResourceRequestBase::setHTTPAccept):
* platform/network/ResourceRequestBase.h:
* platform/network/mac/ResourceHandleMac.mm:
(WebCore::ResourceHandle::willSendRequest):

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