[iOS][WK2] The highlight view needs to be in WKWebView coordinates
https://bugs.webkit.org/show_bug.cgi?id=132435
<rdar://problem/16708861>

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

_UIHighlightView needs to be in WKWebView coordinates so that it render unscaled for any page scale factor.
The view needs to be a child of WKContentView so that it moves/scales with the page.

To fix the issue, add an inverse transform root layer for the hightlight, and scale the coordinates to their
inverse scaled counterpart.

The scale is not updated live with the scaling of WKContentView but that should be fine since the view disappear
on any scaling operation (and I would prefer not add live painting during scaling animation).

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


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@168117 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WKWebView doesn't track visited links (for visited link coloring)
https://bugs.webkit.org/show_bug.cgi?id=132438
<rdar://problem/16704519>

Reviewed by Dan Bernstein.

* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::WebProcessCreationParameters):
(WebKit::WebProcessCreationParameters::encode):
(WebKit::WebProcessCreationParameters::decode):
* Shared/WebProcessCreationParameters.h:
* UIProcess/API/APIHistoryClient.h:
(API::HistoryClient::addsVisitedLinks):
(API::HistoryClient::shouldTrackVisitedLinks): Deleted.
* UIProcess/API/C/WKContext.cpp:
(WKContextSetHistoryClient):
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _addsVisitedLinks]):
(-[WKWebView _setAddsVisitedLinks:]):
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
* UIProcess/API/mac/WKView.mm:
(-[WKView initWithFrame:context:configuration:webView:]):
* UIProcess/Cocoa/HistoryClient.h:
* UIProcess/Cocoa/HistoryClient.mm:
(WebKit::HistoryClient::shouldTrackVisitedLinks): Deleted.
* UIProcess/VisitedLinkProvider.cpp:
(WebKit::VisitedLinkProvider::addVisitedLinkHashFromPage):
* UIProcess/VisitedLinkProvider.h:
* UIProcess/VisitedLinkProvider.messages.in:
* UIProcess/WebContext.cpp:
(WebKit::WebContext::setHistoryClient):
(WebKit::WebContext::createNewWebProcess):
* UIProcess/WebContext.h:
(WebKit::WebContext::processes):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::addsVisitedLinks):
(WebKit::WebPageProxy::setAddsVisitedLinks):
* WebProcess/WebPage/VisitedLinkTableController.cpp:
(WebKit::VisitedLinkTableController::addVisitedLink):
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::initializeWebProcess):
* WebProcess/WebProcess.h:
* WebProcess/WebProcess.messages.in:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@168118 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Don't always make backing store for -webkit-backface-visibility:hidden
https://bugs.webkit.org/show_bug.cgi?id=132420

Reviewed by Sam Weinig.

Source/WebCore:
Previously, -webkit-backface-visibility:hidden unconditionally created
compositing layers with backing store. This results in high memory use
on pages with this style applied to many elements (a cargo-cult "optimization").

Fix by only having -webkit-backface-visibility:hidden create compositing layers
if some ancestor has a 3D transform. That's the only scenario in which the
element can be flipped around to reveal the back side, so the only time we need
to do compositing for this property. In future, we could be smarter, and only
consider 3D transforms in the current preserve-3d context.

Tests: compositing/backing/backface-visibility-in-3dtransformed.html
       compositing/backing/backface-visibility-in-transformed.html
       compositing/backing/backface-visibility.html

* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::RenderLayer):
(WebCore::RenderLayer::updateLayerPositions):
(WebCore::RenderLayer::hitTestLayer):
* rendering/RenderLayer.h:
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::requiresCompositingLayer):
(WebCore::RenderLayerCompositor::requiresOwnBackingStore):
(WebCore::RenderLayerCompositor::requiresCompositingForBackfaceVisibility):
* rendering/RenderLayerCompositor.h:

LayoutTests:
Dump layers for elements with backface-visibility: hidden with various types
of ancestors.

* compositing/backing/backface-visibility-expected.txt: Added.
* compositing/backing/backface-visibility-in-3dtransformed-expected.txt: Added.
* compositing/backing/backface-visibility-in-3dtransformed.html: Added.
* compositing/backing/backface-visibility-in-transformed-expected.txt: Added.
* compositing/backing/backface-visibility-in-transformed.html: Added.
* compositing/backing/backface-visibility.html: Added.
* inspector-protocol/layers/layers-anonymous.html: Don't use backface-visibility
for force a layer.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@168119 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Roll out r60161.

Rubber stamped by Mark Hahnenberg.
        
This breaks our debugging workflow.

* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::decode):
* UIProcess/mac/WebContextMac.mm:
(WebKit::registerUserDefaultsIfNeeded):
(WebKit::WebContext::platformInitializeWebProcess):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@168120 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION (r168046): [New Multicolumn] Selection into and out of column-span elements doesn't work
https://bugs.webkit.org/show_bug.cgi?id=132066

Reviewed by Oliver Hunt.

Make a new SelectionIterator struct that knows how to drill into and out of
column span placeholders. Also change spans to be selection roots (in the painting
sense).

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::isSelectionRoot):
(WebCore::RenderBlock::selectionGaps):
* rendering/RenderView.cpp:
(WebCore::SelectionIterator::SelectionIterator):
(WebCore::SelectionIterator::checkForSpanner):
(WebCore::SelectionIterator::current):
(WebCore::SelectionIterator::next):
(WebCore::RenderView::subtreeSelectionBounds):
(WebCore::RenderView::repaintSubtreeSelection):
(WebCore::RenderView::setSubtreeSelection):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@168121 268f45cc-cd09-0410-ab3c-d52691b4dbfc
window.testRunner.keepWebHistory() should update the UI process state
https://bugs.webkit.org/show_bug.cgi?id=132440

Reviewed by Dan Bernstein.

Source/WebKit2:
* UIProcess/API/C/WKPage.cpp:
(WKPageGetAddsVisitedLinks):
(WKPageSetAddsVisitedLinks):
* UIProcess/API/C/WKPagePrivate.h:

Tools:
* WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
(WTR::InjectedBundle::postSetAddsVisitedLinks):
* WebKitTestRunner/InjectedBundle/InjectedBundle.h:
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::keepWebHistory):
* WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::invoke):
(WTR::TestInvocation::didReceiveMessageFromInjectedBundle):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@168122 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove WKBundleSetShouldTrackVisitedLinks and associate code
https://bugs.webkit.org/show_bug.cgi?id=132441

Reviewed by Sam Weinig.

* WebProcess/InjectedBundle/API/c/WKBundle.cpp:
(WKBundleSetShouldTrackVisitedLinks): Deleted.
* WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::setShouldTrackVisitedLinks): Deleted.
* WebProcess/InjectedBundle/InjectedBundle.h:
* WebProcess/WebPage/VisitedLinkTableController.cpp:
(WebKit::VisitedLinkTableController::addVisitedLink):
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::WebProcess):
(WebKit::WebProcess::setShouldTrackVisitedLinks): Deleted.
* WebProcess/WebProcess.h:
(WebKit::WebProcess::shouldTrackVisitedLinks): Deleted.

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