Merge final changesets from the jsCStack branch (r162969, r162975, r162992, r163004, r163069).

    2014-01-29  Filip Pizlo  <fpizlo@apple.com>
    
    DFG ArrayPop double array mishandles the NaN hole installation
    https://bugs.webkit.org/show_bug.cgi?id=127813
    
    Reviewed by Mark Rowe.
            
    Our object model for arrays inferred double dictates that we use quiet NaN (QNaN) to
    mark holes. Holes, in this context, are any entries in the allocated array buffer
    (i.e. from index 0 up to the vectorLength) that don't currently hold a value. Popping
    creates a hole, since it deletes the value at publicLength - 1.
            
    But, because of some sloppy copy-and-paste, we were storing (int64_t)0 when creating
    the hole, instead of storing QNaN. That's likely because for other kinds of arrays,
    64-bit zero is the hole marker, instead of QNaN.
            
    The attached test case illustrates the problem. In the LLInt and Baseline JIT, the
    result returned from foo() is "1.5,2.5,,4.5", since array.pop() removes 3.5 and
    replaces it with a hole and then the assignment "array[3] = 4.5" creates an element
    just beyond that hole. But, once we tier-up to the DFG, the result previously became
    "1.5,2.5,0,4.5", which is wrong. The 0 appeared because the IEEE double
    interpretation of 64-bit zero is simply zero.
            
    This patch fixes that problem. Now the DFG agrees with the other engines.
            
    This patch also fixes style. For some reason that copy-pasted code wasn't even
    indented correctly.
    
    * dfg/DFGSpeculativeJIT64.cpp:
    (JSC::DFG::SpeculativeJIT::compile):
    * tests/stress/array-pop-double-hole.js: Added.
    (foo):
    
    2014-01-28  Filip Pizlo  <fpizlo@apple.com>
    
    FTL should support ArrayPush
    https://bugs.webkit.org/show_bug.cgi?id=127748
    
    Not reviewed, remove some debug code.
    
    * ftl/FTLLowerDFGToLLVM.cpp:
    (JSC::FTL::LowerDFGToLLVM::compileArrayPush):
    
    2014-01-27  Filip Pizlo  <fpizlo@apple.com>
    
    FTL should support ArrayPush
    https://bugs.webkit.org/show_bug.cgi?id=127748
    
    Reviewed by Oliver Hunt.
    
    * ftl/FTLAbstractHeapRepository.h:
    (JSC::FTL::AbstractHeapRepository::forArrayType):
    * ftl/FTLCapabilities.cpp:
    (JSC::FTL::canCompile):
    * ftl/FTLIntrinsicRepository.h:
    * ftl/FTLLowerDFGToLLVM.cpp:
    (JSC::FTL::LowerDFGToLLVM::compileNode):
    (JSC::FTL::LowerDFGToLLVM::compileArrayPush):
    * tests/stress/array-push-contiguous.js: Added.
    (foo):
    * tests/stress/array-push-double.js: Added.
    (foo):
    
    2014-01-28  Filip Pizlo  <fpizlo@apple.com>
    
    FTL should support ArrayPop
    https://bugs.webkit.org/show_bug.cgi?id=127749
    
    Reviewed by Geoffrey Garen.
    
    * ftl/FTLCapabilities.cpp:
    (JSC::FTL::canCompile):
    * ftl/FTLIntrinsicRepository.h:
    * ftl/FTLLowerDFGToLLVM.cpp:
    (JSC::FTL::LowerDFGToLLVM::compileNode):
    (JSC::FTL::LowerDFGToLLVM::compileArrayPush):
    (JSC::FTL::LowerDFGToLLVM::compileArrayPop):
    * tests/stress/array-pop-contiguous.js: Added.
    (foo):
    * tests/stress/array-pop-double.js: Added.
    (foo):
    * tests/stress/array-pop-int32.js: Added.
    (foo):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@163070 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: Play Breakpoint Sound in Frontend
https://bugs.webkit.org/show_bug.cgi?id=127885

Reviewed by Timothy Hatcher.

Source/JavaScriptCore:

* inspector/ScriptDebugListener.h:
* inspector/ScriptDebugServer.cpp:
(Inspector::ScriptDebugServer::evaluateBreakpointAction):
(Inspector::ScriptDebugServer::dispatchBreakpointActionSound):
* inspector/ScriptDebugServer.h:
Pass the breakpoint action identifier through when the
sound breakpoint action is triggered.

* inspector/protocol/Debugger.json:
New "playBreakpointActionSound" event when a "sound" breakpoint action triggers.

* inspector/agents/InspectorDebuggerAgent.h:
* inspector/agents/InspectorDebuggerAgent.cpp:
(Inspector::InspectorDebuggerAgent::breakpointActionSound):
Send the new event so the frontend can handle it.

Source/WebInspectorUI:

Beep in the frontend when a "sound" breakpoint action is triggered.

* UserInterface/DebuggerManager.js:
(WebInspector.DebuggerManager.prototype.playBreakpointActionSound):
* UserInterface/DebuggerObserver.js:
(WebInspector.DebuggerObserver.prototype.resumed):
(WebInspector.DebuggerObserver.prototype.playBreakpointActionSound):
* UserInterface/InspectorJSBackendCommands.js:

LayoutTests:

Extend the breakpoint actions test for the "playBreakpointActionSound" event.

* inspector-protocol/debugger/setBreakpoint-actions-expected.txt:
* inspector-protocol/debugger/setBreakpoint-actions.html:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@163071 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove ENABLE(JAVASCRIPT_DEBUGGER) leftovers
https://bugs.webkit.org/show_bug.cgi?id=127845

Reviewed by Joseph Pecoraro.

.:

* Source/autotools/SetupWebKitFeatures.m4:

Source/JavaScriptCore:

* Configurations/FeatureDefines.xcconfig:

Source/WebCore:

* Configurations/FeatureDefines.xcconfig:
* bindings/js/JSDOMWindowBase.cpp:
(WebCore::JSDOMWindowBase::supportsProfiling):

Source/WebKit/mac:

* Configurations/FeatureDefines.xcconfig:

Source/WebKit2:

* Configurations/FeatureDefines.xcconfig:

Tools:

* Scripts/webkitperl/FeatureList.pm:

WebKitLibraries:

* win/tools/vsprops/FeatureDefines.props:
* win/tools/vsprops/FeatureDefinesCairo.props:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@163072 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r163048.
http://trac.webkit.org/changeset/163048
https://bugs.webkit.org/show_bug.cgi?id=127890

Caused many crashes, detected by EWS prior to landing
(Requested by ap on #webkit).

* Modules/mediacontrols/MediaControlsHost.cpp:
(WebCore::MediaControlsHost::sortedTrackListForMenu):
(WebCore::MediaControlsHost::displayNameForTrack):
(WebCore::MediaControlsHost::captionDisplayMode):
* WebCore.exp.in:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* css/DocumentRuleSets.cpp:
(WebCore::DocumentRuleSets::initUserStyle):
* css/InspectorCSSOMWrappers.cpp:
(WebCore::InspectorCSSOMWrappers::collectFromDocumentStyleSheetCollection):
* dom/Document.cpp:
(WebCore::Document::setCompatibilityMode):
(WebCore::Document::registerForCaptionPreferencesChangedCallbacks):
(WebCore::Document::captionPreferencesChanged):
* dom/DocumentStyleSheetCollection.cpp:
* dom/DocumentStyleSheetCollection.h:
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::HTMLMediaElement):
(WebCore::HTMLMediaElement::parseAttribute):
* html/shadow/MediaControlElements.cpp:
(WebCore::MediaControlClosedCaptionsTrackListElement::updateDisplay):
(WebCore::MediaControlClosedCaptionsTrackListElement::rebuildTrackListMenu):
(WebCore::MediaControlTextTrackContainerElement::updateTimerFired):
* page/CaptionStyleSheetMediaAF.cpp: Removed.
* page/CaptionStyleSheetMediaAF.h: Removed.
* page/CaptionUserPreferences.cpp:
(WebCore::CaptionUserPreferences::CaptionUserPreferences):
(WebCore::CaptionUserPreferences::notify):
(WebCore::CaptionUserPreferences::setCaptionDisplayMode):
(WebCore::CaptionUserPreferences::userPrefersCaptions):
(WebCore::CaptionUserPreferences::setUserPrefersCaptions):
(WebCore::CaptionUserPreferences::userPrefersSubtitles):
(WebCore::CaptionUserPreferences::setUserPrefersSubtitles):
(WebCore::CaptionUserPreferences::userPrefersTextDescriptions):
(WebCore::CaptionUserPreferences::setUserPrefersTextDescriptions):
(WebCore::CaptionUserPreferences::captionPreferencesChanged):
(WebCore::CaptionUserPreferences::textTrackSelectionScore):
(WebCore::CaptionUserPreferences::setCaptionsStyleSheetOverride):
(WebCore::CaptionUserPreferences::updateCaptionStyleSheetOveride):
* page/CaptionUserPreferences.h:
(WebCore::CaptionUserPreferences::captionsStyleSheetOverride):
(WebCore::CaptionUserPreferences::setInterestedInCaptionPreferenceChanges):
(WebCore::CaptionUserPreferences::testingMode):
(WebCore::CaptionUserPreferences::setTestingMode):
(WebCore::CaptionUserPreferences::pageGroup):
* page/CaptionUserPreferencesMediaAF.cpp:
(WebCore::userCaptionPreferencesChangedNotificationCallback):
(WebCore::CaptionUserPreferencesMediaAF::CaptionUserPreferencesMediaAF):
(WebCore::CaptionUserPreferencesMediaAF::userPrefersCaptions):
(WebCore::CaptionUserPreferencesMediaAF::userPrefersSubtitles):
(WebCore::CaptionUserPreferencesMediaAF::setInterestedInCaptionPreferenceChanges):
(WebCore::CaptionUserPreferencesMediaAF::captionPreferencesChanged):
(WebCore::CaptionUserPreferencesMediaAF::captionsWindowCSS):
(WebCore::CaptionUserPreferencesMediaAF::captionsBackgroundCSS):
(WebCore::CaptionUserPreferencesMediaAF::captionsTextColor):
(WebCore::CaptionUserPreferencesMediaAF::captionsTextColorCSS):
(WebCore::CaptionUserPreferencesMediaAF::windowRoundedCornerRadiusCSS):
(WebCore::CaptionUserPreferencesMediaAF::captionsEdgeColorForTextColor):
(WebCore::CaptionUserPreferencesMediaAF::cssPropertyWithTextEdgeColor):
(WebCore::CaptionUserPreferencesMediaAF::colorPropertyCSS):
(WebCore::CaptionUserPreferencesMediaAF::captionsTextEdgeCSS):
(WebCore::CaptionUserPreferencesMediaAF::captionsDefaultFontCSS):
(WebCore::CaptionUserPreferencesMediaAF::captionsStyleSheetOverride):
(WebCore::CaptionUserPreferencesMediaAF::textTrackSelectionScore):
(WebCore::CaptionUserPreferencesMediaAF::sortedTrackListForMenu):
* page/CaptionUserPreferencesMediaAF.h:
* page/Page.cpp:
* page/Page.h:
* page/PageGroup.cpp:
(WebCore::PageGroup::captionPreferencesChanged):
(WebCore::PageGroup::captionPreferences):
* page/PageGroup.h:
* testing/InternalSettings.cpp:
(WebCore::InternalSettings::setShouldDisplayTrackKind):
(WebCore::InternalSettings::shouldDisplayTrackKind):
* testing/Internals.cpp:
(WebCore::Internals::resetToConsistentState):
(WebCore::Internals::Internals):
(WebCore::Internals::captionsStyleSheetOverride):
(WebCore::Internals::setCaptionsStyleSheetOverride):
(WebCore::Internals::setPrimaryAudioTrackLanguageOverride):
(WebCore::Internals::setCaptionDisplayMode):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@163073 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed. Fix the GTK+ build after r163037.

* UIProcess/API/gtk/WebKitWebView.cpp:
(webkit_web_view_load_uri):
(webkit_web_view_load_request):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@163074 268f45cc-cd09-0410-ab3c-d52691b4dbfc
IDB: Implement IDBObjectStore.count()
https://bugs.webkit.org/show_bug.cgi?id=127888

Reviewed by Tim Horton.

Forward request to the DatabaseProcess, and handle its completion:
* WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:
(WebKit::WebIDBServerConnection::count):
(WebKit::WebIDBServerConnection::didCount):
* WebProcess/Databases/IndexedDB/WebIDBServerConnection.h:
* WebProcess/Databases/IndexedDB/WebIDBServerConnection.messages.in:

Pass request along to the appropriate UniqueIDBDatabase:
* DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.cpp:
(WebKit::DatabaseProcessIDBConnection::count):
* DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.h:
* DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.messages.in:

Pass request to backing store thread, then pass it back to the WebProcess:
* DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
(WebKit::UniqueIDBDatabase::count):
(WebKit::UniqueIDBDatabase::countInBackingStore):
(WebKit::UniqueIDBDatabase::didCountInBackingStore):
* DatabaseProcess/IndexedDB/UniqueIDBDatabase.h:

* Shared/AsyncTask.h:
(WebKit::createAsyncTask):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@163075 268f45cc-cd09-0410-ab3c-d52691b4dbfc
IDB: Key generator support
https://bugs.webkit.org/show_bug.cgi?id=127871

Reviewed by Tim Horton.

* DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
(WebKit::UniqueIDBDatabase::putRecordInBackingStore): Update for storing/retrieving integers instead of IDBKeys.
* DatabaseProcess/IndexedDB/UniqueIDBDatabaseBackingStore.h:

* DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::createAndPopulateInitialMetadata): Create a keygen table.
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::createObjectStore): Put a record in the keygen table for
  this object store if necessary.
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::deleteObjectStore): Delete the entry in the keygen table.
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::generateKeyNumber): Pull the current number from the table.
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::updateKeyGeneratorNumber): Update the number in the table.
* DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.h:

* WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:
(WebKit::WebIDBServerConnection::put): Null keys are acceptable for autoIncrement object stores.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@163076 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r163052.
http://trac.webkit.org/changeset/163052
https://bugs.webkit.org/show_bug.cgi?id=127895

It was the buildfix after the rolled out r163048 (Requested by
Ossy on #webkit).

* WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in:

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