iOS build fix after http://trac.webkit.org/changeset/170447.
Unreviewed.

* editing/mac/TextUndoInsertionMarkup.h:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@170449 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web process should become active when sent a message that requires a callback
https://bugs.webkit.org/show_bug.cgi?id=134315

Reviewed by Tim Horton.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _snapshotRect:intoImageOfWidth:completionHandler:]): Removed one-off code to
acquire an activity token, now that WebPageProxy::takeSnapshot does it automatically for us.

* UIProcess/GenericCallback.h:
(WebKit::CallbackBase::CallbackBase): Made this constructor take and adopt an activity
token.
(WebKit::GenericCallback::create): Added an optional activity token parameter.
(WebKit::GenericCallback::GenericCallback): Pass the activity token to the CallbackBase
constructor.
(WebKit::CallbackMap::put): Added an activity token parameter, which is passed along to
GenericCallback::create.

* UIProcess/ProcessAssertion.cpp: Moved from Source/WebKit2/UIProcess/ios/ProcessAssertion.mm.
This copy includes generic no-op implementations for platforms that don’t have assertions.
(WebKit::ProcessAssertion::ProcessAssertion):
(WebKit::ProcessAssertion::setState):
* UIProcess/ProcessAssertion.h: Moved from Source/WebKit2/UIProcess/ios/ProcessAssertion.h.
Changed platform #ifdefs to make this usable by all platforms.

* UIProcess/ProcessThrottler.cpp: Moved from Source/WebKit2/UIProcess/ios/ProcessThrottler.mm.
Removed iOS platform #ifdef.
* UIProcess/ProcessThrottler.h: Moved from Source/WebKit2/UIProcess/ios/ProcessThrottler.h.
Ditto.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::validateCommand): Create a background activity token and pass it
along to CallbackMap::put.
(WebKit::WebPageProxy::runJavaScriptInMainFrame): Ditto.
(WebKit::WebPageProxy::getRenderTreeExternalRepresentation): Ditto.
(WebKit::WebPageProxy::getSourceForFrame): Ditto.
(WebKit::WebPageProxy::getContentsAsString): Ditto.
(WebKit::WebPageProxy::getBytecodeProfile): Ditto.
(WebKit::WebPageProxy::getSelectionOrContentsAsString): Ditto.
(WebKit::WebPageProxy::getSelectionAsWebArchiveData): Ditto.
(WebKit::WebPageProxy::getMainResourceDataOfFrame): Ditto.
(WebKit::WebPageProxy::getResourceDataFromFrame): Ditto.
(WebKit::WebPageProxy::getWebArchiveOfFrame): Ditto.
(WebKit::WebPageProxy::getMarkedRangeAsync): Ditto.
(WebKit::WebPageProxy::getSelectedRangeAsync): Ditto.
(WebKit::WebPageProxy::characterIndexForPointAsync): Ditto.
(WebKit::WebPageProxy::firstRectForCharacterRangeAsync): Ditto.
(WebKit::WebPageProxy::takeSnapshot): Ditto.

* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::sendProcessWillSuspend): Moved from WebProcessProxyIOS.mm.
(WebKit::WebProcessProxy::sendCancelProcessWillSuspend): Ditto.
(WebKit::WebProcessProxy::processReadyToSuspend): Ditto.
(WebKit::WebProcessProxy::didCancelProcessSuspension): Ditto.
* UIProcess/WebProcessProxy.h: Removed iOS platform #ifdef.
* UIProcess/WebProcessProxy.messages.in: Ditto.

* UIProcess/ios/ProcessAssertionIOS.mm: Renamed from Source/WebKit2/UIProcess/ios/ProcessAssertion.mm.

* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::selectWithGesture): Changed to pass the function directly to
CallbackMap::put, along with a background activity token.
(WebKit::WebPageProxy::updateSelectionWithTouches): Ditto.
(WebKit::WebPageProxy::requestAutocorrectionData): Ditto.
(WebKit::WebPageProxy::applyAutocorrection): Ditto.
(WebKit::WebPageProxy::requestDictationContext): Ditto.
(WebKit::WebPageProxy::requestAutocorrectionContext): Ditto.
(WebKit::WebPageProxy::selectWithTwoTouches): Ditto.

* UIProcess/ios/WebProcessProxyIOS.mm:
(WebKit::WebProcessProxy::sendProcessWillSuspend): Moved to WebProcessProxy.cpp.
(WebKit::WebProcessProxy::sendCancelProcessWillSuspend): Ditto.
(WebKit::WebProcessProxy::processReadyToSuspend): Ditto.
(WebKit::WebProcessProxy::didCancelProcessSuspension): Ditto.

* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::attributedSubstringForCharacterRangeAsync): Create a background
activity token and pass it along to CallbackMap::put.

* WebKit2.xcodeproj/project.pbxproj: Updated for moves and copies.

* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::WebProcess): Moved iOS platform #ifdef.
* WebProcess/WebProcess.h: Ditto.
* WebProcess/WebProcess.messages.in: Ditto.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@170450 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Crash in ScrollingTree::isRubberBandInProgress()
https://bugs.webkit.org/show_bug.cgi?id=134316
-and corresponding-
<rdar://problem/16247911>

Reviewed by Geoffrey Garen.


Source/WebCore: 
This crash appears to have been caused by http://trac.webkit.org/changeset/161276 
which moved the ScrollingNode creation code from ScrollingTree over to 
ScrollingCoordinator. This creates a thread safety issue. In the crashing case, we 
believe that the ScrollingCoordinator's ScrollingTree pointer had been null-ed out
even though the ScrollingTree was kept alive by the bind call to propagate 
commitNewTreeState() over to the scrolling thread. The fix is to move node 
creation back to the ScrollingTree and to use the this pointer to create new
nodes rather than the ScrollingCoordinator's ScrollingTree pointer.

Don't allow ScrollingCoordinator to handle ScrollingTreeNode creation.
* page/scrolling/AsyncScrollingCoordinator.h:

Re-name createNode to createScrollingTreeNode(). 
* page/scrolling/ScrollingTree.cpp:
(WebCore::ScrollingTree::updateTreeFromStateNode):
* page/scrolling/ScrollingTree.h:

Remove this implementation of createNode that called into the 
ScrollingCoordinator.
* page/scrolling/ThreadedScrollingTree.cpp:
(WebCore::ThreadedScrollingTree::createNode): Deleted.
* page/scrolling/ThreadedScrollingTree.h:

Don't allow ScrollingCoordinator to handle ScrollingTreeNode creation.
* page/scrolling/ios/ScrollingCoordinatorIOS.h:
* page/scrolling/ios/ScrollingCoordinatorIOS.mm:
(WebCore::ScrollingCoordinatorIOS::createScrollingTreeNode): Deleted.

Re-name createNode to createScrollingTreeNode, and actually create the nodes here.
* page/scrolling/ios/ScrollingTreeIOS.cpp:
(WebCore::ScrollingTreeIOS::createScrollingTreeNode):
(WebCore::ScrollingTreeIOS::createNode): Deleted.
* page/scrolling/ios/ScrollingTreeIOS.h:

Don't allow ScrollingCoordinator to handle ScrollingTreeNode creation.
* page/scrolling/mac/ScrollingCoordinatorMac.h:
* page/scrolling/mac/ScrollingCoordinatorMac.mm:
(WebCore::ScrollingCoordinatorMac::createScrollingTreeNode): Deleted.

Add the implementation of createScrollingTreeNode() for the Mac to 
ScrollingTreeMac since it can create Mac-specific nodes.
* page/scrolling/mac/ScrollingTreeMac.cpp:
(ScrollingTreeMac::createScrollingTreeNode):
* page/scrolling/mac/ScrollingTreeMac.h:

Source/WebKit2: 
Move all ScrollingTreeNode creation from ScrollingCoordinator subclasses into 
ScrollingTree subclasses.

* UIProcess/Scrolling/RemoteScrollingTree.cpp:
(WebKit::RemoteScrollingTree::createScrollingTreeNode):
(WebKit::RemoteScrollingTree::createNode): Deleted.
* UIProcess/Scrolling/RemoteScrollingTree.h:
* WebProcess/Scrolling/RemoteScrollingCoordinator.h:
* WebProcess/Scrolling/RemoteScrollingCoordinator.mm:
(WebKit::RemoteScrollingCoordinator::createScrollingTreeNode): Deleted.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@170451 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fixed crashes after r170450.

Reviewed by Tim Horton.

* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::WebProcessProxy): Removed iOS platform #ifdef around
initialization of m_throttler.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@170452 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[WK2] Shadow layer is in the wrong place while pinch-zooming
https://bugs.webkit.org/show_bug.cgi?id=134321

Reviewed by Dan Bernstein.

* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::applyTransientZoomToLayers):
(WebKit::TiledCoreAnimationDrawingArea::commitTransientZoom):
(WebKit::TiledCoreAnimationDrawingArea::applyTransientZoomToPage):
The anchor point of the shadow layer changed, so we no longer need to shift our position to the center.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@170453 268f45cc-cd09-0410-ab3c-d52691b4dbfc
compositing/visible-rect/iframe-no-layers.html is broken and confusing
https://bugs.webkit.org/show_bug.cgi?id=134317

Reviewed by Simon Fraser.

The test doesn't wait for scrolling to occur and has unnecessary style stanzas.

* compositing/visible-rect/iframe-no-layers.html:
* compositing/visible-rect/resources/subframe-with-layers.html:
* platform/mac-wk2/compositing/visible-rect/iframe-no-layers-expected.txt:
* platform/ios-sim/compositing/visible-rect/iframe-no-layers-expected.txt:
* platform/mac/compositing/visible-rect/iframe-no-layers-expected.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@170454 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[MSE] removeCodedFrames() can remove more than it should
https://bugs.webkit.org/show_bug.cgi?id=134320

Reviewed by Geoff Garen.

removeCodedFrames() can remove more samples than it should because it compares an iterator
in presentation timespace to one in decode timespace. Clean up this code by removing frames
in decode order. Rename variables and add comments to make explicit which timespace defines
the iterators being used.

* Modules/mediasource/SourceBuffer.cpp:
(WebCore::SourceBuffer::removeCodedFrames):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@170455 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: Rules panel's strikethrough gets confused at -webkit-align-items: flex-start;
https://bugs.webkit.org/show_bug.cgi?id=133515

Reviewed by Timothy Hatcher.

The CSS style declaration text editor uses the author's shortest instance of prefix whitespace
to create an indentation baseline for the style editor. This needs to consider the possibility
that there is no whitespace prefixing one of the rules. Also clarified a FIXME line.

* UserInterface/Views/CSSStyleDeclarationTextEditor.js: Account for zero-length whitespace.


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