Headers and footers are not positioned correctly with topContentInset
https://bugs.webkit.org/show_bug.cgi?id=132787
-and corresponding-
<rdar://problem/16641115>

Reviewed by Tim Horton.

Headers and footers need to take the inset into account, and they also need to 
factor in the fact that the root layer moves around now too.

The existing yPositionForRootContentLayer() is actually the right calculation for 
the header layer. The root content layer wants that value, but pushed down by the 
header height. Now there are static functions for both of them and the footer to 
avoid duplicated code in the three spots where we need this information.
* page/FrameView.cpp:
(WebCore::FrameView::yPositionForHeaderLayer):
(WebCore::FrameView::yPositionForRootContentLayer):
(WebCore::FrameView::yPositionForFooterLayer):
* page/FrameView.h:

Use the static functions to compute the layer positions.
* page/scrolling/AsyncScrollingCoordinator.cpp:
(WebCore::AsyncScrollingCoordinator::updateScrollPositionAfterAsyncScroll):

How did headers ever work with this bug?? I don’t know. We need to return that 
layer.
* page/scrolling/ScrollingCoordinator.cpp:
(WebCore::ScrollingCoordinator::headerLayerForFrameView):

Use the static functions to compute the layer positions.
* page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:
(WebCore::ScrollingTreeScrollingNodeMac::setScrollLayerPosition):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::updateRootLayerPosition):
(WebCore::RenderLayerCompositor::updateLayerForHeader):
(WebCore::RenderLayerCompositor::updateLayerForFooter):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@168602 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add a WKContextConfigurationRef object and make the injected bundle path part of the configuration
https://bugs.webkit.org/show_bug.cgi?id=132806

Source/WebKit2:
<rdar://problem/16830143>

Reviewed by Beth Dakin.

Many setters on WKContextRef really only make sense to set early on, so move to a pattern where we create a
configuration object, a WKContextConfiguration which WKContexts can be created from. Add the injected bundle path
as a configuration property. More setters will follow.

* Shared/API/c/WKBase.h:
Add WKContextConfigurationRef.

* Shared/APIObject.h:
Add ContextConfiguration enum declaration.

* UIProcess/API/C/WKAPICast.h:
Handle WKContextConfigurationRef.

* UIProcess/API/C/WKContext.cpp:
(WKContextCreate):
Create an empty WKContextConfigurationRef object and pass it to WKContextCreateWithConfiguration.

(WKContextCreateWithInjectedBundlePath):
Create a WKContextConfigurationRef object, set its bundle path and pass the configuration to WKContextCreateWithConfiguration.

(WKContextCreateWithConfiguration):
Convert the WKContextConfigurationRef object to a WebContextConfiguration and pass it to WebContext::create.

* UIProcess/API/C/WKContext.h:
Add WKContextCreateWithConfiguration.

* UIProcess/API/C/WKContextConfigurationRef.cpp: Added.
(WKContextConfigurationCreate):
Create an API::ContextConfiguration object.

(WKContextConfigurationCopyInjectedBundlePath):
Return the injected bundle path.

(WKContextConfigurationSetInjectedBundlePath):
Set the injected bundle path.

* UIProcess/API/C/WKContextConfigurationRef.h: Added.
New C SPI header.

* UIProcess/API/Cocoa/WKProcessGroup.mm:
(-[WKProcessGroup initWithInjectedBundleURL:]):
Construct a WebContextConfiguration object and pass it to WebContext::Create.

* UIProcess/API/Cocoa/WKProcessPool.mm:
(-[WKProcessPool _initWithConfiguration:]):
Construct a WebContextConfiguration object and pass it to WebContext::Create.

* UIProcess/APIContextConfiguration.cpp: Added.
New API::ContextConfiguration object.

(API::ContextConfiguration::webContextConfiguration):
Construct a WebContextConfiguration struct from our current configuration.

* UIProcess/APIContextConfiguration.h: Added.

* UIProcess/WebContext.cpp:
(WebKit::WebContext::create):
Pass the WebContextConfiguration to the constructor.

(WebKit::WebContext::WebContext):
Set the injected bundle path from the WebContextConfiguration object.

* UIProcess/WebContext.h:
Change the WebContext constructor and create function to take a WebContextConfiguration object.

* WebKit2.xcodeproj/project.pbxproj:
Add new files.

Tools:

Reviewed by Beth Dakin.

Migrate to WKContextConfiguration.

* WebKitTestRunner/TestController.cpp:
(WTR::TestController::initialize):

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