Source/WebCore: [Windows] Prevent dangling CACFLayer when switching to/from Tiled backing.
https://bugs.webkit.org/show_bug.cgi?id=119818

Reviewed by Darin Adler.

Covered by existing: compositing/tiling/empty-to-tiled.html

* platform/graphics/ca/win/PlatformCALayerWin.cpp:
(PlatformCALayer::~PlatformCALayer): Remove deleted layer from its
parent layer 

LayoutTests: [Windows] Enable previously-failing compositing/tiling/empty-to-tiled.html
https://bugs.webkit.org/show_bug.cgi?id=119818

Reviewed by Darin Adler.

* platform/win/TestExpectations: Re-enable empty-to-tiled.html


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154180 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Windows] Unreviewed build correction after r154165.

* WebCore.vcxproj/copyForwardingHeaders.cmd: Copy html/shadow header files
to WebKit include location.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154181 268f45cc-cd09-0410-ab3c-d52691b4dbfc
<https://webkit.org/b/119889> [WinCairo] Compile error.

Patch by peavo@outlook.com <peavo@outlook.com> on 2013-08-16
Reviewed by Brent Fulgham.

* platform/network/curl/ResourceHandleManager.cpp:
(WebCore::certificatePath): Use correct function name.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154182 268f45cc-cd09-0410-ab3c-d52691b4dbfc
(NetworkProcess)  Sync XHRs should load using async ResourceHandles, not ResourceHandle::loadResourceSynchronously
https://bugs.webkit.org/show_bug.cgi?id=119493

Reviewed by Alexey Proskuryakov.

Source/WebCore:

No new tests (Covered by plenty of existing tests).

* WebCore.exp.in:
* WebCore.xcodeproj/project.pbxproj:

* platform/network/SynchronousLoaderClient.h: Make platformBadResponseError public

* platform/network/mac/ResourceHandleMac.mm:
(WebCore::ResourceHandle::platformLoadResourceSynchronously): Add comments/FIXMEs spelling out how wrong this code is.

Source/WebKit2:

This patch does the following:
  - Consolidates SchedulableLoader and NetworkResourceLoader into one class.
  - Removes SyncNetworkResourceLoader.
  - Adds a NetworkLoaderClient interface that customizes certain behaviors of the NetworkResourceLoader.
  - Implements a SynchronousNetworkLoaderClient and AsynchronousNetworkLoaderClient for the two different types of loads.

The AsynchronousNetworkLoaderClient results in messaging back progress to the WebProcess as the load progresses.
The SynchronousNetworkLoaderClient accumulates the response, data, and error to be communicated back to the WebProcess
only when the load is complete.

Update small swaths of code to reflect that NetworkResourceLoader is the One True Loader (tm):
* NetworkProcess/HostRecord.cpp:
(WebKit::HostRecord::scheduleResourceLoader):
(WebKit::HostRecord::addLoaderInProgress):
(WebKit::removeLoaderFromQueue):
(WebKit::HostRecord::removeLoader):
(WebKit::HostRecord::servePendingRequestsForQueue):
(WebKit::HostRecord::limitsRequests):
* NetworkProcess/HostRecord.h:

* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::didClose):
(WebKit::NetworkConnectionToWebProcess::performSynchronousLoad):
(WebKit::NetworkConnectionToWebProcess::removeLoadIdentifier):
* NetworkProcess/NetworkConnectionToWebProcess.h:

* NetworkProcess/NetworkProcess.cpp:
* NetworkProcess/NetworkResourceLoadScheduler.cpp:
(WebKit::NetworkResourceLoadScheduler::scheduleLoader):
(WebKit::NetworkResourceLoadScheduler::removeLoader):
(WebKit::NetworkResourceLoadScheduler::receivedRedirect):
(WebKit::NetworkResourceLoadScheduler::removeScheduledLoaders):
(WebKit::NetworkResourceLoadScheduler::scheduleRemoveLoader):
* NetworkProcess/NetworkResourceLoadScheduler.h:

Combine ScheduleableLoader and NetworkResourceLoader into NetworkResourceLoader:
* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::NetworkResourceLoader):
(WebKit::NetworkResourceLoader::~NetworkResourceLoader):
(WebKit::NetworkResourceLoader::isSynchronous):
(WebKit::NetworkResourceLoader::start):
(WebKit::NetworkResourceLoader::didReceiveResponseAsync):
(WebKit::NetworkResourceLoader::didReceiveBuffer):
(WebKit::NetworkResourceLoader::didFinishLoading):
(WebKit::NetworkResourceLoader::didFail):
(WebKit::NetworkResourceLoader::willSendRequestAsync):
(WebKit::NetworkResourceLoader::continueWillSendRequest):
(WebKit::NetworkResourceLoader::didSendData):
(WebKit::NetworkResourceLoader::shouldUseCredentialStorage):
(WebKit::NetworkResourceLoader::didReceiveAuthenticationChallenge):
(WebKit::NetworkResourceLoader::consumeSandboxExtensions):
(WebKit::NetworkResourceLoader::invalidateSandboxExtensions):
(WebKit::NetworkResourceLoader::canAuthenticateAgainstProtectionSpaceAsync):
* NetworkProcess/NetworkResourceLoader.h:
(WebKit::NetworkResourceLoader::create):
(WebKit::NetworkResourceLoader::connectionToWebProcess):
(WebKit::NetworkResourceLoader::priority):
(WebKit::NetworkResourceLoader::request):
(WebKit::NetworkResourceLoader::isLoadingMainResource):
(WebKit::NetworkResourceLoader::setHostRecord):
(WebKit::NetworkResourceLoader::hostRecord):
(WebKit::NetworkResourceLoader::sendAbortingOnFailure):

Add an abstract NetworkLoaderClient to adapt a load to be either synchronous or asynchronous:
* NetworkProcess/NetworkLoaderClient.h:
(WebKit::NetworkLoaderClient::~NetworkLoaderClient):
(WebKit::NetworkLoaderClient::isSynchronous):
(WebKit::NetworkLoaderClient::NetworkLoaderClient):

The asynchronous loader client, primarily to message progress back to the WebProcess as it happens:
* NetworkProcess/AsynchronousNetworkLoaderClient.cpp: Added.
(WebKit::AsynchronousNetworkLoaderClient::AsynchronousNetworkLoaderClient):
(WebKit::AsynchronousNetworkLoaderClient::willSendRequest):
(WebKit::AsynchronousNetworkLoaderClient::canAuthenticateAgainstProtectionSpace):
(WebKit::AsynchronousNetworkLoaderClient::didReceiveResponse):
(WebKit::AsynchronousNetworkLoaderClient::didReceiveBuffer):
(WebKit::AsynchronousNetworkLoaderClient::didSendData):
(WebKit::AsynchronousNetworkLoaderClient::didFinishLoading):
(WebKit::AsynchronousNetworkLoaderClient::didFail):
* NetworkProcess/AsynchronousNetworkLoaderClient.h:
(WebKit::AsynchronousNetworkLoaderClient::create):

The synchronous loader client, primarily to accumulate results of the load to send back to the WebProcess all at once:
* NetworkProcess/SynchronousNetworkLoaderClient.cpp: Added.
(WebKit::SynchronousNetworkLoaderClient::SynchronousNetworkLoaderClient):
(WebKit::SynchronousNetworkLoaderClient::~SynchronousNetworkLoaderClient):
(WebKit::SynchronousNetworkLoaderClient::willSendRequest):
(WebKit::SynchronousNetworkLoaderClient::canAuthenticateAgainstProtectionSpace):
(WebKit::SynchronousNetworkLoaderClient::didReceiveResponse):
(WebKit::SynchronousNetworkLoaderClient::didReceiveBuffer):
(WebKit::SynchronousNetworkLoaderClient::didFinishLoading):
(WebKit::SynchronousNetworkLoaderClient::didFail):
(WebKit::SynchronousNetworkLoaderClient::sendDelayedReply):
* NetworkProcess/SynchronousNetworkLoaderClient.h: Added.
(WebKit::SynchronousNetworkLoaderClient::create):

* NetworkProcess/SchedulableLoader.cpp: Removed.
* NetworkProcess/SchedulableLoader.h: Removed.
* NetworkProcess/SyncNetworkResourceLoader.cpp: Removed.
* NetworkProcess/SyncNetworkResourceLoader.h: Removed.

* WebKit2.xcodeproj/project.pbxproj:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154183 268f45cc-cd09-0410-ab3c-d52691b4dbfc
<https://webkit.org/b/119893> FrameView::frame() should return a reference.

Reviewed by Antti Koivisto.

FrameView::m_frame was only ever null for a brief moment during CachedFrame teardown.
Leave it alone instead, and update the assertion that depended on this behavior.
This enables us to make FrameView::frame() return a Frame&, exposing a ton of
unnecessary null checks.

* history/CachedFrame.cpp:
(WebCore::CachedFrame::destroy):

    Remove call to FrameView::clearFrame() that was the only way to get a null
    FrameView::m_frame. Immediately followed by a call to CachedFrame::clear() where
    the FrameView would get destroyed anyway.

(WebCore::CachedFrame::clear):

    Update an assertion to support the case where the Document's Frame pointer has
    been cleared out and CachedFrame is still clinging to the FrameView.

* history/CachedPage.h:

    Made CachedPage::destroy() private as it was only called by ~CachedPage().

* /:

    Frame* FrameView::frame() => Frame& FrameView::frame()

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154184 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Windows] Unreviewed gardening. Turn on a now-passing test.

* platform/win/TestExpectations: Reactivate fast/text/split-text-crash.xhtml



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154185 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] Kerning in fast font path breaks letter-spacing
https://bugs.webkit.org/show_bug.cgi?id=119838

Reviewed by Jocelyn Turcotte.

Source/WebCore:

Mark fonts with both kerning and letter-spacing as unsupported by the simple font-path.

Test: fast/text/letter-spacing-kerned.html

* platform/graphics/WidthIterator.h:
(WebCore::WidthIterator::supportsTypesettingFeatures):

LayoutTests:

Test that kerning does not break letter spacing.

* fast/text/letter-spacing-kerned-expected.html: Added.
* fast/text/letter-spacing-kerned.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154186 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Windows build juice.

* WebView.cpp:
(WebView::paintIntoBackingStore):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154187 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Attempt to fix the Qt/MountainLion build after r154142.

* platform/graphics/qt/MediaPlayerPrivateQt.cpp:
(WebCore::MediaPlayerPrivateQt::commitLoad):

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