Source/WebCore: [Resource Timing]Implementation of resource timing buffer size restriction functionality
https://bugs.webkit.org/show_bug.cgi?id=84885.

Patch by Pan Deng <pan.deng@intel.com> on 2012-10-18
Reviewed by Tony Gentilcore.

http://www.w3.org/TR/2012/CR-resource-timing-20120522/
This patch enable functionality of set buffer size(default is 150 as spec). When buffer is full, resourceTimingBufferFull event will be fired. Incoming entries will be dropped if no more space for them.

Tests: http/tests/w3c/webperf/submission/Intel/resource-timing/test_resource_timing_buffer_full_when_populate_entries.html
       http/tests/w3c/webperf/submission/Intel/resource-timing/test_resource_timing_buffer_full_when_shrink_buffer_size.html
       http/tests/w3c/webperf/submission/Intel/resource-timing/test_resource_timing_buffer_size_restriction.html
       http/tests/w3c/webperf/submission/Intel/resource-timing/test_resource_timing_clear_resource_timing_functionality.html
       http/tests/w3c/webperf/submission/Intel/resource-timing/test_resource_timing_on_shrink_buffer_size.html
       http/tests/w3c/webperf/submission/Intel/resource-timing/test_resource_timing_store_and_clear_during_callback.html

* page/Performance.cpp:
(WebCore):
(WebCore::Performance::Performance):
(WebCore::Performance::webkitSetResourceTimingBufferSize):
(WebCore::Performance::addResourceTiming):
(WebCore::Performance::isResourceTimingBufferFull):
* page/Performance.h:
(Performance):

LayoutTests: [Resource Timing]Test cases for set buffer size functionality and event when buffer full.
https://bugs.webkit.org/show_bug.cgi?id=84885.

Patch by Pan Deng <pan.deng@intel.com> on 2012-10-18
Reviewed by Tony Gentilcore.

Test cases in this patch validate buffer size restriction functionality, clear resource timing functionality and the fired event when buffer full.

* http/tests/w3c/webperf/resources/webperftestharnessextension.js:
(PerformanceContext.prototype.getEntriesByName):
(PerformanceContext.prototype.setResourceTimingBufferSize):
(PerformanceContext.prototype.registerResourceTimingBufferFullCallback):
(PerformanceContext.prototype.clearResourceTimings):
* http/tests/w3c/webperf/submission/Intel/resource-timing/test_resource_timing_buffer_full_when_populate_entries-expected.txt: Added.
* http/tests/w3c/webperf/submission/Intel/resource-timing/test_resource_timing_buffer_full_when_populate_entries.html: Added.
* http/tests/w3c/webperf/submission/Intel/resource-timing/test_resource_timing_buffer_full_when_shrink_buffer_size-expected.txt: Added.
* http/tests/w3c/webperf/submission/Intel/resource-timing/test_resource_timing_buffer_full_when_shrink_buffer_size.html: Added.
* http/tests/w3c/webperf/submission/Intel/resource-timing/test_resource_timing_buffer_size_restriction-expected.txt: Added.
* http/tests/w3c/webperf/submission/Intel/resource-timing/test_resource_timing_buffer_size_restriction.html: Added.
* http/tests/w3c/webperf/submission/Intel/resource-timing/test_resource_timing_clear_resource_timing_functionality-expected.txt: Added.
* http/tests/w3c/webperf/submission/Intel/resource-timing/test_resource_timing_clear_resource_timing_functionality.html: Added.
* http/tests/w3c/webperf/submission/Intel/resource-timing/test_resource_timing_on_shrink_buffer_size-expected.txt: Added.
* http/tests/w3c/webperf/submission/Intel/resource-timing/test_resource_timing_on_shrink_buffer_size.html: Added.
* http/tests/w3c/webperf/submission/Intel/resource-timing/test_resource_timing_store_and_clear_during_callback-expected.txt: Added.
* http/tests/w3c/webperf/submission/Intel/resource-timing/test_resource_timing_store_and_clear_during_callback.html: Added.
* platform/chromium/TestExpectations:
* platform/efl/TestExpectations:
* platform/gtk/TestExpectations:
* platform/mac/TestExpectations:
* platform/qt-5.0-wk2/TestExpectations:
* platform/qt/TestExpectations:
* platform/win/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131829 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unbreak jsc tests.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131830 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Skia] Set m_hasAlpha correctly in ImageFrame::copyBitmapData.
https://bugs.webkit.org/show_bug.cgi?id=99781

Reviewed by Adam Barth.

No tests, since the actual effects of this bug are fickle and it's not
clear how to extract and check particular subframes of an animated GIF.

* platform/image-decoders/skia/ImageDecoderSkia.cpp:
(WebCore::ImageFrame::copyBitmapData):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131831 268f45cc-cd09-0410-ab3c-d52691b4dbfc
IndexedDB: Refactor IDBDatabaseBackendImpl to use IDBDatabaseMetadata
https://bugs.webkit.org/show_bug.cgi?id=99773

Reviewed by Tony Chang.

Refactor to begin separating out metadata from stateful backend objects,
in preparation for https://bugs.webkit.org/show_bug.cgi?id=99774.

Also includes some #include dependency cleanup so that the backing store
depends less on the stateful backend objects.

No new tests as this is purely a refactor.

* Modules/indexeddb/IDBBackingStore.h:
(WebCore):
(IDBBackingStore):
* Modules/indexeddb/IDBCursor.h:
* Modules/indexeddb/IDBCursorBackendImpl.h:
(WebCore):
* Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
(WebCore::IDBDatabaseBackendImpl::IDBDatabaseBackendImpl):
(WebCore::IDBDatabaseBackendImpl::openInternal):
(WebCore::IDBDatabaseBackendImpl::metadata):
(WebCore::IDBDatabaseBackendImpl::createObjectStore):
(WebCore::IDBDatabaseBackendImpl::setVersion):
(WebCore::IDBDatabaseBackendImpl::setVersionInternal):
(WebCore::IDBDatabaseBackendImpl::setIntVersionInternal):
(WebCore::IDBDatabaseBackendImpl::processPendingCalls):
(WebCore::IDBDatabaseBackendImpl::openConnection):
(WebCore::IDBDatabaseBackendImpl::runIntVersionChangeTransaction):
(WebCore::IDBDatabaseBackendImpl::openConnectionWithVersion):
(WebCore::IDBDatabaseBackendImpl::deleteDatabase):
(WebCore::IDBDatabaseBackendImpl::loadObjectStores):
(WebCore::IDBDatabaseBackendImpl::resetVersion):
* Modules/indexeddb/IDBDatabaseBackendImpl.h:
(WebCore::IDBDatabaseBackendImpl::id):
(IDBDatabaseBackendImpl):
* Modules/indexeddb/IDBLevelDBBackingStore.cpp:
(WebCore::IDBLevelDBBackingStore::getIDBDatabaseMetaData):
(WebCore::IDBLevelDBBackingStore::deleteDatabase):
* Modules/indexeddb/IDBLevelDBBackingStore.h:
(IDBLevelDBBackingStore):
* Modules/indexeddb/IDBObjectStoreBackendInterface.h:
* Modules/indexeddb/IDBTransaction.h:
(WebCore):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131832 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Mac WTF build checks dependencies before copying header files
https://bugs.webkit.org/show_bug.cgi?id=99770

Reviewed by Mark Rowe.

Fixed up build rules per Mark Rowe. Made new target an Aggregate and removed "WTF copy".

* Configurations/CopyWTFHeaders.xcconfig: Added.
* Configurations/WTF.xcconfig:
* WTF.xcodeproj/project.pbxproj:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131833 268f45cc-cd09-0410-ab3c-d52691b4dbfc
AX: Crashes in WebProcess at com.apple.WebCore: -[AccessibilityObjectWrapper remoteAccessibilityParentObject] + 78
https://bugs.webkit.org/show_bug.cgi?id=96443

Reviewed by Beth Dakin.

Source/WebCore:

Separate out the chain of calls so that the number of times document() is called is reduced and it will be easier
to determine which line this crash is happening on.

* accessibility/mac/WebAccessibilityObjectWrapper.mm:
(-[WebAccessibilityObjectWrapper remoteAccessibilityParentObject]):

Source/WebKit2:

It appears that the crash is due to not checking whether the page object is null.

* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::accessibilityRemoteObject):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131834 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] Add a webkit_test_support target that WebTestingSupport
https://bugs.webkit.org/show_bug.cgi?id=99772

Reviewed by Adam Barth.

Source/WebKit/chromium:

Before, embedders would need to compile the WebTestingSupport.cpp
themselves, which in turn depends on WebCore headers.

* WebKit.gyp:

Tools:

* DumpRenderTree/DumpRenderTree.gyp/DumpRenderTree.gyp:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131835 268f45cc-cd09-0410-ab3c-d52691b4dbfc
convertUTF8ToUTF16() Should Check for ASCII Input
ihttps://bugs.webkit.org/show_bug.cgi?id=99739

Reviewed by Geoffrey Garen.

Source/JavaScriptCore: 

Using the updated convertUTF8ToUTF16() , we can determine if is makes more sense to 
create a string using the 8 bit source.  Added a new OpaqueJSString::create(LChar*, unsigned).
Had to add a cast n JSStringCreateWithCFString to differentiate which create() to call.

* API/JSStringRef.cpp:
(JSStringCreateWithUTF8CString):
* API/JSStringRefCF.cpp:
(JSStringCreateWithCFString):
* API/OpaqueJSString.h:
(OpaqueJSString::create):
(OpaqueJSString):
(OpaqueJSString::OpaqueJSString):

Source/WTF: 

Added code to accumulate the "or" of all characters seen during the UTF8 to UTF16 conversion.  This is
used to check to see if all characters are ASCII and is returned via a bool*.

* wtf/unicode/UTF8.cpp:
(WTF::Unicode::convertUTF8ToUTF16):
* wtf/unicode/UTF8.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131836 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Chromium] Test expectation update.

* platform/chromium/TestExpectations: Remove entries for passing *-multiple-fieds tests.
* platform/chromium-mac-mountainlion/TestExpectations: Add them.

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