Only add wordspacing when kerning to actual word ends
https://bugs.webkit.org/show_bug.cgi?id=112507
<rdar://problem/12945869>

Reviewed by Enrica Casucci.

Source/WebCore:

When measuring text, we currently include any word spacing in
the result (it's removed later). When kerning is active, we
were adding the word spacing to every wordMeasurement instance
whether or not it is a separate word. For example, a nested
<span> element would get a wordMeasurement, even though it
should not always get word spacing.

Test: fast/text/word-space-with-kerning-3.html

* rendering/RenderBlockLineLayout.cpp:
(WebCore::setLogicalWidthForTextRun): Test if the current character
referenced by the wordMeasurement is a space character, and add word
spacing only then.

LayoutTests:

* fast/text/word-space-with-kerning-3-expected.html: Added.
* fast/text/word-space-with-kerning-3.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146087 268f45cc-cd09-0410-ab3c-d52691b4dbfc
NetworkProcess should send vm_copied, mmap'ed memory to WebProcesses when a
resource is already in the disk cache.
<rdar://problem/13414153> and https://bugs.webkit.org/show_bug.cgi?id=112387

Reviewed by Geoff Garen.

Source/WebCore:

No new tests (No change in behavior).

* WebCore.exp.in:

Add a CFURLRequestRef accessor even in the mac NSURL-based loader:
* platform/network/cf/ResourceRequest.h:
* platform/network/mac/ResourceRequestMac.mm:
(WebCore::ResourceRequest::cfURLRequest):

Source/WebKit2:

* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::sendAbortingOnFailure):
(WebKit::NetworkResourceLoader::didReceiveResponse): After notifying about the response,
  call platformDidReceiveResponse.
* NetworkProcess/NetworkResourceLoader.h:

* NetworkProcess/mac/NetworkResourceLoaderMac.mm: Added.
(WebKit::NetworkResourceLoader::platformDidReceiveResponse): Attempt to pull a filesystem
  mmap'ed buffer from the CFNetwork cache and - if it exists - abort the traditional load
  and send that to the WebProcess instead.
(WebKit::NetworkResourceLoader:: fileBackedResourceMinimumSize): For now, use the VM page size.

* NetworkProcess/mac/NetworkProcessMac.mm:
(WebKit::NetworkProcess::platformInitializeNetworkProcess): Set the threshold for what
  should be backed by a file on disk instead of stored in the database.

Change SharedMemory to do a vm_copy if a previously existing buffer is being passed in:
* Platform/SharedMemory.h:
* Platform/mac/SharedMemoryMac.cpp:
(WebKit::SharedMemory::create):
(WebKit::SharedMemory::createWithVMCopy):

* WebProcess/Network/WebResourceLoader.cpp:
(WebKit::shareableResourceDeallocate):
(WebKit::createShareableResourceDeallocator):
(WebKit::WebResourceLoader::didReceiveResource): Create a special CFDataRef whose buffer is
  backed by a ShareableResource to send to the ResourceLoader in one chunk.

* Shared/ShareableResource.h: Fix some comments.

* WebKit2.xcodeproj/project.pbxproj:

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