Web Inspector: heap profiler should allow revealing an element which is logged to the console
https://bugs.webkit.org/show_bug.cgi?id=86204

Reviewed by Pavel Feldman.

JS objects in the console have context menu item that allows to reveal them in a heap snapshot view.

* English.lproj/localizedStrings.js:
* inspector/front-end/ConsoleMessage.js:
(WebInspector.ConsoleMessageImpl.prototype._formatParameterAsObject):
* inspector/front-end/ContextMenu.js:
(WebInspector.ContextMenu.prototype.isEmpty):
* inspector/front-end/DataGrid.js:
(WebInspector.DataGridNode.prototype._detach):
(WebInspector.DataGridNode.prototype.wasDetached):
* inspector/front-end/HeapSnapshot.js:
(WebInspector.HeapSnapshot.prototype.nodeClassName):
(WebInspector.HeapSnapshotNodesProvider.prototype.nodePosition):
* inspector/front-end/HeapSnapshotDataGrids.js:
(WebInspector.HeapSnapshotSortableDataGrid):
(WebInspector.HeapSnapshotSortableDataGrid.prototype.highlightObjectByHeapSnapshotId):
(WebInspector.HeapSnapshotSortableDataGrid.prototype.highlightNode):
(WebInspector.HeapSnapshotSortableDataGrid.prototype.nodeWasDetached):
(WebInspector.HeapSnapshotSortableDataGrid.prototype._clearCurrentHighlight):
(WebInspector.HeapSnapshotViewportDataGrid):
(WebInspector.HeapSnapshotViewportDataGrid.prototype.highlightNode):
(WebInspector.HeapSnapshotViewportDataGrid.prototype._onScroll):
(WebInspector.HeapSnapshotConstructorsDataGrid):
(WebInspector.HeapSnapshotConstructorsDataGrid.prototype.highlightObjectByHeapSnapshotId.didGetClassName):
(WebInspector.HeapSnapshotConstructorsDataGrid.prototype.highlightObjectByHeapSnapshotId):
(WebInspector.HeapSnapshotConstructorsDataGrid.prototype.setDataSource):
* inspector/front-end/HeapSnapshotGridNodes.js:
(WebInspector.HeapSnapshotGridNode.prototype.wasDetached):
(WebInspector.HeapSnapshotConstructorNode.prototype.revealNodeBySnapshotObjectId):
(WebInspector.HeapSnapshotConstructorNode.prototype.revealNodeBySnapshotObjectId.didPopulateChildren):
* inspector/front-end/HeapSnapshotProxy.js:
(WebInspector.HeapSnapshotProxy.prototype.nodeClassName):
(WebInspector.HeapSnapshotProviderProxy.prototype.nodePosition):
* inspector/front-end/ObjectPropertiesSection.js:
(WebInspector.ObjectPropertiesSection.ContextMenuProvider):
(WebInspector.ObjectPropertiesSection.ContextMenuProvider.prototype.populateContextMenu):
(WebInspector.ObjectPropertiesSection.addContextMenuProvider):
(WebInspector.ObjectPropertiesSection.prototype.enableContextMenu):
(WebInspector.ObjectPropertiesSection.prototype._contextMenuEventFired):
* inspector/front-end/ProfilesPanel.js:
(WebInspector.ProfilesPanel.prototype.showObject):
(WebInspector.RevealInHeapSnapshotContextMenuProvider):
(WebInspector.RevealInHeapSnapshotContextMenuProvider.prototype.populateContextMenu.revealInSummaryView):
(WebInspector.RevealInHeapSnapshotContextMenuProvider.prototype.populateContextMenu.didReceiveHeapObjectId):
(WebInspector.RevealInHeapSnapshotContextMenuProvider.prototype.populateContextMenu):
* inspector/front-end/profilesPanel.css:
(.highlighted-row):
(@-webkit-keyframes row_highlight):
(to):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@116857 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] Allow the platform media player to determine the media element's paused/playing status
https://bugs.webkit.org/show_bug.cgi?id=86235

Patch by Max Feil <mfeil@rim.com> on 2012-05-12
Reviewed by George Staikos.

Source/WebCore:

The platform media player needs to know when the HTMLMediaElement
is not paused. This is to address problems when switching
source element, which causes the destruction of the old
MediaPlayerPrivate object and construction of a new one. The
new one must resume playing ASAP if the old one was playing.

Test: media/media-continues-playing-after-replace-source.html

* platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp:
(WebCore::MediaPlayerPrivate::isElementPaused):
(WebCore):
* platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.h:
(MediaPlayerPrivate):

LayoutTests:

This test replaces the source element of a playing media object
and makes sure the new source element begins playing.

* media/media-continues-playing-after-replace-source-expected.txt: Added.
* media/media-continues-playing-after-replace-source.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@116858 268f45cc-cd09-0410-ab3c-d52691b4dbfc
run-safari and co. should support --guard-malloc command line argument
https://bugs.webkit.org/show_bug.cgi?id=86287

Reviewed by Dan Bernstein.

Add setUpGuardMallocIfNeeded(), which consults the argument --guard-malloc on OS X,
setting DYLD_INSERT_LIBRARIES="/usr/lib/libgmalloc.dylib" if it's enabled.

Use setUpGuardMallocIfNeeded() before running a WebKit app (whether standalone or
in the debugger). This will cause gmalloc to be loaded for gdb as well, but this
tends to be harmless.

Change "malloc guard" to the more common "Guard Malloc" in run-webkit-tests.

* Scripts/old-run-webkit-tests:
* Scripts/webkitdirs.pm:
(appendToEnvironmentVariableList):
(setUpGuardMallocIfNeeded):
(printHelpAndExitForRunAndDebugWebKitAppIfNeeded):
(runMacWebKitApp):
(execMacWebKitAppForDebugging):
* Scripts/webkitpy/layout_tests/run_webkit_tests.py:
(parse_args):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@116859 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Cleanup before changing attributeName in SVG <animate>
https://bugs.webkit.org/show_bug.cgi?id=86100

Reviewed by Nikolas Zimmermann.

Source/WebCore:

Changing attributeName caused a crash because references were not removed from the old target.
This change simply cleans up before changing attributeName in SVG animation elements.

Test: svg/animations/dynamic-modify-attributename-crash.svg

* svg/animation/SVGSMILElement.cpp:
(WebCore::SVGSMILElement::svgAttributeChanged):

LayoutTests:

* svg/animations/dynamic-modify-attributename-crash-expected.txt: Added.
* svg/animations/dynamic-modify-attributename-crash.svg: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@116860 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[wx] Fix backing bitmap creation under wxMSW.
https://bugs.webkit.org/show_bug.cgi?id=86304

Reviewed by Kevin Ollivier.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@116862 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[wx] Restore paste implementation and fix a couple typos.
https://bugs.webkit.org/show_bug.cgi?id=86311


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@116863 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Crash in HTMLSelectElement::setOption
https://bugs.webkit.org/show_bug.cgi?id=85420

Source/WebCore:

Reviewed by Eric Seidel

RefPtr before option in HTMLSelectElement::setOption since it
can get destroyed due to mutation events.

Test: fast/dom/HTMLSelectElement/option-add-crash.html

* html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::setOption):

LayoutTests:

Reviewed by Eric Seidel.

* fast/dom/HTMLSelectElement/option-add-crash-expected.txt: Added.
* fast/dom/HTMLSelectElement/option-add-crash.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@116864 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r116812.
http://trac.webkit.org/changeset/116812
https://bugs.webkit.org/show_bug.cgi?id=86313

Appears to be causing a top crash (Requested by abarth on
#webkit).

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

Source/Platform:

* Platform.gypi:
* chromium/public/Platform.h:
(WebKit):
* chromium/public/WebStorageArea.h: Removed.
* chromium/public/WebStorageNamespace.h: Removed.

Source/WebKit/chromium:

* WebKit.gyp:
* public/WebStorageArea.h:
(WebKit):
(WebStorageArea):
(WebKit::WebStorageArea::~WebStorageArea):
(WebKit::WebStorageArea::setItem):
(WebKit::WebStorageArea::removeItem):
(WebKit::WebStorageArea::clear):
* public/WebStorageNamespace.h:
(WebKit):
(WebStorageNamespace):
(WebKit::WebStorageNamespace::~WebStorageNamespace):
(WebKit::WebStorageNamespace::isSameNamespace):
* public/platform/WebKitPlatformSupport.h:
(WebKit):
(WebKitPlatformSupport):
(WebKit::WebKitPlatformSupport::createLocalStorageNamespace):
* src/StorageAreaProxy.cpp:
* src/StorageNamespaceProxy.cpp:
(WebCore::StorageNamespace::localStorageNamespace):

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