sometimes all slaved videos don't start playing
https://bugs.webkit.org/show_bug.cgi?id=88553

Reviewed by Darin Adler.

Source/WebCore:

Test: media/media-controller-time-clamp.html

Some PlatformClock classes will occasionally return times < 0 and will
always return times slightly > duration() when playback has ended.  Clamp
the value of currentTime() to the specified [0..duration] range.

* html/MediaController.cpp:
(MediaController::currentTime):

LayoutTests:

* media/media-controller-time-clamp-expected.txt: Added.
* media/media-controller-time-clamp.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@119739 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Worker tear-down can re-enter JSC during GC finalization
https://bugs.webkit.org/show_bug.cgi?id=88449

Reviewed by Geoffrey Garen.

No new tests.

This is the first of two patches to fix this issue with Workers.

* workers/AbstractWorker.cpp:
(WebCore::AbstractWorker::~AbstractWorker): We don't need to call onDestroyWorker() here, it
will be called elsewhere in contextDestroyed().


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@119740 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed; chromium test_expectations update.

Removing expected-to-fail results for now-passing tests.

* platform/chromium-mac/canvas/philip/tests/2d.line.width.basic-expected.txt: Removed.
* platform/chromium-mac/canvas/philip/tests/2d.line.width.transformed-expected.txt: Removed.
* platform/chromium-mac/canvas/philip/tests/2d.transformation.setTransform.skewed-expected.txt: Removed.
* platform/chromium-mac/canvas/philip/tests/2d.transformation.transform.skewed-expected.txt: Removed.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@119741 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Plumb CORS attribute information from HTMLMediaElement to media players so it can be used
https://bugs.webkit.org/show_bug.cgi?id=88349

Reviewed by Adam Barth.

Source/WebCore:

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

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::mediaPlayerCORSMode):
(WebCore):
* html/HTMLMediaElement.h:
(HTMLMediaElement):
* html/canvas/CanvasRenderingContext.cpp:
(WebCore::CanvasRenderingContext::wouldTaintOrigin):
* platform/graphics/MediaPlayer.cpp:
(WebCore::MediaPlayer::didPassCORSAccessCheck):
(WebCore):
* platform/graphics/MediaPlayer.h:
(WebCore::MediaPlayerClient::mediaPlayerCORSMode):
(MediaPlayer):
* platform/graphics/MediaPlayerPrivate.h:
(WebCore::MediaPlayerPrivateInterface::didPassCORSAccessCheck):
(MediaPlayerPrivateInterface):

Source/WebKit/chromium:

* public/WebMediaPlayer.h:
(WebMediaPlayer):
* src/AssertMatchingEnums.cpp:
* src/WebMediaPlayerClientImpl.cpp:
(WebKit::WebMediaPlayerClientImpl::loadInternal):
(WebKit::WebMediaPlayerClientImpl::didPassCORSAccessCheck):
(WebKit):
* src/WebMediaPlayerClientImpl.h:
(WebMediaPlayerClientImpl):

LayoutTests:

* http/tests/security/resources/video-cross-origin-allow.php: Added.
* http/tests/security/video-cross-origin-readback-expected.txt: Added.
* http/tests/security/video-cross-origin-readback.html: Added.
* platform/efl/Skipped:
* platform/gtk/TestExpectations:
* platform/mac/Skipped:
* platform/qt/Skipped:
* platform/win/Skipped:
* platform/wk2/Skipped:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@119742 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Buildfix for ENABLE_OVERFLOW_SCROLLING=0 (though defined)
https://bugs.webkit.org/show_bug.cgi?id=88564

Reviewed by Adam Barth.

Where ENABLE(X) mandates that X both has to be defined and evaluates to
true as a lone preprocessor statement, there were two places in the CSS
property and value input files where only was checked whether is has
been defined. This also goes against other #ifdefs in those files.

* css/CSSPropertyNames.in:
* css/CSSValueKeywords.in:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@119743 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] Free texture from CCIOSurfaceLayerImpl when it is destroyed
https://bugs.webkit.org/show_bug.cgi?id=88371

Reviewed by James Robinson.

Source/WebCore:

Unit test: CCLayerTreeHostImplTest.layersFreeTextures

* platform/graphics/chromium/cc/CCIOSurfaceLayerImpl.cpp:
(WebCore::CCIOSurfaceLayerImpl::~CCIOSurfaceLayerImpl):
(WebCore::CCIOSurfaceLayerImpl::willDraw):

Source/WebKit/chromium:

* tests/CCLayerTreeHostImplTest.cpp:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@119744 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Hopefully final chromium rebaseline for r119617.

* platform/chromium-mac/compositing/geometry/fixed-position-composited-page-scale-down-expected.png:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@119745 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r119737.
http://trac.webkit.org/changeset/119737

see https://bugs.webkit.org/show_bug.cgi?id=88561

* css1/basic/class_as_selector-expected.txt: Removed.
* css1/basic/containment-expected.txt: Removed.
...
* platform/gtk/css3/selectors3/xml/css3-modsel-74-expected.txt: Copied from LayoutTests/platform/gtk/css3/selectors3/xml/css3-modsel-74-expected.txt.
* platform/gtk/css3/selectors3/xml/css3-modsel-74b-expected.txt: Copied from LayoutTests/platform/gtk/css3/selectors3/xml/css3-modsel-74b-expected.txt.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@119746 268f45cc-cd09-0410-ab3c-d52691b4dbfc
run-webkit-tests --lint-test-files gives an error when run on linux
https://bugs.webkit.org/show_bug.cgi?id=88551

Reviewed by Ojan Vafai.

We weren't mapping the expectations properly for the
google-chrome ports.

* Scripts/webkitpy/layout_tests/port/base.py:
(Port.path_to_test_expectations_file):
* Scripts/webkitpy/layout_tests/port/google_chrome_unittest.py:
(TestGoogleChromePort.test_path_to_expectations):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@119747 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] Win mock scrollbars appear to overflow by a pixel to the right and bottom
https://bugs.webkit.org/show_bug.cgi?id=77368

Reviewed by Ojan Vafai.

It doesn't look like we ever get a rect with width or height of 0.
I ran css1, css2.1, fast/forms, and tables without any crashes.

* DumpRenderTree/chromium/WebThemeEngineDRTWin.cpp:
(webRectToSkIRect): Correctly convert a WebRect to a SkIRect.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@119748 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Chromium] features.gypi should have the correct definitions for Android
https://bugs.webkit.org/show_bug.cgi?id=88533

Reviewed by Adam Barth.

Make all features which are enabled on Android but disabled on other platforms,
or are disabled on Android while enabled on other platforms, conditional. This
also means that the selection of code compiled for Android will slightly change.

This change also removes the enable_viewport variable as the value of this is
no longer respected by WebKit - it's enabled by default for all of Chromium.
Furthermore, ENABLE_OVERFLOW_SCROLLING is now listed in features.gypi again.

* features.gypi:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@119749 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add Konrad Piascik to committers.py
https://bugs.webkit.org/show_bug.cgi?id=88560

Unreviewed.

Patch by Konrad Piascik <kpiascik@rim.com> on 2012-06-07

* Scripts/webkitpy/common/config/committers.py:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@119750 268f45cc-cd09-0410-ab3c-d52691b4dbfc
IndexedDB: Error codes, phase one
https://bugs.webkit.org/show_bug.cgi?id=88459

Patch by Alec Flett <alecflett@chromium.org> on 2012-06-07
Reviewed by Tony Chang.

Source/WebCore:

This phase gets rid of the now-deprecated NOT_ALLOWED_ERR and
NON_TRANSIENT_ERR from earlier versions of the spec, and
normalizes the place where TypeError should be thrown so that it's
easier to update when the bindings change.

No new tests: existing tests cover these changes and have been updated.

* Modules/indexeddb/IDBCursor.cpp:
(WebCore::IDBCursor::advance):
(WebCore::IDBCursor::continueFunction):
(WebCore::IDBCursor::stringToDirection):
(WebCore::IDBCursor::directionToString):
* Modules/indexeddb/IDBCursorBackendImpl.cpp:
(WebCore::IDBCursorBackendImpl::update):
(WebCore::IDBCursorBackendImpl::deleteFunction):
* Modules/indexeddb/IDBDatabase.cpp:
(WebCore::IDBDatabase::createObjectStore):
(WebCore::IDBDatabase::deleteObjectStore):
(WebCore::IDBDatabase::setVersion):
(WebCore::IDBDatabase::transaction):
* Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
(WebCore::IDBDatabaseBackendImpl::createObjectStore):
(WebCore::IDBDatabaseBackendImpl::deleteObjectStore):
(WebCore::IDBDatabaseBackendImpl::setVersion):
* Modules/indexeddb/IDBDatabaseException.cpp:
(WebCore):
* Modules/indexeddb/IDBDatabaseException.h:
* Modules/indexeddb/IDBDatabaseException.idl:
* Modules/indexeddb/IDBFactory.cpp:
(WebCore::IDBFactory::open):
(WebCore::IDBFactory::deleteDatabase):
* Modules/indexeddb/IDBObjectStore.cpp:
(WebCore::IDBObjectStore::index):
* Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
(WebCore::IDBObjectStoreBackendImpl::createIndex):
(WebCore::IDBObjectStoreBackendImpl::deleteIndex):
* Modules/indexeddb/IDBRequest.cpp:
(WebCore::IDBRequest::result):
(WebCore::IDBRequest::errorCode):
(WebCore::IDBRequest::webkitErrorMessage):
* Modules/indexeddb/IDBTransaction.cpp:
(WebCore::IDBTransaction::objectStore):
(WebCore::IDBTransaction::stringToMode):
(WebCore::IDBTransaction::modeToString):
* Modules/indexeddb/IDBTransactionBackendImpl.cpp:
(WebCore::IDBTransactionBackendImpl::objectStore):

LayoutTests:

* storage/indexeddb/basics-expected.txt:
* storage/indexeddb/basics-shared-workers-expected.txt:
* storage/indexeddb/basics-workers-expected.txt:
* storage/indexeddb/create-and-remove-object-store-expected.txt:
* storage/indexeddb/cursor-advance-expected.txt:
* storage/indexeddb/cursor-update-expected.txt:
* storage/indexeddb/database-basics-expected.txt:
* storage/indexeddb/deleteIndex-expected.txt:
* storage/indexeddb/resources/basics.js:
(test):
* storage/indexeddb/resources/create-and-remove-object-store.js:
(testCreateAndRemove):
(tryOnceMore):
* storage/indexeddb/resources/cursor-advance.js:
(testBadAdvance.advanceBadly):
(testBadAdvance):
* storage/indexeddb/resources/cursor-update.js:
(keyCursor):
* storage/indexeddb/resources/database-basics.js:
(testClose):
* storage/indexeddb/resources/deleteIndex.js:
(postTwiddling):
* storage/indexeddb/resources/transaction-after-close.js:
(firstTransactionComplete):
* storage/indexeddb/resources/transaction-and-objectstore-calls.js:
(afterComplete):
* storage/indexeddb/resources/transaction-basics.js:
(testInvalidMode):
* storage/indexeddb/transaction-after-close-expected.txt:
* storage/indexeddb/transaction-and-objectstore-calls-expected.txt:
* storage/indexeddb/transaction-basics-expected.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@119751 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Settings::defaultDeviceScaleFactor is redundant with Page::deviceScaleFactor
https://bugs.webkit.org/show_bug.cgi?id=88375

Reviewed by James Robinson.

.: 

This symbol no longer exists.

* Source/autotools/symbols.filter:

Source/WebCore: 

This patch removes Settings::defaultDeviceScaleFactor because it is
redundant with Page::deviceScaleFactor now that we no longer support
target-densitydpi.  Page::deviceScaleFactor is the canonical place to
store the device scale factor.

* WebCore.exp.in:
* page/Settings.cpp:
(WebCore::Settings::Settings):
(WebCore):
* page/Settings.h:
(Settings):
* testing/InternalSettings.cpp:
(WebCore::InternalSettings::setDeviceScaleFactor):

Source/WebKit/chromium: 

* public/WebSettings.h:
(WebKit::WebSettings::setDefaultDeviceScaleFactor):
(WebSettings):
* src/ChromeClientImpl.cpp:
(WebKit::ChromeClientImpl::dispatchViewportPropertiesDidChange):
* src/WebSettingsImpl.cpp:
(WebKit):
* src/WebSettingsImpl.h:
(WebSettingsImpl):
* src/WebViewImpl.cpp:
(WebKit::WebViewImpl::setIsAcceleratedCompositingActive):
* tests/WebFrameTest.cpp:
(WebKit::TEST_F):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@119752 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] Remove obsolete FIXME comment about a layer sorting bug.
https://bugs.webkit.org/show_bug.cgi?id=88546

Reviewed by James Robinson.

No tests needed, only comment changed. The comment referred to a
potential bug that actually will not occur. The W3C spec on CSS 3d
transforms indicates that layers that do not share the same "3d
rendering context" do not sort together, and our existing code
sorts this way already.

* platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp:
(WebCore::subtreeShouldRenderToSeparateSurface):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@119753 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix recent null pointer error regression in the flakiness dashboard
https://bugs.webkit.org/show_bug.cgi?id=88573

Reviewed by Dirk Pranke.

* TestResultServer/static-dashboards/builders.js:
(requestBuilderList):
* TestResultServer/static-dashboards/flakiness_dashboard_unittests.js:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@119754 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] Update PlayBook's User Agent String for Web Inspector
https://bugs.webkit.org/show_bug.cgi?id=88543

Patch by Konrad Piascik <kpiascik@rim.com> on 2012-06-07
Reviewed by Antonio Gomes.

We expect users to upgrade their devices so developers only need the latest UA String.

No tests needed.

* inspector/front-end/SettingsScreen.js:
(WebInspector.SettingsScreen.prototype._createUserAgentSelectRowElement.get const):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@119755 268f45cc-cd09-0410-ab3c-d52691b4dbfc
fast/js/dfg-double-vote-fuzz.html fails on Chromium release.

* platform/chromium/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@119756 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] Qt DRT should load external resources - cleanup
https://bugs.webkit.org/show_bug.cgi?id=88568

Make things more straighforward to load external URLs in DRT.

Reviewed by Ryosuke Niwa.

* WebCoreSupport/FrameLoaderClientQt.cpp:
(WebCore::FrameLoaderClientQt::dispatchWillSendRequest):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@119757 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Search highlight does not scroll with the content of the page, and find overlay doesn't work, on large-enough window
https://bugs.webkit.org/show_bug.cgi?id=88577
<rdar://problem/11430118>

Reviewed by John Sullivan.

Prevent the page overlay layer from falling into tiled mode.

* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::createPageOverlayLayer):

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