IndexedDB: Throw native TypeErrors per spec
https://bugs.webkit.org/show_bug.cgi?id=91679

Reviewed by Kentaro Hara.

Source/WebCore:

Per the IDB spec, the advance(), openCursor(), openKeyCursor() and transaction()
methods supposed to throw true native JavaScript TypeError objects as exceptions
rather than DOMException objects. Implement this by adding a special DOMException
code that is tested for in the binding layer.

Tests: storage/indexeddb/cursor-advance.html
       storage/indexeddb/index-basics.html
       storage/indexeddb/index-basics-workers.html
       storage/indexeddb/objectstore-cursor.html
       storage/indexeddb/transaction-basics.html

* Modules/indexeddb/IDBCursor.cpp: Use the new DOMException code.
(WebCore::IDBCursor::advance):
(WebCore::IDBCursor::stringToDirection):
(WebCore::IDBCursor::directionToString):
* Modules/indexeddb/IDBDatabase.cpp: Ditto.
(WebCore::IDBDatabase::setVersion):
* Modules/indexeddb/IDBDatabaseException.cpp: Remove temporary cruft/mark as legacy.
(WebCore):
* Modules/indexeddb/IDBDatabaseException.h: Ditto.
* Modules/indexeddb/IDBDatabaseException.idl: Ditto.
* Modules/indexeddb/IDBFactory.cpp: Use the new DOMException code.
(WebCore::IDBFactory::open):
(WebCore::IDBFactory::deleteDatabase):
* Modules/indexeddb/IDBObjectStore.cpp:
(WebCore::IDBObjectStore::createIndex): Use the new DOMException code.
* Modules/indexeddb/IDBTransaction.cpp: Use the new DOMException code.
(WebCore::IDBTransaction::stringToMode):
(WebCore::IDBTransaction::modeToString):
* bindings/js/JSDOMBinding.cpp:
(WebCore::setDOMException): Intercept new DOMException code, throw native TypeError.
* bindings/v8/V8Proxy.cpp:
(WebCore::V8Proxy::setDOMException): Ditto.
* dom/ExceptionCode.h: Add new DOMException code.

LayoutTests:

* storage/indexeddb/cursor-advance-expected.txt:
* storage/indexeddb/index-basics-expected.txt:
* storage/indexeddb/index-basics-workers-expected.txt:
* storage/indexeddb/objectstore-cursor-expected.txt:
* storage/indexeddb/resources/cursor-advance.js:
(testBadAdvance.advanceBadly):
(testBadAdvance):
* storage/indexeddb/resources/index-basics.js:
(openKeyCursor):
(openObjectCursor):
* storage/indexeddb/resources/objectstore-cursor.js:
(deleteExisting):
* storage/indexeddb/resources/transaction-basics.js:
(testInvalidMode):
* storage/indexeddb/transaction-basics-expected.txt:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@123112 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: CPU bars are not cleared along with the rest of the timeline panel
https://bugs.webkit.org/show_bug.cgi?id=91753

Reviewed by Pavel Feldman.

- remove early bail-outs in  refreshMainThreadBars; let it run to clear bars for the non-existent / invisible events;

* inspector/front-end/TimelinePanel.js:
(WebInspector.TimelinePanel.prototype._refreshMainThreadBars):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@123113 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed gardening.  Update chromium expectations after r123067.

* platform/chromium/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@123114 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed gardening.  Update chromium-mac results after r123053.

* platform/chromium-mac/fast/inline/002-expected.txt: Added.
* platform/chromium-mac/fast/table/table-display-types-strict-expected.txt: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@123115 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed GTK gardening.

Use the WONTFIX modifier for failing tests that the GTK port is not able to pass
due to unsupportable features or specific nature of the tests. The WONTFIX tests
are placed at the top of the 'Expected failures' section in the TestExpectations
file.

For starters the list contains the harness test for reftests mismatch, the tests
that utilize the modal dialog (which won't be supported in WebKit1) and various
V8 and Mac-specific tests

* platform/gtk/TestExpectations:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@123116 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Use native (non-cygwin) binaries for perl, gperf, and bison in Chromium
https://bugs.webkit.org/show_bug.cgi?id=91667

Patch by Scott Graham <scottmg@chromium.org> on 2012-07-19
Reviewed by Kentaro Hara.

Using native tools instead of cygwin version improves build time
performance by roughly 50% (on top of previous cl-instead-of-gcc
change).

No new tests.

* WebCore.gyp/WebCore.gyp:
* WebCore.gyp/scripts/rule_bison.py:
* bindings/scripts/preprocessor.pm:
(applyPreprocessor):
* make-hash-tools.pl:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@123117 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] [Part 3] platform/qt/css1 tests needs update after rebaseline and new testfonts
https://bugs.webkit.org/show_bug.cgi?id=91132

Batch of expected result files reviewed. It comprises
/LayoutTests/platform/qt/css1/[color_and_background, conformance] directories

Patch by Luciano Wolf <luciano.wolf@openbossa.org> on 2012-07-19
Reviewed by Simon Hausmann.

* platform/qt-5.0-wk1/Skipped:
* platform/qt-5.0-wk2/Skipped:
* platform/qt/css1/color_and_background/background-expected.png:
* platform/qt/css1/color_and_background/background-expected.txt:
* platform/qt/css1/color_and_background/background_attachment-expected.png:
* platform/qt/css1/color_and_background/background_attachment-expected.txt:
* platform/qt/css1/color_and_background/background_color-expected.png:
* platform/qt/css1/color_and_background/background_color-expected.txt:
* platform/qt/css1/color_and_background/background_image-expected.png:
* platform/qt/css1/color_and_background/background_image-expected.txt:
* platform/qt/css1/color_and_background/background_position-expected.png:
* platform/qt/css1/color_and_background/background_position-expected.txt:
* platform/qt/css1/color_and_background/background_repeat-expected.png:
* platform/qt/css1/color_and_background/background_repeat-expected.txt:
* platform/qt/css1/color_and_background/color-expected.png:
* platform/qt/css1/color_and_background/color-expected.txt:
* platform/qt/css1/conformance/forward_compatible_parsing-expected.png:
* platform/qt/css1/conformance/forward_compatible_parsing-expected.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@123118 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] platform/qt/editing/execCommand tests needs update after rebaseline and new testfonts (37)
https://bugs.webkit.org/show_bug.cgi?id=91246

Reviewed by Ryosuke Niwa.

Removing left-over skipped tests.

* platform/qt-5.0-wk1/Skipped:
* platform/qt-5.0/Skipped:
* platform/qt/Skipped:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@123119 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r123036.
http://trac.webkit.org/changeset/123036
https://bugs.webkit.org/show_bug.cgi?id=91555

Triggers some DCHECKs in Chromium browser_tests

* public/WebTextInputType.h:
* src/WebViewImpl.cpp:
(WebKit::WebViewImpl::textInputType):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@123120 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Regression(120096): Protect the element used by ImageLoader until the end of notifyFinished().
https://bugs.webkit.org/show_bug.cgi?id=90471

Reviewed by Brady Eidson.

Source/WebCore:

Test: http/tests/security/video-poster-cross-origin-crash.html

* html/HTMLImageLoader.cpp:
(WebCore::HTMLImageLoader::notifyFinished): Hang on to the element until we're done.
* loader/ImageLoader.cpp:
(WebCore::ImageLoader::setImage): No behavior change.
(WebCore):
(WebCore::ImageLoader::setImageWithoutConsideringPendingLoadEvent): Split off from old setImage, minus calling updatedHasPendingLoadEvent().
(WebCore::ImageLoader::notifyFinished): Invoke updatedHasPendingLoadEvent when done with cross origin errors.
* loader/ImageLoader.h:
(ImageLoader):

LayoutTests:

* http/tests/security/video-poster-cross-origin-crash-expected.txt: Added.
* http/tests/security/video-poster-cross-origin-crash.html: Added. From fuzzer.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@123121 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] Move WebAudioSourceProvider destructor from public to protected
https://bugs.webkit.org/show_bug.cgi?id=91669

Reviewed by Darin Fisher.

The lifetime of a WebAudioSourceProvider is managed by the implementor
and should never be deallocted by WebKit.

* public/WebAudioSourceProvider.h:
(WebAudioSourceProvider):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@123122 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Chromium] WebView is missing isSelectionEditable and backgroundColor which are used by chromium-android
https://bugs.webkit.org/show_bug.cgi?id=91671

Reviewed by Darin Fisher.

I haven't studied what these APIs are used for downstream, but they
seem harmless enough.

* public/WebView.h:
(WebView):
* public/WebWidget.h:
(WebWidget):
(WebKit::WebWidget::backgroundColor):
* src/WebViewImpl.cpp:
(WebKit::WebViewImpl::isSelectionEditable):
(WebKit):
(WebKit::WebViewImpl::backgroundColor):
* src/WebViewImpl.h:
(WebViewImpl):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@123123 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r123117.
http://trac.webkit.org/changeset/123117
https://bugs.webkit.org/show_bug.cgi?id=91667

Breaks chromium-win compile.

* WebCore.gyp/WebCore.gyp:
* WebCore.gyp/scripts/rule_bison.py:
* bindings/scripts/preprocessor.pm:
(applyPreprocessor):
* make-hash-tools.pl:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@123124 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[WIN] Fix compilation of JSGlobalData.h with ENABLE(DFG_JIT)
https://bugs.webkit.org/show_bug.cgi?id=91243

Reviewed by Geoffrey Garen.

Disable MSVC warning 4200 "zero-sized array in struct/union" for JSC::ScratchBuffer.

* runtime/JSGlobalData.h:
(JSC):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@123125 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Shape-inside / shape-outside should support percent-based measurements
https://bugs.webkit.org/show_bug.cgi?id=90311

Patch by Bem Jones-Bey <bjonesbe@adobe.com> on 2012-07-19
Reviewed by Andreas Kling.

Source/WebCore:

Update the CSS Parser to accept percentage length values for exclusion
shapes.

Testing added to LayoutTests/fast/exclusions/parsing-wrap-shape-lengths.html

* css/CSSParser.cpp:
(WebCore::CSSParser::parseExclusionShapeRectangle):
(WebCore::CSSParser::parseExclusionShapeCircle):
(WebCore::CSSParser::parseExclusionShapeEllipse):
(WebCore::CSSParser::parseExclusionShapePolygon):

LayoutTests:

Added tests for percent based lengths for exclusion shapes.

* fast/exclusions/parsing-wrap-shape-lengths-expected.txt:
* fast/exclusions/parsing-wrap-shape-lengths.html:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@123126 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Layout Test css3/filters/custom/custom-filter-shader-cache.html is failing
https://bugs.webkit.org/show_bug.cgi?id=84813

Unreviewed.  Add this failing test to the mac Skipped file.

* platform/mac/Skipped:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@123127 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Crash in WebCore::StyleResolver::collectMatchingRulesForList
https://bugs.webkit.org/show_bug.cgi?id=90803

Patch by Douglas Stockwell <dstockwell@google.com> on 2012-07-19
Reviewed by Andreas Kling.

Source/WebCore:

When a ProcessingInstruction was removed from the document the owner
was removed, but the style resolver was not guaranteed to be updated.
It was then possible for an inconsistent version of the stylesheet to
remain visible in the DOM. Fixed by removing an invalid condition and
mirroring the logic from StyleElement.

Test: fast/css/xml-stylesheet-removed.xhtml

* dom/ProcessingInstruction.cpp:
(WebCore::ProcessingInstruction::removedFrom): Mirror the logic from
StyleElement -- always update the style resolver.

LayoutTests:

* fast/css/xml-stylesheet-removed-expected.txt: Added.
* fast/css/xml-stylesheet-removed.xhtml: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@123128 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] Allow nested suspend/resume screen & backingstore calls.
https://bugs.webkit.org/show_bug.cgi?id=91644
RIM PR 174365

Reviewed by Adam Treat and Antonio Gomes.

We expose suspendScreenAndBackingStoreUpdates() to the
outside API, but also use it internally when reacting
to a number of happenings, i.e. zooming, viewport resize,
resetting view state on Committed state or when restoring
it from previous pages, etc.

These two can clash. For instance, if we get a suspend
call from outside that suspends us for app inactivity,
or we are told to suspend because the main target surface
is not available at the time, and while being suspended
we try to rotate, finish loading a page, the we'll end up
resuming operations even though we shouldn't.

This patch changes the suspend flag to be a counter
instead, allowing nested suspend/resume calls and making
suspend/resume more robust this way. It also changes
several call sites to make sure suspend/resume calls are
paired up correctly.

* Api/BackingStore.cpp:
(BlackBerry::WebKit::BackingStorePrivate::BackingStorePrivate):
(BlackBerry::WebKit::BackingStorePrivate::suspendScreenAndBackingStoreUpdates):
(BlackBerry::WebKit::BackingStorePrivate::resumeScreenAndBackingStoreUpdates):
* Api/BackingStore_p.h:
(BackingStorePrivate):
* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPagePrivate::shouldZoomAboutPoint):
(BlackBerry::WebKit::WebPagePrivate::zoomAboutPointTimerFired):
(BlackBerry::WebKit::WebPagePrivate::blockZoomRectForNode):
* WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
(WebCore::FrameLoaderClientBlackBerry::restoreViewState):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@123129 268f45cc-cd09-0410-ab3c-d52691b4dbfc
CSS 2.1 failure: text-indent-intrinsic-003 fails
https://bugs.webkit.org/show_bug.cgi?id=80576

Reviewed by Eric Seidel.

Source/WebCore:

Negative values of text-indent should be distributed across inline children until used up.
This fixes text-indent-intrinsic-003 and text-indent-intrinsic-004.

Tests: css2.1/20110323/text-indent-intrinsic-001.htm
       css2.1/20110323/text-indent-intrinsic-002.htm
       css2.1/20110323/text-indent-intrinsic-003.htm
       css2.1/20110323/text-indent-intrinsic-004.htm

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::computeInlinePreferredLogicalWidths): If text-indent is negative, keep
 applying it to inline children in the first formatted line until it's reduced to zero. This isn't
 a consideration when text-indent is a positive value.

LayoutTests:

* css2.1/20110323/text-indent-intrinsic-001-expected.html: Added.
* css2.1/20110323/text-indent-intrinsic-001.htm: Added.
* css2.1/20110323/text-indent-intrinsic-002-expected.html: Added.
* css2.1/20110323/text-indent-intrinsic-002.htm: Added.
* css2.1/20110323/text-indent-intrinsic-003-expected.html: Added.
* css2.1/20110323/text-indent-intrinsic-003.htm: Added.
* css2.1/20110323/text-indent-intrinsic-004-expected.html: Added.
* css2.1/20110323/text-indent-intrinsic-004.htm: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@123130 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Limit maximum delay of DelayNode.
https://bugs.webkit.org/show_bug.cgi?id=91675

Patch by Raymond Toy <rtoy@google.com> on 2012-07-19
Reviewed by Kenneth Russell.

Source/WebCore:

Clip the maximum delay of a DelayNode to a reasonable maximum.

Test: webaudio/delaynode-maxdelaylimit.html

* Modules/webaudio/DelayNode.cpp:
(WebCore): Add maximumAllowedDelayTime.
(WebCore::DelayNode::DelayNode): Clip max delay.

LayoutTests:

Test that a DelayNode limits the specified max delay to the
expected maximum allowed delay.

* webaudio/delaynode-maxdelaylimit-expected.txt: Added.
* webaudio/delaynode-maxdelaylimit.html: Added.

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