[GStreamer] Video player sets system volume to 100%
https://bugs.webkit.org/show_bug.cgi?id=118974

Reviewed by Philippe Normand.

In order to preserve the system volume we need to keep track of
the volume being initialized in the HTMLMediaElement and then just
setting the volume to the sink when initializing the pipeline if
that volume was changed before.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::HTMLMediaElement): Initialized
attribute to false.
(WebCore::HTMLMediaElement::setVolume): Set the attribute to true
when volume is changed.
(WebCore::HTMLMediaElement::updateVolume): Set the volume only if
volume was initialized.
(WebCore::HTMLMediaElement::mediaPlayerPlatformVolumeConfigurationRequired):
Platform volume configuration is required only if volume was not
initialized before.
* html/HTMLMediaElement.h: Added attribute and interface method.
* platform/graphics/MediaPlayer.h:
(WebCore::MediaPlayerClient::mediaPlayerPlatformVolumeConfigurationRequired):
Declared and added default implementation for the interface method.
(WebCore::MediaPlayer::platformVolumeConfigurationRequired):
Asked the client, meaning the HTMLMediaElement if the platform
volume configuration is required.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
(WebCore::mediaPlayerPrivateVolumeChangedCallback): Added log.
(WebCore::MediaPlayerPrivateGStreamerBase::setVolume): Added log.
(WebCore::MediaPlayerPrivateGStreamerBase::setStreamVolumeElement):
Set the volume only if not platform volume is required and added log.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154970 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] Remove LayerData::LayerProgram
https://bugs.webkit.org/show_bug.cgi?id=120601

Reviewed by Anders Carlsson.

JIRA 490672
All layer contents are RGBA now, so there's no need to support BGRA any
more and the LayerData::LayerProgram enum can be removed. Related dead
code was removed.

No new tests, no change in behavior.

* platform/graphics/blackberry/EGLImageLayerWebKitThread.cpp:
(WebCore::EGLImageLayerWebKitThread::EGLImageLayerWebKitThread):
* platform/graphics/blackberry/LayerData.h:
(WebCore::LayerData::LayerData):
* platform/graphics/blackberry/LayerRenderer.cpp:
(WebCore::LayerRenderer::compositeLayersRecursive):
(WebCore::LayerRenderer::createProgram):
* platform/graphics/blackberry/LayerRenderer.h:
* platform/graphics/blackberry/LayerWebKitThread.h:
* platform/graphics/blackberry/PluginLayerWebKitThread.cpp:
(WebCore::PluginLayerWebKitThread::setPluginView):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154971 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] libsoup upversion to fix a gstreamer issue, bug115354
https://bugs.webkit.org/show_bug.cgi?id=120613

Reviewed by Philippe Normand.

Up version of libsoup to 2.43.90. But the exact version which we'll use is not 2.43.90.
To fix bug115354, we need the Andre's patch for libsoup, but the lastest release
does not contain it. https://bugzilla.gnome.org/show_bug.cgi?id=706338
For the reason, we'll use libsoup git repo directly for a while until the next
libsoup release.

* gtk/jhbuild.modules:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154972 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CSS Regions] position: fixed is computed relative to the first region, not the viewport
https://bugs.webkit.org/show_bug.cgi?id=111176

Reviewed by David Hyatt.

Source/WebCore:

Fixed positioned elements inside a named flow should be positioned and sized relative to the viewport,
not on the first region, as described in the spec: http://dev.w3.org/csswg/css-regions/#the-flow-into-property.
While the flow thread will still act as containing block for the fixed positioned elements, the painting and hit
testing for the fixed positioned elements is done by RenderView. The layers for the fixed positioned elements
are collected by the flow thread.

Tests: fast/regions/element-in-named-flow-absolute-from-fixed.html
       fast/regions/element-in-named-flow-fixed-from-absolute.html
       fast/regions/element-inflow-fixed-from-outflow-static.html
       fast/regions/element-outflow-static-from-inflow-fixed.html
       fast/regions/fixed-element-transformed-parent.html
       fast/regions/fixed-in-named-flow-scroll.html
       fast/regions/fixed-inside-fixed-in-named-flow.html
       fast/regions/fixed-inside-named-flow-zIndex.html
       fast/regions/fixed-pos-elem-in-namedflow-noregions.html
       fast/regions/fixed-pos-region-in-nested-flow.html

* rendering/FlowThreadController.cpp:
(WebCore::FlowThreadController::collectFixedPositionedLayers):
Return the list of layers for the fixed positioned elements with named flows as containing blocks.
Used in RenderLayer:: paintFixedLayersInNamedFlows and RenderLayer:: hitTestFixedLayersInNamedFlows.
* rendering/FlowThreadController.h:
* rendering/RenderBox.cpp:
(WebCore::RenderBox::mapLocalToContainer):
(WebCore::RenderBox::containingBlockLogicalWidthForPositioned):
(WebCore::RenderBox::containingBlockLogicalHeightForPositioned):
For fixed positioned elements, width and height are given by the view instead of the first region.
* rendering/RenderLayer.cpp:
(WebCore::accumulateOffsetTowardsAncestor):
Modified for the fixed positioned elements inside named flows with the named flows as containing block
to take into account the view scroll.
(WebCore::compareZIndex):
Moved upwards because it is used in RenderLayer::paintFixedLayersInNamedFlows.
(WebCore::RenderLayer::paintFixedLayersInNamedFlows):
Paint the list of fixed layers directly from the RenderView instead of painting them through regions -> named flows.
(WebCore::RenderLayer::paintLayerContents):
(WebCore::RenderLayer::paintList):
(WebCore::RenderLayer::hitTestFixedLayersInNamedFlows):
Hit test the layers for the fix positioned elements inside named flows from the RenderView layer
instead of the region -> named flow layer.
(WebCore::RenderLayer::hitTestLayer):
(WebCore::RenderLayer::calculateRects):
* rendering/RenderLayer.h:
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::updateLayerTreeGeometry):
We do not support yet the accelerated compositing for elements in named flows,
so bail out early here. We need to revisit fixed elements once we finish accelerated compositing for elements in named flows.
* rendering/RenderObject.cpp:
(WebCore::RenderObject::fixedPositionedWithNamedFlowContainingBlock):
(WebCore::hasFixedPosInNamedFlowContainingBlock):
(WebCore::RenderObject::containerForRepaint):
Changed to take into account that RenderView should be the repaintContainer for the
fixed positioned elements with named flow as the containing block.
* rendering/RenderObject.h:

LayoutTests:

Added new tests and changed the existing ones that were relying on incorrect positioning
for fixed elements.

* fast/regions/element-in-named-flow-absolute-from-fixed-expected.txt: Added.
* fast/regions/element-in-named-flow-absolute-from-fixed.html: Added.
* fast/regions/element-in-named-flow-fixed-from-absolute-expected.txt: Added.
* fast/regions/element-in-named-flow-fixed-from-absolute.html: Added.
* fast/regions/element-inflow-fixed-from-outflow-static-expected.txt: Added.
* fast/regions/element-inflow-fixed-from-outflow-static.html: Added.
* fast/regions/element-outflow-static-from-inflow-fixed-expected.txt: Added.
* fast/regions/element-outflow-static-from-inflow-fixed.html: Added.
* fast/regions/fixed-element-transformed-parent-expected.txt: Added.
* fast/regions/fixed-element-transformed-parent.html: Added.
* fast/regions/fixed-in-named-flow-scroll-expected.txt: Added.
* fast/regions/fixed-in-named-flow-scroll.html: Added.
* fast/regions/fixed-inside-fixed-in-named-flow-expected.html: Added.
* fast/regions/fixed-inside-fixed-in-named-flow.html: Added.
* fast/regions/fixed-inside-named-flow-zIndex-expected.html: Added.
* fast/regions/fixed-inside-named-flow-zIndex.html: Added.
* fast/regions/fixed-pos-elem-in-namedflow-noregions-expected.html: Added.
* fast/regions/fixed-pos-elem-in-namedflow-noregions.html: Added.
* fast/regions/fixed-pos-elem-in-region-expected.html:
* fast/regions/fixed-pos-elem-in-region.html:
* fast/regions/fixed-pos-region-in-nested-flow-expected.html: Added.
* fast/regions/fixed-pos-region-in-nested-flow.html: Added.


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