[EFL] Unreviewed gardening

* platform/efl-wk2/TestExpectations: Skip failing tests only on WK2.
* platform/efl/TestExpectations: Unskip now passing tests on WK1.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162611 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Basic framework for a modern jsc CLI
https://bugs.webkit.org/show_bug.cgi?id=127435

Reviewed by Geoffrey Garen.

The most basic components of a modern jsc command line interface consist of the following:

- A simple REPL to enter commands and receive results
- The ability to define a module (which consists of various internal methods as well as a
  set of externally visible methods)
- The ability to load other modules at runtime
- The ability to interact with the underlying platform to perform various "privileged"
  functions (e.g. opening files, printing to the stdout, etc.)

The basic architecture will look something like the following:
- If the tool is run in REPL mode (i.e. no command line arguments), it will start the REPL
  on the main thread and start a secondary thread with a run loop to handle various inputs
  from the REPL thread.
- If the tool is given a script to run, it will evaluate that script (and any scripts that
  it might transitively load) within the run loop on the secondary thread while the main
  thread blocks until it has completed.

* Scripts/build-jsc:
* jsc-cli: Added.
* jsc-cli/jsc-cli: Added.
* jsc-cli/jsc-cli.xcodeproj: Added.
* jsc-cli/jsc-cli.xcodeproj/project.pbxproj: Added.
* jsc-cli/jsc-cli/CLIInstance.h: Added.
* jsc-cli/jsc-cli/CLIInstance.m: Added.
(-[CLIInstance init]):
(-[CLIInstance loadFile:]):
(-[CLIInstance run]):
* jsc-cli/jsc-cli/JSModule.h: Added.
* jsc-cli/jsc-cli/JSModule.m: Added.
(coreModules):
(isCoreModule):
(classForModule):
(coreModuleFullPath):
(resolveModuleAsFile):
(resolveModuleAsDirectory):
(nodeModulePaths):
(resolveAsNodeModule):
(+[JSModule resolve:atPath:]):
(globalModuleCache):
(isCached):
(cachedModule):
(cacheModule):
(+[JSModule require:atPath:]):
(+[JSModule require:atPath:inContext:]):
(-[JSModule platformObjectInContext:]):
(-[JSModule initWithId:filename:context:]):
(-[JSModule dealloc]):
(-[JSModule didStartLoading]):
(-[JSModule didFinishLoading]):
(-[JSModule require:]):
(-[JSModule exports]):
* jsc-cli/jsc-cli/JSRunLoopThread.h: Added.
* jsc-cli/jsc-cli/JSRunLoopThread.m: Added.
(jsThreadMain):
(+[JSRunLoopThread threadMain]):
(-[JSRunLoopThread initWithFiles:andContext:]):
(-[JSRunLoopThread startRunLoop]):
(-[JSRunLoopThread start]):
(-[JSRunLoopThread join]):
(-[JSRunLoopThread didReceiveInput:]):
(-[JSRunLoopThread performCallback:withError:]):
(-[JSRunLoopThread performCallback:withArguments:]):
(-[JSRunLoopThread didFinishRunLoopInitialization]):
* jsc-cli/jsc-cli/ReadEvalPrintLoop.h: Added.
* jsc-cli/jsc-cli/ReadEvalPrintLoop.m: Added.
(-[ReadEvalPrintLoop initWithJSThread:]):
(prompt):
(escapeStringForOutput):
(-[ReadEvalPrintLoop processNextInput]):
(-[ReadEvalPrintLoop run]):
* jsc-cli/jsc-cli/RunLoopThread.h: Added.
* jsc-cli/jsc-cli/RunLoopThread.m: Added.
(+[RunLoopThread threadMain]):
(-[RunLoopThread init]):
(-[RunLoopThread dealloc]):
(-[RunLoopThread didFinishRunLoopInitialization]):
(-[RunLoopThread start]):
(-[RunLoopThread join]):
* jsc-cli/jsc-cli/ScriptInputSource.h: Added.
* jsc-cli/jsc-cli/ScriptInputSource.m: Added.
(scriptInputSourceScheduleRoutine):
(scriptInputSourcePerformRoutine):
(scriptInputSourceCancelRoutine):
(-[ScriptInputSource initWithContext:]):
(-[ScriptInputSource dealloc]):
(-[ScriptInputSource addToCurrentRunLoop]):
(-[ScriptInputSource removeFromRemoteRunLoop]):
(-[ScriptInputSource didReceiveScript:]):
(-[ScriptInputSource didReceiveSignal]):
(-[ScriptInputSource runScriptRemotely:]):
(-[ScriptInputSource finishAsyncCallback:withResult:]):
* jsc-cli/jsc-cli/main.m: Added.
(main):


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

broke the build (Requested by mhahnenberg on #webkit).

* Scripts/build-jsc:
* jsc-cli/jsc-cli.xcodeproj/project.pbxproj: Removed.
* jsc-cli/jsc-cli/CLIInstance.h: Removed.
* jsc-cli/jsc-cli/CLIInstance.m: Removed.
* jsc-cli/jsc-cli/JSModule.h: Removed.
* jsc-cli/jsc-cli/JSModule.m: Removed.
* jsc-cli/jsc-cli/JSRunLoopThread.h: Removed.
* jsc-cli/jsc-cli/JSRunLoopThread.m: Removed.
* jsc-cli/jsc-cli/ReadEvalPrintLoop.h: Removed.
* jsc-cli/jsc-cli/ReadEvalPrintLoop.m: Removed.
* jsc-cli/jsc-cli/RunLoopThread.h: Removed.
* jsc-cli/jsc-cli/RunLoopThread.m: Removed.
* jsc-cli/jsc-cli/ScriptInputSource.h: Removed.
* jsc-cli/jsc-cli/ScriptInputSource.m: Removed.
* jsc-cli/jsc-cli/main.m: Removed.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162613 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Win] Update expected result for test svg/W3C-SVG-1.1/paths-data-03-f.html

The expected result for the test test svg/W3C-SVG-1.1/paths-data-03-f.html on Windows
shows a progression towards matching the Mac expected result. Currently, there are many
numerical differences between the expected results for these platforms, described within
three diff chunks. After this commit there will be a single numerical difference (described
in one diff chunk) between the Mac and Windows results. See <https://bugs.webkit.org/show_bug.cgi?id=127490>
for more details.

* platform/win/svg/W3C-SVG-1.1/paths-data-03-f-expected.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162614 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Win] Update expected result for test svg/W3C-SVG-1.1/paths-data-03-f.html

The expected result for the test test svg/W3C-SVG-1.1/paths-data-03-f.html on Windows
shows a progression towards matching the Mac expected result. Currently, there are many
numerical differences between the expected results for these platforms, described within
three diff chunks. After this commit there will be a single numerical difference (described
in one diff chunk) between the Mac and Windows results. See <https://bugs.webkit.org/show_bug.cgi?id=127490>
for more details.

* platform/win/svg/W3C-SVG-1.1/paths-data-03-f-expected.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162615 268f45cc-cd09-0410-ab3c-d52691b4dbfc
build-webkit --sdk=iphonesimulator doesn't think it's building iOS
https://bugs.webkit.org/show_bug.cgi?id=127379

Reviewed by Simon Fraser.

Teach build-webkit to recognize --sdk=X.

Currently, build-webkit recognizes --sdk X to specify X as the Xcode SDK to use, which is also
considered when determining the WebKit port to build. But build-webkit advertises --sdk=X in its
help message. We should teach build-webkit to recognize both --sdk X and --sdk=X to make its handling
of --sdk more consistent with the handling of other build-webkit options that take a value (e.g. --prefix).

* Scripts/webkitdirs.pm:
(checkForArgumentAndRemoveFromArrayRefGettingValue): Added.
(checkForArgumentAndRemoveFromARGVGettingValue): Modified to call checkForArgumentAndRemoveFromArrayRefGettingValue().
* Scripts/webkitperl/webkitdirs_unittest/checkForArgumentAndRemoveFromArrayRefGettingValue.pl: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162616 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed EFL gardening

Add test expectations for failing tests.

* platform/efl/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162617 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[curl] Add storage limit to cache manager
https://bugs.webkit.org/show_bug.cgi?id=125779

Patch by Mátyás Mustoha <mmatyas@inf.u-szeged.hu> on 2014-01-23
Reviewed by Brent Fulgham.

Sets a local disc storage size limit for the cache manager
used by the curl network backend.

* platform/network/curl/CurlCacheEntry.cpp:
(WebCore::CurlCacheEntry::CurlCacheEntry):
(WebCore::CurlCacheEntry::isCached):
(WebCore::CurlCacheEntry::saveCachedData):
(WebCore::CurlCacheEntry::readCachedData):
(WebCore::CurlCacheEntry::didFail):
(WebCore::CurlCacheEntry::didFinishLoading):
(WebCore::CurlCacheEntry::loadFileToBuffer):
(WebCore::CurlCacheEntry::parseResponseHeaders):
(WebCore::CurlCacheEntry::entrySize):
* platform/network/curl/CurlCacheEntry.h:
(WebCore::CurlCacheEntry::requestHeaders):
* platform/network/curl/CurlCacheManager.cpp:
(WebCore::CurlCacheManager::CurlCacheManager):
(WebCore::CurlCacheManager::setStorageSizeLimit):
(WebCore::CurlCacheManager::loadIndex):
(WebCore::CurlCacheManager::saveIndex):
(WebCore::CurlCacheManager::makeRoomForNewEntry):
(WebCore::CurlCacheManager::didReceiveResponse):
(WebCore::CurlCacheManager::didReceiveData):
(WebCore::CurlCacheManager::invalidateCacheEntry):
(WebCore::CurlCacheManager::readCachedData):
* platform/network/curl/CurlCacheManager.h:
(WebCore::CurlCacheManager::cacheDirectory):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162618 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Make IDBGetResult work with IDBKeyData instead of IDBKey.
https://bugs.webkit.org/show_bug.cgi?id=127493

Reviewed by Eric Carlson.

Also break it into its own header to work better with IPC messages.

* Modules/indexeddb/IDBGetResult.h: Added.
(WebCore::IDBGetResult::IDBGetResult):

* Modules/indexeddb/IDBServerConnection.h:

* Modules/indexeddb/IDBTransactionBackendOperations.cpp:
(WebCore::GetOperation::perform):

* WebCore.xcodeproj/project.pbxproj:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162619 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Win] Mark test js/dom/date-big-constructor.html as failing and add Windows expected result

Mark the test js/dom/date-big-constructor.html as failing while we investigate
regression in <https://bugs.webkit.org/show_bug.cgi?id=127492>. Also add Windows expected
result for test fast/css/relative-position-replaced-in-table-display-crash.html as the test
passes but differs in whitespace. We'll investigate this whitespace difference in
<https://bugs.webkit.org/show_bug.cgi?id=127479>.

* platform/win/TestExpectations:
* platform/win/fast/css/relative-position-replaced-in-table-display-crash-expected.txt: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162620 268f45cc-cd09-0410-ab3c-d52691b4dbfc
../JavaScriptCore: [Win] Update project and solution files for 64-bit builds.
https://bugs.webkit.org/show_bug.cgi?id=127457

Reviewed by Eric Carlson.

* JavaScriptCore.vcxproj/JavaScriptCore.submit.sln: Add 64-bit target.
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj: Update for VS2013
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters: Add missing
file from project view.
* JavaScriptCore.vcxproj/jsc/jsc.vcxproj: Update for VS2013
* JavaScriptCore.vcxproj/testRegExp/testRegExp.vcxproj: Ditto
* JavaScriptCore.vcxproj/testapi/testapi.vcxproj: Ditto

../WebCore: [Win] Update project and solution files for 64-bit builds
https://bugs.webkit.org/show_bug.cgi?id=127457

Reviewed by Eric Carlson.

* WebCore.vcxproj/QTMovieWin/QTMovieWin.vcxproj: Update for VS2013
* WebCore.vcxproj/WebCore.submit.sln: Add x64 targets
* WebCore.vcxproj/WebCore.vcxproj: Update for VS2013. Also exclude 32-bit specific
assembly when building 64-bit target.
* WebCore.vcxproj/WebCore.vcxproj.filters: Update for VS2013
* config.h: Handle 64-bit type definitions.
* platform/graphics/ca/win/PlatformCAAnimationWin.cpp:
(PlatformCAAnimation::setFromValue): Use CGFloat to support 64-bit builds
(PlatformCAAnimation::setToValue): Ditto
(PlatformCAAnimation::setValues): Ditto
* platform/graphics/win/FontCustomPlatformData.cpp:
(WebCore::FontCustomPlatformData::fontPlatformData): Add cast to
support 32- and 64-bit targets.
* platform/graphics/win/GraphicsContextCGWin.cpp:
(WebCore::GraphicsContext::drawLineForDocumentMarker): Use CGFloat to
support 64-bit builds.
* platform/win/PasteboardWin.cpp:
(WebCore::Pasteboard::writeURLToDataObject): Specialize std::min to
work on 32- and 64-bit code.
(WebCore::createGlobalImageFileDescriptor): Ditto
* platform/win/StructuredExceptionHandlerSuppressor.cpp:
(WebCore::StructuredExceptionHandlerSuppressor::StructuredExceptionHandlerSuppressor):
Comment out 32-bit inline assembly.
(WebCore::StructuredExceptionHandlerSuppressor::~StructuredExceptionHandlerSuppressor):
Ditto

../WebKit: [Win] Update project and solution files for 64-bit builds
https://bugs.webkit.org/show_bug.cgi?id=127457

Reviewed by Eric Carlson.

* WebKit.vcxproj/Interfaces/Interfaces.vcxproj: Update for VS2013.
* WebKit.vcxproj/WebKit.submit.sln: Add 64-bit target.
* WebKit.vcxproj/WebKit/WebKit.vcxproj: Update for VS2013
* WebKit.vcxproj/WebKit/WebKitApple.props: Remove unused QTMovieWin
library dependency.
* WebKit.vcxproj/WebKitExportGenerator/WebKitExportGenerator.vcxproj:
Update for VS2013.
* WebKit.vcxproj/WebKitGUID/WebKitGUID.vcxproj: Ditto

../WTF: [Win] Update project and solution files for 64-bit builds.
https://bugs.webkit.org/show_bug.cgi?id=127457

Reviewed by Eric Carlson.

* WTF.vcxproj/WTF.submit.sln: Add x64 targets.
* WTF.vcxproj/WTF.vcxproj: Update for VS2013


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

* WebCore.xcodeproj/project.pbxproj: Export the new header so WebKit can see it

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162622 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Curl] There is no way to specify cache folder.
https://bugs.webkit.org/show_bug.cgi?id=125028

Patch by peavo@outlook.com <peavo@outlook.com> on 2014-01-23
Reviewed by Brent Fulgham.

Source/WebCore:

Fixed logical test, disc cache should be disabled if creating cache folder fails.

* platform/network/curl/CurlCacheManager.cpp:
(WebCore::CurlCacheManager::setCacheDirectory):

Source/WebKit/win:

Added interface methods to set and get cache folder location.

* Interfaces/IWebCache.idl:
* WebCache.cpp:
(WebCache::disabled):
(WebCache::cacheFolder):
(WebCache::setCacheFolder):
* WebCache.h:

Tools:

Enable disc cache in WinLauncher by setting cache folder location.

* WinLauncher/WinLauncher.cpp:
(getAppDataFolder): Added function to get app data folder.
(setCacheFolder): Added function to set cache folder.
(createCrashReport): Use new getAppDataFolder function.
(wWinMain): Use function setCacheFolder to set cache folder location.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162623 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Win] Mark test mathml/presentation/maction-toggle.html as failing in TestExpectation

For now, mark the test mathml/presentation/maction-toggle.html as failing. See
<https://bugs.webkit.org/show_bug.cgi?id=127495> for more details.

* platform/win/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162625 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[iOS] [WK2] WKContentView has a black background
https://bugs.webkit.org/show_bug.cgi?id=127471
<rdar://problem/12287363>

Reviewed by Sam Weinig.

* UIProcess/API/ios/WKContentView.mm:
(-[WKContentView _commonInitializationWithContextRef:pageGroupRef:relatedToPage:]):
Instead of giving it a (black!) background to make hit-testing work, use CALayer SPI
to tell CA that the whole layer should be treated as opaque when it comes to hit-testing.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162626 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed GTK gardening.

Remove failure/timeout expectations for the following passed tests:

Patch by Carlos Alberto Lopez Perez <clopez@igalia.com> on 2014-01-23

* platform/gtk/TestExpectations:
    http/tests/navigation/redirect-to-random-url-versus-memory-cache.html

* platform/gtk-wk2/TestExpectations:
    http/tests/xmlhttprequest/access-control-repeated-failed-preflight-crash.html
    accessibility/multiselect-list-reports-active-option.html

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