[WebIDL] Remove custom bindings for WebSQL code
authorweinig@apple.com <weinig@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 23 Dec 2016 17:09:04 +0000 (17:09 +0000)
committerweinig@apple.com <weinig@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 23 Dec 2016 17:09:04 +0000 (17:09 +0000)
commit2bff7eb05083b1299e1b4dce341efa351c9174ec
tree87308be203168afb2ad87d534af8970d0f6a415f
parentece5e7ee37f8056e38d8d3639251c11cb950548c
[WebIDL] Remove custom bindings for WebSQL code
https://bugs.webkit.org/show_bug.cgi?id=166441

Reviewed by Darin Adler.

Source/WebCore:

- Replace custom variant type SQLValue with a type alias of a Variant.
- Use the newly representable SQLValue to remove custom bindings for
  SQLResultSetRowList::item and SQLTransaction::executeSql.

* CMakeLists.txt:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSBindingsAllInOne.cpp:
* bindings/js/JSSQLResultSetRowListCustom.cpp: Removed.
* bindings/js/JSSQLTransactionCustom.cpp: Removed.
* platform/sql/SQLValue.cpp: Removed.
Remove files.

* Modules/webdatabase/SQLResultSetRowList.cpp:
(WebCore::SQLResultSetRowList::length):
(WebCore::SQLResultSetRowList::item):
* Modules/webdatabase/SQLResultSetRowList.h:
* Modules/webdatabase/SQLResultSetRowList.idl:
Sink the implementation of item() into the implementation. Use a
record type to bridge to javascript.

* Modules/webdatabase/SQLStatement.cpp:
(WebCore::SQLStatement::SQLStatement):
* Modules/webdatabase/SQLStatement.h:
Update to take arguments by rvalue reference.

* Modules/webdatabase/SQLTransaction.cpp:
(WebCore::SQLTransaction::executeSql):
* Modules/webdatabase/SQLTransaction.h:
* Modules/webdatabase/SQLTransaction.idl:
Remove custom annotation, and update signature to match the IDL.

* Modules/webdatabase/SQLTransactionBackend.cpp:
* Modules/webdatabase/SQLTransactionBackend.h:
Remove unneeded #includes of SQLValue.h

* bindings/js/JSDOMConvert.h:
(WebCore::Converter<IDLNull>::convert):
(WebCore::JSConverter<IDLNull>::convert):
Implement conversion for the null type so it can be used in the SQLValue union.

* inspector/InspectorDatabaseAgent.cpp:
* platform/sql/SQLiteStatement.cpp:
(WebCore::SQLiteStatement::bindValue):
(WebCore::SQLiteStatement::getColumnValue):
* platform/sql/SQLiteStatement.h:
Replace old switch with a WTF::switchOn that operates on the new variant.

* platform/sql/SQLValue.h:
(WebCore::SQLValue::SQLValue): Deleted.
(WebCore::SQLValue::type): Deleted.
Replace implementation with a Variant.

LayoutTests:

* storage/websql/execute-sql-args-expected.txt:
* storage/websql/execute-sql-args.js:
Update test and result to be slightly more strict about functions taking sequences.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@210134 268f45cc-cd09-0410-ab3c-d52691b4dbfc
25 files changed:
LayoutTests/ChangeLog
LayoutTests/storage/websql/execute-sql-args-expected.txt
LayoutTests/storage/websql/execute-sql-args.js
Source/WebCore/CMakeLists.txt
Source/WebCore/ChangeLog
Source/WebCore/Modules/webdatabase/SQLResultSetRowList.cpp
Source/WebCore/Modules/webdatabase/SQLResultSetRowList.h
Source/WebCore/Modules/webdatabase/SQLResultSetRowList.idl
Source/WebCore/Modules/webdatabase/SQLStatement.cpp
Source/WebCore/Modules/webdatabase/SQLStatement.h
Source/WebCore/Modules/webdatabase/SQLTransaction.cpp
Source/WebCore/Modules/webdatabase/SQLTransaction.h
Source/WebCore/Modules/webdatabase/SQLTransaction.idl
Source/WebCore/Modules/webdatabase/SQLTransactionBackend.cpp
Source/WebCore/Modules/webdatabase/SQLTransactionBackend.h
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/bindings/js/JSBindingsAllInOne.cpp
Source/WebCore/bindings/js/JSDOMConvert.h
Source/WebCore/bindings/js/JSSQLResultSetRowListCustom.cpp [deleted file]
Source/WebCore/bindings/js/JSSQLTransactionCustom.cpp [deleted file]
Source/WebCore/inspector/InspectorDatabaseAgent.cpp
Source/WebCore/platform/sql/SQLValue.cpp [deleted file]
Source/WebCore/platform/sql/SQLValue.h
Source/WebCore/platform/sql/SQLiteStatement.cpp
Source/WebCore/platform/sql/SQLiteStatement.h