Fix build warning in OSAllocatorPosix.cpp
https://bugs.webkit.org/show_bug.cgi?id=105761

Reviewed by Kentaro Hara.

* wtf/OSAllocatorPosix.cpp:
(WTF::OSAllocator::reserveUncommitted): Fix unused param warnings.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138474 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: prepare HeapSnapshot.js for use with native heap snapshot
https://bugs.webkit.org/show_bug.cgi?id=105763

Reviewed by Alexander Pavlov.

HeapSnapshot.js now expects root node to be either the first or the last (real) one
in the list of all nodes.

* inspector/HeapGraphSerializer.cpp:
(HeapGraphNode):
(WebCore::HeapGraphSerializer::serialize): reordered node and edge fields so that the go in
the same order as in the JS heap snapshot.
* inspector/front-end/HeapSnapshot.js:
(WebInspector.HeapSnapshot.prototype._buildAggregates):
(WebInspector.HeapSnapshot.prototype._buildDominatedNodes):
* inspector/front-end/NativeHeapGraph.js:
(WebInspector.NativeHeapGraph):
(WebInspector.NativeHeapGraph.prototype.root): now there is explicit root node which is the last
one in the list, use it.
(WebInspector.NativeHeapGraph.prototype._calculateNodeEdgeIndexes):
(WebInspector.NativeHeapGraph.prototype._addDummyNode): fixed dummy node first edge index.
(WebInspector.NativeHeapGraph.Edge.prototype.target):
(WebInspector.NativeHeapGraph.Node.prototype.referencedNodes):
* inspector/front-end/NativeMemorySnapshotView.js:
(WebInspector.NativeSnapshotNode.prototype._addChildrenFromGraph): switched to use of the root node
(WebInspector.NativeHeapGraphDataGridRoot.prototype._populate):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138475 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[WIN] Build fix for !USE(CFNETWORK) after r138413.

* platform/network/NetworkStorageSession.h:
(WebCore):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138476 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: extract JS heap profiler specifics into JSHeapSnapshot.js
https://bugs.webkit.org/show_bug.cgi?id=105768

Reviewed by Pavel Feldman.

Source/WebCore:

Inroduced JSHeapSnapshot, JSHeapSnapshotNode, JSHeapSnapshotEdge and JSHeapSnapshotRetainerEdge which
should encapsulate logic specific to JS-heap.
No behavioral changes, covered with existing heap profiler tests.

* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* inspector/compile-front-end.py:
* inspector/front-end/HeapSnapshot.js:
(WebInspector.HeapSnapshotEdge.prototype.hasStringName):
(WebInspector.HeapSnapshotEdge.prototype.name):
(WebInspector.HeapSnapshotEdge.prototype.node):
(WebInspector.HeapSnapshotEdge.prototype.toString):
(WebInspector.HeapSnapshotRetainerEdge.prototype._node):
(WebInspector.HeapSnapshotRetainerEdge.prototype._edge):
(WebInspector.HeapSnapshotNode.prototype.className):
(WebInspector.HeapSnapshotNode.prototype.classIndex):
(WebInspector.HeapSnapshotNode.prototype.edges):
(WebInspector.HeapSnapshotNode.prototype.id):
(WebInspector.HeapSnapshotNode.prototype.retainers):
(WebInspector.HeapSnapshot.prototype.createNode):
(WebInspector.HeapSnapshot.prototype.createEdge):
(WebInspector.HeapSnapshot.prototype.createRetainingEdge):
(WebInspector.HeapSnapshot.prototype.rootNode):
(WebInspector.HeapSnapshot.prototype.aggregatesForDiff):
(WebInspector.HeapSnapshot.prototype._buildAggregates):
(WebInspector.HeapSnapshot.prototype._calculateClassesRetainedSize):
(WebInspector.HeapSnapshot.prototype._sortAggregateIndexes):
(WebInspector.HeapSnapshot.prototype._calculateDiffForClass):
(WebInspector.HeapSnapshot.prototype.createEdgesProvider):
(WebInspector.HeapSnapshot.prototype.createRetainingEdgesProvider):
(WebInspector.HeapSnapshot.prototype.createNodesProviderForDominator):
(WebInspector.HeapSnapshotNodesProvider.prototype.nodePosition):
* inspector/front-end/HeapSnapshotLoader.js:
(WebInspector.HeapSnapshotLoader.prototype.buildSnapshot):
* inspector/front-end/HeapSnapshotProxy.js:
(WebInspector.HeapSnapshotWorker):
* inspector/front-end/HeapSnapshotWorker.js:
* inspector/front-end/JSHeapSnapshot.js: Added.
(WebInspector.JSHeapSnapshot):
(WebInspector.JSHeapSnapshot.prototype.createNode):
(WebInspector.JSHeapSnapshot.prototype.createEdge):
(WebInspector.JSHeapSnapshot.prototype.createRetainingEdge):
(WebInspector.JSHeapSnapshotNode):
(WebInspector.JSHeapSnapshotNode.prototype.canBeQueried):
(WebInspector.JSHeapSnapshotNode.prototype.isPageObject):
(WebInspector.JSHeapSnapshotNode.prototype.distanceToWindow):
(WebInspector.JSHeapSnapshotNode.prototype.className):
(WebInspector.JSHeapSnapshotNode.prototype.classIndex):
(WebInspector.JSHeapSnapshotNode.prototype.id):
(WebInspector.JSHeapSnapshotNode.prototype.isHidden):
(WebInspector.JSHeapSnapshotNode.prototype.isNative):
(WebInspector.JSHeapSnapshotNode.prototype.isSynthetic):
(WebInspector.JSHeapSnapshotNode.prototype.isWindow):
(WebInspector.JSHeapSnapshotNode.prototype.isDetachedDOMTreesRoot):
(WebInspector.JSHeapSnapshotNode.prototype.isDetachedDOMTree):
(WebInspector.JSHeapSnapshotEdge):
(WebInspector.JSHeapSnapshotEdge.prototype.clone):
(WebInspector.JSHeapSnapshotEdge.prototype.hasStringName):
(WebInspector.JSHeapSnapshotEdge.prototype.isElement):
(WebInspector.JSHeapSnapshotEdge.prototype.isHidden):
(WebInspector.JSHeapSnapshotEdge.prototype.isWeak):
(WebInspector.JSHeapSnapshotEdge.prototype.isInternal):
(WebInspector.JSHeapSnapshotEdge.prototype.isInvisible):
(WebInspector.JSHeapSnapshotEdge.prototype.isShortcut):
(WebInspector.JSHeapSnapshotEdge.prototype.name):
(WebInspector.JSHeapSnapshotEdge.prototype.toString):
(WebInspector.JSHeapSnapshotEdge.prototype._hasStringName):
(WebInspector.JSHeapSnapshotEdge.prototype._name):
(WebInspector.JSHeapSnapshotEdge.prototype._nameOrIndex):
(WebInspector.JSHeapSnapshotEdge.prototype._type):
(WebInspector.JSHeapSnapshotRetainerEdge):
(WebInspector.JSHeapSnapshotRetainerEdge.prototype.clone):
(WebInspector.JSHeapSnapshotRetainerEdge.prototype.isElement):
(WebInspector.JSHeapSnapshotRetainerEdge.prototype.isHidden):
(WebInspector.JSHeapSnapshotRetainerEdge.prototype.isInternal):
(WebInspector.JSHeapSnapshotRetainerEdge.prototype.isInvisible):
(WebInspector.JSHeapSnapshotRetainerEdge.prototype.isShortcut):
(WebInspector.JSHeapSnapshotRetainerEdge.prototype.isWeak):
* inspector/front-end/ProfilesPanel.js:
* inspector/front-end/WebKit.qrc:

Source/WebKit/chromium:

* WebKit.gyp: added new file to JS heap profiler.

LayoutTests:

Inroduced JSHeapSnapshot, JSHeapSnapshotNode, JSHeapSnapshotEdge and JSHeapSnapshotRetainerEdge which
should encapsulate logic specific to JS-heap. The tests were switched to the new classes.

* inspector/profiler/heap-snapshot-loader.html:
* inspector/profiler/heap-snapshot-test.js:
(initialize_HeapSnapshotTest.InspectorTest.createJSHeapSnapshotMockObject):
(initialize_HeapSnapshotTest.InspectorTest.createHeapSnapshotMockRaw):
* inspector/profiler/heap-snapshot.html:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138477 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] Caret doesn't update position when scrolling text in Input element
https://bugs.webkit.org/show_bug.cgi?id=105757

Patch by Sean Wang <Xuewen.Wang@torchmobile.com.cn> on 2012-12-26
Reviewed by George Staikos.

PR 271627
Internally reviewed by George Staikos.

Call FrameSelection's updateAppearence instead of SelectionHandler's
selectionPositionChanged to update the caret position.

* Api/InRegionScroller.cpp:
(BlackBerry::WebKit::InRegionScrollerPrivate::setLayerScrollPosition):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138478 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Convert WebKeyValueStorageManager and WebMediaCacheManager to MessageReceiver
https://bugs.webkit.org/show_bug.cgi?id=105751

Reviewed by Andreas Kling.

* WebProcess/KeyValueStorage/WebKeyValueStorageManager.cpp:
(WebKit::WebKeyValueStorageManager::WebKeyValueStorageManager):
(WebKit::WebKeyValueStorageManager::dispatchDidGetKeyValueStorageOrigins):
(WebKit::WebKeyValueStorageManager::getKeyValueStorageOrigins):
(WebKit::WebKeyValueStorageManager::deleteEntriesForOrigin):
(WebKit::WebKeyValueStorageManager::deleteAllEntries):
* WebProcess/KeyValueStorage/WebKeyValueStorageManager.h:
(WebKeyValueStorageManager): Remove unused m_originsLoaded member variable.
* WebProcess/MediaCache/WebMediaCacheManager.cpp:
(WebKit::WebMediaCacheManager::WebMediaCacheManager):
(WebKit::WebMediaCacheManager::getHostnamesWithMediaCache):
(WebKit::WebMediaCacheManager::clearCacheForHostname):
(WebKit::WebMediaCacheManager::clearCacheForAllHostnames):
* WebProcess/MediaCache/WebMediaCacheManager.h:
(WebMediaCacheManager):
Convert the managers to MessageReceiver.

* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::WebProcess):
(WebKit::WebProcess::initializeWebProcess):
(WebKit::WebProcess::didReceiveMessage):
* WebProcess/WebProcess.h:
(WebProcess):
Add the new managers.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138479 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: [Resources] Table lose focus (selection) after deleting cookie.
https://bugs.webkit.org/show_bug.cgi?id=105716

Patch by Eugene Klyuchnikov <eustas@chromium.org> on 2012-12-26
Reviewed by Yury Semikhatsky.

This makes deletion of a set of cookies (using keyboard) painful.

* inspector/front-end/CookieItemsView.js: Call method instead of getter.
* inspector/front-end/CookiesTable.js: Remember and use next selected
cookie value.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138480 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r137905.
http://trac.webkit.org/changeset/137905
https://bugs.webkit.org/show_bug.cgi?id=105765

Popover does not disappear when hovering another identifier in
sources panel. (Requested by vsevik on #webkit).

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

* inspector/front-end/Popover.js:
(WebInspector.Popover.prototype._innerShow):
* inspector/front-end/popover.css:
(.popover):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138481 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Mac] MemoryPressureHandler: Occasional crashes in uninstall() when responding to memory pressure signal.
<http://webkit.org/b/105772>

Reviewed by Stephanie Lewis.

We can't synchronously dereference _cache_event_source in uninstall() just because m_installed
is true -- the block that initializes _cache_event_source is asynchronous and may not have executed.
Fix this by performing the uninstallation asynchronously on the main queue as well.

* platform/mac/MemoryPressureHandlerMac.mm:
(WebCore::MemoryPressureHandler::uninstall):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138482 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[TexMap] Remove unused members and methods in TextureMapperLayer.
https://bugs.webkit.org/show_bug.cgi?id=105755

Patch by Huang Dongsung <luxtella@company100.net> on 2012-12-26
Reviewed by Noam Rosenthal.

No new tests. Refactoring only.

* platform/graphics/texmap/TextureMapperLayer.h:
(TextureMapperLayer):
(State):
(WebCore::TextureMapperLayer::State::State):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138483 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed. Enable most sub-pixel tests on mac.

* platform/mac/TestExpectations:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138484 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed Xmas buildfix after r138479.

* WebProcess/MediaCache/WebMediaCacheManager.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138485 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add a Mac test expectations for bugs 105777 and 105778.

* platform/mac/TestExpectations:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138486 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[TexMap] A Minor optimization of GraphicsLayerTransform.
https://bugs.webkit.org/show_bug.cgi?id=105758

Patch by Huang Dongsung <luxtella@company100.net> on 2012-12-26
Reviewed by Noam Rosenthal.

Only multiply the transformation matrices if the paramaters are actually
changed.

This optimizes the code path called from flushCompositingStateForThisLayerOnly(),
and potentially setAnimatedTransform().

No new tests. Refactoring only.

* platform/graphics/GraphicsLayerTransform.cpp:
(WebCore::GraphicsLayerTransform::setPosition):
(WebCore::GraphicsLayerTransform::setSize):
(WebCore::GraphicsLayerTransform::setAnchorPoint):
(WebCore::GraphicsLayerTransform::setFlattening):
(WebCore::GraphicsLayerTransform::setLocalTransform):
(WebCore::GraphicsLayerTransform::setChildrenTransform):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138487 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] Disable unprefixed css transitions until they're functional
https://bugs.webkit.org/show_bug.cgi?id=105771

Reviewed by Eric Seidel.

Bug 105647 mentions that this is not fully implemented yet, and the
partial support breaks feature detection in modernizr and friends.

* features.gypi:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138488 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Texmap] Instead of having multiple shaders sources with lots of duplication, we should have one shader source with MACRO variants
https://bugs.webkit.org/show_bug.cgi?id=104815

Patch by No'am Rosenthal <noam@webkit.org> on 2012-12-26
Reviewed by Kenneth Rohde Christiansen.

Created templates for the vertex and fragment shaders, and added some MACROs in
TextureMapperShaderManager to allow GLSL precompiler-based configuration.

The template follows a pattern where the main function in the shader calls
applyFooBarIfNeeded(), while applyFooBar() is implemented. The Macros prepended to the template define whether applyIfNeeded resolves to the real function or to a noop.

In addition, made some small changes to the filter shaders so that they can use the same code as the normal shaders.

Covered by existing pixel/ref tests when run on Qt/EFL/GTK.

* platform/graphics/texmap/TextureMapperGL.cpp:
(WebCore::TextureMapperGL::drawTexture):
(WebCore::TextureMapperGL::drawSolidColor):
(WebCore::TextureMapperGL::drawTextureWithAntialiasing):
(WebCore::optionsForFilterType):
(WebCore):
(WebCore::getPassesRequiredForFilter):
(WebCore::prepareFilterProgram):
(WebCore::TextureMapperGL::drawFiltered):
(WebCore::BitmapTextureGL::applyFilters):
    Always draw using the drawQuad function, and use the new TextureMapperShaderManager::Options mask instead of the old ShaderKey.

* platform/graphics/texmap/TextureMapperShaderManager.cpp:
(WebCore):
(WebCore::getShaderSpec):
(WebCore::TextureMapperShaderManager::getShaderProgram):
* platform/graphics/texmap/TextureMapperShaderManager.h:
(TextureMapperShaderProgram):
(TextureMapperShaderManager):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138489 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] Set load state for popups manually, in absence of a loader.
https://bugs.webkit.org/show_bug.cgi?id=105708
RIM PR 257216

Reviewed by George Staikos.
Internally reviewed by Chris Guan.

The WebPage class relies on the load state for various things,
among others it will only emit contents size changes after
layouts if a load state other than None is set.

Given that popups write the web page content itself with no
loader that would issue such notifications, the load state
should probably just be set manually in this case.

* WebCoreSupport/PagePopupBlackBerry.cpp:
(WebCore::PagePopupBlackBerry::init):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138490 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed. Replace find("Tools") with rfind("Tools") because base dir of WebKit may have Tools word.
As example ..../DevTools/src/third_party/WebKit

* Scripts/webkitpy/common/webkit_finder.py:
(WebKitFinder.webkit_base):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138491 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Create a GTK build system watchlist and add myself to it
https://bugs.webkit.org/show_bug.cgi?id=105769

Reviewed by Dirk Pranke.

Add a GTK build system watchlist, watching the configure.ac, GNUmakefile.am files
and the input GNUmakefile.features.am.in file. The GNUmakefile.list.am files are
omitted on purpose due to relatively high change rate they are exposed to.

The new watchlist would be of use to me as the GTK build system recently went
through a series of changes that included a changed policy on adding configuration
flags to configure.ac and subsequent additions to GNUmakefile.am files. A PSA on the
mailing list about this change will be published later, but I'd also like to be
notified of any pending changes to these files just so I can check the changes are
in compliance with the new policy.

* Scripts/webkitpy/common/config/watchlist:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138492 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed chromium test expectations update.

* platform/chromium/TestExpectations:

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