Fix a test after r121286.

* editing/deleting/merge-into-empty-block-2.html:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121290 268f45cc-cd09-0410-ab3c-d52691b4dbfc
IndexedDB: Move method precondition checks to front end objects
https://bugs.webkit.org/show_bug.cgi?id=89377

Reviewed by Tony Chang.

Now that metadata exists on the front end, most of the pre-condition validation checks
done on IDB method calls from script can be moved to the front end which simplifies the
code significantly in the case of complex methods like IDBObjectStore::put().

Adds an internal "active" flag for transactions, although the behavior is not accurate
to the spec (it should only be true during event callbacks - http://webkit.org/b/89379).
The back-end methods can then be simplifed to just adding async tasks to the transaction,
and the front end methods can take care of all exception cases except for asynchronous
transaction abort which still requires plumbing back to the front end.

No functional changes - no new tests.

* Modules/indexeddb/IDBCursor.cpp:
(WebCore::IDBCursor::update): Migrate from IDBObjectStoreBackendImpl::put.
(WebCore::IDBCursor::advance): Add more explicit transaction-is-active check.
(WebCore::IDBCursor::continueFunction): Ditto.
(WebCore::IDBCursor::deleteFunction): Ditto.
(WebCore::IDBCursor::effectiveObjectStore): Convenience function (source may be store or index).
(WebCore):
* Modules/indexeddb/IDBCursor.h:
(WebCore::IDBCursor::isKeyCursor): Distinguish from IDBCursorWithValue.
(IDBCursor):
* Modules/indexeddb/IDBCursorBackendImpl.cpp:
(WebCore::IDBCursorBackendImpl::update): Remove migrated check.
* Modules/indexeddb/IDBCursorWithValue.h:
(IDBCursorWithValue):
* Modules/indexeddb/IDBDatabase.cpp: Migrate checks.
(WebCore::IDBDatabase::createObjectStore):
(WebCore::IDBDatabase::deleteObjectStore):
* Modules/indexeddb/IDBDatabaseBackendImpl.cpp: Replace checks with assertions.
(WebCore::IDBDatabaseBackendImpl::createObjectStore):
(WebCore::IDBDatabaseBackendImpl::deleteObjectStore):
* Modules/indexeddb/IDBIndex.cpp: Add transaction-is-active checks.
(WebCore::IDBIndex::openCursor):
(WebCore::IDBIndex::count):
(WebCore::IDBIndex::openKeyCursor):
(WebCore::IDBIndex::get):
(WebCore::IDBIndex::getKey):
* Modules/indexeddb/IDBObjectStore.cpp: Migrate cehcks.
(WebCore::IDBObjectStore::get):
(WebCore::IDBObjectStore::add): Delegates to put(PutMode)
(WebCore::IDBObjectStore::put): Delegates to put(PutMode)
(WebCore): Adds put(PutMode) which has the unified checks migrated from
IDBObjectStoreBackendImpl::put.
(WebCore::IDBObjectStore::deleteFunction):
(WebCore::IDBObjectStore::clear):
(WebCore::IDBObjectStore::createIndex):
(WebCore::IDBObjectStore::deleteIndex):
(WebCore::IDBObjectStore::openCursor):
(WebCore::IDBObjectStore::count):
* Modules/indexeddb/IDBObjectStore.h: Adds put(PutMode).
(IDBObjectStore):
* Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
(WebCore::IDBObjectStoreBackendImpl::getInternal): Fix trace symbol.
(WebCore::IDBObjectStoreBackendImpl::put): Remove migrated checks.
(WebCore::IDBObjectStoreBackendImpl::createIndex): Remove migrated checks.
(WebCore::IDBObjectStoreBackendImpl::deleteIndex): Remove migrated checks.
* Modules/indexeddb/IDBTransaction.cpp: Add active flag tracking.
(WebCore::IDBTransaction::IDBTransaction):
(WebCore::IDBTransaction::abort):
(WebCore::IDBTransaction::onAbort):
(WebCore::IDBTransaction::onComplete):
* Modules/indexeddb/IDBTransaction.h:
(WebCore::IDBTransaction::isActive):
(WebCore::IDBTransaction::isReadOnly): Group IDL/non-IDL methods.
(IDBTransaction):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121291 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] Use premultiplied alpha when extracting image data in WebGL
https://bugs.webkit.org/show_bug.cgi?id=89937

Reviewed by Jocelyn Turcotte.

Perform conversion in QImage only if the image format is not ARGB32 or
ARGB32_Premultiplied. Otherwise, allow packPixels to perform the conversion if the formats
don't match, as packPixels already performs pixel-specific operations.

Covered by tests in LayoutTests/fast/canvas/webgl, e.g. webgl-composite-modes.html.

* platform/graphics/qt/GraphicsContext3DQt.cpp:
(WebCore::GraphicsContext3D::getImageData):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121292 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Include stdio.h when DEBUG_AUDIONODE_REFERENCES is set
https://bugs.webkit.org/show_bug.cgi?id=89997

Patch by Raymond Toy <rtoy@google.com> on 2012-06-26
Reviewed by Eric Seidel.

No new tests needed for a compile issue

* Modules/webaudio/AudioNode.cpp:  Include stdio.h

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121293 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix failing garden-o-matic unittests
https://bugs.webkit.org/show_bug.cgi?id=90021

Reviewed by Adam Barth.

These had all just fallen out of date.

* BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/checkout_unittests.js:
* BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/ui/notifications_unittests.js:
* BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/ui_unittests.js:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121294 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[v8] Clean up generated Dictionary-handling code
https://bugs.webkit.org/show_bug.cgi?id=89994

Reviewed by Adam Barth.

No change in behavior, so no new tests.

* bindings/scripts/CodeGeneratorV8.pm:
(GenerateParametersCheck):
* bindings/scripts/test/V8/V8TestObj.cpp:
(WebCore::TestObjV8Internal::optionsObjectCallback):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121295 268f45cc-cd09-0410-ab3c-d52691b4dbfc
background-size:0 shows as 1px instead of invisible
https://bugs.webkit.org/show_bug.cgi?id=86942

Patch by Joe Thomas <joethomas@motorola.com> on 2012-06-26
Reviewed by Eric Seidel.

As per the specification http://www.w3.org/TR/css3-background/#background-size, if the background image's width or height resolves to zero,
this causes the image not to be displayed. The effect should be the same as if it had been a transparent image.
This is also mentioned in http://www.w3.org/TR/2002/WD-css3-background-20020802/#background-size.

Source/WebCore:

Test: fast/backgrounds/zero-background-size.html

* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::calculateFillTileSize):

LayoutTests:

* fast/backgrounds/size/zero.html:
* fast/backgrounds/zero-background-size-expected.html: Added.
* fast/backgrounds/zero-background-size.html: Added.
* platform/chromium/TestExpectations:
* platform/efl/TestExpectations:
* platform/gtk/TestExpectations:
* platform/mac/fast/backgrounds/size/zero-expected.png:
* platform/mac/fast/backgrounds/size/zero-expected.txt:
* platform/qt/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121296 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] HTML5 audio/video tags - loading http content from https page doesn't trigger warning.
https://bugs.webkit.org/show_bug.cgi?id=89906

Reviewed by Nate Chapin.

This patch treats mixed CachedRawResources as affecting the display of insecure content.

Source/WebCore:

Tests: http/tests/security/mixedContent/insecure-audio-video-in-main-frame.html
       http/tests/security/mixedContent/insecure-xhr-in-main-frame.html

* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::checkInsecureContent):

LayoutTests:

* http/tests/security/mixedContent/insecure-audio-video-in-main-frame-expected.txt: Added.
* http/tests/security/mixedContent/insecure-audio-video-in-main-frame.html: Added.
* http/tests/security/mixedContent/insecure-xhr-in-main-frame-expected.txt: Added.
* http/tests/security/mixedContent/insecure-xhr-in-main-frame.html: Added.
* http/tests/security/mixedContent/resources/frame-with-insecure-audio-video.html: Added.
* platform/efl/TestExpectations:
* platform/gtk/TestExpectations:
* platform/mac/TestExpectations:
* platform/qt/TestExpectations:
* platform/win/TestExpectations:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121297 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Convert editing/inserting/font-size-clears-from-typing-style.html to a dump-as-markup test
https://bugs.webkit.org/show_bug.cgi?id=90024

Reviewed by Ojan Vafai.

Converted a script test to a dump-as-markup test because the test result can be understood much eaiser that way.

* editing/inserting/font-size-clears-from-typing-style-expected.txt:
* editing/inserting/font-size-clears-from-typing-style.html:
* editing/inserting/script-tests: Removed.
* editing/inserting/script-tests/TEMPLATE.html: Removed.
* editing/inserting/script-tests/font-size-clears-from-typing-style.js: Removed.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121298 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Crash at WebCore::TextIterator::handleTextBox
https://bugs.webkit.org/show_bug.cgi?id=89526
<rdar://problem/10305315>

Patch by Alice Cheng <alice_cheng@apple.com> on 2012-06-26
Reviewed by Darin Adler.

Source/WebCore:

The range used for marking becomes invalid after SpellingCorrectionCommand, due to changes in the DOM made by ReplaceSelectionCommand.
This invalid range caused marking to be incorrect, and Mail.app to crash when iterating through the invalid range.  To fix this,
recalculate the range for marking after SpellingCorrectionCommand.

Test: platform/mac/editing/spelling/autocorrection-blockquote-crash.html

* editing/AlternativeTextController.cpp:
(WebCore::AlternativeTextController::applyAlternativeTextToRange):
* editing/Editor.cpp:  (WebCore::Editor::markAndReplaceFor):
* testing/Internals.cpp:
(WebCore):
(WebCore::Internals::hasAutocorrectedMarker):
* testing/Internals.h: (Internals):
* testing/Internals.idl:

LayoutTests:

* platform/mac/editing/spelling/autocorrection-blockquote-crash-expected.txt: Added.
* platform/mac/editing/spelling/autocorrection-blockquote-crash.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121299 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL] Use eina_file_ls() in EFL implementation of FileSystem listDirectory()
https://bugs.webkit.org/show_bug.cgi?id=89976

Patch by Christophe Dumez <christophe.dumez@intel.com> on 2012-06-26
Reviewed by Antonio Gomes.

Rewrite EFL implementation of Filesystem listDirectory() in order to
use eina_file_ls() instead of POSIX C functions. This results in
shorter code.

No new tests, behavior has not changed.

* platform/efl/FileSystemEfl.cpp:
(WebCore::listDirectory):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121300 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Only show the platform-appropriate builders for non-layout test failures in garden-o-matic
https://bugs.webkit.org/show_bug.cgi?id=90025

Reviewed by Simon Fraser.

Move the chromium-specific filtering code into config.js and replace it with a method on each platform
config. Also, let the webkit test step name be webkit_tests (build.chromium.org) or layout-test (build.webkit.org).

* BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/builders.js:
* BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/builders_unittests.js:
* BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/config.js:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121301 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      Teach the Apple port how to build the test tools in build-webkit
      https://bugs.webkit.org/show_bug.cgi?id=89540

      Reviewed by Jon Lee & Simon Fraser.

      * BuildSlaveSupport/build.webkit.org-config/master.cfg:
      (RunWebKitTests.start): pass --no-build since tools should now be in the downloaded archive
      (RunUnitTests.start): ditto
      * Scripts/build-webkit: add tools to the projects build list



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121302 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Stop calling node() and deprecatedEditingOffset() in comparePositions
https://bugs.webkit.org/show_bug.cgi?id=54535

Reviewed by Enrica Casucci.

Source/WebCore: 

Replaced deprecatedNode() and deprecatedEditingOffset() by containerNode() and computeOffsetInContainerNode()
in comparePositions().
        
In addition, fixed a bunch of bugs in DeleteSelectionCommand::handleSpecialCaseBRDelete revealed by this change:
- Use node after position instead of deprecated node in determinig whether start and end positions at a br.
- Don't set m_startsAtEmptyLine true when BR is wrapped in a block element. The only reason this code had worked
was positions like (div, offset, 0) and (br, before) in <div><br> were treated differently, which we no longer do.

* editing/DeleteSelectionCommand.cpp:
(WebCore::DeleteSelectionCommand::handleSpecialCaseBRDelete):
* editing/htmlediting.cpp:
(WebCore::comparePositions):

LayoutTests: 

Rebaselined existing tests. There are no user-visible changes.

* editing/inseting/font-size-clears-from-typing-style-expected.txt: No longer keeps div's around
when merging paragraphs.
* platform/mac/editing/deleting/delete-br-002-expected.txt:
* platform/mac/editing/deleting/delete-br-004-expected.txt:
* platform/mac/editing/deleting/delete-br-005-expected.txt:
* platform/mac/editing/deleting/delete-br-006-expected.txt:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121303 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Chromium] Decrease the number of conditional blocks in features.gypi
https://bugs.webkit.org/show_bug.cgi?id=90013

Reviewed by Adam Barth.

Consolidate two Android-specific and accelerated-compositing-specific
conditional blocks into other blocks which serve an identical purpose.

* features.gypi:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121304 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Touch adjustment does not target shadow DOM elements
https://bugs.webkit.org/show_bug.cgi?id=89556

Source/WebCore:

The position of internal shadow-DOM nodes were not being considered
when determining the snap position when TOUCH_ADJUSTMENT is enabled
for fine tuning the position of synthetic mouse events.  This
restriction results in not being able to select the calendar picker
when input type=date, or to clear the search field for input
type=search.

Patch by Kevin Ellis <kevers@chromium.org> on 2012-06-26
Reviewed by Antonio Gomes.

Test: touchadjustment/nested-shadow-node.html

* page/EventHandler.cpp:
(WebCore::EventHandler::bestClickableNodeForTouchPoint):

LayoutTests:

Cannot open calendar picker for input type=date using a touch tap
gesture if TOUCH_ADJUSTMENT is enabled. When touch adjustment is
enabled, the position of a touch point is snapped to the center of an
element when generating synthetic mouse events.  The position of shadow
nodes was not being considered when determining the snap position.
This test verifies that touch adjustment now considers shadow-DOM
when calculating the snap position.

Patch by Kevin Ellis <kevers@chromium.org> on 2012-06-26
Reviewed by Antonio Gomes.

* touchadjustment/nested-shadow-node-expected.txt: Added.
* touchadjustment/nested-shadow-node.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121305 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Optimize mappings of simple transforms in RenderGeometryMap
https://bugs.webkit.org/show_bug.cgi?id=90034

Reviewed by Dean Jackson.

For transforms that are identity or simple translations, don't
fall off the fast path in RenderGeometryMap; we can just
treat them as offsets.

Improves performance on pages with lots of translateZ(0) elements.

Remove RenderGeometryMapStep::mapPoint() and mapQuad(), which
were unused.

No new tests; optimization only, and tested by assertions.

* rendering/RenderGeometryMap.cpp:
(WebCore::RenderGeometryMap::push):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121306 268f45cc-cd09-0410-ab3c-d52691b4dbfc
DFG PutByValAlias is too aggressive
https://bugs.webkit.org/show_bug.cgi?id=90026
<rdar://problem/11751830>

Source/JavaScriptCore: 

Reviewed by Gavin Barraclough.
        
For CSE on normal arrays, we now treat PutByVal as impure. This does not appear to affect
performance by much.
        
For CSE on typed arrays, we fix PutByValAlias by making GetByVal speculate that the access
is within bounds. This also has the effect of making our out-of-bounds handling consistent
with WebCore.

* dfg/DFGCSEPhase.cpp:
(JSC::DFG::CSEPhase::performNodeCSE):
* dfg/DFGGraph.h:
(JSC::DFG::Graph::byValIsPure):
(JSC::DFG::Graph::clobbersWorld):
* dfg/DFGNodeType.h:
(DFG):
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileGetByValOnIntTypedArray):
(JSC::DFG::SpeculativeJIT::compileGetByValOnFloatTypedArray):

LayoutTests: 

Reviewed by Gavin Barraclough.

* fast/js/dfg-put-by-val-setter-then-get-by-val-expected.txt: Added.
* fast/js/dfg-put-by-val-setter-then-get-by-val.html: Added.
* fast/js/dfg-uint8clampedarray-out-of-bounds-put-by-val-alias-expected.txt: Added.
* fast/js/dfg-uint8clampedarray-out-of-bounds-put-by-val-alias.html: Added.
* fast/js/script-tests/dfg-put-by-val-setter-then-get-by-val.js: Added.
(foo):
(for):
* fast/js/script-tests/dfg-uint8clampedarray-out-of-bounds-put-by-val-alias.js: Added.
(foo):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121307 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add support for preciseTime() to WebKitTestRunner
https://bugs.webkit.org/show_bug.cgi?id=90027

Reviewed by Darin Adler.

It would be nice to be able to use preciseTime() in WebKitTestRunner like we can in DumpRenderTree.

* WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl:
* WebKitTestRunner/InjectedBundle/LayoutTestController.cpp: 
(WTR::LayoutTestController::preciseTime): 
(WTR):
* WebKitTestRunner/InjectedBundle/LayoutTestController.h:
(LayoutTestController):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121308 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unexpected element sizes when mixing inline-table with box-sizing
https://bugs.webkit.org/show_bug.cgi?id=89819

Patch by Kulanthaivel Palanichamy <kulanthaivel@codeaurora.org> on 2012-06-26
Reviewed by Julien Chaffraix.

Source/WebCore:

This change handles box-sizing: border-box property for CSS tables properly.

Test: fast/box-sizing/css-table-with-box-sizing.html

* rendering/RenderTable.cpp:
(WebCore::RenderTable::convertStyleLogicalWidthToComputedWidth):
(WebCore::RenderTable::layout):

LayoutTests:

* fast/box-sizing/css-table-with-box-sizing-expected.txt: Added.
* fast/box-sizing/css-table-with-box-sizing.html: Added.

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