set WTF_USE_LOCKFREE_THREADSAFEREFCOUNTED for chromium android
https://bugs.webkit.org/show_bug.cgi?id=91746

Patch by Wei James <james.wei@intel.com> on 2012-07-27
Reviewed by Adam Barth.

This patch is part of efforts to enable web audio for chromium android.
Web audio component needs to use atomicIncrement and atomicDecrement,
which are enabled by this MACRO.

As mentioned in https://bugs.webkit.org/show_bug.cgi?id=89428#c19, make
this patch standalone.

* wtf/Atomics.h:
(WTF):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@123875 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt][WK2] Gardening after r123786. It made 5 fast/animation tests fail
https://bugs.webkit.org/show_bug.cgi?id=92490

Patch by Balazs Ankes <bank@inf.u-szeged.hu> on 2012-07-27
Rubber stamped by Zoltan Herczeg.

* platform/qt-5.0-wk2/Skipped:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@123876 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[NRWT] should have a way to restrict pixel tests for individual directories
https://bugs.webkit.org/show_bug.cgi?id=91754

Unreviewed attempt to fix the chaos I introduced.

* DumpRenderTree/qt/DumpRenderTreeQt.cpp:
(WebCore::DumpRenderTree::processLine):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@123877 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Support a rational time class for use by media elements.
https://bugs.webkit.org/show_bug.cgi?id=88787

Source/JavaScriptCore:

Re-export WTF::MediaTime from JavaScriptCore.

Reviewed by Eric Carlson.

* JavaScriptCore.order:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:

Source/WTF:

Reviewed by Eric Carlson.

Add a new MediaTime class which implements rational math operations.

Add common constructors and assignment operators:
* wtf/MediaTime.cpp: Added.
(WTF::MediaTime::MediaTime):
(WTF::MediaTime::~MediaTime):
(WTF::MediaTime::operator=):

Add common math operators:
* wtf/MediaTime.cpp:
(WTF::MediaTime::operator+):
(WTF::MediaTime::operator-):
(WTF::MediaTime::operator<):
(WTF::MediaTime::operator>):
(WTF::MediaTime::operator==):
(WTF::MediaTime::operator>=):
(WTF::MediaTime::operator<=):

Add functions to check the MeiaTime time type flags:
* wtf/MediaTime.h:
(WTF::MediaTime::isValid):
(WTF::MediaTime::isInvalid):
(WTF::MediaTime::hasBeenRounde):
(WTF::MediaTime::isPositiveInfinite):
(WTF::MediaTime::isNegativeInfinite):
(WTF::MediaTime::isIndefinite):

Add constants for commonly used MediaTime values:
(WTF::MediaTime::zeroTime):
(WTF::MediaTime::invalidTime):
(WTF::MediaTime::positiveInfiniteTime):
(WTF::MediaTime::negativeInfiniteTime):
(WTF::MediaTime::indefiniteTime):

Add explicit conversion functions to convert to and from floating point values.
* wtf/MediaTime.cpp:
(WTF::MediaTime::createWithFloat):
(WTF::MediaTime::createWithDouble):
(WTF::MediaTime::toFloat):
(WTF::MediaTime::toDouble):

Add some useful exported functions:
* wtf/MediaTime.cpp:
(WTF::MediaTime::compare): Master function for the comparison operators above.
(WTF::MediaTime::setTimeScale): Rescale the time value to a new time scale.
(WTF::abs): Return an absolute value for the current MediaTime.

Static utility functions to implement the above:
* wtf/MediaTime.cpp:
(WTF::greatestCommonDivisor):
(WTF::leastCommonMultiple):
(WTF::signum):

Windows-only implementations of isinf and signbit:
* wtf/MediaTime.cpp:
(std::isinf):
(std::signbit):

Add the new class to platform build files:
* GNUmakefile.list.am:
* WTF.gypi:
* WTF.pro:
* WTF.vcproj/WTF.vcproj:
* WTF.xcodeproj/project.pbxproj:

Tools:

Add unit tests for the WTF::MediaTime class.

Reviewed by Eric Carlson.

* TestWebKitAPI/GNUmakefile.am:
* TestWebKitAPI/TestWebKitAPI.gypi:
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WTF/MediaTime.cpp: Added.
* TestWebKitAPI/win/TestWebKitAPI.vcproj:
(WTF::operator<<):
(TestWebKitAPI):
(TestWebKitAPI::TEST):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@123878 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit: [EFL] WebKit API unit tests needs a timeout
https://bugs.webkit.org/show_bug.cgi?id=92496

Patch by Thiago Marcos P. Santos <thiago.santos@intel.com> on 2012-07-27
Reviewed by Antonio Gomes.

Added the same timeout value that we have for WebKit2.

* PlatformEfl.cmake:

Source/WTF: Support a rational time class for use by media elements.
https://bugs.webkit.org/show_bug.cgi?id=88787

Patch by Jer Noble <jer.noble@apple.com> on 2012-07-27
Reviewed by Eric Carlson.

Add a new MediaTime class which implements rational math operations.

Add common constructors and assignment operators:
* wtf/MediaTime.cpp: Added.
(WTF::MediaTime::MediaTime):
(WTF::MediaTime::~MediaTime):
(WTF::MediaTime::operator=):

Add common math operators:
* wtf/MediaTime.cpp:
(WTF::MediaTime::operator+):
(WTF::MediaTime::operator-):
(WTF::MediaTime::operator<):
(WTF::MediaTime::operator>):
(WTF::MediaTime::operator==):
(WTF::MediaTime::operator>=):
(WTF::MediaTime::operator<=):

Add functions to check the MeiaTime time type flags:
* wtf/MediaTime.h:
(WTF::MediaTime::isValid):
(WTF::MediaTime::isInvalid):
(WTF::MediaTime::hasBeenRounde):
(WTF::MediaTime::isPositiveInfinite):
(WTF::MediaTime::isNegativeInfinite):
(WTF::MediaTime::isIndefinite):

Add constants for commonly used MediaTime values:
(WTF::MediaTime::zeroTime):
(WTF::MediaTime::invalidTime):
(WTF::MediaTime::positiveInfiniteTime):
(WTF::MediaTime::negativeInfiniteTime):
(WTF::MediaTime::indefiniteTime):

Add explicit conversion functions to convert to and from floating point values.
* wtf/MediaTime.cpp:
(WTF::MediaTime::createWithFloat):
(WTF::MediaTime::createWithDouble):
(WTF::MediaTime::toFloat):
(WTF::MediaTime::toDouble):

Add some useful exported functions:
* wtf/MediaTime.cpp:
(WTF::MediaTime::compare): Master function for the comparison operators above.
(WTF::MediaTime::setTimeScale): Rescale the time value to a new time scale.
(WTF::abs): Return an absolute value for the current MediaTime.

Static utility functions to implement the above:
* wtf/MediaTime.cpp:
(WTF::greatestCommonDivisor):
(WTF::leastCommonMultiple):
(WTF::signum):

Windows-only implementations of isinf and signbit:
* wtf/MediaTime.cpp:
(std::isinf):
(std::signbit):

Add the new class to platform build files:
* GNUmakefile.list.am:
* WTF.gypi:
* WTF.pro:
* WTF.vcproj/WTF.vcproj:
* WTF.xcodeproj/project.pbxproj:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@123879 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Microdata: Remove toJs() and toV8Object() custom methods from JSHTMLElementCustom.cpp and V8HTMLElementCustom.cpp respectively.
https://bugs.webkit.org/show_bug.cgi?id=92482

Patch by Arko Saha <arko@motorola.com> on 2012-07-27
Reviewed by Kentaro Hara.

Removed custom methods toJS() and toV8Object(). We should use toJS() method defined in
JSMicroDataItemValueCustom.cpp and toV8() method defined in V8MicroDataItemValueCustom.cpp
in place of custom toJs() and toV8Object().

Existing tests :
        fast/dom/MicroData/itemvalue-reflects-data-attr-on-object-element.html
        fast/dom/MicroData/itemvalue-reflects-href-attr.html
        fast/dom/MicroData/itemvalue-reflects-src-attribute-on-img-element.html
        fast/dom/MicroData/itemvalue-reflects-the-content-attr-on-meta-element.html
        fast/dom/MicroData/itemvalue-reflects-the-src-attr.html
        fast/dom/MicroData/itemvalue-returns-element-itself.html
        fast/dom/MicroData/itemvalue-returns-null.html
        fast/dom/MicroData/itemvalue-throws-excpetion-onsetting-001.html
        fast/dom/MicroData/itemvalue-throws-excpetion-onsetting-002.html

* bindings/js/JSHTMLElementCustom.cpp:
(WebCore):
* bindings/v8/custom/V8HTMLElementCustom.cpp:
(WebCore):
(WebCore::V8HTMLElement::itemValueAccessorGetter):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@123880 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add runtime flag to enable/disable JS memory information
https://bugs.webkit.org/show_bug.cgi?id=92479

Patch by Zoltan Horvath <zoltan@webkit.org> on 2012-07-27
Reviewed by Simon Hausmann.

We need console.memory JS object to be accessible because of the memory consumption
measurements of the performance tests, so I added a toggle to InternalSettings.

* testing/InternalSettings.cpp:
(WebCore::InternalSettings::setMemoryInfoEnabled):
(WebCore):
* testing/InternalSettings.h:
(InternalSettings):
* testing/InternalSettings.idl:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@123881 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL][WK2] Add download client for Ewk_Context
https://bugs.webkit.org/show_bug.cgi?id=91345

Patch by Christophe Dumez <christophe.dumez@intel.com> on 2012-07-27
Reviewed by Kenneth Rohde Christiansen.

Add download client for Ewk_Context so that
information about downloads can be reported
to the client application via Ewk_View signals.

The client application needs to listen for
"download,request" signal on the view and set
the download path for the download in the
callback in order to accept it. If the signal
is ignored or if the download path is not set
the download will fail.

A new Ewk_Download_Job type is introduced to provide
information relative to a download to the client
and to allow the client to interact with it (e.g.
set its download path, cancel it, ...).

* PlatformEfl.cmake:
* UIProcess/API/efl/EWebKit2.h:
* UIProcess/API/efl/PageClientImpl.cpp:
(WebKit::PageClientImpl::handleDownloadRequest):
(WebKit):
* UIProcess/API/efl/PageClientImpl.h:
(PageClientImpl):
* UIProcess/API/efl/ewk_context.cpp:
(_Ewk_Context):
(_Ewk_Context::_Ewk_Context):
(_Ewk_Context::~_Ewk_Context):
(ewk_context_download_job_add):
(ewk_context_download_job_get):
(ewk_context_download_job_remove):
* UIProcess/API/efl/ewk_context_download_client.cpp: Added.
(toEwkContext):
(decideDestinationWithSuggestedFilename):
(didReceiveResponse):
(didCreateDestination):
(didReceiveData):
(didFail):
(didCancel):
(didFinish):
(ewk_context_download_client_attach):
* UIProcess/API/efl/ewk_context_download_client_private.h: Added.
* UIProcess/API/efl/ewk_context_private.h:
* UIProcess/API/efl/ewk_download_job.cpp: Added.
(_Ewk_Download_Job):
(_Ewk_Download_Job::_Ewk_Download_Job):
(_Ewk_Download_Job::~_Ewk_Download_Job):
(ewk_download_job_ref):
(ewk_download_job_unref):
(ewk_download_job_id_get):
(ewk_download_job_view_get):
(ewk_download_job_state_get):
(ewk_download_job_request_get):
(ewk_download_job_response_get):
(ewk_download_job_destination_get):
(ewk_download_job_destination_set):
(ewk_download_job_suggested_filename_get):
(ewk_download_job_cancel):
(ewk_download_job_estimated_progress_get):
(ewk_download_job_elapsed_time_get):
(ewk_download_job_response_set):
(ewk_download_job_suggested_filename_set):
(ewk_download_job_received_data):
(ewk_download_job_state_set):
(ewk_download_job_new):
* UIProcess/API/efl/ewk_download_job.h: Added.
* UIProcess/API/efl/ewk_download_job_private.h: Added.
(WebKit):
* UIProcess/API/efl/ewk_url_response.cpp:
(ewk_url_response_content_length_get): Add a function to
retrieve the content length of a URL response.
* UIProcess/API/efl/ewk_url_response.h:
* UIProcess/API/efl/ewk_view.cpp:
(ewk_view_download_job_cancelled):
(ewk_view_download_job_requested):
(ewk_view_download_job_failed):
(ewk_view_download_job_finished):
* UIProcess/API/efl/ewk_view.h:
* UIProcess/API/efl/ewk_view_private.h:
* UIProcess/API/efl/tests/resources/test.pdf: Added.
* UIProcess/API/efl/tests/test_ewk2_download_job.cpp: Added. This tests
the download functionality.
(DownloadTestData):
(fileExists):
(serverCallback):
(on_download_requested):
(on_download_cancelled):
(on_download_failed):
(on_download_finished):
(TEST_F):
* UIProcess/PageClient.h:
(PageClient):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::receivedPolicyDecision):
(WebKit):
(WebKit::WebPageProxy::handleDownloadRequest):
* UIProcess/WebPageProxy.h:
(WebPageProxy):

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