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: http://svn.webkit.org/repository/webkit/trunk@137739 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[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: http://svn.webkit.org/repository/webkit/trunk@137740 268f45cc-cd09-0410-ab3c-d52691b4dbfc
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: http://svn.webkit.org/repository/webkit/trunk@137741 268f45cc-cd09-0410-ab3c-d52691b4dbfc
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: http://svn.webkit.org/repository/webkit/trunk@137742 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[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: http://svn.webkit.org/repository/webkit/trunk@137743 268f45cc-cd09-0410-ab3c-d52691b4dbfc
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: http://svn.webkit.org/repository/webkit/trunk@137744 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[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: http://svn.webkit.org/repository/webkit/trunk@137745 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[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: http://svn.webkit.org/repository/webkit/trunk@137746 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed.  Rolled DEPS.

* DEPS:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@137747 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[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: http://svn.webkit.org/repository/webkit/trunk@137748 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed.  Rolled DEPS.

* DEPS:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@137749 268f45cc-cd09-0410-ab3c-d52691b4dbfc
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: http://svn.webkit.org/repository/webkit/trunk@137750 268f45cc-cd09-0410-ab3c-d52691b4dbfc
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: http://svn.webkit.org/repository/webkit/trunk@137751 268f45cc-cd09-0410-ab3c-d52691b4dbfc
        <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: http://svn.webkit.org/repository/webkit/trunk@137752 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[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: http://svn.webkit.org/repository/webkit/trunk@137753 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[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: http://svn.webkit.org/repository/webkit/trunk@137754 268f45cc-cd09-0410-ab3c-d52691b4dbfc
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: http://svn.webkit.org/repository/webkit/trunk@137755 268f45cc-cd09-0410-ab3c-d52691b4dbfc
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: http://svn.webkit.org/repository/webkit/trunk@137756 268f45cc-cd09-0410-ab3c-d52691b4dbfc
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: http://svn.webkit.org/repository/webkit/trunk@137757 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed GTK gardening.

Adding crash expectations for two regressions after r137487 and r137607.

* platform/gtk/TestExpectations:


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