Clean up the difference between painting focus rings and adding PDF annotations
https://bugs.webkit.org/show_bug.cgi?id=132638

Reviewed by Simon Fraser.

The code to add a PDF annotation when printing was called from
drawFocusRing, which is quite confusing. With just little movement
of code, we can detect an annotation and call addPDFURLRect in the
paint phase, and drawFocusRing becomes something that only
draws focus rings.

* rendering/RenderInline.cpp:
(WebCore::RenderInline::paintOutline): Split calls to drawFocusRing
and addPDFURLRect.
* rendering/RenderObject.cpp:
(WebCore::RenderObject::paintFocusRing): Get rid of call to PDF.
(WebCore::RenderObject::addPDFURLRect): Change the signature so it
can be called externally, and calculates the rectangle itself.
(WebCore::RenderObject::paintOutline): Split the calls.
* rendering/RenderObject.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@168404 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-[WKWebView isLoading] is NO immediately after -loadRequest: until the provisional load starts
https://bugs.webkit.org/show_bug.cgi?id=132639

Reviewed by Darin Adler.

* UIProcess/PageLoadState.cpp:
(WebKit::PageLoadState::commitChanges): Updated for change from isLoadingState to isLoading.
(WebKit::PageLoadState::isLoading): Renamed from isLoadingState, changed to take Data and
check whether there is a non-null pending API request URL. If so, return true.
* UIProcess/PageLoadState.h:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@168405 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewd build fix for C-LOOP after r168396.

* runtime/TestRunnerUtils.cpp:
(JSC::optimizeNextInvocation): Wrapped actual call inside #if ENABLE(JIT)


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@168406 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add WK2 SPI to prevent the previous back/forward item from remaining in the list
<rdar://problem/16248710> and https://bugs.webkit.org/show_bug.cgi?id=132636

Reviewed by Sam Weinig.

Source/WebKit2:
Add new PageLoaderClient SPI to keep the current back/forward item from remaining in the list:
* UIProcess/API/APILoaderClient.h:
(API::LoaderClient::shouldKeepCurrentBackForwardListItemInList):
* UIProcess/API/C/WKPage.cpp:
(WKPageSetPageLoaderClient):
* UIProcess/API/C/WKPageLoaderClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::shouldKeepCurrentBackForwardListItemInList):
* UIProcess/WebPageProxy.h:

* UIProcess/WebBackForwardList.cpp:
(WebKit::WebBackForwardList::addItem): Use that SPI to determine whether we should insert the new item after
the previous item, or simply replace the previous item.
(WebKit::WebBackForwardList::goToItem): Use that SPI to determine whether the previous item stays or goes.

Tools:
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:

* TestWebKitAPI/Tests/WebKit2/ShouldKeepCurrentBackForwardListItemInList.cpp: Added.
(TestWebKitAPI::itemURLLastComponentIsString):
(TestWebKitAPI::didFinishLoadForFrame):
(TestWebKitAPI::willGoToBackForwardListItem):
(TestWebKitAPI::shouldKeepCurrentBackForwardListItemInList):
(TestWebKitAPI::setPageLoaderClient):
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WebKit2/simple2.html: Added.
* TestWebKitAPI/Tests/WebKit2/simple3.html: Added.

* WebKitTestRunner/TestController.cpp:
(WTR::TestController::createWebViewWithOptions): Update for new client layout.

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