[Forms] Cleanup CSS selectors for multiple fields time input UI
https://bugs.webkit.org/show_bug.cgi?id=94287

Reviewed by Kent Tamura.

Source/WebCore:

This patch cleans CSS selectors for multiple fields time input UI:
 - Removed "width" from fields: we use monospace font for field.
 - Use "em" instead of "px" for unit.
 - Add left margin to spin button.

Changes of this patch affect only both ENABLE_INPUT_TYPE_TIME and
ENABLE_INPUT_TYPE_TIME_MULTIPLE_FIELDS are enabled.

Tests: fast/forms/time-multiple-fields/time-multiple-fields-appearance-basic.html
       fast/forms/time-multiple-fields/time-multiple-fields-appearance-disabled-readonly.html
       fast/forms/time-multiple-fields/time-multiple-fields-appearance-pseudo-classes.html
       fast/forms/time-multiple-fields/time-multiple-fields-appearance-pseudo-elements.html
       fast/forms/time-multiple-fields/time-multiple-fields-appearance-style.html

* css/html.css:
(input::-webkit-datetime-edit-ampm-field):
(input::-webkit-datetime-edit-hour-field):
(input::-webkit-datetime-edit-millisecond-field):
(input::-webkit-datetime-edit-minute-field):
(input::-webkit-datetime-edit-second-field):
(input[type=time]::-webkit-inner-spin-button):

LayoutTests:

This patch introduces tests for multiple fields time input UI appearance
when both ENABLE_INPUT_TYPE_TIME and ENABLE_INPUT_TYPE_TIME_MULTIPLE_FIELDS
are enabled.

Note: We need to do rebaseline for Chromium-Mac and Chromium-Win.

* fast/forms/time-multiple-fields/resources/time-multiple-fields-appearance.css: Added.
* fast/forms/time-multiple-fields/resources/time-multiple-fields-appearance.js: Added.
* fast/forms/time-multiple-fields/time-multiple-fields-appearance-basic-expected.html: Added.
* fast/forms/time-multiple-fields/time-multiple-fields-appearance-basic.html: Added.
* fast/forms/time-multiple-fields/time-multiple-fields-appearance-disabled-readonly.html: Added.
* fast/forms/time-multiple-fields/time-multiple-fields-appearance-pseudo-classes.html: Added.
* fast/forms/time-multiple-fields/time-multiple-fields-appearance-pseudo-elements-expected.html: Added.
* fast/forms/time-multiple-fields/time-multiple-fields-appearance-pseudo-elements.html: Added.
* fast/forms/time-multiple-fields/time-multiple-fields-appearance-style.html: Added.
* platform/chromium-linux/fast/forms/time-multiple-fields/time-multiple-fields-appearance-disabled-readonly-expected.png: Added.
* platform/chromium-linux/fast/forms/time-multiple-fields/time-multiple-fields-appearance-disabled-readonly-expected.txt: Added.
* platform/chromium-linux/fast/forms/time-multiple-fields/time-multiple-fields-appearance-pseudo-classes-expected.png: Added.
* platform/chromium-linux/fast/forms/time-multiple-fields/time-multiple-fields-appearance-pseudo-classes-expected.txt: Added.
* platform/chromium-linux/fast/forms/time-multiple-fields/time-multiple-fields-appearance-style-expected.png: Added.
* platform/chromium-linux/fast/forms/time-multiple-fields/time-multiple-fields-appearance-style-expected.txt: Added.
* platform/chromium/TestExpectations: Added MISSING entries for Chromium-Mac and Chromium-Win.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@125849 268f45cc-cd09-0410-ab3c-d52691b4dbfc
IndexedDB: Frontend and plumbing for integer versions
https://bugs.webkit.org/show_bug.cgi?id=92897

Source/WebCore:

Reviewed by Tony Chang.

This patch exposes integer versions and the upgradeneeded event to
script.

The events surrounding an IDBOpenDBRequest follow a new pattern
compared to other idb requests. An open request can receive a blocked
event, an upgradeneeded event, and then a success event. When
dispatching the upgradeneeded and success events the request has its
readyState set to DONE and its result property set to an IDBDatabase.
We usually think of IDBRequests firing one event with one result,
cursors being the big exception. There are some minor changes around
enqueuing and dispatching events to support this.

There's also some funkiness in
IDBRequest::onSuccess(PassRefPtr<IDBDatabaseBackendInterface>) so that
the IDBDatabase object delivered in upgradeneeded is reused for the
success event.

Tests - expectations are updated in this patch.

* Modules/indexeddb/IDBDatabase.cpp:
(WebCore::IDBDatabase::setVersion):
(WebCore::IDBDatabase::onVersionChange):
(WebCore):
(WebCore::IDBDatabase::registerFrontendCallbacks):
* Modules/indexeddb/IDBDatabase.h:
(IDBDatabase):
* Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
(WebCore::IDBDatabaseBackendImpl::runIntVersionChangeTransaction):
* Modules/indexeddb/IDBDatabaseCallbacks.h:
(IDBDatabaseCallbacks):
* Modules/indexeddb/IDBDatabaseCallbacksImpl.cpp:
(WebCore::IDBDatabaseCallbacksImpl::onVersionChange):
(WebCore):
* Modules/indexeddb/IDBDatabaseCallbacksImpl.h:
(IDBDatabaseCallbacksImpl):
* Modules/indexeddb/IDBFactory.cpp:
(WebCore::IDBFactory::open):
(WebCore):
* Modules/indexeddb/IDBFactory.h:
(IDBFactory):
* Modules/indexeddb/IDBFactory.idl:
* Modules/indexeddb/IDBFactoryBackendImpl.cpp:
(WebCore::IDBFactoryBackendImpl::open):
* Modules/indexeddb/IDBFactoryBackendImpl.h:
(IDBFactoryBackendImpl):
* Modules/indexeddb/IDBFactoryBackendInterface.h:
(IDBFactoryBackendInterface):
* Modules/indexeddb/IDBOpenDBRequest.cpp: Added.
(WebCore):
(WebCore::IDBOpenDBRequest::create):
(WebCore::IDBOpenDBRequest::IDBOpenDBRequest):
(WebCore::IDBOpenDBRequest::~IDBOpenDBRequest):
(WebCore::IDBOpenDBRequest::interfaceName):
(WebCore::IDBOpenDBRequest::onBlocked):
(WebCore::IDBOpenDBRequest::onUpgradeNeeded):
(WebCore::IDBOpenDBRequest::shouldEnqueueEvent):
* Modules/indexeddb/IDBOpenDBRequest.h: Copied from Source/WebCore/Modules/indexeddb/IDBDatabaseCallbacksImpl.h.
(WebCore):
(IDBOpenDBRequest):
* Modules/indexeddb/IDBOpenDBRequest.idl: Copied from Source/WebCore/Modules/indexeddb/IDBDatabaseCallbacks.h.
* Modules/indexeddb/IDBRequest.cpp:
(WebCore::IDBRequest::IDBRequest):
(WebCore::IDBRequest::shouldEnqueueEvent):
(WebCore::IDBRequest::onSuccess):
This function works with WebIDBCallbacksImpl::onSuccess to reuse its
IDBDatabaseBackendInterface that it got during
IDBOpenDBRequest::onUpgradeNeeded.

(WebCore::IDBRequest::dispatchEvent):
(WebCore::IDBRequest::transactionDidDispatchCompleteOrAbort):
(WebCore):
(WebCore::IDBRequest::enqueueEvent):
* Modules/indexeddb/IDBRequest.h:
(WebCore::IDBRequest::onBlocked):
(IDBRequest):
* Modules/indexeddb/IDBTransaction.cpp:
We now take a pointer to the openDBRequest if this is a version
change transaction as a result of an open-with-version call so that we
can clear the transaction property on the openDBRequest as soon as the
upgradeneeded event is dispatched per the spec ("... set request's
transaction property to null... ", currently 4.8.12).

(WebCore::IDBTransaction::create):
(WebCore):
(WebCore::IDBTransaction::IDBTransaction):
(WebCore::IDBTransaction::setActive):
(WebCore::IDBTransaction::onComplete):
(WebCore::IDBTransaction::dispatchEvent):
* Modules/indexeddb/IDBTransaction.h:
(WebCore):
(IDBTransaction):
* Modules/indexeddb/IDBTransactionBackendImpl.cpp:
(WebCore::IDBTransactionBackendImpl::commit):
* Modules/indexeddb/IDBUpgradeNeededEvent.cpp: Copied from Source/WebCore/Modules/indexeddb/IDBDatabaseCallbacksImpl.cpp.
(WebCore):
(WebCore::IDBUpgradeNeededEvent::create):
(WebCore::IDBUpgradeNeededEvent::IDBUpgradeNeededEvent):
(WebCore::IDBUpgradeNeededEvent::~IDBUpgradeNeededEvent):
(WebCore::IDBUpgradeNeededEvent::oldVersion):
(WebCore::IDBUpgradeNeededEvent::newVersion):
(WebCore::IDBUpgradeNeededEvent::interfaceName):
* Modules/indexeddb/IDBUpgradeNeededEvent.h: Copied from Source/WebKit/chromium/src/WebIDBDatabaseCallbacksImpl.h.
(WebCore):
(IDBUpgradeNeededEvent):
* Modules/indexeddb/IDBUpgradeNeededEvent.idl: Copied from Source/WebCore/Modules/indexeddb/IDBDatabaseCallbacks.h.
* WebCore.gypi:
* dom/EventNames.h:
(WebCore):
* dom/EventNames.in:
* dom/EventTargetFactory.in:
* inspector/InspectorIndexedDBAgent.cpp:
(WebCore):

Source/WebKit/chromium:

Reviewed by Tony Chang.

* src/IDBCallbacksProxy.cpp:
(WebKit::IDBCallbacksProxy::onBlocked):
(WebKit):
(WebKit::IDBCallbacksProxy::onUpgradeNeeded):
* src/IDBCallbacksProxy.h:
(IDBCallbacksProxy):
* src/IDBDatabaseBackendProxy.cpp:
(WebKit::IDBDatabaseBackendProxy::setVersion):
* src/IDBDatabaseCallbacksProxy.cpp:
(WebKit::IDBDatabaseCallbacksProxy::onVersionChange):
(WebKit):
* src/IDBDatabaseCallbacksProxy.h:
(IDBDatabaseCallbacksProxy):
* src/IDBFactoryBackendProxy.cpp:
(WebKit::IDBFactoryBackendProxy::open):
* src/IDBFactoryBackendProxy.h:
(IDBFactoryBackendProxy):
* src/IDBTransactionCallbacksProxy.cpp:
(WebKit::IDBTransactionCallbacksProxy::onComplete):
* src/WebIDBCallbacksImpl.cpp:
(WebKit::WebIDBCallbacksImpl::WebIDBCallbacksImpl):
(WebKit::WebIDBCallbacksImpl::onSuccess):
We don't want to create IDBDatabaseBackendProxy again if we've already
created it during upgradeNeeded.  This makes
IDBRequest::onSuccess(IDBDatabaseBackend) reuse its previous
IDBDatabaseBackendInterface if it has one.

(WebKit::WebIDBCallbacksImpl::onBlocked):
(WebKit):
(WebKit::WebIDBCallbacksImpl::onUpgradeNeeded):
* src/WebIDBCallbacksImpl.h:
(WebIDBCallbacksImpl):
* src/WebIDBDatabaseCallbacksImpl.cpp:
(WebKit::WebIDBDatabaseCallbacksImpl::onVersionChange):
(WebKit):
* src/WebIDBDatabaseCallbacksImpl.h:
(WebIDBDatabaseCallbacksImpl):
* src/WebIDBDatabaseImpl.cpp:
(WebKit::WebIDBDatabaseImpl::WebIDBDatabaseImpl):
(WebKit::WebIDBDatabaseImpl::close):
(WebKit::WebIDBDatabaseImpl::open):
* src/WebIDBDatabaseImpl.h:
(WebIDBDatabaseImpl):
* src/WebIDBFactoryImpl.cpp:
(WebKit::WebIDBFactoryImpl::open):
* src/WebIDBFactoryImpl.h:
(WebIDBFactoryImpl):
* src/WebIDBTransactionCallbacksImpl.cpp:
(WebKit::WebIDBTransactionCallbacksImpl::onComplete):
* tests/IDBAbortOnCorruptTest.cpp:
(WebCore::TEST):
* tests/IDBDatabaseBackendTest.cpp:

LayoutTests:

This patch exposes integer versions and the upgradeneeded event to
script so upgradeneeded events are now fired mostly per expectations.
This is the bulk of changes to the expected files, further intversion
patches will change the behavior of a test or two, nothing wholesale.

Reviewed by Tony Chang.

* storage/indexeddb/intversion-abort-in-initial-upgradeneeded-expected.txt:
* storage/indexeddb/intversion-and-setversion-expected.txt:
* storage/indexeddb/intversion-blocked-expected.txt:
* storage/indexeddb/intversion-close-between-events-expected.txt:
* storage/indexeddb/intversion-close-in-oncomplete-expected.txt:
* storage/indexeddb/intversion-close-in-upgradeneeded-expected.txt:
* storage/indexeddb/intversion-gated-on-delete-expected.txt:
* storage/indexeddb/intversion-invalid-setversion-has-no-side-effects-expected.txt:
* storage/indexeddb/intversion-long-queue-expected.txt:
* storage/indexeddb/intversion-open-with-version-expected.txt:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@125850 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] Add resource transfer functions to CCResourceProvider
https://bugs.webkit.org/show_bug.cgi?id=93524

Reviewed by James Robinson.

This adds methods to CCResourceProvider to be able to transport
resources from a child to a parent.

Added test to CCResourceProviderTest.

Source/WebCore:

* platform/graphics/chromium/cc/CCResourceProvider.cpp:
(WebCore::CCResourceProvider::inUseByConsumer):
(WebCore::CCResourceProvider::createResource):
(WebCore::CCResourceProvider::createResourceFromExternalTexture):
(WebCore::CCResourceProvider::CCResourceProvider):
(WebCore::CCResourceProvider::createChild):
(WebCore):
(WebCore::CCResourceProvider::destroyChild):
(WebCore::CCResourceProvider::getChildToParentMap):
(WebCore::CCResourceProvider::prepareSendToParent):
(WebCore::CCResourceProvider::prepareSendToChild):
(WebCore::CCResourceProvider::receiveFromChild):
(WebCore::CCResourceProvider::receiveFromParent):
(WebCore::CCResourceProvider::transferResource):
* platform/graphics/chromium/cc/CCResourceProvider.h:
(Mailbox):
(TransferableResource):
(TransferableResourceList):
(CCResourceProvider):
(Resource):
(Child):

Source/WebKit/chromium:

* tests/CCResourceProviderTest.cpp:
(WebKit::textureSize):
(WebKit):
(WebKit::Texture::Texture):
(Texture):
(ContextSharedData):
(WebKit::ContextSharedData::create):
(WebKit::ContextSharedData::insertSyncPoint):
(WebKit::ContextSharedData::genMailbox):
(WebKit::ContextSharedData::produceTexture):
(WebKit::ContextSharedData::consumeTexture):
(WebKit::ContextSharedData::ContextSharedData):
(WebKit::ResourceProviderContext::create):
(ResourceProviderContext):
(WebKit::ResourceProviderContext::insertSyncPoint):
(WebKit::ResourceProviderContext::waitSyncPoint):
(WebKit::ResourceProviderContext::genMailboxCHROMIUM):
(WebKit::ResourceProviderContext::produceTextureCHROMIUM):
(WebKit::ResourceProviderContext::consumeTextureCHROMIUM):
(WebKit::ResourceProviderContext::ResourceProviderContext):
(PendingProduceTexture):
(WebKit::CCResourceProviderTest::CCResourceProviderTest):
(CCResourceProviderTest):
(WebKit::TEST_F):


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