AX: Crash in WebKit::WebPageProxy::registerWebProcessAccessibilityToken
https://bugs.webkit.org/show_bug.cgi?id=127387

Reviewed by Alexey Proskuryakov.

Speculative fix for crasher. We should check if the connection is still valid before proceeding.

* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::registerWebProcessAccessibilityToken):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@164887 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Subpixel rendering: Add subpixel support to border type of double, groove, ridge, inset and outset.
https://bugs.webkit.org/show_bug.cgi?id=129226

Reviewed by Simon Fraser.

This is the conversion of double, inset, outset, groove and ridge border type
painting to support device pixel precision width/height.

Regression is covered by existing tests.

* rendering/RenderObject.cpp:
(WebCore::RenderObject::drawLineForBoxSide):
* rendering/RenderObject.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@164888 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WebKit2.TerminateTwice test is failing.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::resetStateAfterProcessExited):
Turns out this can be called even when we're in the launching state so don't try to
remove the process from the visited link provider when in that state.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@164889 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Make UIViews for compositing layers in the UI process on iOS
https://bugs.webkit.org/show_bug.cgi?id=129508

Reviewed by Sam Weinig.

In order to parent UIScrollViews for -webkit-overflow-scrolling:touch,
we need to use UIViews in the compositing layer hierarchy on iOS.

Make much of the code that currently uses CALayers layer-or-view
agnostic by using a typedef LayerOrView.

Fix RemoteLayerTreePropertyApplier to apply properties to UIViews
or CALayers; on iOS, we need both paths because we have to set properties
on CALayer for remotely hosted content.

Add iOS-specific implementation files for RemoteLayerTreeHost and RemoteScrollingCoordinatorProxy,
since these need to see the UIView implementation. WebVideoFullscreenManagerProxy.cpp also needs
to be come a .mm file.

* Shared/mac/RemoteLayerTreePropertyApplier.h:
* Shared/mac/RemoteLayerTreePropertyApplier.mm:
(-[UIView setSubviews:]):
(WebKit::applyPropertiesToLayer):
(WebKit::RemoteLayerTreePropertyApplier::applyProperties):
* UIProcess/Cocoa/LayerRepresentation.h: Copied from Source/WebKit2/Shared/mac/RemoteLayerTreePropertyApplier.h.
(asLayer):
* UIProcess/PageClient.h:
* UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp:
* UIProcess/WebPageProxy.h:
* UIProcess/ios/LayerRepresentation.mm: Copied from Source/WebKit2/Shared/mac/RemoteLayerTreePropertyApplier.h.
(asLayer):
* UIProcess/ios/PageClientImplIOS.h:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::setAcceleratedCompositingRootLayer):
(WebKit::PageClientImpl::acceleratedCompositingRootLayer):
* UIProcess/ios/RemoteLayerTreeHostIOS.mm: Added.
(+[WKTransformView layerClass]):
(-[WKRemoteView initWithFrame:contextID:]):
(+[WKRemoteView layerClass]):
(WebKit::RemoteLayerTreeHost::createLayer):
* UIProcess/ios/RemoteScrollingCoordinatorProxyIOS.mm: Added.
(WebKit::layerRepresentationFromLayerOrView):
(WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers):
* UIProcess/ios/WKContentView.h:
* UIProcess/ios/WKContentView.mm:
(-[WKContentView _setAcceleratedCompositingRootView:]):
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::setAcceleratedCompositingRootLayer):
* UIProcess/ios/WebVideoFullscreenManagerProxy.mm: Renamed from Source/WebKit2/UIProcess/ios/WebVideoFullscreenManagerProxy.cpp.
(WebKit::WebVideoFullscreenManagerProxy::create):
(WebKit::WebVideoFullscreenManagerProxy::WebVideoFullscreenManagerProxy):
(WebKit::WebVideoFullscreenManagerProxy::~WebVideoFullscreenManagerProxy):
(WebKit::WebVideoFullscreenManagerProxy::didCommitLayerTree):
(WebKit::WebVideoFullscreenManagerProxy::setVideoLayerID):
(WebKit::WebVideoFullscreenManagerProxy::enterFullscreen):
(WebKit::WebVideoFullscreenManagerProxy::requestExitFullScreen):
(WebKit::WebVideoFullscreenManagerProxy::play):
(WebKit::WebVideoFullscreenManagerProxy::pause):
(WebKit::WebVideoFullscreenManagerProxy::togglePlayState):
(WebKit::WebVideoFullscreenManagerProxy::seekToTime):
(WebKit::WebVideoFullscreenManagerProxy::didExitFullscreen):
* UIProcess/mac/PageClientImpl.h:
* UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
(WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
(WebKit::RemoteLayerTreeDrawingAreaProxy::updateDebugIndicator):
* UIProcess/mac/RemoteLayerTreeHost.h:
(WebKit::RemoteLayerTreeHost::rootLayer):
* UIProcess/mac/RemoteLayerTreeHost.mm:
(WebKit::RemoteLayerTreeHost::updateLayerTree):
(WebKit::RemoteLayerTreeHost::getLayer):
(WebKit::RemoteLayerTreeHost::createLayer):
* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::setAcceleratedCompositingRootLayer):
(WebKit::WebPageProxy::acceleratedCompositingRootLayer):
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
(PlatformCALayerRemote::recursiveBuildTransaction):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@164890 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Turn off margin tiles on iOS
https://bugs.webkit.org/show_bug.cgi?id=129509
-and corresponding-
<rdar://problem/16200383>

Reviewed by Simon Fraser.

* page/FrameView.cpp:
(WebCore::FrameView::needsExtendedBackgroundRectForPainting):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@164891 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore: [iOS][WK2] highlight rects should never big bigger than the view
https://bugs.webkit.org/show_bug.cgi?id=129472

Patch by Benjamin Poulain <bpoulain@apple.com> on 2014-02-28
Reviewed by Enrica Casucci.

* WebCore.exp.in:

Source/WebKit2: [iOS][WK2] highlight rects should never big bigger than the view
https://bugs.webkit.org/show_bug.cgi?id=129472
<rdar://problem/15673655>

Patch by Benjamin Poulain <bpoulain@apple.com> on 2014-02-28
Reviewed by Enrica Casucci.

The unobscuredRect on WebPageProxy is the "true" view rect as seen by the user.
Use that to constrain our highlight rects.

* UIProcess/ios/WKContentViewInteraction.mm:
(highlightedQuadsFitInRect):
(-[WKContentView _didGetTapHighlightForRequest:color:WebCore::quads:WebCore::topLeftRadius:WebCore::topRightRadius:WebCore::bottomLeftRadius:WebCore::bottomRightRadius:WebCore::]):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@164892 268f45cc-cd09-0410-ab3c-d52691b4dbfc
VisitedLinkStore should be able to invalidate link styles for associated pages
https://bugs.webkit.org/show_bug.cgi?id=129515

Reviewed by Dan Bernstein.

* page/Page.cpp:
(WebCore::Page::Page):
Add the VisitedLinkStore if we have one.

(WebCore::Page::~Page):
Remove the VisitedLinkStore if we have one.

* page/VisitedLinkStore.cpp:
(WebCore::VisitedLinkStore::~VisitedLinkStore):
Assert that we don't have any pages.

(WebCore::VisitedLinkStore::addPage):
Add the page to the set.

(WebCore::VisitedLinkStore::removePage):
Remove the page from the set.

(WebCore::VisitedLinkStore::invalidateStylesForAllLinks):
Traverse all the pages and invalidate the style for all links.

(WebCore::VisitedLinkStore::invalidateStylesForLink):
Traverse all the pages and invalidate the style for a given link.

* page/VisitedLinkStore.h:
Add new members.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@164895 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: ASSERT in WebCore::JSDOMWindowBase::supportsRichSourceInfo inspecting iOS
https://bugs.webkit.org/show_bug.cgi?id=129512

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2014-02-28
Reviewed by Simon Fraser.

* page/PageDebuggable.cpp:
(WebCore::PageDebuggable::connect):
(WebCore::PageDebuggable::disconnect):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@164896 268f45cc-cd09-0410-ab3c-d52691b4dbfc
JSC Assertion failure every time I start Safari (r164846)
https://bugs.webkit.org/show_bug.cgi?id=129510

Reviewed by Mark Hahnenberg.

Take the lock before allocating objects because afterward is too late.

* bindings/js/ScriptController.cpp:
(WebCore::ScriptController::evaluateInWorld):
(WebCore::ScriptController::windowScriptNPObject):
(WebCore::ScriptController::jsObjectForPluginElement):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@164897 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Micro-optimize JSNodeOwner::isReachableFromOpaqueRoots().
<https://webkit.org/b/129518>

Only do image and audio element specific checks for element nodes.
Time spent in here goes from 0.8% to 0.5% on DYEB.

Reviewed by Benjamin Poulain.

* bindings/js/JSNodeCustom.cpp:
(WebCore::isReachableFromDOM):

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