Use the XPC service by default on newer systems
https://bugs.webkit.org/show_bug.cgi?id=98297
<rdar://problem/12424641>

Reviewed by Sam Weinig.

* UIProcess/mac/WebProcessProxyMac.mm:
(WebKit::shouldUseXPC):
Return false for older systems.

(WebKit::WebProcessProxy::platformConnect):
Call shouldUseXPC().

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130318 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Font data is purged while fonts are still using it
https://bugs.webkit.org/show_bug.cgi?id=93640

Reviewed by Eric Seidel.

Source/WebCore: 

Move the handling of custom font pruning from Document to FontFallbackList.
The previous inplementation allowed fonts to be removed before all their
clients were done. This change moves handling of custom font purging to the
FontFallbackList class, which is the shared object that is only removed
when all clients of a font are done with it. This fixes a crash in Angry
Birds due to a seamless iframe and some failing tests in fast/frames/seamless.

The specific element that causes problems is:
<iframe id="ingame_frame0" name="ingame_frame0" frameborder="0" seamless="true"
  src="http://chrome.angrybirds.com/ingame_graphic.html"
  onload="this.style.opacity = 1; parent.adLoaded();" scrolling="no"
  style="opacity: 1; -webkit-transition: opacity 1s ease-in-out 0s;
  position: absolute; border: 0px; width: 312px; height: 320px; z-index:
  300; overflow: hidden; visibility: visible;"></iframe>
The source document uses the same font as the embedding document.

Tests: fast/frames/seamless/seamless-custom-font-pruning-crash.html
       fast/frames/seamless/seamless-nested-crash.html

* css/CSSFontFaceSource.cpp:
(WebCore::CSSFontFaceSource::getFontData): Remove code to register the font with the document.
* css/CSSSegmentedFontFace.cpp:
(WebCore::CSSSegmentedFontFace::getFontData): Remove code to register the font with the document.
* dom/Document.cpp:
(WebCore::Document::~Document): Remove code that records and purges custom fonts.
(WebCore):
(WebCore::Document::reportMemoryUsage): Remove reference to non-existent objects.
* dom/Document.h:
(WebCore):
(Document): Remove method declarations for custom font handling.
* platform/graphics/FontFallbackList.h:
(FontFallbackList): Moved some code around and made non-copyable.
(WebCore::FontFallbackList::setGlyphPageZero): Moved.
(WebCore::FontFallbackList::setGlyphPages): Moved.
* platform/graphics/GlyphPageTreeNode.cpp:
(WebCore::GlyphPageTreeNode::pruneFontData): Removed unnecessary null check.
* platform/graphics/SegmentedFontData.cpp:
(WebCore::SegmentedFontData::~SegmentedFontData): Added code to prune the Glyph pages when this is deleted.
* platform/graphics/SimpleFontData.cpp:
(WebCore::SimpleFontData::~SimpleFontData): Added code to prune the Glyph pages when this is deleted.

LayoutTests: 

Tests for font purging. The seamless-custom-font-pruning-crash test
was only failing in Chromium Asan, while the seamless-nested-crash
case was only failing in Asan DumpRenderTree.

* fast/frames/seamless/seamless-custom-font-pruning-crash-expected.txt: Added.
* fast/frames/seamless/seamless-custom-font-pruning-crash.html: Added.
* fast/frames/seamless/seamless-nested-crash-expected.txt: Added.
* fast/frames/seamless/seamless-nested-crash.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130319 268f45cc-cd09-0410-ab3c-d52691b4dbfc
.: [BlackBerry] Implementing the NetworkInfo API for BB port
https://bugs.webkit.org/show_bug.cgi?id=98273

Patch by Otto Derek Cheung <otcheung@rim.com> on 2012-10-03
Reviewed by Rob Buis.

Adding references to new classes added to support BlackBerry's
NetworkInfo implementation.

* Source/cmake/OptionsBlackBerry.cmake:

Source/WebKit: [BlackBerry] Implementing the NetworkInfo API for BB port
https://bugs.webkit.org/show_bug.cgi?id=98273

Patch by Otto Derek Cheung <otcheung@rim.com> on 2012-10-03
Reviewed by Rob Buis.

Adding new classes to support NetworkInfo API in the
BlackBerry Port.

* PlatformBlackBerry.cmake:

Source/WebKit/blackberry: [BlackBerry] Implementing the NetworkInfo API for BB port
https://bugs.webkit.org/show_bug.cgi?id=98273

Patch by Otto Derek Cheung <otcheung@rim.com> on 2012-10-03
Reviewed by Rob Buis.

Adding new class NetworkInfoClientBlackBerry to implement
NetworkInfoClient for the BlackBerry port.

* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPagePrivate::init):
* WebCoreSupport/NetworkInfoClientBlackBerry.cpp: Added.
(WebCore):
(WebCore::NetworkInfoClientBlackBerry::NetworkInfoClientBlackBerry):
(WebCore::NetworkInfoClientBlackBerry::startUpdating):
(WebCore::NetworkInfoClientBlackBerry::stopUpdating):
(WebCore::NetworkInfoClientBlackBerry::bandwidth):
(WebCore::NetworkInfoClientBlackBerry::metered):
(WebCore::NetworkInfoClientBlackBerry::onCurrentNetworkChange):
(WebCore::NetworkInfoClientBlackBerry::onCurrentCellularTypeChange):
* WebCoreSupport/NetworkInfoClientBlackBerry.h: Added.
(WebKit):
(WebCore):
(NetworkInfoClientBlackBerry):
(WebCore::NetworkInfoClientBlackBerry::~NetworkInfoClientBlackBerry):

Tools: [BlackBerry] Implementing the NetworkInfo API for BB port
https://bugs.webkit.org/show_bug.cgi?id=98273

Patch by Otto Derek Cheung <otcheung@rim.com> on 2012-10-03
Reviewed by Rob Buis.

Enabling NetworkInfo API for the BlackBerry port.

* Scripts/webkitperl/FeatureList.pm:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130320 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] Expose settings value to conditionally enable pinch-zoom scaling in the Chromium compositor.  The
flag defaults to disabled, so this change should be a no-op for scaling/scrolling behaviour.
https://bugs.webkit.org/show_bug.cgi?id=93292

Patch by Jeff Timanus <twiz@chromium.org> on 2012-10-03
Reviewed by James Robinson.

Source/Platform:

* chromium/public/WebCompositor.h:
(WebCompositor):
* chromium/public/WebCompositorSupport.h:
(WebKit::WebCompositorSupport::setPageScalePinchZoomEnabled):

Source/WebCore:

Tests:  Existing page-scale layout tests.

* page/Frame.cpp:
(WebCore::Frame::frameScaleFactor):
* page/Settings.cpp:
(WebCore::Settings::Settings):
* page/Settings.h:
(WebCore::Settings::setApplyPageScaleFactorInCompositor):
(WebCore::Settings::applyPageScaleFactorInCompositor):
(Settings):

Source/WebKit/chromium:

* public/WebSettings.h:
* src/NonCompositedContentHost.cpp:
(WebKit::NonCompositedContentHost::NonCompositedContentHost):
* src/WebSettingsImpl.cpp:
(WebKit::WebSettingsImpl::setApplyPageScaleFactorInCompositor):
(WebKit):
(WebKit::WebSettingsImpl::applyPageScaleFactorInCompositor):
* src/WebSettingsImpl.h:
(WebSettingsImpl):
* src/WebViewImpl.cpp:
(WebKit::WebViewImpl::setPageScaleFactor):
(WebKit::WebViewImpl::applyScrollAndScale):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130321 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Sub-pixel layout] incorrect rendering when painting sub-layers as their own root
https://bugs.webkit.org/show_bug.cgi?id=97484

Reviewed by Eric Seidel.

When in compositing mode, layer painting can be triggered through the backing store. When this
happens, a non-top-level RenderLayer is called to paint as its own root. Normally, we attempt to preserve
the proper sub-pixel accumulation through layers to their children, but since we're not
starting with the top-level layer, we haven't properly accumulated one, and convertToLayerCoords,
another source of correctly getting the sub-pixel offset for a layer, also avoids crawling
past the listed root layer.

When painting a root layer, we're aligned to the surface we're painting to, so we round our
offset to avoid moving objects around.

* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::paintLayerContents):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130322 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION(r130160): It made 3 tests crash
https://bugs.webkit.org/show_bug.cgi?id=98158

Unreviewed testExpectations update.

* platform/qt/TestExpectations: Removed expectations from tests that were crashing due to this bug.


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