Add the duration attribute to MediaSource
https://bugs.webkit.org/show_bug.cgi?id=95149

Reviewed by Eric Carlson.

Add support for the duration attribute recently added to the MediaSource spec.
http://dev.w3.org/html5/spec/media-elements.html#dom-media-duration

Source/WebCore:

Test: http/tests/media/media-source/video-media-source-duration-changed.html

* Modules/mediasource/MediaSource.cpp:
(WebCore::MediaSource::duration): Added duration method.
(WebCore):
(WebCore::MediaSource::setDuration): Added duration setter.
* Modules/mediasource/MediaSource.h:
(MediaSource):
* Modules/mediasource/MediaSource.idl:
* platform/graphics/MediaPlayer.cpp:
(WebCore::NullMediaPlayerPrivate::sourceSetDuration): Add empty definition.
(WebCore::MediaPlayer::sourceSetDuration): Forward call to m_private.
(WebCore):
* platform/graphics/MediaPlayer.h:
* platform/graphics/MediaPlayerPrivate.h:
(WebCore::MediaPlayerPrivateInterface::sourceSetDuration): Add empty definition.

Source/WebKit/chromium:

* public/WebMediaPlayer.h:
(WebKit::WebMediaPlayer::sourceSetDuration): Add empty definition.
* src/WebMediaPlayerClientImpl.cpp:
(WebKit::WebMediaPlayerClientImpl::sourceSetDuration): Forward call to m_webMediaPlayer.
(WebKit):
* src/WebMediaPlayerClientImpl.h:
(WebMediaPlayerClientImpl):

LayoutTests:

* http/tests/media/media-source/media-source.js:
(MediaSourceTest.SegmentHelper): Add parameter to specify whether full file should be loaded.
(MediaSourceTest.SegmentHelper.prototype.appendAllMediaSegments): Added method to append all file segments.
(MediaSourceTest.roundedEquals_): Added to see if values are equivalent after rounding.
(MediaSourceTest.expectDuration): Added to check for expected duration.
(MediaSourceTest.expectBufferedRange): Added to check for the expected buffered attribute value.
* http/tests/media/media-source/video-media-source-duration-changed-expected.txt: Added.
* http/tests/media/media-source/video-media-source-duration-changed.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@127675 268f45cc-cd09-0410-ab3c-d52691b4dbfc
a = data[a]++; sets the wrong key in data
https://bugs.webkit.org/show_bug.cgi?id=91270

Reviewed by Oliver Hunt.

Source/JavaScriptCore: 

Postfix inc/dec is unsafely using finalDestination, can trample base/subscript prior to the result being put.

* bytecompiler/NodesCodegen.cpp:
(JSC::PostfixNode::emitResolve):
    - Remove redundant parens.
(JSC::PostfixNode::emitBracket):
(JSC::PostfixNode::emitDot):
    - Refactored to use tempDestination instead of finalDestination.
(JSC::PrefixNode::emitBracket):
(JSC::PrefixNode::emitDot):
    - Should be using emitPreIncOrDec.

LayoutTests: 

Added test cases.

* fast/js/post-inc-assign-overwrites-expected.txt: Added.
* fast/js/post-inc-assign-overwrites.html: Added.
* fast/js/script-tests/post-inc-assign-overwrites.js: Added.
(postIncDotAssignToBase):
(postIncBracketAssignToBase):
(postIncBracketAssignToSubscript):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@127676 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] Remove deprecated dialog connections.
https://bugs.webkit.org/show_bug.cgi?id=95868

Reviewed by Rob Buis.

PR 187481.
Remove deprecated logic for unsupported
Dialog types.

* Api/WebPageClient.h:
* WebKitSupport/InputHandler.cpp:
(BlackBerry::WebKit::InputHandler::openDatePopup):
(BlackBerry::WebKit::InputHandler::openColorPopup):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@127677 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] Test WebSolidColorLayer in WebLayerTest.Client unit test
https://bugs.webkit.org/show_bug.cgi?id=95819

Patch by James Robinson <jamesr@chromium.org> on 2012-09-05
Reviewed by Adam Barth.

This unit test doesn't do all that much, but it does verify that WebSolidColorLayer doesn't completely explode
upon use and also makes sure that the WebSolidColorLayer::create() symbol is referenced and not dropped from
webkit.dll in the component build.

* tests/WebLayerTest.cpp:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@127678 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r127612, r127660, and r127664.
http://trac.webkit.org/changeset/127612
http://trac.webkit.org/changeset/127660
http://trac.webkit.org/changeset/127664
https://bugs.webkit.org/show_bug.cgi?id=95920

Source/Platform:

* Platform.gypi:
* chromium/public/WebRTCPeerConnectionHandler.h:
(WebKit):
(WebRTCPeerConnectionHandler):
* chromium/public/WebRTCVoidRequest.h: Removed.

Source/WebCore:

* CMakeLists.txt:
* GNUmakefile.list.am:
* Modules/mediastream/RTCErrorCallback.h:
(WebCore):
(RTCErrorCallback):
* Modules/mediastream/RTCErrorCallback.idl:
* Modules/mediastream/RTCPeerConnection.cpp:
(WebCore::RTCPeerConnection::createOffer):
* Modules/mediastream/RTCPeerConnection.h:
(WebCore):
(RTCPeerConnection):
* Modules/mediastream/RTCPeerConnection.idl:
* Modules/mediastream/RTCSessionDescriptionCallback.h:
(WebCore):
(RTCSessionDescriptionCallback):
* Modules/mediastream/RTCSessionDescriptionCallback.idl:
* Modules/mediastream/RTCSessionDescriptionRequestImpl.cpp:
(WebCore::RTCSessionDescriptionRequestImpl::create):
(WebCore::RTCSessionDescriptionRequestImpl::RTCSessionDescriptionRequestImpl):
(WebCore::RTCSessionDescriptionRequestImpl::requestSucceeded):
(WebCore::RTCSessionDescriptionRequestImpl::requestFailed):
(WebCore::RTCSessionDescriptionRequestImpl::clear):
* Modules/mediastream/RTCSessionDescriptionRequestImpl.h:
(RTCSessionDescriptionRequestImpl):
* Modules/mediastream/RTCVoidRequestImpl.cpp: Removed.
* Modules/mediastream/RTCVoidRequestImpl.h: Removed.
* WebCore.gypi:
* platform/chromium/support/WebRTCVoidRequest.cpp: Removed.
* platform/mediastream/RTCPeerConnectionHandler.cpp:
(RTCPeerConnectionHandlerDummy):
(WebCore::RTCPeerConnectionHandlerDummy::RTCPeerConnectionHandlerDummy):
* platform/mediastream/RTCPeerConnectionHandler.h:
(WebCore):
(WebCore::RTCPeerConnectionHandler::~RTCPeerConnectionHandler):
(RTCPeerConnectionHandler):
(WebCore::RTCPeerConnectionHandler::RTCPeerConnectionHandler):
* platform/mediastream/RTCVoidRequest.h: Removed.
* platform/mediastream/chromium/RTCPeerConnectionHandlerChromium.cpp:
* platform/mediastream/chromium/RTCPeerConnectionHandlerChromium.h:
(RTCPeerConnectionHandlerChromium):

Tools:

* DumpRenderTree/chromium/MockWebRTCPeerConnectionHandler.cpp:
(MockWebRTCPeerConnectionHandler::SuccessCallbackTask::SuccessCallbackTask):
(MockWebRTCPeerConnectionHandler::SuccessCallbackTask::runIfValid):
(MockWebRTCPeerConnectionHandler::FailureCallbackTask::FailureCallbackTask):
(MockWebRTCPeerConnectionHandler::FailureCallbackTask::runIfValid):
(MockWebRTCPeerConnectionHandler::createOffer):
* DumpRenderTree/chromium/MockWebRTCPeerConnectionHandler.h:
(MockWebRTCPeerConnectionHandler):
(SuccessCallbackTask):
(FailureCallbackTask):

LayoutTests:

* fast/mediastream/RTCPeerConnection-createOffer.html:
* fast/mediastream/RTCPeerConnection-localDescription-expected.txt: Removed.
* fast/mediastream/RTCPeerConnection-localDescription.html: Removed.
* fast/mediastream/RTCPeerConnection-remoteDescription-expected.txt: Removed.
* fast/mediastream/RTCPeerConnection-remoteDescription.html: Removed.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@127679 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] Remove feature about:cache/disable and about:cache/enable
https://bugs.webkit.org/show_bug.cgi?id=95820

Reviewed by Rob Buis.

Remove this feature since we need to add a button in settings.

* WebKitSupport/AboutData.cpp:
(BlackBerry::WebKit::cachePage):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@127680 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Vertically center non-anchored <dialog> elements
https://bugs.webkit.org/show_bug.cgi?id=90670

Patch by Matt Falkenhagen <falken@chromium.org> on 2012-09-05
Reviewed by Ojan Vafai.

Source/WebCore:

This adjusts the static default position of non-anchored
dialog elements so they are vertically centered in or at the top of
the viewport, as per the spec.

The approach is to add a RenderDialog class whose layout()
function adjusts the position after normal RenderBlock::layout runs.

Test: fast/dom/HTMLDialogElement/non-anchored-dialog-positioning.html

* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.gypi:
* WebCore.xcodeproj/project.pbxproj:
* html/HTMLDialogElement.cpp:
(WebCore::HTMLDialogElement::createRenderer):
(WebCore):
* html/HTMLDialogElement.h:
(HTMLDialogElement):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::mapAbsoluteToLocalPoint): Remove assertion since now absoluteToLocal is called during layout.
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::mapAbsoluteToLocalPoint): Ditto.
* rendering/RenderDialog.cpp: Added.
(WebCore):
(WebCore::RenderDialog::layout): Compute the desired top position in the absolute coordinate system, and then set top to the
corresponding local coordinate.
* rendering/RenderDialog.h: Added.
(WebCore):
(RenderDialog):
(WebCore::RenderDialog::RenderDialog):
(WebCore::RenderDialog::~RenderDialog):
(WebCore::RenderDialog::renderName):
* rendering/RenderObject.h:
(RenderObject):
(WebCore::RenderObject::isDialog):
* rendering/RenderingAllInOne.cpp:

LayoutTests:

* fast/dom/HTMLDialogElement/non-anchored-dialog-positioning-expected.txt: Added.
* fast/dom/HTMLDialogElement/non-anchored-dialog-positioning.html: Added.

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