IndexedDB: createIndex should throw INVALID_ACCESS_ERR instead of NOT_SUPPORTED_ERR
https://bugs.webkit.org/show_bug.cgi?id=91553

Patch by Alec Flett <alecflett@chromium.org> on 2012-07-17
Reviewed by Tony Chang.

Source/WebCore:

Update createIndex to throw an INVALID_ACCESS_ERR
as per the IndexedDB spec.

No new tests: existing tests have been updated

* Modules/indexeddb/IDBDatabaseException.cpp:
(WebCore):
* Modules/indexeddb/IDBDatabaseException.h:
* Modules/indexeddb/IDBObjectStore.cpp:
(WebCore::IDBObjectStore::createIndex):

LayoutTests:

Update to match IndexedDB spec.

* storage/indexeddb/keypath-arrays-expected.txt:
* storage/indexeddb/resources/keypath-arrays.js:
(openSuccess.request.onsuccess):
(openSuccess):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122905 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed chromium windows rebaseline for r122883.

* platform/chromium-win-xp/css2.1/t100801-c544-valgn-03-d-agi-expected.png: Added.
* platform/chromium-win-xp/css2.1/t100801-c544-valgn-03-d-agi-expected.txt: Added.
* platform/chromium-win-xp/fast/inline-block/inline-block-vertical-align-expected.png: Added.
* platform/chromium-win-xp/fast/inline/002-expected.png:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122906 268f45cc-cd09-0410-ab3c-d52691b4dbfc
webkitdirs.pm should fallback to uname -m if arch is not present.
https://bugs.webkit.org/show_bug.cgi?id=91543

Reviewed by Martin Robinson.

It seems that coreutils is moving away from the 'arch' command. Archlinux
for example doesn't ship it anymore (coreutils 8.17). We can then fallback
to 'uname -m' to find out the architecture.

* Scripts/webkitdirs.pm:
(determineArchitecture):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122907 268f45cc-cd09-0410-ab3c-d52691b4dbfc
IndexedDB: Key generator state not maintained across connections
https://bugs.webkit.org/show_bug.cgi?id=91456

Reviewed by Tony Chang.

Source/WebCore:

Explicitly store key generator state for each object store in the backing store,
rather than deriving it from the maximum key in the data (which violates the spec
if data is deleted).

This change eliminates a (fragile) per-store cache of the value to simplify the
code. A cache could be re-introduced, requiring an "onbeforecommit" hook for
object stores, but it seems cleaner to save that for a follow-up patch.

Test: storage/indexeddb/key-generator.html

* Modules/indexeddb/IDBBackingStore.h: New APIs for getting/setting generator states.
(IDBBackingStore):
* Modules/indexeddb/IDBLevelDBBackingStore.cpp:
(WebCore::IDBLevelDBBackingStore::getObjectStores): Read generator state (but currently ignored).
(WebCore::IDBLevelDBBackingStore::createObjectStore): Write generator state.
(WebCore):
(WebCore::IDBLevelDBBackingStore::getKeyGeneratorCurrentNumber):
(WebCore::IDBLevelDBBackingStore::maybeUpdateKeyGeneratorCurrentNumber): Update, optionally
checking to see if the new value is greater than the old. (If caller got the value via
getKeyGeneratorCurrentNumber it is safe to skip the check.)
* Modules/indexeddb/IDBLevelDBBackingStore.h:
(IDBLevelDBBackingStore):
* Modules/indexeddb/IDBLevelDBCoding.cpp:
* Modules/indexeddb/IDBLevelDBCoding.h:
* Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
(WebCore::IDBObjectStoreBackendImpl::IDBObjectStoreBackendImpl): Ditch the cache.
(WebCore::IDBObjectStoreBackendImpl::put): No need for abort task.
(WebCore::IDBObjectStoreBackendImpl::putWithIndexKeys): Ditto.
(WebCore::IDBObjectStoreBackendImpl::putInternal): Use the newfangled APIs below.
(WebCore::IDBObjectStoreBackendImpl::generateKey):
(WebCore::IDBObjectStoreBackendImpl::updateKeyGenerator):
* Modules/indexeddb/IDBObjectStoreBackendImpl.h:
(IDBObjectStoreBackendImpl):

Source/WebKit/chromium:

Add stub method implementations to test class.

* tests/IDBFakeBackingStore.h:

LayoutTests:

Added key generator test case that spans database connections.

* storage/indexeddb/key-generator-expected.txt:
* storage/indexeddb/resources/key-generator.js:
(testAcrossConnections.request.onsuccess.request.onsuccess.request.onsuccess):
(testAcrossConnections.request.onsuccess.request.onsuccess):
(testAcrossConnections.request.onsuccess):
(testAcrossConnections.doFirstWrite.request.onsuccess):
(testAcrossConnections.doFirstWrite):
(testAcrossConnections.closeAndReopen.request.onsuccess):
(testAcrossConnections.closeAndReopen):
(testAcrossConnections.doSecondWrite.request.onsuccess):
(testAcrossConnections.doSecondWrite.trans.oncomplete):
(testAcrossConnections.doSecondWrite):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122909 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Record metrics to measure the usage of Blob([ArrayBuffer]) to eventually deprecate it
https://bugs.webkit.org/show_bug.cgi?id=90534

Reviewed by Jian Li.

We are removing ArrayBuffer support in Blob constructor (in favor of
ArrayBufferView) but before doing that we should record its use relative to ArrayBufferView.
http://dev.w3.org/2006/webapi/FileAPI/#dfn-Blob

No new tests as this has no functional changes.

* fileapi/WebKitBlobBuilder.cpp:
(WebCore::WebKitBlobBuilder::append):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122910 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Chromium] Rename HarfBuzzFace to HarfBuzzNGFace
https://bugs.webkit.org/show_bug.cgi?id=91458

Reviewed by Tony Chang.

There are HarfbuzzFace class (for old-harfbuzz) and HarfBuzzFace (for harfbuzz-ng) class. The difference is too subtle. Make them more distinct.

No new tests. No changes in behavior.

* WebCore.gyp/WebCore.gyp: Rename HarfBuzzFace to HarfBuzzNGFace.
* WebCore.gypi: Ditto.
* platform/graphics/FontPlatformData.h: Ditto.
(FontPlatformData):
* platform/graphics/cocoa/FontPlatformDataCocoa.mm: Ditto.
(WebCore::FontPlatformData::harfbuzzFace):
* platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.cpp: Ditto.
(WebCore::FontPlatformData::harfbuzzFace):
* platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.h: Ditto.
(FontPlatformData):
* platform/graphics/harfbuzz/ng/HarfBuzzNGFaceCoreText.cpp: Renamed from Source/WebCore/platform/graphics/harfbuzz/ng/HarfBuzzFaceCoreText.cpp.
(WebCore):
(WebCore::floatToHarfBuzzPosition):
(WebCore::getGlyph):
(WebCore::getGlyphHorizontalAdvance):
(WebCore::getGlyphHorizontalOrigin):
(WebCore::getGlyphExtents):
(WebCore::harfbuzzCoreTextGetFontFuncs):
(WebCore::releaseTableData):
(WebCore::harfbuzzCoreTextGetTable):
(WebCore::HarfBuzzNGFace::createFace):
(WebCore::HarfBuzzNGFace::createFont):
(WebCore::HarfBuzzShaper::createGlyphBufferAdvance):
* platform/graphics/harfbuzz/ng/HarfBuzzNGFaceSkia.cpp: Renamed from Source/WebCore/platform/graphics/harfbuzz/ng/HarfBuzzFaceSkia.cpp.
(WebCore):
(WebCore::SkiaScalarToHarfbuzzPosition):
(WebCore::SkiaGetGlyphWidthAndExtents):
(WebCore::harfbuzzGetGlyph):
(WebCore::harfbuzzGetGlyphHorizontalAdvance):
(WebCore::harfbuzzGetGlyphHorizontalOrigin):
(WebCore::harfbuzzGetGlyphExtents):
(WebCore::harfbuzzSkiaGetFontFuncs):
(WebCore::harfbuzzSkiaGetTable):
(WebCore::destroyPaint):
(WebCore::HarfBuzzNGFace::createFace):
(WebCore::HarfBuzzNGFace::createFont):
(WebCore::HarfBuzzShaper::createGlyphBufferAdvance):
* platform/graphics/harfbuzz/ng/HarfBuzzNGFace.cpp: Renamed from Source/WebCore/platform/graphics/harfbuzz/ng/HarfBuzzFace.cpp.
(WebCore):
(WebCore::harfbuzzFaceCache):
(WebCore::HarfBuzzNGFace::HarfBuzzNGFace):
(WebCore::HarfBuzzNGFace::~HarfBuzzNGFace):
* platform/graphics/harfbuzz/ng/HarfBuzzNGFace.h: Renamed from Source/WebCore/platform/graphics/harfbuzz/ng/HarfBuzzFace.h.
(WebCore):
(HarfBuzzNGFace):
(WebCore::HarfBuzzNGFace::create):
* platform/graphics/harfbuzz/ng/HarfBuzzShaper.cpp:
(WebCore::HarfBuzzShaper::shapeHarfBuzzRuns):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122911 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Teach CodeGenerator to support for static, readonly, attributes
https://bugs.webkit.org/show_bug.cgi?id=88920
<rdar://problem/11650330>

Reviewed by Oliver Hunt.

Update the parser to be able to accept the static keyword for attribute. We will treat static attributes
like custom static functions. They call the implementing class directly, and pass in the ExecState as a script context.

* bindings/scripts/CodeGeneratorJS.pm:
(GetAttributeGetterName): Factor out the construction of the attribute getter function name.
(GetAttributeSetterName): Factor out the construction of the attribute setter function name.
(GenerateHeader): Determine that a class has read-write properties only if there is a read-write attribute that
is not static.
(GenerateAttributesHashTable): Skip static attributes in the object hash table. They will be added to the constructor
hash table.
(GenerateImplementation): Look for static attributes to add to the constructor hash table. Make a call to the static
function in the class.
* bindings/scripts/IDLParser.pm:
(ParseInterface): Update the processing because of the regex change.
* bindings/scripts/IDLStructure.pm: Update the attribute regex.
* bindings/scripts/test/JS/JSTestObj.cpp: Update test results.
* bindings/scripts/test/JS/JSTestObj.h: Update test results.
* bindings/scripts/test/TestObj.idl: Add test cases.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122912 268f45cc-cd09-0410-ab3c-d52691b4dbfc
NRWT The time before server_process kills DRT should be variable
https://bugs.webkit.org/show_bug.cgi?id=91542

Patch by Don Olmstead <don.olmstead@am.sony.com> on 2012-07-17
Reviewed by Dirk Pranke.

Added the ability to configure the amount of time
server_process waits before killing the DRT process
during the call to stop.

* Scripts/webkitpy/layout_tests/port/base.py:
(Port.variable.process_kill_time):
* Scripts/webkitpy/layout_tests/port/server_process.py:
(ServerProcess.stop):

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