[SCM] WebKit Debian packaging branch, webkit-1.3, updated. upstream/1.3.7-4207-g178b198
commit-queue at webkit.org
commit-queue at webkit.org
Sun Feb 20 22:54:35 UTC 2011
The following commit has been merged in the webkit-1.3 branch:
commit 4d6a04e19cc59f61cbe7976de2f8890fa400fd9b
Author: commit-queue at webkit.org <commit-queue at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Thu Jan 13 15:12:08 2011 +0000
2011-01-13 Yi Shen <yi.4.shen at nokia.com>
Reviewed by Eric Seidel.
[Qt] Use a big central media play control button for video element
https://bugs.webkit.org/show_bug.cgi?id=52315
When ChromeClient::requiresFullscreenForVideoPlayback() returns true,
all other control buttons for the video element are hidden, except
a big centralized play button.
No new tests because no client implements requiresFullscreenForVideoPlayback yet.
* WebCore.pri:
* css/mediaControlsQtFullscreen.css: Added.
(audio):
(audio::-webkit-media-controls-panel):
(video::-webkit-media-controls-panel):
(video:-webkit-full-page-media::-webkit-media-controls-panel):
(audio::-webkit-media-controls-mute-button):
(video::-webkit-media-controls-mute-button):
(audio::-webkit-media-controls-play-button):
(video::-webkit-media-controls-play-button):
(audio::-webkit-media-controls-timeline-container):
(video::-webkit-media-controls-timeline-container):
(audio::-webkit-media-controls-current-time-display):
(video::-webkit-media-controls-current-time-display):
(audio::-webkit-media-controls-time-remaining-display, video::-webkit-media-controls-time-remaining-display):
(audio::-webkit-media-controls-timeline):
(video::-webkit-media-controls-timeline):
(audio::-webkit-media-controls-volume-slider-container):
(video::-webkit-media-controls-volume-slider-container):
(audio::-webkit-media-controls-volume-slider):
(video::-webkit-media-controls-volume-slider):
(audio::-webkit-media-controls-seek-back-button, video::-webkit-media-controls-seek-back-button):
(audio::-webkit-media-controls-seek-forward-button, video::-webkit-media-controls-seek-forward-button):
(audio::-webkit-media-controls-fullscreen-button):
(video::-webkit-media-controls-fullscreen-button):
(audio::-webkit-media-controls-rewind-button, video::-webkit-media-controls-rewind-button):
(audio::-webkit-media-controls-return-to-realtime-button, video::-webkit-media-controls-return-to-realtime-button):
(audio::-webkit-media-controls-toggle-closed-captions-button, video::-webkit-media-controls-toggle-closed-captions-button):
* platform/qt/RenderThemeQt.cpp:
(WebCore::RenderThemeQt::extraMediaControlsStyleSheet):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75711 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog
index e626278..613f3a0 100644
--- a/Source/WebCore/ChangeLog
+++ b/Source/WebCore/ChangeLog
@@ -1,3 +1,47 @@
+2011-01-13 Yi Shen <yi.4.shen at nokia.com>
+
+ Reviewed by Eric Seidel.
+
+ [Qt] Use a big central media play control button for video element
+ https://bugs.webkit.org/show_bug.cgi?id=52315
+
+ When ChromeClient::requiresFullscreenForVideoPlayback() returns true,
+ all other control buttons for the video element are hidden, except
+ a big centralized play button.
+
+ No new tests because no client implements requiresFullscreenForVideoPlayback yet.
+
+ * WebCore.pri:
+ * css/mediaControlsQtFullscreen.css: Added.
+ (audio):
+ (audio::-webkit-media-controls-panel):
+ (video::-webkit-media-controls-panel):
+ (video:-webkit-full-page-media::-webkit-media-controls-panel):
+ (audio::-webkit-media-controls-mute-button):
+ (video::-webkit-media-controls-mute-button):
+ (audio::-webkit-media-controls-play-button):
+ (video::-webkit-media-controls-play-button):
+ (audio::-webkit-media-controls-timeline-container):
+ (video::-webkit-media-controls-timeline-container):
+ (audio::-webkit-media-controls-current-time-display):
+ (video::-webkit-media-controls-current-time-display):
+ (audio::-webkit-media-controls-time-remaining-display, video::-webkit-media-controls-time-remaining-display):
+ (audio::-webkit-media-controls-timeline):
+ (video::-webkit-media-controls-timeline):
+ (audio::-webkit-media-controls-volume-slider-container):
+ (video::-webkit-media-controls-volume-slider-container):
+ (audio::-webkit-media-controls-volume-slider):
+ (video::-webkit-media-controls-volume-slider):
+ (audio::-webkit-media-controls-seek-back-button, video::-webkit-media-controls-seek-back-button):
+ (audio::-webkit-media-controls-seek-forward-button, video::-webkit-media-controls-seek-forward-button):
+ (audio::-webkit-media-controls-fullscreen-button):
+ (video::-webkit-media-controls-fullscreen-button):
+ (audio::-webkit-media-controls-rewind-button, video::-webkit-media-controls-rewind-button):
+ (audio::-webkit-media-controls-return-to-realtime-button, video::-webkit-media-controls-return-to-realtime-button):
+ (audio::-webkit-media-controls-toggle-closed-captions-button, video::-webkit-media-controls-toggle-closed-captions-button):
+ * platform/qt/RenderThemeQt.cpp:
+ (WebCore::RenderThemeQt::extraMediaControlsStyleSheet):
+
2011-01-13 Carlos Garcia Campos <cgarcia at igalia.com>
Reviewed by Xan Lopez.
diff --git a/Source/WebCore/WebCore.pri b/Source/WebCore/WebCore.pri
index 0c33eed..f79d497 100644
--- a/Source/WebCore/WebCore.pri
+++ b/Source/WebCore/WebCore.pri
@@ -60,6 +60,7 @@ STYLESHEETS_EMBED = \
$$PWD/css/wml.css \
$$PWD/css/mediaControls.css \
$$PWD/css/mediaControlsQt.css \
+ $$PWD/css/mediaControlsQtFullscreen.css \
$$PWD/css/themeQtNoListboxes.css \
$$PWD/css/themeQtMobile.css
diff --git a/Source/WebCore/css/mediaControlsQtFullscreen.css b/Source/WebCore/css/mediaControlsQtFullscreen.css
new file mode 100644
index 0000000..d191331
--- /dev/null
+++ b/Source/WebCore/css/mediaControlsQtFullscreen.css
@@ -0,0 +1,190 @@
+/*
+ * Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies)
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+audio {
+ height: 34px;
+ width: 400px;
+}
+
+audio::-webkit-media-controls-panel {
+ display: -webkit-box;
+ -webkit-box-orient: horizontal;
+ -webkit-box-align: end;
+ -webkit-user-select: none;
+ position: absolute;
+ bottom: 0;
+ width: 100%;
+ z-index: 0;
+ overflow: visible;
+ height: 100%;
+ text-align: right;
+}
+
+video::-webkit-media-controls-panel {
+/* The control panel is only play button for full screen */
+ display: -webkit-box;
+ -webkit-box-align: center;
+ -webkit-box-pack: center;
+ width: 100%;
+ height: 100%;
+}
+
+video:-webkit-full-page-media::-webkit-media-controls-panel {
+ display: none;
+}
+
+audio::-webkit-media-controls-mute-button {
+ width: 12px;
+ height: 12px;
+ padding: 6px;
+ margin: 5px 5px 5px 3px;
+}
+
+video::-webkit-media-controls-mute-button {
+ display: none;
+}
+
+audio::-webkit-media-controls-play-button {
+ width: 9px;
+ height: 12px;
+ padding: 6px 12px 6px 11px;
+ margin: 5px 3px 5px 5px;
+}
+
+video::-webkit-media-controls-play-button {
+ display: -webkit-box;
+ -webkit-box-align: center;
+ -webkit-box-pack: center;
+ width: 50px;
+ height: 50px;
+ padding: 20px;
+}
+
+audio::-webkit-media-controls-timeline-container {
+ height: 34px;
+}
+
+video::-webkit-media-controls-timeline-container {
+ display: none;
+}
+
+audio::-webkit-media-controls-current-time-display {
+ -webkit-appearance: media-current-time-display;
+ -webkit-user-select: none;
+ display: inline-block;
+ height: 12px;
+ padding: 6px;
+ margin: 5px 3px;
+
+ overflow: hidden;
+ cursor: default;
+
+ text-align: center;
+ font-size: 10px;
+ font-family: Verdana;
+ font-weight: bold;
+ color: white;
+}
+
+video::-webkit-media-controls-current-time-display {
+ -webkit-appearance: media-current-time-display;
+ -webkit-user-select: none;
+ display: none;
+}
+
+audio::-webkit-media-controls-time-remaining-display, video::-webkit-media-controls-time-remaining-display {
+ display: none;
+}
+
+audio::-webkit-media-controls-timeline {
+ height: 12px;
+ padding: 6px 8px;
+ margin: 5px 3px;
+}
+
+video::-webkit-media-controls-timeline {
+ display: none;
+}
+
+audio::-webkit-media-controls-volume-slider-container {
+ -webkit-appearance: media-volume-slider-container;
+ position: absolute;
+ height: 103px;
+ width: 24px;
+}
+
+video::-webkit-media-controls-volume-slider-container {
+ -webkit-appearance: media-volume-slider-container;
+ display: none;
+}
+
+audio::-webkit-media-controls-volume-slider {
+ -webkit-appearance: media-volume-slider;
+ display: inline;
+ position: absolute;
+
+ width: 12px;
+ padding: 6px;
+ height: 88px;
+ margin: 0 0 3px 0;
+}
+
+video::-webkit-media-controls-volume-slider {
+ -webkit-appearance: media-volume-slider;
+ display: none;
+}
+
+audio::-webkit-media-controls-seek-back-button, video::-webkit-media-controls-seek-back-button {
+ display: none;
+}
+
+audio::-webkit-media-controls-seek-forward-button, video::-webkit-media-controls-seek-forward-button {
+ display: none;
+}
+
+audio::-webkit-media-controls-fullscreen-button {
+ position: absolute;
+ top: 0px;
+ right: 0px;
+ width: 12px;
+ height: 12px;
+ padding: 6px;
+ margin: 5px 5px 5px 3px;
+}
+
+video::-webkit-media-controls-fullscreen-button {
+ display: none;
+}
+
+audio::-webkit-media-controls-rewind-button, video::-webkit-media-controls-rewind-button {
+ display: none;
+}
+
+audio::-webkit-media-controls-return-to-realtime-button, video::-webkit-media-controls-return-to-realtime-button {
+ display: none;
+}
+
+audio::-webkit-media-controls-toggle-closed-captions-button, video::-webkit-media-controls-toggle-closed-captions-button {
+ display: none;
+}
diff --git a/Source/WebCore/platform/qt/RenderThemeQt.cpp b/Source/WebCore/platform/qt/RenderThemeQt.cpp
index 9a1775c..de3fd8f 100644
--- a/Source/WebCore/platform/qt/RenderThemeQt.cpp
+++ b/Source/WebCore/platform/qt/RenderThemeQt.cpp
@@ -1113,7 +1113,12 @@ ControlPart RenderThemeQt::initializeCommonQStyleOptions(QStyleOption& option, R
String RenderThemeQt::extraMediaControlsStyleSheet()
{
- return String(mediaControlsQtUserAgentStyleSheet, sizeof(mediaControlsQtUserAgentStyleSheet));
+ String result = String(mediaControlsQtUserAgentStyleSheet, sizeof(mediaControlsQtUserAgentStyleSheet));
+
+ if (m_page && m_page->chrome()->requiresFullscreenForVideoPlayback())
+ result += String(mediaControlsQtFullscreenUserAgentStyleSheet, sizeof(mediaControlsQtFullscreenUserAgentStyleSheet));
+
+ return result;
}
// Helper class to transform the painter's world matrix to the object's content area, scaled to 0,0,100,100
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list