WebKit-https.git
7 years ago[GStreamer] create playbin in ::load(), not in player constructor
commit-queue@webkit.org [Sun, 16 Dec 2012 15:41:47 +0000 (15:41 +0000)]
[GStreamer] create playbin in ::load(), not in player constructor
https://bugs.webkit.org/show_bug.cgi?id=103898

Patch by Víctor Manuel Jáquez Leal <vjaquez@igalia.com> on 2012-12-16
Reviewed by Philippe Normand.

This patch moves the instantiation of the playbin pipeline into the
WebCore::MediaPlayerPrivateGStreamer::load() method, so the pipeline
layout can reflect other predefined settings such as audio pitch
preservation in variable playback rate scenarios

No new tests. Covered by existing tests.

* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer):
(WebCore::MediaPlayerPrivateGStreamer::load):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
(MediaPlayerPrivateGStreamer):

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

7 years agoUnreviewed rebaseline.
christophe.dumez@intel.com [Sun, 16 Dec 2012 14:53:04 +0000 (14:53 +0000)]
Unreviewed rebaseline.

Rebaseline several compositing tests after r137798.

* compositing/iframes/overlapped-nested-iframes-expected.txt:
* compositing/rtl/rtl-fixed-overflow-scrolled-expected.txt:
* compositing/rtl/rtl-iframe-absolute-expected.txt:
* compositing/rtl/rtl-iframe-fixed-expected.txt:
* compositing/rtl/rtl-iframe-relative-expected.txt:
* compositing/tiling/crash-reparent-tiled-layer-expected.txt:
* compositing/tiling/huge-layer-add-remove-child-expected.txt:
* compositing/tiling/huge-layer-with-layer-children-expected.txt:
* compositing/tiling/huge-layer-with-layer-children-resize-expected.txt:

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

7 years ago[CSSRegions] Pseudo-elements should not be directly collected into a named flow
mihnea@adobe.com [Sun, 16 Dec 2012 11:00:05 +0000 (11:00 +0000)]
[CSSRegions] Pseudo-elements should not be directly collected into a named flow
https://bugs.webkit.org/show_bug.cgi?id=105046

Reviewed by Abhishek Arya.

Source/WebCore:

Prevent pseudo-elements to be collected into a named-flow by bailing out early in the collecting stage.
Following the CSSRegions spec, http://dev.w3.org/csswg/css3-regions/#flow-into, the pseudo-elements
like ::before/::after/::first-letter/::first-line are not allowed to become content nodes, being directly
collected into a flow thread.

Tests: fast/regions/pseudo-after-content-node.html
       fast/regions/pseudo-before-content-node.html
       fast/regions/pseudo-first-letter-content-node.html
       fast/regions/pseudo-first-line-content-node.html

* dom/NodeRenderingContext.cpp:
(WebCore::NodeRenderingContext::moveToFlowThreadIfNeeded):

LayoutTests:

Prevent pseudo-elements to be collected into a named-flow by bailing out early in the collecting stage.

Following the CSSRegions spec, http://dev.w3.org/csswg/css3-regions/#flow-into, the pseudo-elements
like ::before/::after/::first-letter/::first-line are not allowed to become content nodes, being directly
collected into a flow thread.

* fast/regions/pseudo-after-content-node-expected.txt: Added.
* fast/regions/pseudo-after-content-node.html: Added.
* fast/regions/pseudo-before-content-node-expected.txt: Added.
* fast/regions/pseudo-before-content-node.html: Added.
* fast/regions/pseudo-first-letter-content-node-expected.txt: Added.
* fast/regions/pseudo-first-letter-content-node.html: Added.
* fast/regions/pseudo-first-line-content-node-expected.txt: Added.
* fast/regions/pseudo-first-line-content-node.html: Added.

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

7 years agoSource/WebCore: [CSS Regions] broken feature detection: body.webkitRegionOverset...
commit-queue@webkit.org [Sun, 16 Dec 2012 10:01:09 +0000 (10:01 +0000)]
Source/WebCore: [CSS Regions] broken feature detection: body.webkitRegionOverset and body.webkitGetRegionFlowRanges shouldn't succeed when disabled at runtime
https://bugs.webkit.org/show_bug.cgi?id=99707

Patch by Mihai Maerean <mmaerean@adobe.com> on 2012-12-16
Reviewed by Hajime Morita.

The bug is that the CSS Regions feature leaks information at run-time. There are JS properties that exist even
if the feature is disabled at run-time (document.webkitGetNamedFlows, document.body.webkitRegionOverset,
document.body.webkitGetRegionFlowRanges and window.WebKitCSSRegionRule).

The fix is to add V8EnabledAtRuntime=cssRegions in the IDL files to the properties that leak information and to
the interfaces that are the type of those properties.

Test: fast/regions/region-leak-js-information-when-disabled-at-runtime.html

* css/WebKitCSSRegionRule.idl:
    added V8EnabledAtRuntime=cssRegions for the WebKitCSSRegionRule interface.
* dom/DOMNamedFlowCollection.idl:
    added V8EnabledAtRuntime=cssRegions for the DOMNamedFlowCollection interface.
* dom/Document.idl:
    added V8EnabledAtRuntime=cssRegions for the webkitGetNamedFlows method.
* dom/Element.idl:
    added V8EnabledAtRuntime=cssRegions for the webkitRegionOverset attribute.
    added V8EnabledAtRuntime=cssRegions for the webkitGetRegionFlowRanges method.
* page/DOMWindow.idl:
    added V8EnabledAtRuntime=cssRegions for the WebKitCSSRegionRule attribute.

LayoutTests: [CSS Regions] broken feature detection: body.webkitRegionOverset and body.webkitGetRegionFlowRanges shouldn't succeed when disabled at runtime.
https://bugs.webkit.org/show_bug.cgi?id=99707

Patch by Mihai Maerean <mmaerean@adobe.com> on 2012-12-16
Reviewed by Hajime Morita.

The bug is that the CSS Regions feature leaks information at run-time. There are JS properties that exist even
if the feature is disabled at run-time (document.webkitGetNamedFlows, document.body.webkitRegionOverset,
document.body.webkitGetRegionFlowRanges and window.WebKitCSSRegionRule).
The best LayoutTest would test that the properties exist when the feature is enabled and that the properties
just aren't there when the feature is disabled.
But, since during running Layout Tests the feature is enabled by default and switching the
RuntimeEnabledFeatures requires the process to be restarted and that is currently not possible, we can only test
that the properties exist and have the proper type.

* fast/regions/region-leak-js-information-when-disabled-at-runtime-expected.txt: Added.
* fast/regions/region-leak-js-information-when-disabled-at-runtime.html: Added.

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

7 years ago[chromium] More expectations updates for composited scrolling.
vollick@chromium.org [Sun, 16 Dec 2012 04:41:09 +0000 (04:41 +0000)]
[chromium] More expectations updates for composited scrolling.

Unreviewed change. Updating expectations.

Added expectations for a remaining test that needs a new baseline.

* platform/chromium/TestExpectations:

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

7 years ago[chromium] More expectations updates for composited scrolling.
vollick@chromium.org [Sun, 16 Dec 2012 04:03:50 +0000 (04:03 +0000)]
[chromium] More expectations updates for composited scrolling.

Unreviewed change. Updating expectations.

Some of the Failures noted in the last change were actually
ImageOnlyFailures, and some tests are now passing - these are
corrected in this patch.

* platform/chromium/TestExpectations:

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

7 years agoAnother build fix.
andersca@apple.com [Sun, 16 Dec 2012 03:11:05 +0000 (03:11 +0000)]
Another build fix.

* UIProcess/WebContext.cpp:
(WebKit::WebContext::createDownloadProxy):

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

7 years ago[WebKit2] Have CustomProtocolManager and CustomProtocolManagerProxy store Connections...
aestes@apple.com [Sun, 16 Dec 2012 02:54:54 +0000 (02:54 +0000)]
[WebKit2] Have CustomProtocolManager and CustomProtocolManagerProxy store Connections for messaging
https://bugs.webkit.org/show_bug.cgi?id=105124

Reviewed by Anders Carlsson.

Remove CustomProtocolManagerProxy's assumption that all messages go to
a web process. Have it take a ChildProcessProxy instead and extract its
connection.

Similarly, remove CustomProtocolManager's assumption that all messages
go through a shared WebProcess. Initialize the shared CustomProtocolManager
with a Connection object instead.

* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::initializeNetworkProcess): Initialize the
shared CustomProtocolManager with the NetworkProcess's connection to
the UI process.
* Shared/Network/CustomProtocols/CustomProtocolManager.h:
(WebKit::CustomProtocolManager::connection): Assert m_connection is
non-0 and return it.
* Shared/Network/CustomProtocols/mac/CustomProtocolManagerMac.mm:
(+[WKCustomProtocol canInitWithRequest:]): Remove an unnecessary
namespace.
(-[WKCustomProtocol initWithRequest:cachedResponse:client:]): Ditto.
(-[WKCustomProtocol startLoading]): Send a message on the
CustomProtocolManager's connection rather than assuming there is a
shared WebProcess in our address space.
(-[WKCustomProtocol stopLoading]): Ditto.
(WebKit::CustomProtocolManager::initialize): Initialize the shared
CustomProtocolManager with a Connection and register our custom
protocol handler with NSURLProtocol.
* UIProcess/Network/CustomProtocols/CustomProtocolManagerProxy.h:
(WebKit):
(CustomProtocolManagerProxy): Take a ChildProcessProxy* rather than a
WebProcessProxy*.
* UIProcess/Network/CustomProtocols/mac/CustomProtocolManagerProxyMac.mm:
(WebKit::CustomProtocolManagerProxy::CustomProtocolManagerProxy): Ditto.
(WebKit::CustomProtocolManagerProxy::startLoading): Ditto.
* UIProcess/Network/NetworkProcessProxy.cpp:
(WebKit::NetworkProcessProxy::NetworkProcessProxy): Instantiate a
CustomProtocolManagerProxy for the network process.
(WebKit::NetworkProcessProxy::didReceiveMessage): Route messages of
class MessageClassCustomProtocolManagerProxy to the
CustomProtocolManagerProxy.
* UIProcess/Network/NetworkProcessProxy.h:
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::didReceiveMessage): Assert that we aren't
using the network process since we've received a message from a
web process's CustomProtocolManager.
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::initializeWebProcess): Break CustomProtocolManager
initialization out into a helper function.
(WebKit::WebProcess::initializeCustomProtocolManager): Initialize our
CustomProtocolManager.
* WebProcess/WebProcess.h:

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

7 years agoHappy little Qt build fix.
andersca@apple.com [Sun, 16 Dec 2012 02:47:55 +0000 (02:47 +0000)]
Happy little Qt build fix.

* UIProcess/WebContext.cpp:
(WebKit::WebContext::download):

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

7 years ago[chromium] Update test expectations now that we're opting into composited scrolling
vollick@chromium.org [Sun, 16 Dec 2012 02:41:39 +0000 (02:41 +0000)]
[chromium] Update test expectations now that we're opting into composited scrolling
https://bugs.webkit.org/show_bug.cgi?id=105123

Unreviewed change. Updating expectations.

Added expectations for tests that need updated baselines now that
we're opting into composited scrolling.

* platform/chromium/TestExpectations:

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

7 years agoSource/WebCore: [chromium] Automatically use composited scrolling
vollick@chromium.org [Sun, 16 Dec 2012 02:07:57 +0000 (02:07 +0000)]
Source/WebCore: [chromium] Automatically use composited scrolling
https://bugs.webkit.org/show_bug.cgi?id=94743

Reviewed by Adrienne Walker.

We currently use the composited scrolling facilities provided by
wkb.ug/91117 if the overflow scroll block element is styled with
-webkit-overflow-scrolling: touch. Ideally, we could automatically
opt into composited scrolling if it is safe to do so. This can affect
antialiasing, so it is important that automatically opting in is only
enabled via a setting.

The way I determine if it is safe is by checking that z-ordering will
not be affected if the overflow scrollable element were promoted to a
stacking context (details below), and that clipping our scrolling
descendants will not affect rendering.

To check the first condition (that z-ordering will not be affected).
I ensure that the candidate element and all its descendants appear as a
contiguous block in the candidate's stacking context. That is, if no
other elements are 'between' any of the candidates descendants when we
sort in paint order, then we're safe. This is overly conservative,
however. We could, in future, only consider stacking problems between
elements that actually overlap.

To ensure that clipping will not cause a rendering change, I ensure
that the layer has no out of flow positioned descendant whose
containing block is not also a descendant of ours.

Test: compositing/overflow/automatically-opt-into-compositing-scrolling.html

(WebCore):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::RenderLayer):
(WebCore::RenderLayer::acceleratedCompositingForOverflowScrollEnabled):
(WebCore):
(WebCore::RenderLayer::updateDescendantsAreContiguousInStackingOrder):
(WebCore::RenderLayer::updateDescendantsAreContiguousInStackingOrderRecursive):
(WebCore::RenderLayer::positionNewlyCreatedOverflowControls):
(WebCore::RenderLayer::canSafelyEstablishAStackingContext):
  Returns true if the RenderLayer could become a stacking context without
  affecting the stacking order.
(WebCore::RenderLayer::updateDescendantDependentFlags):
  We now need to keep track of out of flow positioned descendants.
(WebCore::RenderLayer::addChild):
(WebCore::RenderLayer::removeChild):
(WebCore::RenderLayer::usesCompositedScrolling):
  Returns true if the layer actually is using composited scrolling.
  This function may return false, even when needsCompositedScrolling
  returns true.
(WebCore::RenderLayer::needsCompositedScrolling):
  This function returns true if we would like to use composited
  scrolling and it is safe to turn it on.
(WebCore::RenderLayer::updateNeedsCompositedScrolling):
(WebCore::RenderLayer::scrollTo):
(WebCore::RenderLayer::dirtyZOrderLists):
(WebCore::RenderLayer::dirtyNormalFlowList):
  Since these could affect opting into composited scrolling, we must
  request that the RenderLayerCompositor reevaluate compositing.
(WebCore::RenderLayer::updateLayerListsIfNeeded):
  We call updateCanSafelyEstablishStackingContext here, if necessary.
(WebCore::RenderLayer::shouldBeNormalFlowOnly):
(WebCore::RenderLayer::shouldBeSelfPaintingLayer):
  usesCompositedScrolling -> needsCompositedScrolling
(WebCore::RenderLayer::setAncestorChainHasOutOfFlowPositionedDescendant):
(WebCore::RenderLayer::dirtyAncestorChainHasOutOfFlowPositionedDescendantStatus):
(WebCore::RenderLayer::updateOutOfFlowPositioned):
  Dirties and sets the out of flow positioned descendant state.
(WebCore::RenderLayer::styleChanged):
* rendering/RenderLayer.h:
(RenderLayer):
(WebCore::RenderLayer::hasOutOfFlowPositionedDescendant):
* rendering/RenderLayerBacking.cpp:
(WebCore::layerOrAncestorIsTransformedOrUsingCompositedScrolling):
(WebCore::RenderLayerBacking::updateGraphicsLayerConfiguration):
(WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
(WebCore::RenderLayerBacking::hasUnpositionedOverflowControlsLayers):
(WebCore):
* rendering/RenderLayerBacking.h:
(RenderLayerBacking):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::rebuildCompositingLayerTree):
(WebCore::RenderLayerCompositor::requiresCompositingForOverflowScrolling):
* rendering/RenderLayerCompositor.h:
(WebCore::RenderLayerCompositor::setShouldReevaluateCompositingAfterLayout):
* testing/InternalSettings.cpp:
(WebCore::InternalSettings::setEnableCompositingForOverflowScroll):
  Allows enabling the setting in layout tests.
(WebCore):
* testing/InternalSettings.h:
(InternalSettings):
* testing/InternalSettings.idl:

LayoutTests: Automatically use composited scrolling
https://bugs.webkit.org/show_bug.cgi?id=94743

Reviewed by Adrienne Walker.

Tests various configurations of elements to ensure that we only automatically opt into
composited scrolling when it is safe to do so.

* compositing/overflow/automatically-opt-into-composited-scrolling-expected.txt: Added.
* compositing/overflow/automatically-opt-into-composited-scrolling.html: Added.
* platform/chromium/TestExpectations:
 The test platform/chromium/virtual/gpu/compositedscrolling/scrollbars/custom-scrollbar-with-incomplete-style.html
 is failing due to wkb.ug/103156

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

7 years agoUnreviewed. Fix make distcheck.
carlosgc@webkit.org [Sun, 16 Dec 2012 02:01:34 +0000 (02:01 +0000)]
Unreviewed. Fix make distcheck.

* bindings/gobject/GNUmakefile.am: Do not dist generated DOM
bindings headers.
* platform/ScrollAnimatorNone.cpp: Include PlatformGestureEvent.h
only if gesture events are enabled.

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

7 years ago Build fix.
ap@apple.com [Sun, 16 Dec 2012 01:49:38 +0000 (01:49 +0000)]
    Build fix.

        * platform/network/FormData.cpp:
        (WebCore::encodeElement):
        (WebCore::decodeElement):
        (WebCore::FormData::encode):
        (WebCore::FormData::decode):
        Disambiguated encode/decode functions. I'm not quite sure why the compiler was
        confused, but distinct names should make the code more readable anyway.

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

7 years ago <rdar://problem/12886312> Cannot upload patches to Bugzilla (<input type...
ap@apple.com [Sun, 16 Dec 2012 01:31:00 +0000 (01:31 +0000)]
    <rdar://problem/12886312> Cannot upload patches to Bugzilla (<input type=file> doesn't work)
        https://bugs.webkit.org/show_bug.cgi?id=105120

        Reviewed by Sam Weinig.

        Serialize HTTP body. ResourceRequest serialization cannot (and shouldn't) know about
        body streams, as used with files.

        * Shared/Network/NetworkResourceLoadParameters.cpp:
        (WebKit::NetworkResourceLoadParameters::encode):
        (WebKit::NetworkResourceLoadParameters::decode):
        * Shared/WebCoreArgumentCoders.cpp:
        (CoreIPC::::encode):

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

7 years agoHandle downloads in the network process
andersca@apple.com [Sun, 16 Dec 2012 01:26:05 +0000 (01:26 +0000)]
Handle downloads in the network process
https://bugs.webkit.org/show_bug.cgi?id=105117

Reviewed by Sam Weinig.

Start using the download manager in the network process.

* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::startDownload):
Call through to the download manager.

* NetworkProcess/NetworkConnectionToWebProcess.messages.in:
Add StartDownload message.

* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::downloadManager):
Add "singleton" download manager.

(WebKit::NetworkProcess::didCreateDownload):
(WebKit::NetworkProcess::didDestroyDownload):
(WebKit::NetworkProcess::downloadProxyConnection):
Implement DownloadManager::Client.

* UIProcess/Network/NetworkProcessProxy.cpp:
(WebKit::NetworkProcessProxy::didReceiveMessage):
(WebKit::NetworkProcessProxy::didReceiveSyncMessage):
Call through to the message receiver map.

* WebProcess/Downloads/Download.cpp:
* WebProcess/Downloads/DownloadManager.cpp:
(WebKit::DownloadManager::downloadProxyConnection):
* WebProcess/Downloads/DownloadManager.h:
Rename connection to downloadProxyConnection.

* WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::startDownload):
When using the network process, send a message to it with the request that needs to be downloaded.

* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::downloadProxyConnection):
Return the connection to the UI process.

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

7 years agoNSURLCache should be disabled in the WebProcess when using the NetworkProcess
weinig@apple.com [Sun, 16 Dec 2012 01:15:52 +0000 (01:15 +0000)]
NSURLCache should be disabled in the WebProcess when using the NetworkProcess
<rdar://problem/12872266>
https://bugs.webkit.org/show_bug.cgi?id=105119

Reviewed by Alexey Proskuryakov.

Set the size of the NSURLCache to 0 (both disk and memory) in the WebProcess when using
the NetworkProcess.

* WebProcess/mac/WebProcessMac.mm:
(WebKit::WebProcess::platformSetCacheModel):
(WebKit::WebProcess::platformInitializeWebProcess):

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

7 years ago[WebKit2] Register the custom protocol handler in the network process if it exists
aestes@apple.com [Sun, 16 Dec 2012 00:42:11 +0000 (00:42 +0000)]
[WebKit2] Register the custom protocol handler in the network process if it exists
https://bugs.webkit.org/show_bug.cgi?id=105118

Reviewed by Anders Carlsson.

Register our custom protocol handler with NSURLProtocol when starting
up the network process; do not register the custom protocol handler in
web processes if a network process is being used.

* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::initializeNetworkProcess):
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::initializeWebProcess):
* WebProcess/mac/WebProcessMac.mm:
(WebKit::WebProcess::platformInitializeWebProcess):

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

7 years agoThe network process should use the correct NSURLCache location and set its size corre...
weinig@apple.com [Sun, 16 Dec 2012 00:22:35 +0000 (00:22 +0000)]
The network process should use the correct NSURLCache location and set its size correctly for the CacheModel
<rdar://problem/12848505>
https://bugs.webkit.org/show_bug.cgi?id=105115

Reviewed by Anders Carlsson.

* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::NetworkProcess):
(WebKit::NetworkProcess::initializeNetworkProcess):
(WebKit::NetworkProcess::setCacheModel):
* NetworkProcess/NetworkProcess.h:
(NetworkProcess):
* NetworkProcess/mac/NetworkProcessMac.mm:
(WebKit::NetworkProcess::platformInitialize):
(WebKit::memorySize):
(WebKit::volumeFreeSize):
(WebKit::NetworkProcess::platformSetCacheModel):
Copy code from the WebProcess to set up the NSURLCache correctly (location and size).
We should eventually move the calculation of this to the WebContext so it can be done
once.

* Shared/Network/NetworkProcessCreationParameters.cpp:
(WebKit::NetworkProcessCreationParameters::encode):
(WebKit::NetworkProcessCreationParameters::decode):
* Shared/Network/NetworkProcessCreationParameters.h:
(NetworkProcessCreationParameters):
Add the necessary creation parameters to set up the cache.

* UIProcess/Network/NetworkProcessProxy.cpp:
(WebKit::NetworkProcessProxy::didFinishLaunching):
* UIProcess/Network/NetworkProcessProxy.h:
(NetworkProcessProxy):
* UIProcess/Network/mac/NetworkProcessProxyMac.mm:
* UIProcess/WebContext.cpp:
(WebKit::WebContext::ensureNetworkProcess):
(WebKit::WebContext::setCacheModel):
* UIProcess/WebContext.h:
(WebKit):
(WebContext):
* UIProcess/mac/WebContextMac.mm:
(WebKit):
(WebKit::WebContext::platformInitializeNetworkProcess):
Move initializing the NetworkProcess to just after creating (matching the WebProcess),
rather than waiting for it finish loading before sending the creation parameters.
Additionally, this moves the setting up of the creation parameters to the WebContext,
as that is where all the interesting state resides (and also matches the WebProcess).

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

7 years agoClean up the previous build fix; access m_networkProcess directly.
aestes@apple.com [Sun, 16 Dec 2012 00:18:49 +0000 (00:18 +0000)]
Clean up the previous build fix; access m_networkProcess directly.

* UIProcess/WebContext.cpp:
(WebKit::WebContext::registerSchemeForCustomProtocol):
(WebKit::WebContext::unregisterSchemeForCustomProtocol):

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

7 years agoFix the build.
aestes@apple.com [Sun, 16 Dec 2012 00:13:51 +0000 (00:13 +0000)]
Fix the build.

* UIProcess/WebContext.cpp:
(WebKit::WebContext::registerSchemeForCustomProtocol):
(WebKit::WebContext::unregisterSchemeForCustomProtocol):

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

7 years ago[WebKit2] Register schemes with the network process if it is being used
aestes@apple.com [Sun, 16 Dec 2012 00:03:27 +0000 (00:03 +0000)]
[WebKit2] Register schemes with the network process if it is being used
https://bugs.webkit.org/show_bug.cgi?id=105113

Reviewed by Anders Carlsson.

If a WebContext is using the network process, it needs to be told about
scheme (un)registration rather than the context's web processes.

* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::initializeNetworkProcess): Tell the shared
CustomProtocolManager about schemes registered at process creation time.
(WebKit::NetworkProcess::registerSchemeForCustomProtocol): Tell the
shared CustomProtocolManager about a new scheme.
(WebKit::NetworkProcess::unregisterSchemeForCustomProtocol): Remove a
scheme from the shared CustomProtocolManager.
* NetworkProcess/NetworkProcess.h:
* NetworkProcess/NetworkProcess.messages.in: Add registration and
unregistration messages for the NetworkProcess.
* Shared/Network/NetworkProcessCreationParameters.cpp:
(WebKit::NetworkProcessCreationParameters::encode): Encode
urlSchemesRegisteredForCustomProtocols.
(WebKit::NetworkProcessCreationParameters::decode): Decode
urlSchemesRegisteredForCustomProtocols.
* Shared/Network/NetworkProcessCreationParameters.h: Define
urlSchemesRegisteredForCustomProtocols.
* UIProcess/Network/mac/NetworkProcessProxyMac.mm:
(WebKit::NetworkProcessProxy::platformInitializeNetworkProcess): Populate
urlSchemesRegisteredForCustomProtocols with the current set of schemes.
* UIProcess/WebContext.cpp:
(WebKit::WebContext::registerSchemeForCustomProtocol): Send a new
scheme to either the network process or to the context's web processes.
(WebKit::WebContext::unregisterSchemeForCustomProtocol): Ditto for
removing a scheme.
* UIProcess/WebContext.h:
* UIProcess/mac/WebContextMac.mm:
(WebKit::WebContext::platformInitializeWebProcess): Only populate
urlSchemesRegisteredForCustomProtocols if the network process isn't
being used.
(WebKit::WebContext::registerNotificationObservers):
* WebProcess/mac/WebProcessMac.mm:
(WebKit::WebProcess::platformInitializeWebProcess):
urlSchemesRegisteredForCustomProtocols should only be non-empty if the
network process isn't being used. Assert this.

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

7 years ago[BlackBerry] Pass key modifiers with touch and mouse events
nghanavatian@rim.com [Sat, 15 Dec 2012 23:43:15 +0000 (23:43 +0000)]
[BlackBerry] Pass key modifiers with touch and mouse events
https://bugs.webkit.org/show_bug.cgi?id=105108

Reviewed by Rob Buis.

Source/WebCore:

Call Screen to retrieve current key modifiers.

Internally reviewed by Gen Mak.

* platform/PlatformMouseEvent.h:
(PlatformMouseEvent):
* platform/blackberry/PlatformKeyboardEventBlackBerry.cpp:
(WebCore::PlatformKeyboardEvent::getCurrentModifierState):
* platform/blackberry/PlatformMouseEventBlackBerry.cpp:
(WebCore::PlatformMouseEvent::PlatformMouseEvent):
* platform/blackberry/PlatformTouchEventBlackBerry.cpp:
(WebCore::PlatformTouchEvent::PlatformTouchEvent):

Source/WebKit/blackberry:

Pass key modifiers to allow for added functionality, such as
shift+click to highlight.

Internally reviewed by Gen Mak.

* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPagePrivate::webContext):
(BlackBerry::WebKit::WebPagePrivate::updateCursor):
(BlackBerry::WebKit::WebPage::mouseEvent):
(BlackBerry::WebKit::WebPage::touchPointAsMouseEvent):
* Api/WebPage.h:
* WebKitSupport/TouchEventHandler.cpp:
(BlackBerry::WebKit::TouchEventHandler::sendClickAtFatFingersPoint):
(BlackBerry::WebKit::TouchEventHandler::handleTouchPoint):
(BlackBerry::WebKit::TouchEventHandler::handleFatFingerPressed):
* WebKitSupport/TouchEventHandler.h:
(TouchEventHandler):

Tools:

Update DRT to new api.

Internally reviewed by Gen Mak.

* DumpRenderTree/blackberry/EventSender.cpp:
(mouseDownCallback):
(mouseUpCallback):
(mouseMoveToCallback):

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

7 years ago[BlackBerry] Clean up allocated memory from InputMethodSupport
nghanavatian@rim.com [Sat, 15 Dec 2012 23:40:12 +0000 (23:40 +0000)]
[BlackBerry] Clean up allocated memory from InputMethodSupport
https://bugs.webkit.org/show_bug.cgi?id=105110

Reviewed by Rob Buis.

PR265919
We are deep copying the spannable_string from IMF and freeing
here once we're done with it.

Internally reviewed by Jeff Rogers.

* WebKitSupport/InputHandler.cpp:
(BlackBerry::WebKit::InputHandler::spellCheckingRequestProcessed):

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

7 years agoRemove the unneeded NetworkProcessCrashed message
andersca@apple.com [Sat, 15 Dec 2012 23:35:50 +0000 (23:35 +0000)]
Remove the unneeded NetworkProcessCrashed message
https://bugs.webkit.org/show_bug.cgi?id=105114

Reviewed by Sam Weinig.

Remove the NetworkProcessCrashed message; it's not needed since the connection member variable is already
nulled out in WebProcess::networkProcessConnectionClosed which is called when the Connection::Client::didClose member
function is called on the connection between the web process and network process.

Furthermore, this message was handled on the connection queue which runs on a different thread and the handler was not
thread-safe so this could in theory cause bad crashes.

* UIProcess/Network/NetworkProcessProxy.cpp:
(WebKit::NetworkProcessProxy::didClose):
* WebProcess/WebProcess.cpp:
* WebProcess/WebProcess.h:
(WebProcess):
* WebProcess/WebProcess.messages.in:

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

7 years ago[BlackBerry] Prevent CookieManager from blocking the WKT thread
commit-queue@webkit.org [Sat, 15 Dec 2012 23:32:12 +0000 (23:32 +0000)]
[BlackBerry] Prevent CookieManager from blocking the WKT thread
https://bugs.webkit.org/show_bug.cgi?id=105111

PR 265603

Patch by Otto Derek Cheung <otcheung@rim.com> on 2012-12-15
Reviewed by Rob Buis.
Internally reviewed by Konrad Piascik.

The getBackingStoreCookies in WKT is blocking the thread because it has to wait for
the db to be opened before it can call on it.

The fix is to make CookieDatabaseBackingStore in the cookie_db thread dispatch
a getBackingStoreCookies call on WKT after invokeOpen is finished.

Tested loading the browser. Cookies are being loaded into memory on start up.

* platform/blackberry/CookieDatabaseBackingStore/CookieDatabaseBackingStore.cpp:
(WebCore::CookieDatabaseBackingStore::invokeOpen):
* platform/blackberry/CookieManager.cpp:
(WebCore::cookieManager):
* platform/blackberry/CookieManager.h:

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

7 years agoAdd a DownloadProxyMap object to the NetworkProcessProxy object
andersca@apple.com [Sat, 15 Dec 2012 23:11:52 +0000 (23:11 +0000)]
Add a DownloadProxyMap object to the NetworkProcessProxy object
https://bugs.webkit.org/show_bug.cgi?id=105112

Reviewed by Sam Weinig.

* UIProcess/Network/NetworkProcessProxy.cpp:
(WebKit::NetworkProcessProxy::createDownloadProxy):
(WebKit::NetworkProcessProxy::didClose):
* UIProcess/Network/NetworkProcessProxy.h:
* UIProcess/WebContext.cpp:
(WebKit::WebContext::createDownloadProxy):
* UIProcess/WebProcessProxy.cpp:
* UIProcess/WebProcessProxy.h:

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

7 years agoMove the download proxy map from the web context to the web process proxy
andersca@apple.com [Sat, 15 Dec 2012 22:49:36 +0000 (22:49 +0000)]
Move the download proxy map from the web context to the web process proxy
https://bugs.webkit.org/show_bug.cgi?id=105109

Reviewed by Andreas Kling.

More progress towards making downloads work with the networking process. Since downloads are handled by the
web process when not using a networking process, it makes sense for the download proxy map to live in the
web process proxy object.

* UIProcess/WebContext.cpp:
(WebKit::WebContext::WebContext):
(WebKit::WebContext::shouldTerminate):
(WebKit::WebContext::disconnectProcess):
(WebKit::WebContext::download):
(WebKit::WebContext::createDownloadProxy):
* UIProcess/WebContext.h:
(WebContext):
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::disconnect):
(WebKit::WebProcessProxy::shouldTerminate):
(WebKit):
(WebKit::WebProcessProxy::createDownloadProxy):
* UIProcess/WebProcessProxy.h:
(WebProcessProxy):

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

7 years agoFix repaint issues when resizing a window with centered content, for platforms with...
simon.fraser@apple.com [Sat, 15 Dec 2012 22:11:27 +0000 (22:11 +0000)]
Fix repaint issues when resizing a window with centered content, for platforms with a tile cache
https://bugs.webkit.org/show_bug.cgi?id=105073

Reviewed by Dan Bernstein.

Add a manual test for window resize with a centered element.

* ManualTests/resize-repaint.html: Added.

Source/WebCore:

There were several issues with the "do full repaint" code path in
FrameView::layout(). These caused repaint issues when resizing the web view,
especially for platforms that use a tile cache.

First, the m_doFullRepaint flag wold get clobbered on resize-layouts, because
the call to adjustViewSize() re-enters layout(), and resets the m_doFullRepaint member
variable to false, even if the outer call had previously set it to true. This would
cause us to lose track of whether we needed to do a full repaint. The patch fixes
this by restoring m_doFullRepaint to the value it had before the call to adjustViewSize().

The second problem was that full repaints would not propagate to compositing
layers. They only repainted the RenderView, and on platforms that use a tile cache,
this only repaints the top portion of that tile cache. This was fixed by sending
a NeedsFullRepaintInBacking flag down into RenderLayer::updateLayerPositions(),
and using that to do a full repaint on all compositing layers.

Sending this new flag down into updateAfterLayout() prompted some boolean/flags
cleanup with propagated into several files. This also allowed me to no longer
include RenderLayerBacking.h in RenderLayerCompositor.h, but that required
header cleanup in several files.

Automated testing is not possible because WebKitTestRunner resizes the window
asynchronously (bug 105101). Added manual test.

* page/FrameView.cpp:
(WebCore::updateLayerPositionFlags):
(WebCore::FrameView::layout):
* page/scrolling/ScrollingCoordinator.cpp:
* page/scrolling/mac/ScrollingCoordinatorMac.mm:
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::updateLayerPositions):
(WebCore::RenderLayer::updateCompositingLayersAfterScroll):
* rendering/RenderLayer.h:
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateAfterLayout):
(WebCore::RenderLayerBacking::contentChanged):
* rendering/RenderLayerBacking.h:
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::updateCompositingDescendantGeometry):
* rendering/RenderLayerCompositor.h:
* rendering/RenderObject.cpp:
* rendering/RenderView.cpp:

Source/WebKit/chromium:

Include RenderLayerBacking.h, which is no longer included by RenderLayerCompositor.h.

* tests/ScrollingCoordinatorChromiumTest.cpp:

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

7 years agoDownloadProxy should keep a strong reference to its associated web context
andersca@apple.com [Sat, 15 Dec 2012 22:04:12 +0000 (22:04 +0000)]
DownloadProxy should keep a strong reference to its associated web context
https://bugs.webkit.org/show_bug.cgi?id=105107

Reviewed by Alexey Proskuryakov.

While this does create a ref-cycle, it's broken when the download completes, fails, is canceled or
if the process that's doing the download crashes.

* UIProcess/Downloads/DownloadProxy.cpp:
(WebKit::DownloadProxy::processDidClose):
(WebKit::DownloadProxy::didStart):
(WebKit::DownloadProxy::didReceiveAuthenticationChallenge):
(WebKit::DownloadProxy::didReceiveResponse):
(WebKit::DownloadProxy::didReceiveData):
(WebKit::DownloadProxy::shouldDecodeSourceDataOfMIMEType):
(WebKit::DownloadProxy::decideDestinationWithSuggestedFilename):
(WebKit::DownloadProxy::didCreateDestination):
(WebKit::DownloadProxy::didFinish):
(WebKit::DownloadProxy::didFail):
(WebKit::DownloadProxy::didCancel):
* UIProcess/Downloads/DownloadProxy.h:
(DownloadProxy):

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

7 years agoRemove WebContext::downloadFinished
andersca@apple.com [Sat, 15 Dec 2012 21:53:11 +0000 (21:53 +0000)]
Remove WebContext::downloadFinished
https://bugs.webkit.org/show_bug.cgi?id=105105

Reviewed by Sam Weinig.

Have DownloadProxyMap manage the message receiver map and remove WebContext::downloadFinished.

* UIProcess/Downloads/DownloadProxy.cpp:
(WebKit::DownloadProxy::didFinish):
(WebKit::DownloadProxy::didFail):
(WebKit::DownloadProxy::didCancel):
* UIProcess/Downloads/DownloadProxyMap.cpp:
(WebKit::DownloadProxyMap::DownloadProxyMap):
(WebKit::DownloadProxyMap::createDownloadProxy):
(WebKit::DownloadProxyMap::downloadFinished):
* UIProcess/Downloads/DownloadProxyMap.h:
(DownloadProxyMap):
* UIProcess/WebContext.cpp:
(WebKit::WebContext::WebContext):
(WebKit::WebContext::createDownloadProxy):
* UIProcess/WebContext.h:

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

7 years agoMake the NetworkProcess be managed by the WebContext, rather than a singleton Network...
weinig@apple.com [Sat, 15 Dec 2012 21:31:14 +0000 (21:31 +0000)]
Make the NetworkProcess be managed by the WebContext, rather than a singleton NetworkProcessMananger
https://bugs.webkit.org/show_bug.cgi?id=105104

Reviewed by Alexey Proskuryakov.

Move to having the WebContext own and manage the NetworkProcessProxy.

* UIProcess/Network/NetworkProcessManager.cpp: Removed.
* UIProcess/Network/NetworkProcessManager.h: Removed.
* UIProcess/Network/NetworkProcessProxy.cpp:
(WebKit::NetworkProcessProxy::create):
(WebKit::NetworkProcessProxy::NetworkProcessProxy):
(WebKit::NetworkProcessProxy::networkProcessCrashedOrFailedToLaunch):
* UIProcess/Network/NetworkProcessProxy.h:
(WebKit):
(NetworkProcessProxy):
* UIProcess/Network/mac/NetworkProcessManagerMac.mm: Removed.
* UIProcess/WebContext.cpp:
(WebKit::WebContext::ensureNetworkProcess):
(WebKit::WebContext::removeNetworkProcessProxy):
(WebKit::WebContext::getNetworkProcessConnection):
(WebKit::WebContext::willStartUsingPrivateBrowsing):
(WebKit::WebContext::willStopUsingPrivateBrowsing):
(WebKit::WebContext::createNewWebProcess):
* UIProcess/WebContext.h:
(WebKit):
(WebContext):
(WebKit::WebContext::networkProcess):
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::getNetworkProcessConnection):
* UIProcess/mac/WebContextMac.mm:
(WebKit::WebContext::applicationBecameVisible):
(WebKit::WebContext::applicationBecameOccluded):
* WebKit2.xcodeproj/project.pbxproj:

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

7 years agoDownloadProxy objects should know which DownloadProxyMap they belong to
andersca@apple.com [Sat, 15 Dec 2012 21:15:29 +0000 (21:15 +0000)]
DownloadProxy objects should know which DownloadProxyMap they belong to
https://bugs.webkit.org/show_bug.cgi?id=105102

Reviewed by Andy Estes.

* UIProcess/Downloads/DownloadProxy.cpp:
(WebKit::DownloadProxy::create):
(WebKit::DownloadProxy::DownloadProxy):
* UIProcess/Downloads/DownloadProxy.h:
(WebKit):
(DownloadProxy):
* UIProcess/Downloads/DownloadProxyMap.cpp:
(WebKit::DownloadProxyMap::createDownloadProxy):

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

7 years ago[WebKit2] Move CustomProtocolManager to Shared/
aestes@apple.com [Sat, 15 Dec 2012 21:08:46 +0000 (21:08 +0000)]
[WebKit2] Move CustomProtocolManager to Shared/
https://bugs.webkit.org/show_bug.cgi?id=105103

Reviewed by Sam Weinig.

CustomProtocolManager can be instantiated either in the NetworkProcess or the WebProcess, so it should live in Shared/.

* DerivedSources.make: Update the path where CustomProtocolManager.messages.in can be found.
* Shared/Network/CustomProtocols/CustomProtocolManager.h: Renamed from Source/WebKit2/WebProcess/Network/CustomProtocols/CustomProtocolManager.h.
* Shared/Network/CustomProtocols/CustomProtocolManager.messages.in: Renamed from Source/WebKit2/WebProcess/Network/CustomProtocols/CustomProtocolManager.messages.in.
* Shared/Network/CustomProtocols/mac/CustomProtocolManagerMac.mm: Renamed from Source/WebKit2/WebProcess/Network/CustomProtocols/mac/CustomProtocolManagerMac.mm.
* WebKit2.xcodeproj/project.pbxproj:

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

7 years agoTry to fix the Qt build.
weinig@apple.com [Sat, 15 Dec 2012 21:02:52 +0000 (21:02 +0000)]
Try to fix the Qt build.

* Target.pri:

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

7 years agoGet rid of DownloadProxyMap::downloads()
andersca@apple.com [Sat, 15 Dec 2012 20:35:53 +0000 (20:35 +0000)]
Get rid of DownloadProxyMap::downloads()
https://bugs.webkit.org/show_bug.cgi?id=105100

Reviewed by Sam Weinig.

Add the needed member functions to DownloadProxyMap and remove the downloads() member function.

* UIProcess/Downloads/DownloadProxyMap.cpp:
(WebKit::DownloadProxyMap::downloadFinished):
(WebKit::DownloadProxyMap::processDidClose):
(WebKit):
* UIProcess/Downloads/DownloadProxyMap.h:
(WebKit::DownloadProxyMap::isEmpty):
(DownloadProxyMap):
* UIProcess/WebContext.cpp:
(WebKit::WebContext::shouldTerminate):
(WebKit::WebContext::disconnectProcess):
(WebKit::WebContext::downloadFinished):

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

7 years agoMove calculation of caches sizes based on the cache model to CacheModel.h/cpp
weinig@apple.com [Sat, 15 Dec 2012 20:26:40 +0000 (20:26 +0000)]
Move calculation of caches sizes based on the cache model to CacheModel.h/cpp
https://bugs.webkit.org/show_bug.cgi?id=105098

Reviewed by Anders Carlsson.

Move calculation of caches sizes based on the cache model to CacheModel.h/cpp so
that it can be used by more than just the WebProcess.

* CMakeLists.txt:
* GNUmakefile.list.am:
* Shared/CacheModel.cpp: Added.
(WebKit):
(WebKit::calculateCacheSizes):
* Shared/CacheModel.h:
* Target.pri:
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/WebProcess.cpp:
* WebProcess/WebProcess.h:
(WebProcess):
* win/WebKit2.vcproj:

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

7 years agoDownloadProxyMap shouldn't be a singleton after all
andersca@apple.com [Sat, 15 Dec 2012 20:13:41 +0000 (20:13 +0000)]
DownloadProxyMap shouldn't be a singleton after all
https://bugs.webkit.org/show_bug.cgi?id=105099

Reviewed by Sam Weinig.

Make the DownloadProxyMap be per context instead, and get rid of the m_downloads hash map from WebContext.

* UIProcess/Downloads/DownloadProxy.cpp:
(WebKit::DownloadProxy::didFinish):
(WebKit::DownloadProxy::didFail):
(WebKit::DownloadProxy::didCancel):
* UIProcess/Downloads/DownloadProxyMap.cpp:
(WebKit::DownloadProxyMap::~DownloadProxyMap):
* UIProcess/Downloads/DownloadProxyMap.h:
(DownloadProxyMap):
(WebKit::DownloadProxyMap::downloads):
* UIProcess/WebContext.cpp:
(WebKit::WebContext::shouldTerminate):
(WebKit::WebContext::disconnectProcess):
(WebKit::WebContext::createDownloadProxy):
(WebKit::WebContext::downloadFinished):
* UIProcess/WebContext.h:
(WebContext):

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

7 years agoFix build.
andersca@apple.com [Sat, 15 Dec 2012 19:40:17 +0000 (19:40 +0000)]
Fix build.

* platform/graphics/ca/GraphicsLayerCA.h:
Remove an unused member variable.

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

7 years agoREGRESSION (r137006): TileCache flashes to linen, rather than the background color...
simon.fraser@apple.com [Sat, 15 Dec 2012 19:37:49 +0000 (19:37 +0000)]
REGRESSION (r137006): TileCache flashes to linen, rather than the background color, when scrolling fast
https://bugs.webkit.org/show_bug.cgi?id=104746

Reviewed by Darin Adler.

Make RenderLayerBacking::updateBackgroundColor() responsible for setting the background
color of the main frame's root layer to the document background color (rather than doing
it in code related to overlay scrollbars, which was crazy). This is only done for platforms
that use a TiledBacking (currently, just Mac).

Also fix updateBackgroundColor() to not call m_graphicsLayer->setContentsToBackgroundColor()
and then call clearBackgroundColor() right away if the color was transparent.

* page/FrameView.cpp:
(WebCore::FrameView::recalculateScrollbarOverlayStyle): Remove code that calls documentBackgroundColorDidChange().
* rendering/RenderLayerBacking.cpp:
(WebCore::clipBox): Remove blank linke.
(WebCore::RenderLayerBacking::updateBackgroundColor):
* rendering/RenderLayerCompositor.cpp:
* rendering/RenderLayerCompositor.h:
(RenderLayerCompositor):

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

7 years agoStop the XvfbDriver before proceeding with its starting setup
zandobersek@gmail.com [Sat, 15 Dec 2012 19:36:19 +0000 (19:36 +0000)]
Stop the XvfbDriver before proceeding with its starting setup
https://bugs.webkit.org/show_bug.cgi?id=105006

Reviewed by Philippe Normand.

Just as with the base Driver implementation, stop the XvfbDriver
before proceeding with setting up lock files and a new Xvfb instance.
This forces any driver or Xvfb instances that are currently under
the driver's control to be closed/killed and cleaned up after.

* Scripts/webkitpy/layout_tests/port/xvfbdriver.py:
(XvfbDriver._start):

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

7 years agoDisambiguate "background color" and "contents as solid color" on GraphicsLayer
simon.fraser@apple.com [Sat, 15 Dec 2012 19:11:44 +0000 (19:11 +0000)]
Disambiguate "background color" and "contents as solid color" on GraphicsLayer
https://bugs.webkit.org/show_bug.cgi?id=104842

Source/WebCore:

Patch by No'am Rosenthal <noam.rosenthal@nokia.com> on 2012-12-15
Reviewed by Simon Fraser.

Rename overloads in GraphicsLayerTextureMapper and GraphicsLayerChromium to account for the rename in GraphicsLayer.

Covered by existing tests.

* platform/graphics/chromium/GraphicsLayerChromium.cpp:
* platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
(WebCore::GraphicsLayerTextureMapper::setContentsToSolidColor):
* platform/graphics/texmap/GraphicsLayerTextureMapper.h:
(GraphicsLayerTextureMapper):
(WebCore::GraphicsLayerTextureMapper::solidColor):
* platform/graphics/texmap/TextureMapperLayer.cpp:
(WebCore::TextureMapperLayer::paintSelf):
(WebCore::TextureMapperLayer::flushCompositingStateSelf):
* platform/graphics/texmap/TextureMapperLayer.h:
(State):

Source/WebKit2:

Patch by No'am Rosenthal <noam.rosenthal@nokia.com> on 2012-12-15
Reviewed by Simon Fraser.

Rename overloads in coordinated graphics to account for the rename in GraphicsLayer.

* Shared/CoordinatedGraphics/CoordinatedLayerInfo.h:
(CoordinatedLayerInfo):
* UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp:
(WebKit::LayerTreeRenderer::setLayerState):
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.cpp:
(WebCore::CoordinatedGraphicsLayer::setContentsToSolidColor):
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.h:
(CoordinatedGraphicsLayer):

LayoutTests:

Patch by No'am Rosenthal <noam@webkit.org> on 2012-12-15
Reviewed by Simon Fraser.

Since we don't set the background color for a layer with a solid color, the test results have to be rebaselined.

* compositing/backing/no-backing-for-clip-expected.txt:
* compositing/backing/no-backing-for-clip-overlap-expected.txt:
* compositing/backing/no-backing-for-perspective-expected.txt:
* compositing/columns/composited-in-paginated-expected.txt:
* compositing/geometry/ancestor-overflow-change-expected.txt:
* compositing/geometry/bounds-ignores-hidden-composited-descendant-expected.txt:
* compositing/geometry/bounds-ignores-hidden-dynamic-negzindex-expected.txt:
* compositing/geometry/clip-expected.txt:
* compositing/geometry/clip-inside-expected.txt:
* compositing/geometry/composited-in-columns-expected.txt:
* compositing/geometry/flipped-writing-mode-expected.txt:
* compositing/geometry/layer-due-to-layer-children-deep-switch-expected.txt:
* compositing/geometry/limit-layer-bounds-fixed-positioned-expected.txt:
* compositing/geometry/limit-layer-bounds-overflow-root-expected.txt:
* compositing/geometry/limit-layer-bounds-positioned-expected.txt:
* compositing/geometry/limit-layer-bounds-positioned-transition-expected.txt:
* compositing/geometry/limit-layer-bounds-transformed-expected.txt:
* compositing/geometry/limit-layer-bounds-transformed-overflow-expected.txt:
* compositing/geometry/preserve-3d-switching-expected.txt:
* compositing/iframes/become-composited-nested-iframes-expected.txt:
* compositing/iframes/become-overlapped-iframe-expected.txt:
* compositing/iframes/composited-parent-iframe-expected.txt:
* compositing/iframes/connect-compositing-iframe-delayed-expected.txt:
* compositing/iframes/connect-compositing-iframe-expected.txt:
* compositing/iframes/connect-compositing-iframe2-expected.txt:
* compositing/iframes/connect-compositing-iframe3-expected.txt:
* compositing/iframes/enter-compositing-iframe-expected.txt:
* compositing/iframes/iframe-resize-expected.txt:
* compositing/iframes/invisible-nested-iframe-hide-expected.txt:
* compositing/iframes/invisible-nested-iframe-show-expected.txt:
* compositing/iframes/overlapped-iframe-expected.txt:
* compositing/iframes/overlapped-iframe-iframe-expected.txt:
* compositing/iframes/page-cache-layer-tree-expected.txt:
* compositing/iframes/scrolling-iframe-expected.txt:
* compositing/layer-creation/animation-overlap-with-children-expected.txt:
* compositing/layer-creation/fixed-position-and-transform-expected.txt:
* compositing/layer-creation/fixed-position-under-transform-expected.txt:
* compositing/layer-creation/no-compositing-for-preserve-3d-expected.txt:
* compositing/layer-creation/overflow-scroll-overlap-expected.txt:
* compositing/layer-creation/overlap-animation-expected.txt:
* compositing/layer-creation/overlap-child-layer-expected.txt:
* compositing/layer-creation/overlap-clipping-expected.txt:
* compositing/layer-creation/overlap-transformed-and-clipped-expected.txt:
* compositing/layer-creation/overlap-transformed-layer-expected.txt:
* compositing/layer-creation/overlap-transforms-expected.txt:
* compositing/layer-creation/scroll-partial-update-expected.txt:
* compositing/layer-creation/spanOverlapsCanvas-expected.txt:
* compositing/layer-creation/stacking-context-overlap-expected.txt:
* compositing/layer-creation/stacking-context-overlap-nested-expected.txt:
* compositing/layer-creation/translatez-overlap-expected.txt:
* compositing/overflow-trumps-transform-style-expected.txt:
* compositing/overflow/clip-descendents-expected.txt:
* compositing/plugins/no-backing-store-expected.txt:
* compositing/rtl/rtl-absolute-expected.txt:
* compositing/rtl/rtl-absolute-overflow-expected.txt:
* compositing/rtl/rtl-absolute-overflow-scrolled-expected.txt:
* compositing/rtl/rtl-fixed-expected.txt:
* compositing/rtl/rtl-fixed-overflow-expected.txt:
* compositing/rtl/rtl-relative-expected.txt:
* compositing/tiled-layers-hidpi-expected.txt:
* compositing/visible-rect/2d-transformed-expected.txt:
* compositing/visible-rect/3d-transform-style-expected.txt:
* compositing/visible-rect/3d-transformed-expected.txt:
* compositing/visible-rect/animated-expected.txt:
* compositing/visible-rect/animated-from-none-expected.txt:
* compositing/visible-rect/clipped-by-viewport-expected.txt:
* compositing/visible-rect/clipped-visible-rect-expected.txt:
* compositing/visible-rect/iframe-and-layers-expected.txt:
* compositing/visible-rect/nested-transform-expected.txt:
* compositing/visible-rect/scrolled-expected.txt:
* css3/filters/filtered-compositing-descendant-expected.txt:
* platform/mac/compositing/geometry/fixed-position-composited-switch-expected.txt:
* platform/mac/compositing/iframes/resizer-expected.txt:
* platform/mac/compositing/repaint/invalidations-on-composited-layers-expected.txt:
* platform/mac/compositing/tiling/crash-reparent-tiled-layer-expected.txt:
* platform/mac/compositing/tiling/huge-layer-add-remove-child-expected.txt:
* platform/mac/compositing/tiling/huge-layer-with-layer-children-expected.txt:
* platform/mac/compositing/tiling/huge-layer-with-layer-children-resize-expected.txt:

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

7 years ago[GTK][WK2] Memory leak in ChunkedUpdateDrawingArea::paintIntoUpdateChunk()
christophe.dumez@intel.com [Sat, 15 Dec 2012 18:49:42 +0000 (18:49 +0000)]
[GTK][WK2] Memory leak in ChunkedUpdateDrawingArea::paintIntoUpdateChunk()
https://bugs.webkit.org/show_bug.cgi?id=105095

Reviewed by Martin Robinson.

Adopt the pointer returned by cairo_create() in
ChunkedUpdateDrawingArea::paintIntoUpdateChunk() to avoid leaking
memory.

* WebProcess/WebPage/gtk/ChunkedUpdateDrawingAreaGtk.cpp:
(WebKit::ChunkedUpdateDrawingArea::paintIntoUpdateChunk):

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

7 years agoAdded #if ENABLE(SQL_DATABASE) around WebPlatformStrategies::getDatabaseServer().
mark.lam@apple.com [Sat, 15 Dec 2012 09:02:47 +0000 (09:02 +0000)]
Added #if ENABLE(SQL_DATABASE) around WebPlatformStrategies::getDatabaseServer().
https://bugs.webkit.org/show_bug.cgi?id=104934..

Not reviewed.

Greening the Qt Linux Release Minimal bot.

* WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
(WebKit):
* WebProcess/WebCoreSupport/WebPlatformStrategies.h:
(WebPlatformStrategies):

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

7 years agoRe-landing patch for "Introducing the DatabaseStrategy and database servers".
mark.lam@apple.com [Sat, 15 Dec 2012 08:09:53 +0000 (08:09 +0000)]
Re-landing patch for "Introducing the DatabaseStrategy and database servers".
https://bugs.webkit.org/show_bug.cgi?id=104934.

Not reviewed.

Source/WebCore:

Merged from r137767. Previously reviewed by Sam Weinig.
Also added __ZTVN7WebCore16DatabaseStrategyE to WebCore.exp.in.

No new tests.

* CMakeLists.txt:
* GNUmakefile.list.am:
* Modules/webdatabase/AbstractDatabaseServer.h: Copied from Source/WebCore/Modules/webdatabase/AbstractDatabaseServer.h.
* Modules/webdatabase/DBBackendServer.h: Copied from Source/WebCore/Modules/webdatabase/DBBackendServer.h.
* Modules/webdatabase/DatabaseManager.cpp:
(WebCore::DatabaseManager::DatabaseManager):
* Modules/webdatabase/DatabaseManager.h:
(DatabaseManager):
* Target.pri:
* WebCore.exp.in:
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* platform/DatabaseStrategy.cpp: Copied from Source/WebCore/platform/DatabaseStrategy.cpp.
* platform/DatabaseStrategy.h: Copied from Source/WebCore/platform/DatabaseStrategy.h.
* platform/PlatformStrategies.h:
(WebCore::PlatformStrategies::databaseStrategy):
(PlatformStrategies):
(WebCore::PlatformStrategies::PlatformStrategies):

Source/WebKit/efl:

Merged from r137767. Previously reviewed by Sam Weinig.

* WebCoreSupport/PlatformStrategiesEfl.cpp:
(PlatformStrategiesEfl::createDatabaseStrategy):
* WebCoreSupport/PlatformStrategiesEfl.h:
(PlatformStrategiesEfl):

Source/WebKit/gtk:

Merged from r137767. Previously reviewed by Sam Weinig.

* WebCoreSupport/PlatformStrategiesGtk.cpp:
(PlatformStrategiesGtk::createDatabaseStrategy):
* WebCoreSupport/PlatformStrategiesGtk.h:
(PlatformStrategiesGtk):

Source/WebKit/mac:

Merged from r137767. Previously reviewed by Sam Weinig.

* WebCoreSupport/WebPlatformStrategies.h:
(WebPlatformStrategies):
* WebCoreSupport/WebPlatformStrategies.mm:
(WebPlatformStrategies::createDatabaseStrategy):

Source/WebKit/qt:

Merged from r137767. Previously reviewed by Sam Weinig.

* WebCoreSupport/PlatformStrategiesQt.cpp:
(PlatformStrategiesQt::createDatabaseStrategy):
* WebCoreSupport/PlatformStrategiesQt.h:
(PlatformStrategiesQt):

Source/WebKit/win:

Merged from r137767. Previously reviewed by Sam Weinig.

* WebCoreSupport/WebPlatformStrategies.cpp:
(WebPlatformStrategies::createDatabaseStrategy):
* WebCoreSupport/WebPlatformStrategies.h:
(WebPlatformStrategies):

Source/WebKit/wince:

Merged from r137767. Previously reviewed by Sam Weinig.

* WebCoreSupport/PlatformStrategiesWinCE.cpp:
(PlatformStrategiesWinCE::createDatabaseStrategy):
* WebCoreSupport/PlatformStrategiesWinCE.h:
(PlatformStrategiesWinCE):

Source/WebKit2:

Merged from r137767. Previously reviewed by Sam Weinig.

* CMakeLists.txt:
* WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
(WebKit::WebPlatformStrategies::createDatabaseStrategy):
(WebKit):
(WebKit::WebPlatformStrategies::getDatabaseServer):
* WebProcess/WebCoreSupport/WebPlatformStrategies.h:
(WebPlatformStrategies):

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

7 years agoThe WebView should initialize the platform strategies before initializing other sub...
mark.lam@apple.com [Sat, 15 Dec 2012 06:15:39 +0000 (06:15 +0000)]
The WebView should initialize the platform strategies before initializing other sub-systems.
https://bugs.webkit.org/show_bug.cgi?id=105083.

Reviewed by Alexey Proskuryakov.

Source/WebKit/mac:

* WebView/WebView.mm:
(-[WebView _commonInitializationWithFrameName:groupName:]):

Source/WebKit/win:

* WebView.cpp:
(WebView::initWithFrame):

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

7 years agoSend a message from WebViewImpl to the compositor to inform about end of flings
commit-queue@webkit.org [Sat, 15 Dec 2012 02:28:55 +0000 (02:28 +0000)]
Send a message from WebViewImpl to the compositor to inform about end of flings
https://bugs.webkit.org/show_bug.cgi?id=104947

Patch by Yusuf Ozuysal <yusufo@google.com> on 2012-12-14
Reviewed by James Robinson.

Whenever we have a fling animation finished on cancelled on main thread this sends
a message that will be relayed to the compositor input handler. Then the input handler
keeps track of main thread fling with a boolean and doesn't send flingCancels
unnecessarily

* chromium/public/WebInputHandler.h:
(WebInputHandler):
* chromium/public/WebLayerTreeView.h:
(WebLayerTreeView):
(WebKit::WebLayerTreeView::mainThreadHasStoppedFlinging):

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

7 years agoWebViewImpl::resetScrollAndScaleState() causes the page to render incorrectly
commit-queue@webkit.org [Sat, 15 Dec 2012 01:21:25 +0000 (01:21 +0000)]
WebViewImpl::resetScrollAndScaleState() causes the page to render incorrectly
https://bugs.webkit.org/show_bug.cgi?id=104767

Patch by Dan Alcantara <dfalcantara@chromium.org> on 2012-12-14
Reviewed by Darin Fisher.

Change WebViewImpl::resetScrollAndScaleState() so that it directly
alters values in the HistoryItem instead of indirectly changing the
values.

Adds a method in HistoryController to clear the scroll and scale state of
its current HistoryItem.

* public/WebView.h:
(WebView):
* src/WebViewImpl.cpp:
(WebKit::WebViewImpl::resetScrollAndScaleState):
* tests/WebViewTest.cpp:

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

7 years agohttps://bugs.webkit.org/show_bug.cgi?id=105064
bdakin@apple.com [Sat, 15 Dec 2012 00:52:24 +0000 (00:52 +0000)]
https://bugs.webkit.org/show_bug.cgi?id=105064
fast/css/nested-layers-with-hover.html fails on the Mac WK2 bots, and seems to be
a bad test

Reviewed by Tim Horton.

There were a number of problems with this test, and this patch attempts to fix
them all. The problems were:
-This test was failing on the WK2 bots.
-But it was comparing against expected results that expected to fail, so that's
bad!
-In the cross-platform directory there were expected results checked in that look
for a render tree dump, but those results haven't made sense for a while since
that test was converted to dumpAsText() months ago.

This patch updates the test so that it will actually work. To do that, we need to
make sure layout is up to date and also use window.setTimeout() to run the
function to assess our hover state rather than relying on onmousemove.
* fast/css/nested-layers-with-hover-expected.txt:
* fast/css/nested-layers-with-hover.html:
* platform/mac/fast/css/nested-layers-with-hover-expected.png: Removed.
* platform/mac/fast/css/nested-layers-with-hover-expected.txt: Removed.

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

7 years agoDownloadProxy objects should be message receivers
andersca@apple.com [Sat, 15 Dec 2012 00:48:13 +0000 (00:48 +0000)]
DownloadProxy objects should be message receivers
https://bugs.webkit.org/show_bug.cgi?id=105068

Reviewed by Andreas Kling.

This simplifies the WebContext message dispatch code somewhat.

* UIProcess/Downloads/DownloadProxy.cpp:
(WebKit::DownloadProxy::didReceiveMessage):
(WebKit::DownloadProxy::didReceiveSyncMessage):
* UIProcess/Downloads/DownloadProxy.h:
(DownloadProxy):
* UIProcess/WebContext.cpp:
(WebKit::WebContext::createDownloadProxy):
(WebKit::WebContext::didReceiveMessage):
(WebKit::WebContext::didReceiveSyncMessage):

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

7 years agoUnreviewed, rolling out r137765.
commit-queue@webkit.org [Sat, 15 Dec 2012 00:28:29 +0000 (00:28 +0000)]
Unreviewed, rolling out r137765.
http://trac.webkit.org/changeset/137765
https://bugs.webkit.org/show_bug.cgi?id=105067

Breaks webkit_unit_tests and transferred flings (Requested by
jamesr_ on #webkit).

Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2012-12-14

Source/Platform:

* chromium/public/WebInputHandler.h:
(WebInputHandler):
* chromium/public/WebLayerTreeView.h:
(WebLayerTreeView):

Source/WebKit/chromium:

* src/WebCompositorInputHandlerImpl.cpp:
(WebKit::WebCompositorInputHandlerImpl::WebCompositorInputHandlerImpl):
(WebKit::WebCompositorInputHandlerImpl::handleInputEventInternal):
(WebKit::WebCompositorInputHandlerImpl::handleGestureFling):
* src/WebCompositorInputHandlerImpl.h:
(WebCompositorInputHandlerImpl):
* src/WebViewImpl.cpp:
(WebKit::WebViewImpl::handleGestureEvent):
(WebKit::WebViewImpl::handleKeyEvent):
(WebKit::WebViewImpl::updateAnimations):
(WebKit::WebViewImpl::didCommitLoad):

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

7 years agoEmphasis mark is printed after inline-block with justify
commit-queue@webkit.org [Fri, 14 Dec 2012 23:52:00 +0000 (23:52 +0000)]
Emphasis mark is printed after inline-block with justify
https://bugs.webkit.org/show_bug.cgi?id=104631

Patch by Yuki Sekiguchi <yuki.sekiguchi@access-company.com> on 2012-12-14
Reviewed by Dean Jackson.

Source/WebCore:

Do not print an emphasis mark after an inline-block when justified.

If an inline-block is expanded, it has a space appended to it.
This space should not have any emphasis marks drawn.

Test: fast/inline/justify-emphasis-inline-box.html

* platform/graphics/SimpleFontData.h:
(WebCore::SimpleFontData::zeroWidthSpaceGlyph): Add getter method to get zero width space glyph.
* platform/graphics/WidthIterator.cpp:
(WebCore::WidthIterator::advanceInternal): We use zero width space for the extra space not to draw emphasis marks.

LayoutTests:

Test that emphasis marks are not drawn incorrectly in justified text with inline boxes.

* fast/inline/justify-emphasis-inline-box.html: Added.
* platform/chromium-mac/fast/inline/justify-emphasis-inline-box-expected.png: Added.
* platform/chromium-mac/fast/inline/justify-emphasis-inline-box-expected.txt: Added.
* platform/mac/fast/inline/justify-emphasis-inline-box-expected.txt: Added.

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

7 years agoUnreviewed bug fix after r137782.
jer.noble@apple.com [Fri, 14 Dec 2012 23:47:29 +0000 (23:47 +0000)]
Unreviewed bug fix after r137782.

Add new source file TextTrackRepresentation.cpp to CMakeLists.txt.

* CMakeLists.txt:

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

7 years agoUnreviewed, rolling out r137767.
commit-queue@webkit.org [Fri, 14 Dec 2012 23:40:22 +0000 (23:40 +0000)]
Unreviewed, rolling out r137767.
http://trac.webkit.org/changeset/137767
https://bugs.webkit.org/show_bug.cgi?id=105062

Broke Mac builds. (Requested by mlam on #webkit).

Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2012-12-14

Source/WebCore:

* CMakeLists.txt:
* GNUmakefile.list.am:
* Modules/webdatabase/AbstractDatabaseServer.h: Removed.
* Modules/webdatabase/DBBackendServer.h: Removed.
* Modules/webdatabase/DatabaseManager.cpp:
(WebCore::DatabaseManager::DatabaseManager):
* Modules/webdatabase/DatabaseManager.h:
* Target.pri:
* WebCore.exp.in:
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* platform/DatabaseStrategy.cpp: Removed.
* platform/DatabaseStrategy.h: Removed.
* platform/PlatformStrategies.h:
(WebCore):
(WebCore::PlatformStrategies::PlatformStrategies):
(PlatformStrategies):

Source/WebKit/efl:

* WebCoreSupport/PlatformStrategiesEfl.cpp:
* WebCoreSupport/PlatformStrategiesEfl.h:
(PlatformStrategiesEfl):

Source/WebKit/gtk:

* WebCoreSupport/PlatformStrategiesGtk.cpp:
* WebCoreSupport/PlatformStrategiesGtk.h:
(PlatformStrategiesGtk):

Source/WebKit/mac:

* WebCoreSupport/WebPlatformStrategies.h:
(WebPlatformStrategies):
* WebCoreSupport/WebPlatformStrategies.mm:

Source/WebKit/qt:

* WebCoreSupport/PlatformStrategiesQt.cpp:
* WebCoreSupport/PlatformStrategiesQt.h:
(PlatformStrategiesQt):

Source/WebKit/win:

* WebCoreSupport/WebPlatformStrategies.cpp:
* WebCoreSupport/WebPlatformStrategies.h:
(WebPlatformStrategies):

Source/WebKit/wince:

* WebCoreSupport/PlatformStrategiesWinCE.cpp:
* WebCoreSupport/PlatformStrategiesWinCE.h:
(PlatformStrategiesWinCE):

Source/WebKit2:

* CMakeLists.txt:
* WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
* WebProcess/WebCoreSupport/WebPlatformStrategies.h:
(WebPlatformStrategies):

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

7 years ago <rdar://problem/12874760> NetworkProcess loads may get stuck when WebProcess...
ap@apple.com [Fri, 14 Dec 2012 23:33:45 +0000 (23:33 +0000)]
    <rdar://problem/12874760> NetworkProcess loads may get stuck when WebProcess quits
        https://bugs.webkit.org/show_bug.cgi?id=105056

        Reviewed by Anders Carlsson.

        Make response maps per-connection.

        * NetworkProcess/NetworkConnectionToWebProcess.cpp:
        (WebKit::NetworkConnectionToWebProcess::didClose): Cancel waiting for responses
        from WebProcess, they will never arrive.

        * NetworkProcess/NetworkConnectionToWebProcess.h:
        (WebKit::NetworkConnectionToWebProcess::willSendRequestResponseMap):
        (WebKit::NetworkConnectionToWebProcess::canAuthenticateAgainstProtectionSpaceResponseMap):
        Maps now live here.

        * NetworkProcess/NetworkResourceLoader.cpp:
        (WebKit::NetworkResourceLoader::connectionToWebProcessDidClose): Added a FIXME.

        (WebKit::NetworkResourceLoader::willSendRequest):
        (WebKit::NetworkResourceLoader::willSendRequestHandled):
        (WebKit::NetworkResourceLoader::canAuthenticateAgainstProtectionSpace):
        (WebKit::NetworkResourceLoader::canAuthenticateAgainstProtectionSpaceHandled):
        Handle the cases where we can't send a request, or can't expect a response any more.

        * Shared/BlockingResponseMap.h:
        (BlockingResponseMap):
        (BlockingResponseMap::BlockingResponseMap):
        (BlockingResponseMap::~BlockingResponseMap):
        (BlockingResponseMap::waitForResponse):
        (BlockingResponseMap::didReceiveResponse):
        (BlockingResponseMap::cancel):
        (BlockingBoolResponseMap):
        (BlockingBoolResponseMap::BlockingBoolResponseMap):
        (BlockingBoolResponseMap::~BlockingBoolResponseMap):
        (BlockingBoolResponseMap::waitForResponse):
        (BlockingBoolResponseMap::didReceiveResponse):
        (BlockingBoolResponseMap::cancel):
        Added an ability to cancel, and slightly beefed up overall.

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

7 years agoAllow the text track contents to be displayed externally to WebCore.
jer.noble@apple.com [Fri, 14 Dec 2012 23:23:25 +0000 (23:23 +0000)]
Allow the text track contents to be displayed externally to WebCore.
https://bugs.webkit.org/show_bug.cgi?id=105052

Reviewed by Eric Carlson.

Support scenarios where the text track contents must be rendered outside of WebCore, such as to an external
display or window.  Add an abstract base class which encapsulates the external representation to which the
text tracks will be rendered.

Add a new abstract base class and client to wrap the external rendering of a TextTrack.
* platform/graphics/TextTrackRepresentation.h: Added.
(WebCore::TextTrackRepresentationClient::~TextTrackRepresentationClient):
(WebCore::TextTrackRepresentation::~TextTrackRepresentation):

Add an empty concrete implementation for those ports who do not yet support external display of subtitles.
* platform/graphics/TextTrackRepresentation.cpp: Added.
(NullTextTrackRepresentation):
(WebCore::NullTextTrackRepresentation::~NullTextTrackRepresentation):
(WebCore::NullTextTrackRepresentation::update):
(WebCore::NullTextTrackRepresentation::platformLayer):
(WebCore::NullTextTrackRepresentation::setContentScale):
(WebCore::NullTextTrackRepresentation::bounds):
(WebCore::TextTrackRepresentation::create):

Add methods to MediaPlayerPrivateIOS to handle the TextTrackRepresentation.
* platform/graphics/ios/MediaPlayerPrivateIOS.h:
* platform/graphics/ios/MediaPlayerPrivateIOS.mm:
(WebCore::MediaPlayerPrivateIOS::deliverNotification): Remove the representation when exiting full screen.
(WebCore::MediaPlayerPrivateIOS::requiresTextTrackRepresentation): Return YES if in full screen mode.
(WebCore::MediaPlayerPrivateIOS::setTextTrackRepresentation): Pass the representation's layer to the player plug-in.

Expose those methods via HTMLMediaElement:
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::requiresTextTrackRepresentation):
(WebCore::HTMLMediaElement::setTextTrackRepresentation):
* html/HTMLMediaElement.h:
* platform/graphics/MediaPlayer.cpp:
(WebCore::MediaPlayer::requiresTextTrackRepresentation):
(WebCore::MediaPlayer::setTextTrackRepresentation):
* platform/graphics/MediaPlayer.h:
(WebCore::MediaPlayerClient::textTrackRepresentationBoundsChanged):
(WebCore::MediaPlayerClient::paintTextTrackRepresentation):
* platform/graphics/MediaPlayerPrivate.h:
(WebCore::MediaPlayerPrivateInterface::requiresTextTrackRepresentation):
(WebCore::MediaPlayerPrivateInterface::setTextTrackRepresentation):

* html/shadow/MediaControlElements.cpp:
(WebCore::MediaControlTextTrackContainerElement::updateDisplay): Create the representation, if necessary.
(WebCore::MediaControlTextTrackContainerElement::updateSizes): Use the representation to determine the font size.
(WebCore::MediaControlTextTrackContainerElement::paintTextTrackRepresentation): Added. Paint the TextTrack into the provided graphics context.
(WebCore::MediaControlTextTrackContainerElement::textTrackRepresentationBoundsChanged): Added. Call updateSizes().
* html/shadow/MediaControlElements.h:

Add the new files to the project.
* WebCore.xcodeproj/project.pbxproj:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:

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

7 years agowebkitpy: make port_name a required parameter to the non-test ports
dpranke@chromium.org [Fri, 14 Dec 2012 23:18:25 +0000 (23:18 +0000)]
webkitpy: make port_name a required parameter to the non-test ports
https://bugs.webkit.org/show_bug.cgi?id=105057

Reviewed by Eric Seidel.

This is just minor code cleanup along the path to making Port
constructors simpler and pushing more logic into the port factory.

* Scripts/webkitpy/layout_tests/port/base.py:
(Port.__init__):
* Scripts/webkitpy/layout_tests/port/base_unittest.py:
(PortTest.make_port):
* Scripts/webkitpy/layout_tests/port/port_testcase.py:
(TestWebKitPort.__init__):
* Scripts/webkitpy/layout_tests/port/test.py:
(TestPort):
(TestPort.determine_full_port_name):
(TestPort.__init__):
* Scripts/webkitpy/layout_tests/port/xvfbdriver_unittest.py:
(XvfbDriverTest.make_driver):
(XvfbDriverTest.test_stop):

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

7 years agogarden-o-matic doesn't know about reftests
dpranke@chromium.org [Fri, 14 Dec 2012 23:17:03 +0000 (23:17 +0000)]
garden-o-matic doesn't know about reftests
https://bugs.webkit.org/show_bug.cgi?id=101976

Reviewed by Eric Seidel.

Attempt to make garden-o-matic properly aware of reftests again.

This is re-landing r137407 with a change to
rebaselineWithStatusUpdates() to actually pass the filtered
failureInofLost to checkout.rebaseline().

Unfortunately, the testing coverage for this whole module is almost
non-existent, and it's not obvious that there's a good way to
stub out checkout.rebaseline() to test that the right thing
happens. I verified the change manually.

* BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/controllers.js:
(.):
* BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/ui/results.js:
(.):
* BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/ui/results_unittests.js:

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

7 years agoUpdating these results again since this failing test has started failing in a new
bdakin@apple.com [Fri, 14 Dec 2012 23:04:21 +0000 (23:04 +0000)]
Updating these results again since this failing test has started failing in a new
way. https://bugs.webkit.org/show_bug.cgi?id=58332 represents fixing the bug.

* platform/mac-wk2/canvas/philip/tests/2d.text.draw.fontface.notinpage-expected.txt:

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

7 years agoAllow embedder to observe changes to frame names
fsamuel@chromium.org [Fri, 14 Dec 2012 22:55:27 +0000 (22:55 +0000)]
Allow embedder to observe changes to frame names
https://bugs.webkit.org/show_bug.cgi?id=104404

Reviewed by Darin Fisher.

Source/WebCore:

* loader/FrameLoaderClient.h:
(WebCore::FrameLoaderClient::didChangeName):
(FrameLoaderClient):
* page/DOMWindow.cpp:
(WebCore::DOMWindow::setName):

Source/WebKit/chromium:

* public/WebFrameClient.h:
(WebFrameClient):
(WebKit::WebFrameClient::didChangeName):
* src/FrameLoaderClientImpl.cpp:
(WebKit::FrameLoaderClientImpl::didChangeName):
(WebKit):
* src/FrameLoaderClientImpl.h:
(FrameLoaderClientImpl):

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

7 years ago[Chromium] IndexedDB: Memory leak in IDBCallbacksProxy::onSuccess(PassRefPtr<IDBDatab...
jsbell@chromium.org [Fri, 14 Dec 2012 22:31:53 +0000 (22:31 +0000)]
[Chromium] IndexedDB: Memory leak in IDBCallbacksProxy::onSuccess(PassRefPtr<IDBDatabaseBackendInterface>)
https://bugs.webkit.org/show_bug.cgi?id=104615

Reviewed by Tony Chang.

Don't create (and leak) a new wrapper object for onSuccess if one was created for onUpgradeNeeded.

* src/IDBCallbacksProxy.cpp:
(WebKit::IDBCallbacksProxy::IDBCallbacksProxy):
(WebKit::IDBCallbacksProxy::onSuccess):
(WebKit::IDBCallbacksProxy::onUpgradeNeeded):
* src/IDBCallbacksProxy.h:
(IDBCallbacksProxy):

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

7 years ago[Resource Timing] Properly report reused connections
simonjam@chromium.org [Fri, 14 Dec 2012 22:30:20 +0000 (22:30 +0000)]
[Resource Timing] Properly report reused connections
https://bugs.webkit.org/show_bug.cgi?id=104986

Reviewed by Tony Gentilcore.

Source/WebCore:

Test: http/tests/w3c/webperf/submission/resource-timing/html/test_resource_connection_reuse.html

* page/PerformanceResourceTiming.cpp:
(WebCore::PerformanceResourceTiming::PerformanceResourceTiming):
(WebCore::PerformanceResourceTiming::connectStart):
(WebCore::PerformanceResourceTiming::connectEnd):
* page/PerformanceResourceTiming.h:
(PerformanceResourceTiming):

LayoutTests:

* http/tests/w3c/webperf/submission/resource-timing/html/test_resource_connection_reuse-expected.txt: Added.
* http/tests/w3c/webperf/submission/resource-timing/html/test_resource_connection_reuse.html: Added.

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

7 years agoEnable video caption controls on Windows.
roger_fong@apple.com [Fri, 14 Dec 2012 22:18:23 +0000 (22:18 +0000)]
Enable video caption controls on Windows.
https://bugs.webkit.org/show_bug.cgi?id=105045.

Reviewed by Eric Carlson.

Now that video tracks have been enabled on Windows, enable controls as well.

* html/shadow/MediaControlElements.cpp:
(WebCore::MediaControlToggleClosedCaptionsButtonElement::MediaControlToggleClosedCaptionsButtonElement):
(WebCore::MediaControlToggleClosedCaptionsButtonElement::defaultEventHandler):
* html/shadow/MediaControlElements.h:
* rendering/RenderThemeWin.h:

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

7 years ago"Running 1 DumpRenderTree over X shards" is not a helpful output
rniwa@webkit.org [Fri, 14 Dec 2012 22:13:54 +0000 (22:13 +0000)]
"Running 1 DumpRenderTree over X shards" is not a helpful output
https://bugs.webkit.org/show_bug.cgi?id=104858

Reviewed by Dirk Pranke.

The word "shard" is not typically used in test frameworks. This word is confusing for many WebKit
contributors who typically don't have much experience on distributed computations and databases.
So only print this message out in the debug mode.

* Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py:
* Scripts/webkitpy/layout_tests/views/printing.py:
(Printer.print_workers_and_shards):

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

7 years agofast/dom/HTMLTemplateElement/inertContents.html is flaky
adamk@chromium.org [Fri, 14 Dec 2012 22:11:18 +0000 (22:11 +0000)]
fast/dom/HTMLTemplateElement/inertContents.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=104023

Reviewed by Eric Seidel.

Made the test only check inertness using <script>, since
<img>s are currently flaky due to the preload scanner.

* fast/dom/HTMLTemplateElement/inertContents-expected.txt:
* fast/dom/HTMLTemplateElement/inertContents.html:
* platform/chromium/TestExpectations:

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

7 years agoDownloadProxyMap should keep track of outstanding DownloadProxy objects
andersca@apple.com [Fri, 14 Dec 2012 22:07:32 +0000 (22:07 +0000)]
DownloadProxyMap should keep track of outstanding DownloadProxy objects
https://bugs.webkit.org/show_bug.cgi?id=105053

Reviewed by Andreas Kling.

This is more work towards removing the m_downloads map from every WebContext object.

* UIProcess/Downloads/DownloadProxy.cpp:
(WebKit::DownloadProxy::didFinish):
(WebKit::DownloadProxy::didFail):
(WebKit::DownloadProxy::didCancel):
* UIProcess/Downloads/DownloadProxyMap.cpp:
(WebKit::DownloadProxyMap::createDownloadProxy):
(WebKit):
(WebKit::DownloadProxyMap::downloadFinished):
* UIProcess/Downloads/DownloadProxyMap.h:
(DownloadProxyMap):
* UIProcess/WebContext.cpp:
(WebKit::WebContext::createDownloadProxy):

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

7 years agoIntroducing the DatabaseStrategy and database servers.
mark.lam@apple.com [Fri, 14 Dec 2012 21:57:58 +0000 (21:57 +0000)]
Introducing the DatabaseStrategy and database servers.
https://bugs.webkit.org/show_bug.cgi?id=104934.

Reviewed by Sam Weinig.

The database server is currently a placeholder that does nothing.

Source/WebCore:

No new tests.

* CMakeLists.txt:
* GNUmakefile.list.am:
* Modules/webdatabase/AbstractDatabaseServer.h: Added.
(WebCore):
(AbstractDatabaseServer):
(WebCore::AbstractDatabaseServer::AbstractDatabaseServer):
(WebCore::AbstractDatabaseServer::~AbstractDatabaseServer):
* Modules/webdatabase/DBBackendServer.h: Added.
(DBBackend):
* Modules/webdatabase/DatabaseManager.cpp:
(WebCore::DatabaseManager::DatabaseManager):
* Modules/webdatabase/DatabaseManager.h:
(WebCore):
(DatabaseManager):
* Target.pri:
* WebCore.exp.in:
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* platform/DatabaseStrategy.cpp: Added.
(WebCore):
(WebCore::DatabaseStrategy::getDatabaseServer):
* platform/DatabaseStrategy.h: Added.
(WebCore):
(DatabaseStrategy):
(WebCore::DatabaseStrategy::~DatabaseStrategy):
* platform/PlatformStrategies.h:
(WebCore):
(WebCore::PlatformStrategies::databaseStrategy):
(PlatformStrategies):
(WebCore::PlatformStrategies::PlatformStrategies):

Source/WebKit/efl:

* WebCoreSupport/PlatformStrategiesEfl.cpp:
(PlatformStrategiesEfl::createDatabaseStrategy):
* WebCoreSupport/PlatformStrategiesEfl.h:
(PlatformStrategiesEfl):

Source/WebKit/gtk:

* WebCoreSupport/PlatformStrategiesGtk.cpp:
(PlatformStrategiesGtk::createDatabaseStrategy):
* WebCoreSupport/PlatformStrategiesGtk.h:
(PlatformStrategiesGtk):

Source/WebKit/mac:

* WebCoreSupport/WebPlatformStrategies.h:
(WebPlatformStrategies):
* WebCoreSupport/WebPlatformStrategies.mm:
(WebPlatformStrategies::createDatabaseStrategy):

Source/WebKit/qt:

* WebCoreSupport/PlatformStrategiesQt.cpp:
(PlatformStrategiesQt::createDatabaseStrategy):
* WebCoreSupport/PlatformStrategiesQt.h:
(PlatformStrategiesQt):

Source/WebKit/win:

* WebCoreSupport/WebPlatformStrategies.cpp:
(WebPlatformStrategies::createDatabaseStrategy):
* WebCoreSupport/WebPlatformStrategies.h:
(WebPlatformStrategies):

Source/WebKit/wince:

* WebCoreSupport/PlatformStrategiesWinCE.cpp:
(PlatformStrategiesWinCE::createDatabaseStrategy):
* WebCoreSupport/PlatformStrategiesWinCE.h:
(PlatformStrategiesWinCE):

Source/WebKit2:

* CMakeLists.txt:
* WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
(WebKit::WebPlatformStrategies::createDatabaseStrategy):
(WebKit):
(WebKit::WebPlatformStrategies::getDatabaseServer):
* WebProcess/WebCoreSupport/WebPlatformStrategies.h:
(WebPlatformStrategies):

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

7 years ago Resource loads sometimes stall
ap@apple.com [Fri, 14 Dec 2012 21:25:22 +0000 (21:25 +0000)]
    Resource loads sometimes stall
        https://bugs.webkit.org/show_bug.cgi?id=104976

        Apply the same quick an dirty fix to BlockingBoolResponseMap.

        * Shared/BlockingResponseMap.h:
        (BlockingBoolResponseMap::didReceiveResponse):

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

7 years agoSend a message from WebViewImpl to the compositor to inform about end of flings
commit-queue@webkit.org [Fri, 14 Dec 2012 21:17:08 +0000 (21:17 +0000)]
Send a message from WebViewImpl to the compositor to inform about end of flings
https://bugs.webkit.org/show_bug.cgi?id=104947

Patch by Yusuf Ozuysal <yusufo@google.com> on 2012-12-14
Reviewed by James Robinson.

Whenever we have a fling animation finished on cancelled on main thread this sends
a message that will be relayed to the compositor input handler. Then the input handler
keeps track of main thread fling with a boolean and doesn't send flingCancels
unnecessarily

Source/Platform:

* chromium/public/WebInputHandler.h:
(WebInputHandler):
* chromium/public/WebLayerTreeView.h:
(WebLayerTreeView):
(WebKit::WebLayerTreeView::mainThreadHasStoppedFlinging):

Source/WebKit/chromium:

* src/WebCompositorInputHandlerImpl.cpp:
(WebKit::WebCompositorInputHandlerImpl::WebCompositorInputHandlerImpl):
(WebKit::WebCompositorInputHandlerImpl::handleInputEventInternal):
(WebKit::WebCompositorInputHandlerImpl::handleGestureFling):
(WebKit::WebCompositorInputHandlerImpl::mainThreadHasStoppedFlinging):
(WebKit):
* src/WebCompositorInputHandlerImpl.h:
(WebCompositorInputHandlerImpl):
* src/WebViewImpl.cpp:
(WebKit::WebViewImpl::handleGestureEvent):
(WebKit::WebViewImpl::handleKeyEvent):
(WebKit::WebViewImpl::updateAnimations):
(WebKit::WebViewImpl::didCommitLoad):

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

7 years agoSource/WebCore: Text Autosizing: Consider inline-block and inline-table elements...
commit-queue@webkit.org [Fri, 14 Dec 2012 21:07:07 +0000 (21:07 +0000)]
Source/WebCore: Text Autosizing: Consider inline-block and inline-table elements to be autosizing clusters.
https://bugs.webkit.org/show_bug.cgi?id=104702

Patch by Anton Vayvod <avayvod@chromium.org> on 2012-12-14
Reviewed by Julien Chaffraix.

A common pattern for creating adjacent columns in CSS is to set each of the columns to
display:inline-block, display:inline-table or alike WebKit-specific styles. Whenever columns
are used, Text Autosizing needs to assign each of the columns to different clusters (since
the user can zoom in such that a column fills the width of the screen, so text within a column
should have a smaller multiplier than it's wider enclosing cluster would have needed).

This patch causes display:inline-block, display:inline-table and alike styles to trigger new clusters.

Test: fast/text-autosizing/cluster-inline-block-or-table.html
Test: fast/text-autosizing/cluster-inline-grid-flex-box.html

* rendering/TextAutosizer.cpp:
(WebCore::TextAutosizer::isAutosizingContainer):
(WebCore::TextAutosizer::isAutosizingCluster):
    Consider display:inline-block, inline-table and alike elements to be autosizing containers and clusters.

LayoutTests: Consider inline-block and inline-table elements to be autosizing clusters.
https://bugs.webkit.org/show_bug.cgi?id=104702

Patch by Anton Vayvod <avayvod@chromium.org> on 2012-12-14
Reviewed by Julien Chaffraix.

Added tests to verify that display:inline-block, display:inline-table and alike elements become clusters.

* fast/text-autosizing/cluster-inline-block-or-table-expected.html: Added.
* fast/text-autosizing/cluster-inline-block-or-table.html: Added.
* fast/text-autosizing/cluster-inline-grid-flex-box-expected.html: Added.
* fast/text-autosizing/cluster-inline-grid-flex-box.html: Added.

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

7 years agoREGRESSION (r137607): Cannot download files, stuck in "Preparing to download"
andersca@apple.com [Fri, 14 Dec 2012 20:49:09 +0000 (20:49 +0000)]
REGRESSION (r137607): Cannot download files, stuck in "Preparing to download"
https://bugs.webkit.org/show_bug.cgi?id=105044
<rdar://problem/12879657>

Reviewed by Alexey Proskuryakov.

Make ResourceHandle::cancel return early if the handle has been converted to a download.

* platform/network/mac/ResourceHandleMac.mm:
(WebCore::ResourceHandle::cancel):

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

7 years agoMarking these tests as failure for now.
bdakin@apple.com [Fri, 14 Dec 2012 20:27:36 +0000 (20:27 +0000)]
Marking these tests as failure for now.
https://bugs.webkit.org/show_bug.cgi?id=105049 tracks fixing the issue.

* platform/mac/TestExpectations:

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

7 years agoUnreviewed, rolling out r137570.
commit-queue@webkit.org [Fri, 14 Dec 2012 20:16:33 +0000 (20:16 +0000)]
Unreviewed, rolling out r137570.
http://trac.webkit.org/changeset/137570
https://bugs.webkit.org/show_bug.cgi?id=105048

Stale nodes in the touchEventTarget HashCountedSet are
triggering crashes. Rolling out while I find the root cause.
(Requested by leviw on #webkit).

Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2012-12-14

Source/WebCore:

* dom/Document.cpp:
(WebCore::Document::Document):
(WebCore::Document::didAddTouchEventHandler):
(WebCore::Document::didRemoveTouchEventHandler):
* dom/Document.h:
(WebCore::Document::touchEventHandlerCount):
(Document):
* dom/Node.cpp:
(WebCore::Node::didMoveToNewDocument):
(WebCore::tryAddEventListener):
(WebCore::tryRemoveEventListener):
* history/CachedFrame.cpp:
(WebCore::CachedFrameBase::restore):
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::~HTMLInputElement):
(WebCore::HTMLInputElement::updateType):
* page/DOMWindow.cpp:
(WebCore::DOMWindow::addEventListener):
(WebCore::DOMWindow::removeEventListener):
* page/EventHandler.cpp:
(WebCore::EventHandler::handleTouchEvent):
* page/Frame.cpp:
(WebCore::Frame::setDocument):
* page/scrolling/ScrollingCoordinator.cpp:
* page/scrolling/ScrollingCoordinator.h:
* page/scrolling/chromium/ScrollingCoordinatorChromium.cpp:
(WebCore::ScrollingCoordinatorChromium::frameViewLayoutUpdated):
* page/scrolling/chromium/ScrollingCoordinatorChromium.h:
(ScrollingCoordinatorChromium):
* testing/Internals.cpp:
(WebCore::Internals::touchEventHandlerCount):
* testing/Internals.h:
(Internals):
* testing/Internals.idl:

Source/WebKit/chromium:

* features.gypi:
* src/WebPluginContainerImpl.cpp:
(WebKit::WebPluginContainerImpl::requestTouchEventType):
(WebKit::WebPluginContainerImpl::~WebPluginContainerImpl):

LayoutTests:

* platform/chromium/fast/events/touch/compositor-touch-hit-rects-expected.txt: Removed.
* platform/chromium/fast/events/touch/compositor-touch-hit-rects.html: Removed.

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

7 years agoUnreviewed GTK gardening.
zandobersek@gmail.com [Fri, 14 Dec 2012 19:26:04 +0000 (19:26 +0000)]
Unreviewed GTK gardening.

Adding crash expectations for two regressions after r137487 and r137607.

* platform/gtk/TestExpectations:

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

7 years agoUnreviewed rebaselines on Win7 port after r137336.
roger_fong@apple.com [Fri, 14 Dec 2012 19:24:46 +0000 (19:24 +0000)]
Unreviewed rebaselines on Win7 port after r137336.

* media/video-controls-captions-trackmenu.html:
* platform/win/fast/css-generated-content: Added.
* platform/win/fast/css-generated-content/table-row-group-to-inline-expected.txt: Added.
* platform/win/fast/css/empty-generated-content-expected.txt: Added.
* platform/win/http/tests/misc: Added.
* platform/win/http/tests/misc/acid3-expected.txt: Added.

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

7 years agoAdd a DownloadsProxyMap class in preparation for moving the downloads map away from...
andersca@apple.com [Fri, 14 Dec 2012 18:47:59 +0000 (18:47 +0000)]
Add a DownloadsProxyMap class in preparation for moving the downloads map away from WebContext
https://bugs.webkit.org/show_bug.cgi?id=104980

Reviewed by Andreas Kling.

Currently the DownloadProxyMap doesn't really do anything; this initial change is to make sure that
adding the new files won't break any builds.

* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* UIProcess/Downloads/DownloadProxyMap.cpp: Added.
(WebKit):
(WebKit::DownloadProxyMap::shared):
(WebKit::DownloadProxyMap::DownloadProxyMap):
(WebKit::DownloadProxyMap::~DownloadProxyMap):
(WebKit::DownloadProxyMap::createDownloadProxy):
* UIProcess/Downloads/DownloadProxyMap.h: Added.
(WebKit):
(DownloadProxyMap):
* UIProcess/WebContext.cpp:
(WebKit::WebContext::createDownloadProxy):
* WebKit2.xcodeproj/project.pbxproj:
* win/WebKit2.vcproj:

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

7 years agoFix assertion failure when the network process is enabled
andersca@apple.com [Fri, 14 Dec 2012 18:42:37 +0000 (18:42 +0000)]
Fix assertion failure when the network process is enabled
https://bugs.webkit.org/show_bug.cgi?id=105040
<rdar://problem/12883632>

Reviewed by Alexey Proskuryakov.

Make sure that we don't call into the download manager when running with a network process.

* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::shouldTerminate):

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

7 years ago[CSS Shaders] Remove code for the other mesh box types (border-box | padding-box...
michelangelo@webkit.org [Fri, 14 Dec 2012 18:35:32 +0000 (18:35 +0000)]
[CSS Shaders] Remove code for the other mesh box types (border-box | padding-box | content-box)
https://bugs.webkit.org/show_bug.cgi?id=103776

Reviewed by Dean Jackson.

Source/WebCore:

The MeshBoxType has been removed and the code has been refactored. The specs will be updated shortly
and therefore this feature - even though it was not fully implemented yet - shall not be used anymore.

In this patch we remove everything but the parsing code, which shall be addressed in a different patch
(see: https://bugs.webkit.org/show_bug.cgi?id=103778).

Specification to be updated: http://dvcs.w3.org/hg/FXTF/raw-file/tip/filters/index.html#ltboxgt

Existing tests have been updated and new parsing legacy cases have been added.

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::CSSComputedStyleDeclaration::valueForFilter):
* css/CSSParser.cpp:
(WebCore::CSSParser::parseCustomFilter):
* css/CSSPrimitiveValueMappings.h:
* css/StyleResolver.cpp:
(WebCore::StyleResolver::createCustomFilterOperation):
* platform/graphics/filters/CustomFilterConstants.h:
* platform/graphics/filters/CustomFilterOperation.cpp:
(WebCore::CustomFilterOperation::CustomFilterOperation):
(WebCore::CustomFilterOperation::blend):
* platform/graphics/filters/CustomFilterOperation.h:
(WebCore::CustomFilterOperation::create):
(CustomFilterOperation):
(WebCore::CustomFilterOperation::operator==):
* platform/graphics/filters/CustomFilterRenderer.cpp:
(WebCore::CustomFilterRenderer::create):
(WebCore::CustomFilterRenderer::CustomFilterRenderer):
* platform/graphics/filters/CustomFilterRenderer.h:
(CustomFilterRenderer):
* platform/graphics/filters/FECustomFilter.cpp:
(WebCore::FECustomFilter::FECustomFilter):
(WebCore::FECustomFilter::create):
* platform/graphics/filters/FECustomFilter.h:
(FECustomFilter):
* platform/graphics/filters/ValidatedCustomFilterOperation.cpp:
(WebCore::ValidatedCustomFilterOperation::ValidatedCustomFilterOperation):
* platform/graphics/filters/ValidatedCustomFilterOperation.h:
(WebCore::ValidatedCustomFilterOperation::create):
(WebCore::ValidatedCustomFilterOperation::operator==):
(ValidatedCustomFilterOperation):
* rendering/FilterEffectRenderer.cpp:
(WebCore::createCustomFilterEffect):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::computeFilterOperations):
* platform/graphics/texmap/TextureMapperGL.cpp:
(WebCore::TextureMapperGL::drawUsingCustomFilter):

Source/WebKit2:

The MeshBoxType has been removed and the code has been refactored. The specs will be updated shortly
and therefore this feature - even though it was not fully implemented yet - shall not be used anymore.

In this patch we remove everything but the parsing code, which shall be addressed in a different patch
(see: https://bugs.webkit.org/show_bug.cgi?id=103778).

Specification to be updated: http://dvcs.w3.org/hg/FXTF/raw-file/tip/filters/index.html#ltboxgt

Existing tests have been updated and new parsing legacy cases have been added.

* Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
(CoreIPC::::encode):
(CoreIPC::::decode):
* Shared/CoordinatedGraphics/WebCustomFilterOperation.h:
(WebCore::WebCustomFilterOperation::create):
(WebCore::WebCustomFilterOperation::WebCustomFilterOperation):

LayoutTests:

MeshBoxBoxType has been removed from the spec and from the code.
Parsing code has been retained for legacy reason and will be updated in a different patch
(see: https://bugs.webkit.org/show_bug.cgi?id=103778).

Current tests have been updated and new legacy test cases have been added to custom-filter-property-parsing.

* css3/filters/custom/custom-filter-animation-expected.txt:
* css3/filters/custom/custom-filter-animation.html:
* css3/filters/custom/custom-filter-array-blending-expected.txt:
* css3/filters/custom/custom-filter-array-blending.html:
* css3/filters/custom/custom-filter-property-computed-style-expected.txt:
* css3/filters/custom/custom-filter-property-parsing-expected.txt:
* css3/filters/custom/custom-filter-transforms-animation-expected.txt:
* css3/filters/custom/custom-filter-transforms-animation.html:
* css3/filters/script-tests/custom-filter-property-computed-style.js:
* css3/filters/script-tests/custom-filter-property-parsing.js:

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

7 years ago[BlackBerry] Allow plugins to be disabled by shared library filename
commit-queue@webkit.org [Fri, 14 Dec 2012 17:53:45 +0000 (17:53 +0000)]
[BlackBerry] Allow plugins to be disabled by shared library filename
https://bugs.webkit.org/show_bug.cgi?id=101274

Patch by Parth Patel <parpatel@rim.com> on 2012-12-14
Reviewed by Yong Li.

Fixing build error.

* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPage::setExtraPluginDirectory):

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

7 years ago <rdar://problem/12880750> RGRESSION: Crash when emptying cookie jar
ap@apple.com [Fri, 14 Dec 2012 17:53:18 +0000 (17:53 +0000)]
    <rdar://problem/12880750> RGRESSION: Crash when emptying cookie jar
        https://bugs.webkit.org/show_bug.cgi?id=105038

        Reviewed by Jessie Berlin.

        Handle null context, which is used for cookie management functions.

        * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
        (WebKit::WebPlatformStrategies::cookiesForDOM):
        (WebKit::WebPlatformStrategies::setCookiesFromDOM):
        (WebKit::WebPlatformStrategies::cookiesEnabled):
        (WebKit::WebPlatformStrategies::cookieRequestHeaderFieldValue):
        (WebKit::WebPlatformStrategies::getRawCookies):
        (WebKit::WebPlatformStrategies::deleteCookie):
        (WebKit::WebPlatformStrategies::getHostnamesWithCookies):
        (WebKit::WebPlatformStrategies::deleteCookiesForHostname):
        (WebKit::WebPlatformStrategies::deleteAllCookies):

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

7 years agoWeb Inspector: optional parameters of protocol commands should go after required...
yurys@chromium.org [Fri, 14 Dec 2012 17:21:20 +0000 (17:21 +0000)]
Web Inspector: optional parameters of protocol commands should go after required ones
https://bugs.webkit.org/show_bug.cgi?id=105019

Reviewed by Pavel Feldman.

* inspector/Inspector.json: Moved required x and y parameters declaration before
optional ones.
* inspector/InspectorInputAgent.cpp:
(WebCore::InspectorInputAgent::dispatchMouseEvent):
* inspector/InspectorInputAgent.h:
(InspectorInputAgent):

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

7 years agoMac build fix after r137724.
jberlin@webkit.org [Fri, 14 Dec 2012 17:19:36 +0000 (17:19 +0000)]
Mac build fix after r137724.

* platform/graphics/MediaPlayer.h:
(WebCore::MediaPlayerClient::mediaPlayerKeyAdded):
Comment out the names of the unused parameters so they don't trigger unused parameter
warnings.
(WebCore::MediaPlayerClient::mediaPlayerKeyError):
Ditto.
(WebCore::MediaPlayerClient::mediaPlayerKeyMessage):
Ditto.
(WebCore::MediaPlayerClient::mediaPlayerKeyNeeded):
Ditto.

* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::generateKeyRequest):
Pass an empty URL for the new defaultURL parameter in the keyMessage call.

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

7 years agoUnreviewed. Rolled DEPS.
senorblanco@chromium.org [Fri, 14 Dec 2012 17:00:16 +0000 (17:00 +0000)]
Unreviewed.  Rolled DEPS.

* DEPS:

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

7 years ago[GTK] When in private mode WebKitGTK+ should not save HTTP authentication credentials...
commit-queue@webkit.org [Fri, 14 Dec 2012 16:57:55 +0000 (16:57 +0000)]
[GTK] When in private mode WebKitGTK+ should not save HTTP authentication credentials to the persistent storage
https://bugs.webkit.org/show_bug.cgi?id=104910

Patch by Alberto Garcia <agarcia@igalia.com> on 2012-12-14
Reviewed by Martin Robinson.

Source/WebCore:

Add new parameter to GtkAuthenticationDialog to select whether we
allow persistent storage of credential information or not. In the
latter case, the "Remember password" check button is not shown and
the credentials are always stored in the session.

* platform/gtk/GtkAuthenticationDialog.cpp:
(WebCore::GtkAuthenticationDialog::GtkAuthenticationDialog):
(WebCore::GtkAuthenticationDialog::createContentsInContainer):
(WebCore::GtkAuthenticationDialog::buttonClickedCallback):
* platform/gtk/GtkAuthenticationDialog.h:
(GtkAuthenticationDialog):

Source/WebKit/gtk:

* WebCoreSupport/FrameLoaderClientGtk.cpp:
(WebKit::FrameLoaderClient::dispatchDidReceiveAuthenticationChallenge):
When creating the GtkAuthenticationDialog, set the credential
storage mode using the private browsing setting from the current
page.

* webkit/webkitsoupauthdialog.cpp:
(sessionAuthenticate):
Create the GtkAuthenticationDialog with no persistent storage
allowed, as we are not handling the credential persistence here.

Source/WebKit2:

* UIProcess/API/gtk/WebKit2GtkAuthenticationDialog.cpp:
(WebKit::WebKit2GtkAuthenticationDialog::WebKit2GtkAuthenticationDialog):
* UIProcess/API/gtk/WebKit2GtkAuthenticationDialog.h:
(WebKit2GtkAuthenticationDialog):
GtkAuthenticationDialog has a new credential storage mode
parameter, so add it here too.

* UIProcess/API/gtk/WebKitWebView.cpp:
(webkitWebViewHandleAuthenticationChallenge):
When creating the GtkAuthenticationDialog, set the credential
storage mode using the private browsing setting from the current
page.

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

7 years agoUnreviewed. Rolled DEPS.
senorblanco@chromium.org [Fri, 14 Dec 2012 16:18:37 +0000 (16:18 +0000)]
Unreviewed.  Rolled DEPS.

* DEPS:

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

7 years ago[EFL][WK2] Fix EFL build after r137718
commit-queue@webkit.org [Fri, 14 Dec 2012 16:12:03 +0000 (16:12 +0000)]
[EFL][WK2] Fix EFL build after r137718
https://bugs.webkit.org/show_bug.cgi?id=105018

Unreviewed build fix.

The problem was that UNUSED_PARAM(size) was left in the code
for non-existent variable 'size'.

Patch by Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com> on 2012-12-14

* UIProcess/efl/PageClientDefaultImpl.cpp:
(WebKit::PageClientDefaultImpl::updateViewportSize):
* UIProcess/efl/PageClientLegacyImpl.cpp:
(WebKit::PageClientLegacyImpl::updateViewportSize):

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

7 years ago[Chromium gardening] Set expectations for platform/chromium/virtual/gpu/compositedscr...
wjmaclean@chromium.org [Fri, 14 Dec 2012 15:45:46 +0000 (15:45 +0000)]
[Chromium gardening] Set expectations for platform/chromium/virtual/gpu/compositedscrolling/scrollbars/scrollbar-drag-thumb-with-large-content-expected.html

Unreviewed gardening change.

Need to mirror the expectations for the virtual tests against those for the
original.

* platform/chromium/TestExpectations:

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

7 years agoUnreviewed, rolling out r129633 and r129757.
caseq@chromium.org [Fri, 14 Dec 2012 15:35:14 +0000 (15:35 +0000)]
Unreviewed, rolling out r129633 and r129757.
http://trac.webkit.org/changeset/129633
http://trac.webkit.org/changeset/129757
https://bugs.webkit.org/show_bug.cgi?id=97659

Causes performance regression whn inspector overlay is
displayed

* inspector/InspectorOverlay.cpp:
(WebCore::InspectorOverlay::paint):

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

7 years ago[BlackBerry][Fullscreen] Exiting fullscreen does not set the correct scroll position
zhajiang@rim.com [Fri, 14 Dec 2012 15:33:11 +0000 (15:33 +0000)]
[BlackBerry][Fullscreen] Exiting fullscreen does not set the correct scroll position
https://bugs.webkit.org/show_bug.cgi?id=104958

Patch by Jacky Jiang  <zhajiang@rim.com>.
Reviewed by Antonio Gomes.
Internally reviewed by Arvid Nilsson and Max Feil.

PR: 231174
When leaving fullscreen, WebPage scale and scroll position can't return
to the original scale and scroll position.
We can't restore them in WebPagePrivate::exitFullScreenForElement()
as they can still be changed thereafter during the async
setViewportSize(). And also the async setViewportSize() from the app
side isn't guaranteed as some apps don't need to resize the viewport if
their windows are already fullscreen.
The restoration is basically only needed if viewport size is changed.
At the point of entering fullscreen, we can safely assume that there
would be a viewport size change thereafter if the current visible size
and screen size are not equal. Based on this assumption, we can save
the scale and position before entering fullscreen and restore them in
setViewportSize() thereafter.

* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPagePrivate::WebPagePrivate):
(BlackBerry::WebKit::WebPagePrivate::setViewportSize):
* Api/WebPage_p.h:
(WebPagePrivate):

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

7 years agoWeb Inspector: add data grid for exploring native heap graph
yurys@chromium.org [Fri, 14 Dec 2012 14:10:00 +0000 (14:10 +0000)]
Web Inspector: add data grid for exploring native heap graph
https://bugs.webkit.org/show_bug.cgi?id=105012

Reviewed by Pavel Feldman.

Source/WebCore:

Added a view for displaying native heap graph nodes.

* inspector/HeapGraphSerializer.cpp:
(WebCore::HeapGraphSerializer::reportEdge):
* inspector/front-end/NativeMemorySnapshotView.js:
(WebInspector.NativeMemorySnapshotView):
(WebInspector.NativeMemorySnapshotView.prototype._onSelectedViewChanged):
(WebInspector.NativeMemorySnapshotView.prototype.get statusBarItems):
(WebInspector.NativeHeapGraphNode):
(WebInspector.NativeHeapGraphNode.prototype.id):
(WebInspector.NativeHeapGraphNode.prototype.type):
(WebInspector.NativeHeapGraphNode.prototype.size):
(WebInspector.NativeHeapGraphNode.prototype.className):
(WebInspector.NativeHeapGraphNode.prototype.name):
(WebInspector.NativeHeapGraphNode.prototype.hasReferencedNodes):
(WebInspector.NativeHeapGraphNode.prototype.referencedNodes):
(WebInspector.NativeHeapGraphNode.prototype._firstEdgePoistion):
(WebInspector.NativeHeapGraphNode.prototype._afterLastEdgePosition):
(WebInspector.NativeHeapGraphNode.prototype._getStringField):
(WebInspector.NativeHeapGraph):
(WebInspector.NativeHeapGraph.prototype.rootNodes):
(WebInspector.NativeHeapGraph.prototype._calculateNodeEdgeIndexes):
(WebInspector.NativeHeapGraphDataGrid):
(WebInspector.NativeHeapGraphDataGridRoot):
(WebInspector.NativeHeapGraphDataGridRoot.prototype._populate):
(WebInspector.NativeHeapGraphDataGridNode):
(WebInspector.NativeHeapGraphDataGridNode.prototype._populate):
(WebInspector.NativeMemoryProfileType.prototype.buttonClicked.didReceiveMemorySnapshot):
(WebInspector.NativeMemoryProfileType.prototype.buttonClicked):

Source/WTF:

Do not report edges with null target.

* wtf/MemoryInstrumentation.h:
(WTF::MemoryInstrumentation::addObjectImpl):

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

7 years agoWeb Inspector: Native Memory Instrumentation: do not validate InlineFlowBox objects...
loislo@chromium.org [Fri, 14 Dec 2012 13:54:22 +0000 (13:54 +0000)]
Web Inspector: Native Memory Instrumentation: do not validate InlineFlowBox objects against tcmalloc data.
https://bugs.webkit.org/show_bug.cgi?id=105001

Reviewed by Yury Semikhatsky.

This is a follow-up change for r137589.

* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::reportMemoryUsage):
(WebCore):
* rendering/InlineFlowBox.h:
(InlineFlowBox):

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

7 years ago[Chromium] Unreviewed rebaseline after Skia roll @6773.
fmalita@chromium.org [Fri, 14 Dec 2012 13:49:49 +0000 (13:49 +0000)]
[Chromium] Unreviewed rebaseline after Skia roll @6773.

* platform/chromium-linux/fast/borders/borderRadiusDotted02-expected.png:
* platform/chromium-linux/fast/borders/borderRadiusDotted03-expected.png:
* platform/chromium-linux/fast/borders/borderRadiusDotted04-expected.png:
* platform/chromium-mac/fast/borders/borderRadiusDotted02-expected.png:
* platform/chromium-mac/fast/borders/borderRadiusDotted03-expected.png:
* platform/chromium-mac/fast/borders/borderRadiusDotted04-expected.png:

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

7 years agoChildNodesLazySnapshot::nextNode() can crash in Debug builds
haraken@chromium.org [Fri, 14 Dec 2012 12:04:28 +0000 (12:04 +0000)]
ChildNodesLazySnapshot::nextNode() can crash in Debug builds
https://bugs.webkit.org/show_bug.cgi?id=104982

Reviewed by Ryosuke Niwa.

The original fix in r137702 was not enough. r137702 fixed a crash
in Release builds but didn't fix a crash in Debug builds.
We have to also change a return type of ChildNodesLazySnapshot::nextNode()
from a raw pointer to a RefPtr.

Test: fast/dom/insertedIntoDocument-no-crash.html
(Confirm that this test does not crash in Debug builds.)

* dom/ContainerNode.h:
(WebCore::ChildNodesLazySnapshot::nextNode):
* dom/ContainerNodeAlgorithms.cpp:
(WebCore::ChildNodeInsertionNotifier::notifyDescendantInsertedIntoDocument):
(WebCore::ChildNodeRemovalNotifier::notifyDescendantRemovedFromDocument):

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

7 years agoText Autosizing: Don't autosize unwrappable blocks
commit-queue@webkit.org [Fri, 14 Dec 2012 11:58:39 +0000 (11:58 +0000)]
Text Autosizing: Don't autosize unwrappable blocks
https://bugs.webkit.org/show_bug.cgi?id=104925

Patch by John Mellor <johnme@chromium.org> on 2012-12-14
Reviewed by Julien Chaffraix.

Source/WebCore:

If we autosize an unwrappable block (white-space:nowrap/pre), it'll
expand sideways. This doesn't actually improve its legibility, and it
can often severely break web page layouts. This patch prevents us from
autosizing unwrappable blocks. A follow-up patch will address the more
complex issue of unwrappable inline elements.

Tests: fast/text-autosizing/unwrappable-blocks.html
       fast/text-autosizing/unwrappable-inlines.html

* rendering/TextAutosizer.cpp:
(WebCore::TextAutosizer::processContainer):
    Use containerShouldbeAutosized instead of contentHeightIsConstrained.
(WebCore::contentHeightIsConstrained):
    Unchanged, just moved lower down the file.
(WebCore::TextAutosizer::containerShouldbeAutosized):
    Checks that the block is wrappable, and also that contentHeightIsConstrained is false.
(WebCore::TextAutosizer::measureDescendantTextWidth):
    Use containerShouldbeAutosized instead of contentHeightIsConstrained.
* rendering/TextAutosizer.h:
    Declared containerShouldbeAutosized.

LayoutTests:

Added tests verifying that this prevents unwrappable blocks from being
autosized, and that this has no effect on unwrappable inlines.

* fast/text-autosizing/unwrappable-blocks-expected.html: Added.
* fast/text-autosizing/unwrappable-blocks.html: Added.
* fast/text-autosizing/unwrappable-inlines-expected.html: Added.
* fast/text-autosizing/unwrappable-inlines.html: Added.

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

7 years agoWeb Inspector: Duplicate scripts appear in workspace when script was referenced by...
vsevik@chromium.org [Fri, 14 Dec 2012 11:16:05 +0000 (11:16 +0000)]
Web Inspector: Duplicate scripts appear in workspace when script was referenced by url with a fragment part.
https://bugs.webkit.org/show_bug.cgi?id=105004

Reviewed by Alexander Pavlov.

* inspector/front-end/NetworkUISourceCodeProvider.js:
(WebInspector.NetworkUISourceCodeProvider.prototype._parsedScriptSource):

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

7 years agoRemove an exception message from insertedIntoDocument-no-crash-expected.txt
haraken@chromium.org [Fri, 14 Dec 2012 10:56:24 +0000 (10:56 +0000)]
Remove an exception message from insertedIntoDocument-no-crash-expected.txt
https://bugs.webkit.org/show_bug.cgi?id=104982

Reviewed by Ryosuke Niwa.

To make the test result identical in all platforms, this patch
removes an exception message from insertedIntoDocument-no-crash-expected.txt.

* fast/dom/insertedIntoDocument-no-crash-expected.txt:
* fast/dom/insertedIntoDocument-no-crash.html:

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

7 years agoUnreviewed. Rebaselined images.
haraken@chromium.org [Fri, 14 Dec 2012 10:54:15 +0000 (10:54 +0000)]
Unreviewed. Rebaselined images.

* platform/chromium-mac-lion/platform/chromium/virtual/gpu/compositedscrolling/scrollbars/custom-scrollbar-with-incomplete-style-expected.png: Added.
* platform/chromium-mac-snowleopard/platform/chromium/virtual/gpu/compositedscrolling/scrollbars/custom-scrollbar-with-incomplete-style-expected.png: Added.
* platform/chromium-mac/platform/chromium/virtual/gpu/compositedscrolling/scrollbars/custom-scrollbar-with-incomplete-style-expected.png: Added.

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

7 years agoUnreviewed. Marked fast/css/variables/case-insensitive.html as [ Pass Crash ]
haraken@chromium.org [Fri, 14 Dec 2012 10:51:34 +0000 (10:51 +0000)]
Unreviewed. Marked fast/css/variables/case-insensitive.html as [ Pass Crash ]

* platform/chromium/TestExpectations:

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

7 years agoHours field of date/time input UI should respect step attribute
commit-queue@webkit.org [Fri, 14 Dec 2012 09:32:28 +0000 (09:32 +0000)]
Hours field of date/time input UI should respect step attribute
https://bugs.webkit.org/show_bug.cgi?id=104993

Patch by Kunihiko Sakamoto <ksakamoto@chromium.org> on 2012-12-14
Reviewed by Kent Tamura.

Source/WebCore:

This patch makes step-up/-down UI of the hours field respect step attribute when possible.

Test: fast/forms/time-multiple-fields/time-multiple-fields-stepup-stepdown-from-renderer.html

* html/shadow/DateTimeEditElement.cpp:
(WebCore::DateTimeEditBuilder::visitField): Pass step parameters to the hour field constructor.
* html/shadow/DateTimeFieldElements.cpp:
(WebCore::DateTimeHourFieldElement::DateTimeHourFieldElement): Add Parameters argument.
(WebCore::DateTimeHourFieldElement::create): Ditto.
* html/shadow/DateTimeFieldElements.h:
(DateTimeHourFieldElement): Ditto.

LayoutTests:

* fast/forms/time-multiple-fields/time-multiple-fields-stepup-stepdown-from-renderer-expected.txt:
* fast/forms/time-multiple-fields/time-multiple-fields-stepup-stepdown-from-renderer.html:
Added test cases for hour field.

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

7 years agoUnreviewed. Windows compilation fix after r137728.
yurys@chromium.org [Fri, 14 Dec 2012 09:30:22 +0000 (09:30 +0000)]
Unreviewed. Windows compilation fix after r137728.

* inspector/InspectorAllInOne.cpp:

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

7 years ago[Shadow DOM] ShadowRoot.getElementById() should work outside document.
shinyak@chromium.org [Fri, 14 Dec 2012 09:23:22 +0000 (09:23 +0000)]
[Shadow DOM] ShadowRoot.getElementById() should work outside document.
https://bugs.webkit.org/show_bug.cgi?id=87815

Reviewed by Hajime Morita.

Source/WebCore:

ShadowRoot.getElementById() didn't work if ShadowRoot is outside document. We need to update id when an element
is in ShadowTree event if it is not in document.

For performance reason, we introduce IsInShadowTree flag, which enables us to check isInTreeScope() fast.
This is maintained in Element::insertedInto and removedFrom. Here, we're anxious about performance regression,
however our benchmark result shows this doesn't regress the performance.

I've measured Dromaeo/dom-modify.html and Parser/html5-full-render.html 2 times.

Dromaeo/dom-modify.html
     35.21,   35.27 [runs/s] --->   35.76,   35.56 [runs/s]
Parser/html5-full-render.html
   4328.51, 4254.94 [ms]     ---> 4277.14, 4222.43 [ms]

Test: fast/dom/shadow/getelementbyid-in-orphan.html

* dom/Element.cpp:
(WebCore::Element::insertedInto):
* dom/Element.h:
(WebCore::Element::updateId):
* dom/Node.cpp:
(WebCore::Node::insertedInto): If the parent node is in shadow tree, this node should be also in the same shadow tree.
Since this node is inserted, parentOrHostNode() will not be null.
(WebCore::Node::removedFrom): When node is removed from ShadowTree, its treeScope() should not be ShadowRoot.
* dom/Node.h:
(Node):
(WebCore::Node::isInShadowTree):
(WebCore::Node::isInTreeScope):

LayoutTests:

* fast/dom/shadow/getelementbyid-in-orphan-expected.txt: Added.
* fast/dom/shadow/getelementbyid-in-orphan.html: Added.

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