Remove entries for now-passing tests in chroum-mac-mountainlion.

Unreviewed, expectations change.

* platform/chromium-mac-mountainlion/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131855 268f45cc-cd09-0410-ab3c-d52691b4dbfc
make move_overwritten_baselines_to work again while rebaselining
https://bugs.webkit.org/show_bug.cgi?id=99793

Reviewed by Ojan Vafai.

We used to have code that would help when rebaselining results
for new ports (e.g., when moving from Lion to Mountain Lion) but
it appears that code bitrotted during all the refactoring since
the last time we needed this. This patch makes things work
again, adds more tests that will hopefully make clearer what
is supposed to work, and renames various parameters to be
consistent.

* Scripts/webkitpy/layout_tests/port/builders.py:
(move_overwritten_baselines_to):
(builder_path_for_port_name):
* Scripts/webkitpy/tool/commands/rebaseline.py:
(RebaselineTest.__init__):
(RebaselineTest._copy_existing_baseline):
(RebaselineTest._rebaseline_test):
(RebaselineTest.execute):
(AbstractParallelRebaselineCommand._rebaseline_commands):
* Scripts/webkitpy/tool/commands/rebaseline_unittest.py:
(test_rebaseline_json_with_move_overwritten_baselines_to):
(test_rebaseline_test_internal_with_move_overwritten_baselines_to):
* Scripts/webkitpy/tool/servers/gardeningserver_unittest.py:
(GardeningServerTest.test_rebaselineall):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131856 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Automatically start plugins created within a user gesture, skipping snapshotting
https://bugs.webkit.org/show_bug.cgi?id=99778

Patch by Kiran Muppala <cmuppala@apple.com> on 2012-10-18
Reviewed by Alexey Proskuryakov.

If a user gesture is being processed, do not set the display state of
HTMLPluginImageElement to WaitingForSnapshot.

No new tests, since it only affects when plugins switch from snapshot to running
state.  Does not affect rendering of other elements.

* html/HTMLPlugInImageElement.cpp:
(WebCore::HTMLPlugInImageElement::HTMLPlugInImageElement):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131857 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Refactor MacroAssembler interfaces to differentiate the pointer operands from the 64-bit integer operands
https://bugs.webkit.org/show_bug.cgi?id=99154

Reviewed by Gavin Barraclough.

In current JavaScriptCore implementation for JSVALUE64 platform (i.e.,
the X64 platform), we assume that the JSValue size is same to the
pointer size, and thus EncodedJSValue is simply type defined as a
"void*". In the JIT compiler, we also take this assumption and invoke
the same macro assembler interfaces for both JSValue and pointer
operands. We need to differentiate the operations on pointers from the
operations on JSValues, and let them invoking different macro
assembler interfaces. For example, we now use the interface of
"loadPtr" to load either a pointer or a JSValue, and we need to switch
to using "loadPtr" to load a pointer and some new "load64" interface
to load a JSValue. This would help us supporting other JSVALUE64
platforms where pointer size is not necessarily 64-bits, for example
x32 (bug #99153).

The major modification I made is to introduce the "*64" interfaces in
the MacroAssembler for those operations on JSValues, keep the "*Ptr"
interfaces for those operations on real pointers, and go through all
the JIT compiler code to correct the usage.

This is the second part of the work, i.e, to correct the usage of the
new MacroAssembler interfaces in the JIT compilers, which also means
that now EncodedJSValue is defined as a 64-bit integer, and the "*64"
interfaces are used for it.

* assembler/MacroAssembler.h: JSValue immediates should be in Imm64 instead of ImmPtr.
(MacroAssembler):
(JSC::MacroAssembler::shouldBlind):
* dfg/DFGAssemblyHelpers.cpp: Correct the JIT compilers usage of the new interfaces.
(JSC::DFG::AssemblyHelpers::jitAssertIsInt32):
(JSC::DFG::AssemblyHelpers::jitAssertIsJSInt32):
(JSC::DFG::AssemblyHelpers::jitAssertIsJSNumber):
(JSC::DFG::AssemblyHelpers::jitAssertIsJSDouble):
(JSC::DFG::AssemblyHelpers::jitAssertIsCell):
* dfg/DFGAssemblyHelpers.h:
(JSC::DFG::AssemblyHelpers::emitPutToCallFrameHeader):
(JSC::DFG::AssemblyHelpers::branchIfNotCell):
(JSC::DFG::AssemblyHelpers::debugCall):
(JSC::DFG::AssemblyHelpers::boxDouble):
(JSC::DFG::AssemblyHelpers::unboxDouble):
(JSC::DFG::AssemblyHelpers::emitExceptionCheck):
* dfg/DFGCCallHelpers.h:
(JSC::DFG::CCallHelpers::setupArgumentsWithExecState):
(CCallHelpers):
* dfg/DFGOSRExitCompiler64.cpp:
(JSC::DFG::OSRExitCompiler::compileExit):
* dfg/DFGRepatch.cpp:
(JSC::DFG::generateProtoChainAccessStub):
(JSC::DFG::tryCacheGetByID):
(JSC::DFG::tryBuildGetByIDList):
(JSC::DFG::emitPutReplaceStub):
(JSC::DFG::emitPutTransitionStub):
* dfg/DFGScratchRegisterAllocator.h:
(JSC::DFG::ScratchRegisterAllocator::preserveUsedRegistersToScratchBuffer):
(JSC::DFG::ScratchRegisterAllocator::restoreUsedRegistersFromScratchBuffer):
* dfg/DFGSilentRegisterSavePlan.h:
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::checkArgumentTypes):
(JSC::DFG::SpeculativeJIT::compileValueToInt32):
(JSC::DFG::SpeculativeJIT::compileInt32ToDouble):
(JSC::DFG::SpeculativeJIT::compileInstanceOfForObject):
(JSC::DFG::SpeculativeJIT::compileInstanceOf):
(JSC::DFG::SpeculativeJIT::compileStrictEqForConstant):
(JSC::DFG::SpeculativeJIT::compileGetByValOnArguments):
* dfg/DFGSpeculativeJIT.h:
(SpeculativeJIT):
(JSC::DFG::SpeculativeJIT::silentSavePlanForGPR):
(JSC::DFG::SpeculativeJIT::silentSpill):
(JSC::DFG::SpeculativeJIT::silentFill):
(JSC::DFG::SpeculativeJIT::spill):
(JSC::DFG::SpeculativeJIT::valueOfJSConstantAsImm64):
(JSC::DFG::SpeculativeJIT::callOperation):
(JSC::DFG::SpeculativeJIT::branch64):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::fillInteger):
(JSC::DFG::SpeculativeJIT::fillDouble):
(JSC::DFG::SpeculativeJIT::fillJSValue):
(JSC::DFG::SpeculativeJIT::nonSpeculativeValueToNumber):
(JSC::DFG::SpeculativeJIT::nonSpeculativeValueToInt32):
(JSC::DFG::SpeculativeJIT::nonSpeculativeUInt32ToNumber):
(JSC::DFG::SpeculativeJIT::cachedGetById):
(JSC::DFG::SpeculativeJIT::cachedPutById):
(JSC::DFG::SpeculativeJIT::nonSpeculativeNonPeepholeCompareNull):
(JSC::DFG::SpeculativeJIT::nonSpeculativePeepholeBranchNull):
(JSC::DFG::SpeculativeJIT::nonSpeculativePeepholeBranch):
(JSC::DFG::SpeculativeJIT::nonSpeculativeNonPeepholeCompare):
(JSC::DFG::SpeculativeJIT::nonSpeculativePeepholeStrictEq):
(JSC::DFG::SpeculativeJIT::nonSpeculativeNonPeepholeStrictEq):
(JSC::DFG::SpeculativeJIT::emitCall):
(JSC::DFG::SpeculativeJIT::fillSpeculateIntInternal):
(JSC::DFG::SpeculativeJIT::fillSpeculateDouble):
(JSC::DFG::SpeculativeJIT::fillSpeculateCell):
(JSC::DFG::SpeculativeJIT::fillSpeculateBoolean):
(JSC::DFG::SpeculativeJIT::convertToDouble):
(JSC::DFG::SpeculativeJIT::compileObjectEquality):
(JSC::DFG::SpeculativeJIT::compileObjectToObjectOrOtherEquality):
(JSC::DFG::SpeculativeJIT::compilePeepHoleObjectToObjectOrOtherEquality):
(JSC::DFG::SpeculativeJIT::compileDoubleCompare):
(JSC::DFG::SpeculativeJIT::compileNonStringCellOrOtherLogicalNot):
(JSC::DFG::SpeculativeJIT::compileLogicalNot):
(JSC::DFG::SpeculativeJIT::emitNonStringCellOrOtherBranch):
(JSC::DFG::SpeculativeJIT::emitBranch):
(JSC::DFG::SpeculativeJIT::compileContiguousGetByVal):
(JSC::DFG::SpeculativeJIT::compileArrayStorageGetByVal):
(JSC::DFG::SpeculativeJIT::compileContiguousPutByVal):
(JSC::DFG::SpeculativeJIT::compileArrayStoragePutByVal):
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGThunks.cpp:
(JSC::DFG::osrExitGenerationThunkGenerator):
(JSC::DFG::throwExceptionFromCallSlowPathGenerator):
(JSC::DFG::slowPathFor):
(JSC::DFG::virtualForThunkGenerator):
* interpreter/Interpreter.cpp:
(JSC::Interpreter::dumpRegisters):
* jit/JIT.cpp:
(JSC::JIT::privateCompile):
* jit/JIT.h:
(JIT):
* jit/JITArithmetic.cpp:
(JSC::JIT::emit_op_negate):
(JSC::JIT::emitSlow_op_negate):
(JSC::JIT::emit_op_rshift):
(JSC::JIT::emitSlow_op_urshift):
(JSC::JIT::emit_compareAndJumpSlow):
(JSC::JIT::emit_op_bitand):
(JSC::JIT::compileBinaryArithOpSlowCase):
(JSC::JIT::emit_op_div):
* jit/JITCall.cpp:
(JSC::JIT::compileLoadVarargs):
(JSC::JIT::compileCallEval):
(JSC::JIT::compileCallEvalSlowCase):
(JSC::JIT::compileOpCall):
* jit/JITInlineMethods.h: Have some clean-up work as well.
(JSC):
(JSC::JIT::emitPutCellToCallFrameHeader):
(JSC::JIT::emitPutIntToCallFrameHeader):
(JSC::JIT::emitPutToCallFrameHeader):
(JSC::JIT::emitGetFromCallFrameHeader32):
(JSC::JIT::emitGetFromCallFrameHeader64):
(JSC::JIT::emitAllocateJSArray):
(JSC::JIT::emitValueProfilingSite):
(JSC::JIT::emitGetJITStubArg):
(JSC::JIT::emitGetVirtualRegister):
(JSC::JIT::emitPutVirtualRegister):
(JSC::JIT::emitInitRegister):
(JSC::JIT::emitJumpIfJSCell):
(JSC::JIT::emitJumpIfBothJSCells):
(JSC::JIT::emitJumpIfNotJSCell):
(JSC::JIT::emitLoadInt32ToDouble):
(JSC::JIT::emitJumpIfImmediateInteger):
(JSC::JIT::emitJumpIfNotImmediateInteger):
(JSC::JIT::emitJumpIfNotImmediateIntegers):
(JSC::JIT::emitFastArithReTagImmediate):
(JSC::JIT::emitFastArithIntToImmNoCheck):
* jit/JITOpcodes.cpp:
(JSC::JIT::privateCompileCTINativeCall):
(JSC::JIT::emit_op_mov):
(JSC::JIT::emit_op_instanceof):
(JSC::JIT::emit_op_is_undefined):
(JSC::JIT::emit_op_is_boolean):
(JSC::JIT::emit_op_is_number):
(JSC::JIT::emit_op_tear_off_activation):
(JSC::JIT::emit_op_not):
(JSC::JIT::emit_op_jfalse):
(JSC::JIT::emit_op_jeq_null):
(JSC::JIT::emit_op_jneq_null):
(JSC::JIT::emit_op_jtrue):
(JSC::JIT::emit_op_bitxor):
(JSC::JIT::emit_op_bitor):
(JSC::JIT::emit_op_get_pnames):
(JSC::JIT::emit_op_next_pname):
(JSC::JIT::compileOpStrictEq):
(JSC::JIT::emit_op_catch):
(JSC::JIT::emit_op_throw_reference_error):
(JSC::JIT::emit_op_eq_null):
(JSC::JIT::emit_op_neq_null):
(JSC::JIT::emit_op_create_activation):
(JSC::JIT::emit_op_create_arguments):
(JSC::JIT::emit_op_init_lazy_reg):
(JSC::JIT::emitSlow_op_convert_this):
(JSC::JIT::emitSlow_op_not):
(JSC::JIT::emit_op_get_argument_by_val):
(JSC::JIT::emit_op_put_to_base):
(JSC::JIT::emit_resolve_operations):
* jit/JITPropertyAccess.cpp:
(JSC::JIT::emit_op_get_by_val):
(JSC::JIT::emitContiguousGetByVal):
(JSC::JIT::emitArrayStorageGetByVal):
(JSC::JIT::emitSlow_op_get_by_val):
(JSC::JIT::compileGetDirectOffset):
(JSC::JIT::emit_op_get_by_pname):
(JSC::JIT::emitContiguousPutByVal):
(JSC::JIT::emitArrayStoragePutByVal):
(JSC::JIT::compileGetByIdHotPath):
(JSC::JIT::emit_op_put_by_id):
(JSC::JIT::compilePutDirectOffset):
(JSC::JIT::emit_op_init_global_const):
(JSC::JIT::emit_op_init_global_const_check):
(JSC::JIT::emitIntTypedArrayGetByVal):
(JSC::JIT::emitFloatTypedArrayGetByVal):
(JSC::JIT::emitFloatTypedArrayPutByVal):
* jit/JITStubCall.h:
(JITStubCall):
(JSC::JITStubCall::JITStubCall):
(JSC::JITStubCall::addArgument):
(JSC::JITStubCall::call):
(JSC::JITStubCall::callWithValueProfiling):
* jit/JSInterfaceJIT.h:
(JSC::JSInterfaceJIT::emitJumpIfImmediateNumber):
(JSC::JSInterfaceJIT::emitJumpIfNotImmediateNumber):
(JSC::JSInterfaceJIT::emitLoadJSCell):
(JSC::JSInterfaceJIT::emitLoadInt32):
(JSC::JSInterfaceJIT::emitLoadDouble):
* jit/SpecializedThunkJIT.h:
(JSC::SpecializedThunkJIT::returnDouble):
(JSC::SpecializedThunkJIT::tagReturnAsInt32):
* runtime/JSValue.cpp:
(JSC::JSValue::description):
* runtime/JSValue.h: Define JSVALUE64 EncodedJSValue as int64_t, which is also unified with JSVALUE32_64.
(JSC):
* runtime/JSValueInlineMethods.h: New implementation of some JSValue methods to make them more conformant
with the new rule that "JSValue is a 64-bit integer rather than a pointer" for JSVALUE64 platforms.
(JSC):
(JSC::JSValue::JSValue):
(JSC::JSValue::operator bool):
(JSC::JSValue::operator==):
(JSC::JSValue::operator!=):
(JSC::reinterpretDoubleToInt64):
(JSC::reinterpretInt64ToDouble):
(JSC::JSValue::asDouble):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131858 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add shortMonthLabels and shortStandAloneMonthLabels to Localizer
https://bugs.webkit.org/show_bug.cgi?id=99787

* tests/LocaleMacTest.cpp:
(TEST_F): Disable tests depends on OS X versions.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131859 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] REGRESSION(r131858): It broke the ARM build
https://bugs.webkit.org/show_bug.cgi?id=99809

Reviewed by Csaba Osztrogonác.

* dfg/DFGCCallHelpers.h:
(CCallHelpers):
(JSC::DFG::CCallHelpers::setupArgumentsWithExecState):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131860 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Move ConnectionStack out of WebProcessConnection into its own files.
https://bugs.webkit.org/show_bug.cgi?id=99813

Reviewed by Andreas Kling.

ConnectionStack will need to be used in a few upcoming areas, so it needs to be in its own header and implementation files.

Project file stuff:
* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebKit2.xcodeproj/project.pbxproj:

Move it from here:
* PluginProcess/WebProcessConnection.cpp:
(WebKit::WebProcessConnection::setGlobalException):
(WebKit::WebProcessConnection::didReceiveMessage):
(WebKit::WebProcessConnection::didReceiveSyncMessage):

Into here:
* Shared/ConnectionStack.cpp: Added.
(WebKit):
(WebKit::ConnectionStack::shared):
* Shared/ConnectionStack.h: Added.
(CoreIPC):
(WebKit):
(ConnectionStack):
(WebKit::ConnectionStack::current):
(CurrentConnectionPusher):
(WebKit::ConnectionStack::CurrentConnectionPusher::CurrentConnectionPusher):
(WebKit::ConnectionStack::CurrentConnectionPusher::~CurrentConnectionPusher):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131861 268f45cc-cd09-0410-ab3c-d52691b4dbfc
quirk-orphaned-units.html should be removed from TestExpectations.
https://bugs.webkit.org/show_bug.cgi?id=99807

Patch by Dongwoo Joshua Im <dw.im@samsung.com> on 2012-10-18
Reviewed by Csaba Osztrogonác.

quirk-orphaned-units.html is no more existed, so it should be removed from TestExpectations.

* platform/qt-mac/TestExpectations: Remove quirk-orphaned-units.html.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131862 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[V8] GrouperVisitor is secretly two entirely separate objects
https://bugs.webkit.org/show_bug.cgi?id=99810

Reviewed by Kentaro Hara.

We can separate out the two things that GrouperVisitor is trying to do
because they have nothing to do with each other.

* bindings/v8/V8GCController.cpp:
(ObjectVisitor):
(WebCore::ObjectVisitor::visitDOMWrapper):
(WebCore):
(WebCore::V8GCController::gcPrologue):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131863 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: [Styles] Property considered overridden if it is non-inherited important property in inherited style
https://bugs.webkit.org/show_bug.cgi?id=99720

Reviewed by Yury Semikhatsky.

Source/WebCore:

Non-inherited properties are now disregarded in inherited styles.

* inspector/front-end/StylesSidebarPane.js:
(WebInspector.StylesSidebarPane.prototype._refreshStyleRules):
(WebInspector.StylesSidebarPane.prototype._markUsedProperties):

LayoutTests:

* inspector/elements/elements-panel-styles-expected.txt:
* inspector/elements/resources/elements-panel-styles.css:
(#container):
(.foo):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131864 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[V8] Remove unused typedef from V8GCController.cpp
https://bugs.webkit.org/show_bug.cgi?id=99808

Reviewed by Kentaro Hara.

This typedef is not used.

* bindings/v8/V8GCController.cpp:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131865 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[V8] DOMObjectVisitor does nothing
https://bugs.webkit.org/show_bug.cgi?id=99812

Reviewed by Kentaro Hara.

This code doesn't do anything, even in Debug! We should just remove it.

* bindings/v8/V8GCController.cpp:
(WebCore):
(WebCore::V8GCController::gcPrologue):
(WebCore::V8GCController::gcEpilogue):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131866 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WebPageProxy::canShowMIMEType() should return false for plugins when they are disabled
https://bugs.webkit.org/show_bug.cgi?id=99449

Reviewed by Anders Carlsson.

* UIProcess/API/gtk/tests/GNUmakefile.am:
* UIProcess/API/gtk/tests/TestWebKitWebView.cpp:
(testWebViewCanShowMIMEType): Test that
webkit_web_view_can_show_mime_type() returns FALSE if plugins are
disabled.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::canShowMIMEType): Return false for
MIME-Type of plugins if they are disabled.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131867 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Baseline array profiling should be less accurate, and DFG OSR exit should update array profiles on CheckArray and CheckStructure failure
https://bugs.webkit.org/show_bug.cgi?id=99261

Reviewed by Oliver Hunt.

This makes array profiling stochastic, like value profiling. The point is to avoid
noticing one-off indexing types that we'll never see again, but instead to:
        
Notice the big ones: We want the DFG to compile based on the things that happen with
high probability. So, this change makes array profiling do like value profiling and
only notice a random subsampling of indexing types that flowed through an array
access. Prior to this patch array profiles noticed all indexing types and weighted
them identically.
        
Bias the recent: Often an array access will see awkward indexing types during the
first handful of executions because of artifacts of program startup. So, we want to
bias towards the indexing types that we saw most recently. With this change, array
profiling does like value profiling and usually tells use a random sampling that
is biased to what happened recently.
        
Have a backup plan: The above two things don't work by themselves because our
randomness is not that random (nor do we care enough to make it more random), and
because some procedures will have a <1/10 probability event that we must handle
without bailing because it dominates a hot loop. So, like value profiling, this
patch makes array profiling use OSR exits to tell us why we are bailing out, so
that we don't make the same mistake again in the future.
        
This change also makes the way that the 32-bit OSR exit compiler snatches scratch
registers more uniform. We don't need a scratch buffer when we can push and pop.

* bytecode/DFGExitProfile.h:
* dfg/DFGOSRExitCompiler32_64.cpp:
(JSC::DFG::OSRExitCompiler::compileExit):
* dfg/DFGOSRExitCompiler64.cpp:
(JSC::DFG::OSRExitCompiler::compileExit):
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::checkArray):
(JSC::DFG::SpeculativeJIT::arrayify):
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* jit/JITInlineMethods.h:
(JSC::JIT::emitArrayProfilingSite):
* llint/LowLevelInterpreter.asm:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131868 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: NMI provide data for mixing with tcmalloc heap dumps.
https://bugs.webkit.org/show_bug.cgi?id=99457

Reviewed by Yury Semikhatsky.

Source/WebCore:

countObjectSize now accepts ptr as the first argument and saves it into HashMap if the binary was ran with HEAPPROFILE env variable.
getProcessMemoryDistribution does snapshot and calls the downstream code with the map of counted objects.

* inspector/InspectorClient.h:
(WebCore::InspectorClient::dumpUncountedAllocatedObjects):
* inspector/InspectorMemoryAgent.cpp:
(WebCore::reportJSHeapInfo):
(WebCore::reportRenderTreeInfo):
(WebCore):
(WebCore::InspectorMemoryAgent::getProcessMemoryDistribution):
* inspector/MemoryInstrumentationImpl.cpp:
(WebCore::MemoryInstrumentationClientImpl::countObjectSize):
(WebCore::MemoryInstrumentationClientImpl::reportMemoryUsage):
* inspector/MemoryInstrumentationImpl.h:
(MemoryInstrumentationClientImpl):
(WebCore::MemoryInstrumentationClientImpl::countedObjects):

Source/WebKit/chromium:

Embedder's code wraps the map with counted objects info into InstrumentedObjectSizeProvider
and forces downstream code to make tcmalloc heap snapshot.
The default implementation is empty.

* public/WebDevToolsAgentClient.h:
(InstrumentedObjectSizeProvider):
(WebKit::WebDevToolsAgentClient::InstrumentedObjectSizeProvider::~InstrumentedObjectSizeProvider):
(WebKit::WebDevToolsAgentClient::dumpUncountedAllocatedObjects):
(WebDevToolsAgentClient):
* src/InspectorClientImpl.cpp:
(WebKit::InspectorClientImpl::dumpUncountedAllocatedObjects):
(WebKit):
* src/InspectorClientImpl.h:
(InspectorClientImpl):
* src/WebDevToolsAgentImpl.cpp:
(WebKit::WebDevToolsAgentImpl::getAllocatedObjects):
(WebKit::WebDevToolsAgentImpl::dumpUncountedAllocatedObjects):
(WebKit):
* src/WebDevToolsAgentImpl.h:
(WebDevToolsAgentImpl):

Source/WTF:

countObjectSize now accepts ptr as the first argument and saves it into HashMap if the binary was ran with HEAPPROFILE env variable.
getProcessMemoryDistribution does snapshot and calls the downstream code with the map of counted objects.

* wtf/MemoryInstrumentation.h:
(MemoryInstrumentationClient):
(WTF::MemoryInstrumentation::countObjectSize):
(WTF::MemoryInstrumentation::addRawBuffer):
(WTF::MemoryClassInfo::addPrivateBuffer):
(WTF::MemoryInstrumentation::addObjectImpl):
(WTF::MemoryInstrumentation::addListHashSet):
(WTF::::process):

Tools:

countObjectSize now requires pointer to object as the first argument.

* TestWebKitAPI/Tests/WTF/MemoryInstrumentationTest.cpp:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131869 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: Update localizedStrings.js
https://bugs.webkit.org/show_bug.cgi?id=99701

Patch by Eugene Klyuchnikov <eustas.bug@gmail.com> on 2012-10-19
Reviewed by Yury Semikhatsky.

Fixed most of missing strings and orphans.

* English.lproj/localizedStrings.js:
* inspector/front-end/SettingsScreen.js:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131870 268f45cc-cd09-0410-ab3c-d52691b4dbfc
AX: labelForElement is slow when there are a lot of DOM elements
https://bugs.webkit.org/show_bug.cgi?id=97825

Reviewed by Ryosuke Niwa.

Source/WebCore:

Adds a DocumentOrderedMap to TreeScope that allows accessibility to
quickly map from an id to the label for that id. This speeds up
AccessibilityNode::labelForElement, which was a bottleneck in Chromium
when accessibility was on.

Tests: accessibility/title-ui-element-correctness.html
       perf/accessibility-title-ui-element.html

* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::labelForElement):
* dom/DocumentOrderedMap.cpp:
(WebCore::keyMatchesLabelForAttribute):
(WebCore):
(WebCore::DocumentOrderedMap::get):
(WebCore::DocumentOrderedMap::getElementByLabelForAttribute):
* dom/DocumentOrderedMap.h:
(DocumentOrderedMap):
* dom/Element.cpp:
(WebCore::Element::insertedInto):
(WebCore::Element::removedFrom):
(WebCore::Element::updateLabel):
(WebCore):
(WebCore::Element::willModifyAttribute):
* dom/Element.h:
(Element):
* dom/TreeScope.cpp:
(WebCore::TreeScope::TreeScope):
(WebCore::TreeScope::destroyTreeScopeData):
(WebCore::TreeScope::addLabel):
(WebCore):
(WebCore::TreeScope::removeLabel):
(WebCore::TreeScope::labelElementForId):
* dom/TreeScope.h:
(WebCore):
(TreeScope):
(WebCore::TreeScope::shouldCacheLabelsByForAttribute):

Tools:

Implement titleUIElement in the chromium port of DRT, and
fix getAccessibleElementById so that it ensures the backing store
is up-to-date.

* DumpRenderTree/chromium/TestRunner/AccessibilityControllerChromium.cpp:
(AccessibilityController::getAccessibleElementById):
* DumpRenderTree/chromium/TestRunner/AccessibilityUIElementChromium.cpp:
(AccessibilityUIElement::titleUIElementCallback):

LayoutTests:

Adds two new tests for titleUIElement that run on both Mac and
Chromium. One tests correctness, the other tests speed.

Fixes one test so that it passes on Chromium.
Enables other tests that now pass on Chromium.

* accessibility/secure-textfield-title-ui.html:
* accessibility/title-ui-element-correctness-expected.txt: Added.
* accessibility/title-ui-element-correctness.html: Added.
* perf/accessibility-title-ui-element-expected.txt: Added.
* perf/accessibility-title-ui-element.html: Added.
* platform/chromium/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131871 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: Saving HAR, snapshots and timeline data do not work in remote debugging mode
https://bugs.webkit.org/show_bug.cgi?id=99179

Patch by Eugene Klyuchnikov <eustas.bug@gmail.com> on 2012-10-19
Reviewed by Yury Semikhatsky.

Added method "close" to InspectorFrontendHost.
Symantically, this method forces to flush all unsaved buffers for
specified file. In native implementation this turns to be no-op.

In stub implementation "close" causes compilation of blob object an
navigating to blob-schema url.

Removed "canAppend", as appending in now suppurted
by all implementations.

Repaced schema "data" with "blob" in InspectorFrontendHostStub "save"
to avoid out-of-memory errors.

* inspector/InspectorFrontendHost.cpp:
(WebCore::InspectorFrontendHost::close): Compiles blob object and
navigates to blob-object url.
(WebCore):
* inspector/InspectorFrontendHost.h: Added "close" method.
* inspector/InspectorFrontendHost.idl: Ditto.
* inspector/front-end/FileManager.js:
(WebInspector.FileManager.prototype.close): Proxy to InspectorFrontend.
* inspector/front-end/FileUtils.js:
(WebInspector.FileOutputStream.prototype.close):
Invoke "close" on FileManager.
(WebInspector.FileOutputStream.prototype._onAppendDone): Ditto.
* inspector/front-end/HandlerRegistry.js: Added mandatory "close" call.
* inspector/front-end/HeapSnapshotView.js:
(WebInspector.HeapProfileHeader.prototype.canSaveToFile): Fixed check.
* inspector/front-end/InspectorFrontendHostStub.js:
(.WebInspector.InspectorFrontendHostStub):
Added "appendable" behaviour emulation.
* inspector/front-end/SourceFrame.js: Added mandatory "close" call.
* inspector/front-end/externs.js: Replaced "canAppend" with "close"

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131872 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[V8] Simplify GCPrologueVisitor
https://bugs.webkit.org/show_bug.cgi?id=99819

Reviewed by Kentaro Hara.

Previously, GCPrologueVisitor used a complicated traits-based template
design. That's not necessary. We can just implement it directly without
template magic.

The one subtly here is that MessagePort is not actually a subclass of
ActiveDOMObject. The next stage of this cleanup is to make MessagePort
inherit from ActiveDOMObject and remove this special case entirely.

* bindings/v8/V8GCController.cpp:
(WebCore::EnsureWeakDOMNodeVisitor::visitDOMWrapper):
(WebCore):
(WebCore::ActiveDOMObjectPrologueVisitor::visitDOMWrapper):
(WebCore::NodeVisitor::visitDOMWrapper):
(WebCore::V8GCController::gcPrologue):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131873 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed fix after r131868.

On JSVALUE64 platforms, JSValue constants can be Imm64 instead of ImmPtr for JIT compilers.

* dfg/DFGOSRExitCompiler64.cpp:
(JSC::DFG::OSRExitCompiler::compileExit):


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