[chromium] Unify compositor quad transforms into content space
https://bugs.webkit.org/show_bug.cgi?id=91350

Reviewed by Kenneth Russell.

Source/WebCore:

For the purpose of simplification and as a first step towards removing
any transform that takes a centered rect, remove the ability of layers
to override the quad transform. All quads and quad transforms operate
on content space with the origin in the top left.

The gutter quads used to use the root layer (that doesn't draw
content) as the layer to create the shared quad state from. This is
now created manually as a layer without bounds should never in general
need a shared quad state created for it.

No change in functionality; tested by existing layout and unit tests.

* platform/graphics/chromium/cc/CCIOSurfaceLayerImpl.cpp:
(WebCore::CCIOSurfaceLayerImpl::appendQuads):
* platform/graphics/chromium/cc/CCLayerImpl.cpp:
(WebCore::CCLayerImpl::createSharedQuadState):
* platform/graphics/chromium/cc/CCLayerImpl.h:
(CCLayerImpl):
* platform/graphics/chromium/cc/CCRenderPass.cpp:
(WebCore::CCRenderPass::appendQuadsToFillScreen):
* platform/graphics/chromium/cc/CCSolidColorLayerImpl.cpp:
(WebCore::CCSolidColorLayerImpl::appendQuads):
* platform/graphics/chromium/cc/CCSolidColorLayerImpl.h:
(CCSolidColorLayerImpl):
* platform/graphics/chromium/cc/CCTextureLayerImpl.cpp:
(WebCore::CCTextureLayerImpl::appendQuads):
* platform/graphics/chromium/cc/CCTiledLayerImpl.cpp:
* platform/graphics/chromium/cc/CCTiledLayerImpl.h:
(CCTiledLayerImpl):
* platform/graphics/chromium/cc/CCVideoLayerImpl.cpp:
(WebCore::CCVideoLayerImpl::appendQuads):

Source/WebKit/chromium:

Update tests to add bounds/contentBounds properties to layers. This
exposed a bug in the quad culler tests where the draw transform was
incorrectly being set to the origin transform rather than being a
transform that operates on centered layer rects. Fixed this bug.

* tests/CCQuadCullerTest.cpp:
* tests/CCSolidColorLayerImplTest.cpp:
(CCLayerTestCommon::TEST):
* tests/CCTiledLayerImplTest.cpp:
(CCLayerTestCommon::createLayer):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122776 268f45cc-cd09-0410-ab3c-d52691b4dbfc
nrwt: move a bunch of printing code from manager.py to printing.py
https://bugs.webkit.org/show_bug.cgi?id=91439

Reviewed by Ojan Vafai.

All of the logic that handles what gets logged should eventually
live in printing.py; this patch moves a large chunk of code that
prints all of the stuff after the run completes.

There are no functional changes, this is just moving code
around. Covered by existing tests (updated as necessary).

This code is all pretty messy and most of it should be deleted
(or extracted after the fact from results.json), but I'm saving
that for further patches. My goal is just to manager.py to a
more manageable state.

* Scripts/webkitpy/layout_tests/controllers/manager.py:
(Manager.prepare_lists_and_print_output):
(Manager.run):
(Manager._mark_interrupted_tests_as_skipped):
(Manager._update_summary_with_result):
(Manager._num_digits):
* Scripts/webkitpy/layout_tests/controllers/manager_unittest.py:
(ManagerTest.test_interrupt_if_at_failure_limits):
(ResultSummaryTest.summarized_results):
* Scripts/webkitpy/layout_tests/models/result_summary.py:
(ResultSummary.__init__):
(ResultSummary.add):
Here we had to add a list of the slow tests to the result
summary so that we didn't need to call back into the manager and
the test expectations object to figure out if a test is SLOW.
* Scripts/webkitpy/layout_tests/views/printing.py:
(Printer.print_results):
(Printer):
(Printer._print_timing_statistics):
(Printer._print_aggregate_test_statistics):
(Printer._print_individual_test_times):
(Printer._print_test_list_timing):
(Printer._print_directory_timings):
(Printer._print_statistics_for_test_timings):
(Printer._print_result_summary):
(Printer._print_result_summary_entry):
* Scripts/webkitpy/layout_tests/views/printing_unittest.py:
(Testprinter.test_print_unexpected_results.get_unexpected_results):
(Testprinter):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122777 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] Unreviewed gardening. Layout Test plugins/embed-attributes-style.html is failing
https://bugs.webkit.org/show_bug.cgi?id=91445

Started failing around r122770

* platform/chromium/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122778 268f45cc-cd09-0410-ab3c-d52691b4dbfc
IndexedDB: Introduce putWithIndexKeys and calculate them in the renderer
https://bugs.webkit.org/show_bug.cgi?id=90923

Patch by Alec Flett <alecflett@chromium.org> on 2012-07-16
Reviewed by Darin Fisher.

Source/WebCore:

Refactor IndexWriter to depend only on IDBIndexMetadata and on
(databaseId, objectStoreId, indexId) so that it can talk directly
to the backing store, and also eventually be moved into the renderer.

This also introduces IDBObjectStoreBackendInterface::putWithIndexKeys
as a replacement for IDBObjectStoreBackendInterface::put, already
stubbed out in the chromium port. It will fully replace put()
after both chromium and webkit sides have reached alignment.

No new tests as this is just a refactor and existing tests cover
correctness.

* Modules/indexeddb/IDBCursor.cpp:
(WebCore::IDBCursor::setValueReady):
* Modules/indexeddb/IDBIndexBackendImpl.cpp:
* Modules/indexeddb/IDBIndexBackendImpl.h:
* Modules/indexeddb/IDBObjectStore.h:
(IDBObjectStore):
* Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
(WebCore::IDBObjectStoreBackendImpl::put):
(WebCore):
(WebCore::IDBObjectStoreBackendImpl::putWithIndexKeys):
(WebCore::IDBObjectStoreBackendImpl::putInternal):
(WebCore::IDBObjectStoreBackendImpl::populateIndex):
* Modules/indexeddb/IDBObjectStoreBackendImpl.h:
(IDBObjectStoreBackendImpl):
* Modules/indexeddb/IDBObjectStoreBackendInterface.h:
* Modules/indexeddb/IDBRequest.cpp:
(WebCore::IDBRequest::onSuccess):

Source/WebKit/chromium:

Stub out implementations of putWithIndexKeys(), already implemented
on the chromium side.

* public/WebIDBObjectStore.h:
(WebKit::WebIDBObjectStore::putWithIndexKeys):
* src/IDBObjectStoreBackendProxy.cpp:
(WebKit::IDBObjectStoreBackendProxy::putWithIndexKeys):
(WebKit):
* src/IDBObjectStoreBackendProxy.h:
(IDBObjectStoreBackendProxy):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122779 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore: IndexedDB: Introduce putWithIndexKeys and calculate them in the renderer
https://bugs.webkit.org/show_bug.cgi?id=90923

Patch by Alec Flett <alecflett@chromium.org> on 2012-07-16
Reviewed by Darin Fisher.

Refactor IndexWriter to depend only on IDBIndexMetadata and on
(databaseId, objectStoreId, indexId) so that it can talk directly
to the backing store, and also eventually be moved into the renderer.

This also introduces IDBObjectStoreBackendInterface::putWithIndexKeys
as a replacement for IDBObjectStoreBackendInterface::put, already
stubbed out in the chromium port. It will fully replace put()
after both chromium and webkit sides have reached alignment.

No new tests as this is just a refactor and existing tests cover
correctness.

* Modules/indexeddb/IDBCursor.cpp:
(WebCore::IDBCursor::setValueReady):
* Modules/indexeddb/IDBIndexBackendImpl.cpp:
* Modules/indexeddb/IDBIndexBackendImpl.h:
* Modules/indexeddb/IDBObjectStore.h:
(IDBObjectStore):
* Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
(WebCore::IDBObjectStoreBackendImpl::put):
(WebCore):
(WebCore::IDBObjectStoreBackendImpl::putWithIndexKeys):
(WebCore::IDBObjectStoreBackendImpl::putInternal):
(WebCore::IDBObjectStoreBackendImpl::populateIndex):
* Modules/indexeddb/IDBObjectStoreBackendImpl.h:
(IDBObjectStoreBackendImpl):
* Modules/indexeddb/IDBObjectStoreBackendInterface.h:
* Modules/indexeddb/IDBRequest.cpp:
(WebCore::IDBRequest::onSuccess):

Source/WebKit/chromium: IndexedDB: Introduce putWithIndexKeys and calculate them in the renderer
https://bugs.webkit.org/show_bug.cgi?id=90923

Patch by Alec Flett <alecflett@chromium.org> on 2012-07-16
Reviewed by Darin Fisher.

Stub out implementations of putWithIndexKeys(), already implemented
on the chromium side.

* public/WebIDBObjectStore.h:
(WebKit::WebIDBObjectStore::putWithIndexKeys):
* src/IDBObjectStoreBackendProxy.cpp:
(WebKit::IDBObjectStoreBackendProxy::putWithIndexKeys):
(WebKit):
* src/IDBObjectStoreBackendProxy.h:
(IDBObjectStoreBackendProxy):

Tools: [Chromium-android] Don't use test_shell mode of DRT
https://bugs.webkit.org/show_bug.cgi?id=88542

Patch by Xianzhu Wang <wangxianzhu@chromium.org> on 2012-07-16
Reviewed by Dirk Pranke.

Test shell mode is about to be removed.
Switch to use DRT mode for chromium-android.

Summary of changes:
1. ChromiumAndroidDriver now inherits from WebKitDriver instead of ChromiumDriver (to be deprecated).
2. Conforms to the DRT mode protocol for input/output of DumpRenderTree.
3. Added support for Android 'adb shell' input/output (base64, newline mode, etc.)

* DumpRenderTree/chromium/TestEventPrinter.cpp:
(DRTPrinter::handleImage): Outputs base64 on Android.
* DumpRenderTree/chromium/TestShellAndroid.cpp:
(platformInit): Changed err_file to err_fifo, required by python ServerProcess.
* Scripts/webkitpy/layout_tests/port/chromium_android.py:
(ChromiumAndroidPort.__init__):
(ChromiumAndroidPort.create_driver): Override to create driver without DriverProxy to ensure 1 Driver per run.
(ChromiumAndroidDriver):
(ChromiumAndroidDriver.__init__):
(ChromiumAndroidDriver.cmd_line):
(ChromiumAndroidDriver._deadlock_detector):
(ChromiumAndroidDriver._drt_cmd_line):
(ChromiumAndroidDriver.start):
(ChromiumAndroidDriver._start):
(ChromiumAndroidDriver._start_once):
(ChromiumAndroidDriver.run_test):
(ChromiumAndroidDriver.stop):
(ChromiumAndroidDriver._command_from_driver_input):
(ChromiumAndroidDriver._read_prompt):
* Scripts/webkitpy/layout_tests/port/chromium_android_unittest.py:
(ChromiumAndroidPortTest.test_driver_cmd_line):
(ChromiumAndroidDriverTest.test_cmd_line):
(ChromiumAndroidDriverTest):
(ChromiumAndroidDriverTest.test_drt_cmd_line):
(ChromiumAndroidDriverTest.test_read_prompt):
(ChromiumAndroidDriverTest.test_command_from_driver_input):
(ChromiumAndroidDriverTest.test_write_command_and_read_line):
* Scripts/webkitpy/layout_tests/port/server_process.py:
(ServerProcess.__init__): Added universal_newlines to handle Android 'adb shell' line ends.
(ServerProcess._start):
(ServerProcess._wait_for_data_and_update_buffers_using_select): Handles unexpected EOF which indicates crash on Android.
(ServerProcess.stop): Added kill_directly parameter to kill the process without waiting it (which always timeouts for Android).
(ServerProcess.replace_outputs): Added to combine different input/output pipes into one ServerProcess.
* Scripts/webkitpy/layout_tests/port/webkit.py:
(WebKitDriver._command_from_driver_input):
(WebKitDriver.run_test): Changed timeout origin so that slow start() on Android won't cause timeout of layout test case.
* Scripts/webkitpy/layout_tests/port/webkit_unittest.py:
(MockServerProcess.read_stdout):
(MockServerProcess.start):
(MockServerProcess):
(MockServerProcess.stop):
(MockServerProcess.kill):
(WebKitDriverTest.test_read_block):
(WebKitDriverTest.test_read_binary_block):
(WebKitDriverTest.test_read_base64_block):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122780 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] Fix WebFrameTest flakiness due to synthetic mouse events
https://bugs.webkit.org/show_bug.cgi?id=91428

Patch by Alexandre Elias <aelias@google.com> on 2012-07-16
Reviewed by Adam Barth.

Synthetic mouse move events on scrolling can cause segfaults in
WebFrameTest due to delayed callbacks on the message loop after
state destruction. This is currently only affecting
the Android port, but has the potential to affect other platforms in the
future.

We can avoid the issue by disabling the deviceSupportsMouse
setting, which shouldn't be needed by any WebFrameTest.

* tests/FrameTestHelpers.cpp:
(WebKit::FrameTestHelpers::createWebViewAndLoad):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122781 268f45cc-cd09-0410-ab3c-d52691b4dbfc
IndexedDB: Implement spec updates to IDBTransaction.error
https://bugs.webkit.org/show_bug.cgi?id=91409

Reviewed by Tony Chang.

Source/WebCore:

The Indexed DB spec was updated to resolve some edge cases around the
IDBTransaction.error attribute. It was agreed that accessing error should
never throw, error should be null if the transaction is not finished or
abort() was explicitly called, an appropriate error should be returned if
a commit failed, and a generic AbortError should be used if a request
callback throws. These cases are now handled per spec, except that a reason
is not provided for the commit failure (it's always UnknownError).

Test: storage/indexeddb/transaction-error.html
      storage/indexeddb/transaction-abort.html

* Modules/indexeddb/IDBRequest.cpp:
(WebCore::IDBRequest::dispatchEvent): Refactor some nested if() blocks; don't
re-abort the transaction if dispatching in response to an abort.
(WebCore::IDBRequest::uncaughtExceptionInEventHandler): Abort transaction
only if not already aborting, and set it's error to AbortError.
* Modules/indexeddb/IDBTransaction.cpp:
(WebCore::IDBTransaction::onAbort): Set error if abort triggered by back end.
* Modules/indexeddb/IDBTransaction.h:
(WebCore::IDBTransaction::db): Move impl to header file.
(WebCore::IDBTransaction::error): Move impl to header file, simplify.
(IDBTransaction):
* Modules/indexeddb/IDBTransaction.idl: The error attribute no longer throws.

LayoutTests:

Update transaction-abort test to accomodate refinements in the spec around
IDBTransaction.error and add a dedicated test to exercise all spec behavior
for the property.

* storage/indexeddb/resources/transaction-abort.js:
(startTest):
(firstAdd):
(secondAdd):
(transactionAborted):
* storage/indexeddb/resources/transaction-error.js: Added.
(test.request.onsuccess.request.onsuccess.request.onsuccess):
(test.request.onsuccess.request.onsuccess):
(test.request.onsuccess):
(test):
(startTest.trans.onabort):
(startTest):
(testErrorFromRequest.request.onerror):
(testErrorFromRequest.trans.onabort):
(testErrorFromRequest):
(testErrorFromException.request.onerror):
(testErrorFromException.trans.onabort):
(testErrorFromException):
* storage/indexeddb/transaction-abort-expected.txt:
* storage/indexeddb/transaction-error-expected.txt: Added.
* storage/indexeddb/transaction-error.html: Added.


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