<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[45474] trunk</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/45474">45474</a></dd>
<dt>Author</dt> <dd>eric.carlson@apple.com</dd>
<dt>Date</dt> <dd>2009-07-02 08:47:55 -0700 (Thu, 02 Jul 2009)</dd>
</dl>

<h3>Log Message</h3>
<pre>2009-07-02  Pierre d'Herbemont  &lt;pdherbemont@apple.com&gt;

        Reviewed by Simon Fraser.

        &lt;rdar://problem/6518119&gt;

        Add a rewind button and hide the timeline for live broadcasts when
        in MediaUI mode.

        * css/CSSPrimitiveValueMappings.h: 
        (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Add the new pseudo element.

        * css/CSSSelector.cpp:
        (WebCore::CSSSelector::extractPseudoType): Ditto.
        * css/CSSSelector.h: 

        * css/CSSStyleSelector.cpp:
        (WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector): Ditto.

        * css/CSSValueKeywords.in: Ditto.
        * css/mediaControls.css: Ditto.
        * css/mediaControlsQT.css: Ditto.

        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::rewind): New.
        (WebCore::HTMLMediaElement::returnToRealTime): New.
        (WebCore::HTMLMediaElement::isStreaming): New.
        * html/HTMLMediaElement.h:

        * page/mac/WebCoreViewFactory.h: Declare mediaElementLoadingStateText and mediaElementLiveBroadcastStateText.

        * platform/LocalizedStrings.h: Add localized media state messages.

        * platform/ThemeTypes.h: Add the new pseudo element.

        * platform/mac/LocalizedStringsMac.mm: 
        (WebCore::mediaElementLoadingStateText): Add localized media state.
        (WebCore::mediaElementLiveBroadcastStateText): Ditto.

        * platform/mac/WebCoreSystemInterface.h: Change BOOL param wkDrawMediaUIPart to an int to support
           multiple states.
        * platform/mac/WebCoreSystemInterface.mm: Ditto.

        * rendering/MediaControlElements.cpp: 
        (WebCore::MediaControlElement::MediaControlElement): Deal with new elements.
        (WebCore::MediaControlElement::attachToParent): Ditto.
        (WebCore::MediaControlElement::update): Ditto.
        (WebCore::MediaControlElement::updateStyle): Ditto.
        (WebCore::MediaControlTimelineContainerElement::MediaControlTimelineContainerElement): Ditto.
        (WebCore::MediaControlTimelineContainerElement::rendererIsNeeded): Ditto.
        (WebCore::MediaControlStatusDisplayElement::MediaControlStatusDisplayElement): Ditto.
        (WebCore::MediaControlStatusDisplayElement::update): Ditto.
        (WebCore::MediaControlStatusDisplayElement::rendererIsNeeded): Ditto.
        (WebCore::MediaControlInputElement::MediaControlInputElement): Ditto.
        (WebCore::MediaControlInputElement::attachToParent): Ditto.
        (WebCore::MediaControlInputElement::updateStyle): Ditto.
        (WebCore::MediaControlRewindButtonElement::MediaControlRewindButtonElement): Ditto.
        (WebCore::MediaControlRewindButtonElement::defaultEventHandler): Ditto.
        (WebCore::MediaControlReturnToRealtimeButtonElement::MediaControlReturnToRealtimeButtonElement): Ditto.
        (WebCore::MediaControlReturnToRealtimeButtonElement::defaultEventHandler): Ditto.
        (WebCore::MediaControlReturnToRealtimeButtonElement::rendererIsNeeded): Ditto.
        (WebCore::MediaControlTimelineElement::defaultEventHandler): Ditto.
        (WebCore::MediaControlTimelineElement::update): Ditto.
        (WebCore::MediaControlFullscreenButtonElement::rendererIsNeeded): Ditto.
        * rendering/MediaControlElements.h: Ditto.

        * rendering/RenderMedia.cpp: 
        (WebCore::RenderMedia::styleDidChange): Deal with the new elements.
        (WebCore::RenderMedia::createPanel): Ditto.
        (WebCore::RenderMedia::createRewindButton): Ditto.
        (WebCore::RenderMedia::createReturnToRealtimeButton): Ditto.
        (WebCore::RenderMedia::createStatusDisplay): Ditto.
        (WebCore::RenderMedia::createTimelineContainer): Ditto.
        (WebCore::RenderMedia::createCurrentTimeDisplay): Ditto.
        (WebCore::RenderMedia::createTimeRemainingDisplay): Ditto.
        (WebCore::RenderMedia::updateControls): Ditto.
        (WebCore::RenderMedia::forwardEvent): Ditto.
        * rendering/RenderMedia.h:

        * rendering/RenderTheme.cpp:
        (WebCore::RenderTheme::paint): Deal with the new elements.

        * rendering/RenderTheme.h:
        (WebCore::RenderTheme::paintMediaRewindButton): Deal with the new elements.
        (WebCore::RenderTheme::paintMediaReturnToRealtimeButton): Ditto.
        (WebCore::RenderTheme::paintMediaControlsBackground): Ditto.

        * rendering/RenderThemeMac.h:
        * rendering/RenderThemeMac.mm:
        (WebCore::RenderThemeMac::paintMediaRewindButton): Deal with the new elements.
        (WebCore::RenderThemeMac::paintMediaReturnToRealtimeButton): Ditto.
        (WebCore::RenderThemeMac::paintMediaControlsBackground): Ditto.

        * rendering/style/RenderStyleConstants.h: Add constants for the new elements.

2009-07-02  Pierre d'Herbemont  &lt;pdherbemont@apple.com&gt;

        Reviewed by Simon Fraser.

        &lt;rdar://problem/6518119&gt;

        Add localized strings for media controller status messages.

        * English.lproj/Localizable.strings: Localized text.

2009-07-02  Pierre d'Herbemont  &lt;pdherbemont@apple.com&gt;

        Reviewed by Simon Fraser.

        &lt;rdar://problem/6518119&gt;

        Add localized strings for media controller status.

        * WebCoreSupport/WebViewFactory.mm: Add new localized text.
        (-[WebViewFactory mediaElementLoadingStateText]):
        (-[WebViewFactory mediaElementLiveBroadcastStateText]):

2009-07-02  Pierre d'Herbemont  &lt;pdherbemont@apple.com&gt;

        Reviewed by Simon Fraser.

        Update WebKitSystemInterface for &lt;rdar://problem/6518119&gt;

        * WebKitSystemInterface.h:
        * libWebKitSystemInterfaceLeopard.a:
        * libWebKitSystemInterfaceSnowLeopard.a:
        * libWebKitSystemInterfaceTiger.a:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsmediavideoemptysourcehtml">trunk/LayoutTests/media/video-empty-source.html</a></li>
<li><a href="#trunkWebCoreChangeLog">trunk/WebCore/ChangeLog</a></li>
<li><a href="#trunkWebCorecssCSSPrimitiveValueMappingsh">trunk/WebCore/css/CSSPrimitiveValueMappings.h</a></li>
<li><a href="#trunkWebCorecssCSSSelectorcpp">trunk/WebCore/css/CSSSelector.cpp</a></li>
<li><a href="#trunkWebCorecssCSSSelectorh">trunk/WebCore/css/CSSSelector.h</a></li>
<li><a href="#trunkWebCorecssCSSStyleSelectorcpp">trunk/WebCore/css/CSSStyleSelector.cpp</a></li>
<li><a href="#trunkWebCorecssCSSValueKeywordsin">trunk/WebCore/css/CSSValueKeywords.in</a></li>
<li><a href="#trunkWebCorecssmediaControlscss">trunk/WebCore/css/mediaControls.css</a></li>
<li><a href="#trunkWebCorecssmediaControlsQTcss">trunk/WebCore/css/mediaControlsQT.css</a></li>
<li><a href="#trunkWebCorehtmlHTMLMediaElementcpp">trunk/WebCore/html/HTMLMediaElement.cpp</a></li>
<li><a href="#trunkWebCorehtmlHTMLMediaElementh">trunk/WebCore/html/HTMLMediaElement.h</a></li>
<li><a href="#trunkWebCorepagemacWebCoreViewFactoryh">trunk/WebCore/page/mac/WebCoreViewFactory.h</a></li>
<li><a href="#trunkWebCoreplatformLocalizedStringsh">trunk/WebCore/platform/LocalizedStrings.h</a></li>
<li><a href="#trunkWebCoreplatformThemeTypesh">trunk/WebCore/platform/ThemeTypes.h</a></li>
<li><a href="#trunkWebCoreplatformmacLocalizedStringsMacmm">trunk/WebCore/platform/mac/LocalizedStringsMac.mm</a></li>
<li><a href="#trunkWebCoreplatformmacWebCoreSystemInterfaceh">trunk/WebCore/platform/mac/WebCoreSystemInterface.h</a></li>
<li><a href="#trunkWebCoreplatformmacWebCoreSystemInterfacemm">trunk/WebCore/platform/mac/WebCoreSystemInterface.mm</a></li>
<li><a href="#trunkWebCorerenderingMediaControlElementscpp">trunk/WebCore/rendering/MediaControlElements.cpp</a></li>
<li><a href="#trunkWebCorerenderingMediaControlElementsh">trunk/WebCore/rendering/MediaControlElements.h</a></li>
<li><a href="#trunkWebCorerenderingRenderMediacpp">trunk/WebCore/rendering/RenderMedia.cpp</a></li>
<li><a href="#trunkWebCorerenderingRenderMediah">trunk/WebCore/rendering/RenderMedia.h</a></li>
<li><a href="#trunkWebCorerenderingRenderThemecpp">trunk/WebCore/rendering/RenderTheme.cpp</a></li>
<li><a href="#trunkWebCorerenderingRenderThemeh">trunk/WebCore/rendering/RenderTheme.h</a></li>
<li><a href="#trunkWebCorerenderingRenderThemeMach">trunk/WebCore/rendering/RenderThemeMac.h</a></li>
<li><a href="#trunkWebCorerenderingRenderThemeMacmm">trunk/WebCore/rendering/RenderThemeMac.mm</a></li>
<li><a href="#trunkWebCorerenderingstyleRenderStyleConstantsh">trunk/WebCore/rendering/style/RenderStyleConstants.h</a></li>
<li><a href="#trunkWebKitChangeLog">trunk/WebKit/ChangeLog</a></li>
<li><a href="#trunkWebKitEnglishlprojLocalizablestrings">trunk/WebKit/English.lproj/Localizable.strings</a></li>
<li><a href="#trunkWebKitmacChangeLog">trunk/WebKit/mac/ChangeLog</a></li>
<li><a href="#trunkWebKitmacWebCoreSupportWebViewFactorymm">trunk/WebKit/mac/WebCoreSupport/WebViewFactory.mm</a></li>
<li><a href="#trunkWebKitLibrariesChangeLog">trunk/WebKitLibraries/ChangeLog</a></li>
<li><a href="#trunkWebKitLibrariesWebKitSystemInterfaceh">trunk/WebKitLibraries/WebKitSystemInterface.h</a></li>
<li><a href="#trunkWebKitLibrarieslibWebKitSystemInterfaceLeoparda">trunk/WebKitLibraries/libWebKitSystemInterfaceLeopard.a</a></li>
<li><a href="#trunkWebKitLibrarieslibWebKitSystemInterfaceSnowLeoparda">trunk/WebKitLibraries/libWebKitSystemInterfaceSnowLeopard.a</a></li>
<li><a href="#trunkWebKitLibrarieslibWebKitSystemInterfaceTigera">trunk/WebKitLibraries/libWebKitSystemInterfaceTiger.a</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (45473 => 45474)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2009-07-02 14:15:35 UTC (rev 45473)
+++ trunk/LayoutTests/ChangeLog        2009-07-02 15:47:55 UTC (rev 45474)
</span><span class="lines">@@ -1,3 +1,14 @@
</span><ins>+2009-07-02  Eric Carlson  &lt;eric.carlson@apple.com&gt;
+
+        Reviewed by Simon Fraser.
+
+        &lt;rdar://problem/6518119&gt;
+
+        Delay dumping the render tree because the media controller may not be done with
+        layout immediately.
+
+        * media/video-empty-source.html:
+
</ins><span class="cx"> 2009-07-02  Antonio Gomes   &lt;antonio.gomes@openbossa.org&gt;
</span><span class="cx"> 
</span><span class="cx">         Reviewed by Simon Hausmann.
</span></span></pre></div>
<a id="trunkLayoutTestsmediavideoemptysourcehtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/media/video-empty-source.html (45473 => 45474)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/media/video-empty-source.html        2009-07-02 14:15:35 UTC (rev 45473)
+++ trunk/LayoutTests/media/video-empty-source.html        2009-07-02 15:47:55 UTC (rev 45474)
</span><span class="lines">@@ -1,5 +1,18 @@
</span><del>-&lt;body&gt;
-&lt;p&gt;Slider drawing with no source. The controls should render correctly.&lt;/p&gt;
-&lt;video src=&quot;&quot; controls style=&quot;border:1px solid black&quot;&gt;&lt;/video&gt;
-&lt;/div&gt;
-&lt;/body&gt;
</del><ins>+&lt;html&gt;
+    &lt;head&gt;
+        &lt;script&gt;
+            if (window.layoutTestController)
+                layoutTestController.waitUntilDone();
+    
+            function test()
+            {
+                if (window.layoutTestController)
+                    layoutTestController.notifyDone();
+            }
+        &lt;/script&gt;
+    &lt;/head&gt;
+    &lt;body onload=&quot;setTimeout(test, 250)&quot;&gt;
+        &lt;p&gt;Slider drawing with no source. The controls should render correctly.&lt;/p&gt;
+        &lt;video src=&quot;&quot; controls style=&quot;border:1px solid black&quot;&gt;&lt;/video&gt;
+    &lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/ChangeLog (45473 => 45474)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/ChangeLog        2009-07-02 14:15:35 UTC (rev 45473)
+++ trunk/WebCore/ChangeLog        2009-07-02 15:47:55 UTC (rev 45474)
</span><span class="lines">@@ -1,3 +1,98 @@
</span><ins>+2009-07-02  Pierre d'Herbemont  &lt;pdherbemont@apple.com&gt;
+
+        Reviewed by Simon Fraser.
+
+        &lt;rdar://problem/6518119&gt;
+
+        Add a rewind button and hide the timeline for live broadcasts when
+        in MediaUI mode.
+
+        * css/CSSPrimitiveValueMappings.h: 
+        (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Add the new pseudo element.
+
+        * css/CSSSelector.cpp:
+        (WebCore::CSSSelector::extractPseudoType): Ditto.
+        * css/CSSSelector.h: 
+
+        * css/CSSStyleSelector.cpp:
+        (WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector): Ditto.
+
+        * css/CSSValueKeywords.in: Ditto.
+        * css/mediaControls.css: Ditto.
+        * css/mediaControlsQT.css: Ditto.
+
+        * html/HTMLMediaElement.cpp:
+        (WebCore::HTMLMediaElement::rewind): New.
+        (WebCore::HTMLMediaElement::returnToRealTime): New.
+        (WebCore::HTMLMediaElement::isStreaming): New.
+        * html/HTMLMediaElement.h:
+
+        * page/mac/WebCoreViewFactory.h: Declare mediaElementLoadingStateText and mediaElementLiveBroadcastStateText.
+
+        * platform/LocalizedStrings.h: Add localized media state messages.
+
+        * platform/ThemeTypes.h: Add the new pseudo element.
+
+        * platform/mac/LocalizedStringsMac.mm: 
+        (WebCore::mediaElementLoadingStateText): Add localized media state.
+        (WebCore::mediaElementLiveBroadcastStateText): Ditto.
+
+        * platform/mac/WebCoreSystemInterface.h: Change BOOL param wkDrawMediaUIPart to an int to support
+           multiple states.
+        * platform/mac/WebCoreSystemInterface.mm: Ditto.
+
+        * rendering/MediaControlElements.cpp: 
+        (WebCore::MediaControlElement::MediaControlElement): Deal with new elements.
+        (WebCore::MediaControlElement::attachToParent): Ditto.
+        (WebCore::MediaControlElement::update): Ditto.
+        (WebCore::MediaControlElement::updateStyle): Ditto.
+        (WebCore::MediaControlTimelineContainerElement::MediaControlTimelineContainerElement): Ditto.
+        (WebCore::MediaControlTimelineContainerElement::rendererIsNeeded): Ditto.
+        (WebCore::MediaControlStatusDisplayElement::MediaControlStatusDisplayElement): Ditto.
+        (WebCore::MediaControlStatusDisplayElement::update): Ditto.
+        (WebCore::MediaControlStatusDisplayElement::rendererIsNeeded): Ditto.
+        (WebCore::MediaControlInputElement::MediaControlInputElement): Ditto.
+        (WebCore::MediaControlInputElement::attachToParent): Ditto.
+        (WebCore::MediaControlInputElement::updateStyle): Ditto.
+        (WebCore::MediaControlRewindButtonElement::MediaControlRewindButtonElement): Ditto.
+        (WebCore::MediaControlRewindButtonElement::defaultEventHandler): Ditto.
+        (WebCore::MediaControlReturnToRealtimeButtonElement::MediaControlReturnToRealtimeButtonElement): Ditto.
+        (WebCore::MediaControlReturnToRealtimeButtonElement::defaultEventHandler): Ditto.
+        (WebCore::MediaControlReturnToRealtimeButtonElement::rendererIsNeeded): Ditto.
+        (WebCore::MediaControlTimelineElement::defaultEventHandler): Ditto.
+        (WebCore::MediaControlTimelineElement::update): Ditto.
+        (WebCore::MediaControlFullscreenButtonElement::rendererIsNeeded): Ditto.
+        * rendering/MediaControlElements.h: Ditto.
+
+        * rendering/RenderMedia.cpp: 
+        (WebCore::RenderMedia::styleDidChange): Deal with the new elements.
+        (WebCore::RenderMedia::createPanel): Ditto.
+        (WebCore::RenderMedia::createRewindButton): Ditto.
+        (WebCore::RenderMedia::createReturnToRealtimeButton): Ditto.
+        (WebCore::RenderMedia::createStatusDisplay): Ditto.
+        (WebCore::RenderMedia::createTimelineContainer): Ditto.
+        (WebCore::RenderMedia::createCurrentTimeDisplay): Ditto.
+        (WebCore::RenderMedia::createTimeRemainingDisplay): Ditto.
+        (WebCore::RenderMedia::updateControls): Ditto.
+        (WebCore::RenderMedia::forwardEvent): Ditto.
+        * rendering/RenderMedia.h:
+
+        * rendering/RenderTheme.cpp:
+        (WebCore::RenderTheme::paint): Deal with the new elements.
+
+        * rendering/RenderTheme.h:
+        (WebCore::RenderTheme::paintMediaRewindButton): Deal with the new elements.
+        (WebCore::RenderTheme::paintMediaReturnToRealtimeButton): Ditto.
+        (WebCore::RenderTheme::paintMediaControlsBackground): Ditto.
+
+        * rendering/RenderThemeMac.h:
+        * rendering/RenderThemeMac.mm:
+        (WebCore::RenderThemeMac::paintMediaRewindButton): Deal with the new elements.
+        (WebCore::RenderThemeMac::paintMediaReturnToRealtimeButton): Ditto.
+        (WebCore::RenderThemeMac::paintMediaControlsBackground): Ditto.
+
+        * rendering/style/RenderStyleConstants.h: Add constants for the new elements.
+
</ins><span class="cx"> 2009-07-01  John Abd-El-Malek  &lt;jam@chromium.org&gt;
</span><span class="cx"> 
</span><span class="cx">         Reviewed by Darin Fisher.
</span></span></pre></div>
<a id="trunkWebCorecssCSSPrimitiveValueMappingsh"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/css/CSSPrimitiveValueMappings.h (45473 => 45474)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/css/CSSPrimitiveValueMappings.h        2009-07-02 14:15:35 UTC (rev 45473)
+++ trunk/WebCore/css/CSSPrimitiveValueMappings.h        2009-07-02 15:47:55 UTC (rev 45474)
</span><span class="lines">@@ -215,14 +215,20 @@
</span><span class="cx">         case MediaSeekForwardButtonPart:
</span><span class="cx">             m_value.ident = CSSValueMediaSeekForwardButton;
</span><span class="cx">             break;
</span><ins>+        case MediaRewindButtonPart:
+            m_value.ident = CSSValueMediaRewindButton;
+            break;
+        case MediaReturnToRealtimeButtonPart:
+            m_value.ident = CSSValueMediaReturnToRealtimeButton;
+            break;
</ins><span class="cx">         case MediaSliderPart:
</span><span class="cx">             m_value.ident = CSSValueMediaSlider;
</span><span class="cx">             break;
</span><span class="cx">         case MediaSliderThumbPart:
</span><span class="cx">             m_value.ident = CSSValueMediaSliderthumb;
</span><span class="cx">             break;
</span><del>-        case MediaTimelineContainerPart:
-            m_value.ident = CSSValueMediaTimelineContainer;
</del><ins>+        case MediaControlsBackgroundPart:
+            m_value.ident = CSSValueMediaControlsBackground;
</ins><span class="cx">             break;
</span><span class="cx">         case MediaCurrentTimePart:
</span><span class="cx">             m_value.ident = CSSValueMediaCurrentTimeDisplay;
</span></span></pre></div>
<a id="trunkWebCorecssCSSSelectorcpp"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/css/CSSSelector.cpp (45473 => 45474)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/css/CSSSelector.cpp        2009-07-02 14:15:35 UTC (rev 45473)
+++ trunk/WebCore/css/CSSSelector.cpp        2009-07-02 15:47:55 UTC (rev 45474)
</span><span class="lines">@@ -107,6 +107,9 @@
</span><span class="cx">     DEFINE_STATIC_LOCAL(AtomicString, mediaControlsTimeline, (&quot;-webkit-media-controls-timeline&quot;));
</span><span class="cx">     DEFINE_STATIC_LOCAL(AtomicString, mediaControlsSeekBackButton, (&quot;-webkit-media-controls-seek-back-button&quot;));
</span><span class="cx">     DEFINE_STATIC_LOCAL(AtomicString, mediaControlsSeekForwardButton, (&quot;-webkit-media-controls-seek-forward-button&quot;));
</span><ins>+    DEFINE_STATIC_LOCAL(AtomicString, mediaControlsRewindButton, (&quot;-webkit-media-controls-rewind-button&quot;));
+    DEFINE_STATIC_LOCAL(AtomicString, mediaControlsReturnToRealtimeButton, (&quot;-webkit-media-controls-return-to-realtime-button&quot;));
+    DEFINE_STATIC_LOCAL(AtomicString, mediaControlsStatusDisplay, (&quot;-webkit-media-controls-status-display&quot;));
</ins><span class="cx">     DEFINE_STATIC_LOCAL(AtomicString, mediaControlsFullscreenButton, (&quot;-webkit-media-controls-fullscreen-button&quot;));
</span><span class="cx">     DEFINE_STATIC_LOCAL(AtomicString, mediaControlsTimelineContainer, (&quot;-webkit-media-controls-timeline-container&quot;));
</span><span class="cx">     DEFINE_STATIC_LOCAL(AtomicString, mediaControlsCurrentTimeDisplay, (&quot;-webkit-media-controls-current-time-display&quot;));
</span><span class="lines">@@ -236,6 +239,15 @@
</span><span class="cx">     } else if (m_value == mediaControlsSeekForwardButton) {
</span><span class="cx">         m_pseudoType = PseudoMediaControlsSeekForwardButton;
</span><span class="cx">         element = true;
</span><ins>+    } else if (m_value == mediaControlsRewindButton) {
+        m_pseudoType = PseudoMediaControlsRewindButton;
+        element = true;
+    } else if (m_value == mediaControlsReturnToRealtimeButton) {
+        m_pseudoType = PseudoMediaControlsReturnToRealtimeButton;
+        element = true;
+    } else if (m_value == mediaControlsStatusDisplay) {
+        m_pseudoType = PseudoMediaControlsStatusDisplay;
+        element = true;
</ins><span class="cx">     } else if (m_value == mediaControlsFullscreenButton) {
</span><span class="cx">         m_pseudoType = PseudoMediaControlsFullscreenButton;
</span><span class="cx">         element = true;
</span></span></pre></div>
<a id="trunkWebCorecssCSSSelectorh"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/css/CSSSelector.h (45473 => 45474)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/css/CSSSelector.h        2009-07-02 14:15:35 UTC (rev 45473)
+++ trunk/WebCore/css/CSSSelector.h        2009-07-02 15:47:55 UTC (rev 45474)
</span><span class="lines">@@ -173,6 +173,9 @@
</span><span class="cx">             PseudoMediaControlsTimeline,
</span><span class="cx">             PseudoMediaControlsSeekBackButton,
</span><span class="cx">             PseudoMediaControlsSeekForwardButton,
</span><ins>+            PseudoMediaControlsRewindButton,
+            PseudoMediaControlsReturnToRealtimeButton,
+            PseudoMediaControlsStatusDisplay,
</ins><span class="cx">             PseudoMediaControlsFullscreenButton
</span><span class="cx">         };
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkWebCorecssCSSStyleSelectorcpp"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/css/CSSStyleSelector.cpp (45473 => 45474)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/css/CSSStyleSelector.cpp        2009-07-02 14:15:35 UTC (rev 45473)
+++ trunk/WebCore/css/CSSStyleSelector.cpp        2009-07-02 15:47:55 UTC (rev 45474)
</span><span class="lines">@@ -2497,6 +2497,15 @@
</span><span class="cx">             case CSSSelector::PseudoMediaControlsSeekForwardButton:
</span><span class="cx">                 dynamicPseudo = MEDIA_CONTROLS_SEEK_FORWARD_BUTTON;
</span><span class="cx">                 return true;
</span><ins>+            case CSSSelector::PseudoMediaControlsRewindButton:
+                dynamicPseudo = MEDIA_CONTROLS_REWIND_BUTTON;
+                return true;
+            case CSSSelector::PseudoMediaControlsReturnToRealtimeButton:
+                dynamicPseudo = MEDIA_CONTROLS_RETURN_TO_REALTIME_BUTTON;
+                return true;
+            case CSSSelector::PseudoMediaControlsStatusDisplay:
+                dynamicPseudo = MEDIA_CONTROLS_STATUS_DISPLAY;
+                return true;
</ins><span class="cx">             case CSSSelector::PseudoMediaControlsFullscreenButton:
</span><span class="cx">                 dynamicPseudo = MEDIA_CONTROLS_FULLSCREEN_BUTTON;
</span><span class="cx">                 return true;
</span></span></pre></div>
<a id="trunkWebCorecssCSSValueKeywordsin"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/css/CSSValueKeywords.in (45473 => 45474)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/css/CSSValueKeywords.in        2009-07-02 14:15:35 UTC (rev 45473)
+++ trunk/WebCore/css/CSSValueKeywords.in        2009-07-02 15:47:55 UTC (rev 45474)
</span><span class="lines">@@ -504,9 +504,11 @@
</span><span class="cx"> media-play-button
</span><span class="cx"> media-seek-back-button
</span><span class="cx"> media-seek-forward-button
</span><ins>+media-rewind-button
+media-return-to-realtime-button
</ins><span class="cx"> media-slider
</span><span class="cx"> media-sliderthumb
</span><del>-media-timeline-container
</del><ins>+media-controls-background
</ins><span class="cx"> media-current-time-display
</span><span class="cx"> media-time-remaining-display
</span><span class="cx"> menulist
</span></span></pre></div>
<a id="trunkWebCorecssmediaControlscss"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/css/mediaControls.css (45473 => 45474)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/css/mediaControls.css        2009-07-02 14:15:35 UTC (rev 45473)
+++ trunk/WebCore/css/mediaControls.css        2009-07-02 15:47:55 UTC (rev 45474)
</span><span class="lines">@@ -32,6 +32,7 @@
</span><span class="cx"> audio::-webkit-media-controls-panel, video::-webkit-media-controls-panel {
</span><span class="cx">     display: -webkit-box;
</span><span class="cx">     -webkit-box-orient: horizontal;
</span><ins>+    -webkit-box-align: center;
</ins><span class="cx">     -webkit-user-select: none;
</span><span class="cx">     position: absolute;
</span><span class="cx">     bottom: 0;
</span><span class="lines">@@ -61,7 +62,7 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> audio::-webkit-media-controls-timeline-container, video::-webkit-media-controls-timeline-container {
</span><del>-    -webkit-appearance: media-timeline-container;
</del><ins>+    -webkit-appearance: media-controls-background;
</ins><span class="cx">     display: -webkit-box;
</span><span class="cx">     -webkit-box-orient: horizontal;
</span><span class="cx">     -webkit-box-align: center;
</span><span class="lines">@@ -102,6 +103,16 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> audio::-webkit-media-controls-fullscreen-button, video::-webkit-media-controls-fullscreen-button {
</span><ins>+    -webkit-appearance: media-fullscreen-button;
+    display: -webkit-box;
+    width: 16px;
+    height: 16px;
+}
+
+audio::-webkit-media-controls-rewind-button, video::-webkit-media-controls-rewind-button {
</ins><span class="cx">     display: none;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+audio::-webkit-media-controls-return-to-realtime-button, video::-webkit-media-controls-return-to-realtime-button {
+    display: none;
+}
</ins></span></pre></div>
<a id="trunkWebCorecssmediaControlsQTcss"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/css/mediaControlsQT.css (45473 => 45474)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/css/mediaControlsQT.css        2009-07-02 14:15:35 UTC (rev 45473)
+++ trunk/WebCore/css/mediaControlsQT.css        2009-07-02 15:47:55 UTC (rev 45474)
</span><span class="lines">@@ -31,6 +31,7 @@
</span><span class="cx"> 
</span><span class="cx"> audio::-webkit-media-controls-panel, video::-webkit-media-controls-panel {
</span><span class="cx">     /* In mediaControls.css */
</span><ins>+    -webkit-appearance: media-controls-background;
</ins><span class="cx">     height: 25px;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -39,17 +40,22 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> audio::-webkit-media-controls-mute-button, video::-webkit-media-controls-mute-button {
</span><del>-    -webkit-box-ordinal-group: 2; /* At the end of the controller bar */
-    width: 30px;
-    height: 25px;
</del><ins>+    -webkit-box-ordinal-group: 2; /* Before the fullscreen button */
+    width: 16px;
+    height: 16px;
+    margin-left: 7px;
+    margin-right: 7px;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> audio::-webkit-media-controls-play-button, video::-webkit-media-controls-play-button {
</span><del>-    width: 30px;
-    height: 25px;
</del><ins>+    width: 16px;
+    height: 16px;
+    margin-left: 7px;
+    margin-right: 7px;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> audio::-webkit-media-controls-timeline-container, video::-webkit-media-controls-timeline-container {
</span><ins>+    -webkit-appearance: none;
</ins><span class="cx">     height: 25px;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -63,7 +69,7 @@
</span><span class="cx">     text-align: center;
</span><span class="cx">     overflow: hidden;
</span><span class="cx">     line-height: 13px;
</span><del>-    height: 14px;
</del><ins>+    height: 13px;
</ins><span class="cx">     width: 45px;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -77,7 +83,7 @@
</span><span class="cx">     text-align: center;
</span><span class="cx">     overflow: hidden;
</span><span class="cx">     line-height: 13px;
</span><del>-    height: 14px;
</del><ins>+    height: 13px;
</ins><span class="cx">     width: 45px;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -96,5 +102,41 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> audio::-webkit-media-controls-fullscreen-button, video::-webkit-media-controls-fullscreen-button {
</span><del>-    display: none;
</del><ins>+    width: 16px;
+    height: 16px;
+    margin-left: 7px;
+    margin-right: 7px;
+    -webkit-box-ordinal-group: 3; /* At the very end */
</ins><span class="cx"> }
</span><ins>+
+audio::-webkit-media-controls-rewind-button, video::-webkit-media-controls-rewind-button {
+    -webkit-appearance: media-rewind-button;
+    display: -webkit-box;
+    width: 16px;
+    height: 16px;
+    margin-left: 7px;
+    margin-right: 7px;
+}
+
+audio::-webkit-media-controls-return-to-realtime-button, video::-webkit-media-controls-return-to-realtime-button {
+    -webkit-appearance: media-return-to-realtime-button;
+    display: -webkit-box;
+    width: 16px;
+    height: 16px;
+    margin-left: 7px;
+    margin-right: 7px;
+}
+
+audio::-webkit-media-controls-status-display, video::-webkit-media-controls-status-display {
+    -webkit-user-select: none;
+    display: -webkit-box;
+    -webkit-box-flex: 1;
+    font: -webkit-small-control;
+    color: white;
+    font-size: 0.6em;
+    line-height: 13px;
+    overflow: hidden;
+    text-shadow: 1px 1px 0px black;
+    margin-left: 10px;
+    margin-right: 10px;
+}
</ins></span></pre></div>
<a id="trunkWebCorehtmlHTMLMediaElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/html/HTMLMediaElement.cpp (45473 => 45474)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/html/HTMLMediaElement.cpp        2009-07-02 14:15:35 UTC (rev 45473)
+++ trunk/WebCore/html/HTMLMediaElement.cpp        2009-07-02 15:47:55 UTC (rev 45474)
</span><span class="lines">@@ -837,6 +837,18 @@
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void HTMLMediaElement::rewind(float timeDelta)
+{
+    ExceptionCode e;
+    setCurrentTime(max(currentTime() - timeDelta, minTimeSeekable()), e);
+}
+
+void HTMLMediaElement::returnToRealtime()
+{
+    ExceptionCode e;
+    setCurrentTime(maxTimeSeekable(), e);
+}  
+    
</ins><span class="cx"> void HTMLMediaElement::seek(float time, ExceptionCode&amp; ec)
</span><span class="cx"> {
</span><span class="cx">     // 4.8.10.10. Seeking
</span><span class="lines">@@ -889,6 +901,12 @@
</span><span class="cx">     return m_readyState;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+bool HTMLMediaElement::isStreaming() const
+{
+    MediaPlayer::MovieLoadType loadType = m_player ? m_player-&gt;movieLoadType() : MediaPlayer::Unknown;
+    return loadType == MediaPlayer::LiveStream;
+}
+
</ins><span class="cx"> bool HTMLMediaElement::seeking() const
</span><span class="cx"> {
</span><span class="cx">     return m_seeking;
</span><span class="lines">@@ -1406,9 +1424,9 @@
</span><span class="cx"> PassRefPtr&lt;TimeRanges&gt; HTMLMediaElement::seekable() const
</span><span class="cx"> {
</span><span class="cx">     // FIXME real ranges support
</span><del>-    if (!m_player || !m_player-&gt;maxTimeSeekable())
</del><ins>+    if (!maxTimeSeekable())
</ins><span class="cx">         return TimeRanges::create();
</span><del>-    return TimeRanges::create(0, m_player-&gt;maxTimeSeekable());
</del><ins>+    return TimeRanges::create(minTimeSeekable(), maxTimeSeekable());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool HTMLMediaElement::potentiallyPlaying() const
</span><span class="lines">@@ -1442,6 +1460,16 @@
</span><span class="cx">     return false;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+float HTMLMediaElement::minTimeSeekable() const
+{
+    return 0;
+}
+
+float HTMLMediaElement::maxTimeSeekable() const
+{
+    return m_player ? m_player-&gt;maxTimeSeekable() : 0;
+}
+    
</ins><span class="cx"> void HTMLMediaElement::updateVolume()
</span><span class="cx"> {
</span><span class="cx">     if (!m_player)
</span></span></pre></div>
<a id="trunkWebCorehtmlHTMLMediaElementh"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/html/HTMLMediaElement.h (45473 => 45474)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/html/HTMLMediaElement.h        2009-07-02 14:15:35 UTC (rev 45473)
+++ trunk/WebCore/html/HTMLMediaElement.h        2009-07-02 15:47:55 UTC (rev 45474)
</span><span class="lines">@@ -66,6 +66,9 @@
</span><span class="cx">     virtual bool isVideo() const { return false; }
</span><span class="cx">     virtual bool hasVideo() const { return false; }
</span><span class="cx"> 
</span><ins>+    void rewind(float timeDelta);
+    void returnToRealtime();
+    
</ins><span class="cx">     virtual bool supportsFullscreen() const { return false; }
</span><span class="cx"> 
</span><span class="cx">     void scheduleLoad();
</span><span class="lines">@@ -95,6 +98,8 @@
</span><span class="cx">     void load(ExceptionCode&amp;);
</span><span class="cx">     String canPlayType(const String&amp; mimeType) const;
</span><span class="cx"> 
</span><ins>+    bool isStreaming() const;
+
</ins><span class="cx"> // ready state
</span><span class="cx">     enum ReadyState { HAVE_NOTHING, HAVE_METADATA, HAVE_CURRENT_DATA, HAVE_FUTURE_DATA, HAVE_ENOUGH_DATA };
</span><span class="cx">     ReadyState readyState() const;
</span><span class="lines">@@ -221,6 +226,9 @@
</span><span class="cx">     bool stoppedDueToErrors() const;
</span><span class="cx">     bool pausedForUserInteraction() const;
</span><span class="cx"> 
</span><ins>+    float minTimeSeekable() const;
+    float maxTimeSeekable() const;
+
</ins><span class="cx">     // Restrictions to change default behaviors. This is a effectively a compile time choice at the moment
</span><span class="cx">     //  because there are no accessor methods.
</span><span class="cx">     enum BehaviorRestrictions 
</span></span></pre></div>
<a id="trunkWebCorepagemacWebCoreViewFactoryh"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/page/mac/WebCoreViewFactory.h (45473 => 45474)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/page/mac/WebCoreViewFactory.h        2009-07-02 14:15:35 UTC (rev 45473)
+++ trunk/WebCore/page/mac/WebCoreViewFactory.h        2009-07-02 15:47:55 UTC (rev 45474)
</span><span class="lines">@@ -141,6 +141,9 @@
</span><span class="cx"> // FTP Directory Related
</span><span class="cx"> - (NSString *)unknownFileSizeText;
</span><span class="cx"> 
</span><ins>+- (NSString *)mediaElementLoadingStateText;
+- (NSString *)mediaElementLiveBroadcastStateText;
+
</ins><span class="cx"> @end
</span><span class="cx"> 
</span><span class="cx"> @interface WebCoreViewFactory : NSObject
</span></span></pre></div>
<a id="trunkWebCoreplatformLocalizedStringsh"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/platform/LocalizedStrings.h (45473 => 45474)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/platform/LocalizedStrings.h        2009-07-02 14:15:35 UTC (rev 45473)
+++ trunk/WebCore/platform/LocalizedStrings.h        2009-07-02 15:47:55 UTC (rev 45474)
</span><span class="lines">@@ -132,6 +132,9 @@
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx">     String imageTitle(const String&amp; filename, const IntSize&amp; size);
</span><ins>+
+    String mediaElementLoadingStateText();
+    String mediaElementLiveBroadcastStateText();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkWebCoreplatformThemeTypesh"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/platform/ThemeTypes.h (45473 => 45474)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/platform/ThemeTypes.h        2009-07-02 14:15:35 UTC (rev 45473)
+++ trunk/WebCore/platform/ThemeTypes.h        2009-07-02 15:47:55 UTC (rev 45474)
</span><span class="lines">@@ -43,12 +43,15 @@
</span><span class="cx"> 
</span><span class="cx"> typedef unsigned ControlStates;
</span><span class="cx"> 
</span><ins>+// Must follow CSSValueKeywords.in order
</ins><span class="cx"> enum ControlPart {
</span><span class="cx">     NoControlPart, CheckboxPart, RadioPart, PushButtonPart, SquareButtonPart, ButtonPart,
</span><span class="cx">     ButtonBevelPart, DefaultButtonPart, ListboxPart, ListItemPart, 
</span><span class="cx">     MediaFullscreenButtonPart, MediaMuteButtonPart, MediaPlayButtonPart, MediaSeekBackButtonPart, 
</span><del>-    MediaSeekForwardButtonPart, MediaSliderPart, MediaSliderThumbPart, MediaTimelineContainerPart,
-    MediaCurrentTimePart, MediaTimeRemainingPart, 
</del><ins>+    MediaSeekForwardButtonPart, MediaRewindButtonPart, MediaReturnToRealtimeButtonPart,
+    MediaSliderPart,
+    MediaSliderThumbPart, MediaControlsBackgroundPart,
+    MediaCurrentTimePart, MediaTimeRemainingPart,
</ins><span class="cx">     MenulistPart, MenulistButtonPart, MenulistTextPart, MenulistTextFieldPart,
</span><span class="cx">     SliderHorizontalPart, SliderVerticalPart, SliderThumbHorizontalPart,
</span><span class="cx">     SliderThumbVerticalPart, CaretPart, SearchFieldPart, SearchFieldDecorationPart,
</span></span></pre></div>
<a id="trunkWebCoreplatformmacLocalizedStringsMacmm"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/platform/mac/LocalizedStringsMac.mm (45473 => 45474)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/platform/mac/LocalizedStringsMac.mm        2009-07-02 14:15:35 UTC (rev 45473)
+++ trunk/WebCore/platform/mac/LocalizedStringsMac.mm        2009-07-02 15:47:55 UTC (rev 45474)
</span><span class="lines">@@ -697,4 +697,20 @@
</span><span class="cx">     return String();
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+String mediaElementLoadingStateText()
+{
+    BEGIN_BLOCK_OBJC_EXCEPTIONS;
+    return [[WebCoreViewFactory sharedFactory] mediaElementLoadingStateText];
+    END_BLOCK_OBJC_EXCEPTIONS;
+    return String();
</ins><span class="cx"> }
</span><ins>+
+String mediaElementLiveBroadcastStateText()
+{
+    BEGIN_BLOCK_OBJC_EXCEPTIONS;
+    return [[WebCoreViewFactory sharedFactory] mediaElementLiveBroadcastStateText];
+    END_BLOCK_OBJC_EXCEPTIONS;
+    return String();
+}
+
+}
</ins></span></pre></div>
<a id="trunkWebCoreplatformmacWebCoreSystemInterfaceh"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/platform/mac/WebCoreSystemInterface.h (45473 => 45474)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/platform/mac/WebCoreSystemInterface.h        2009-07-02 14:15:35 UTC (rev 45473)
+++ trunk/WebCore/platform/mac/WebCoreSystemInterface.h        2009-07-02 15:47:55 UTC (rev 45474)
</span><span class="lines">@@ -105,7 +105,7 @@
</span><span class="cx"> extern NSFont* (*wkGetFontInLanguageForCharacter)(NSFont*, UniChar);
</span><span class="cx"> extern BOOL (*wkGetGlyphTransformedAdvances)(CGFontRef, NSFont*, CGAffineTransform*, ATSGlyphRef*, CGSize* advance);
</span><span class="cx"> extern void (*wkDrawMediaSliderTrack)(int themeStyle, CGContextRef context, CGRect rect, float timeLoaded, float currentTime, float duration);
</span><del>-extern void (*wkDrawMediaUIPart)(int part, int themeStyle, CGContextRef context, CGRect rect, BOOL active);
</del><ins>+extern void (*wkDrawMediaUIPart)(int part, int themeStyle, CGContextRef context, CGRect rect, int state);
</ins><span class="cx"> extern NSString* (*wkGetPreferredExtensionForMIMEType)(NSString*);
</span><span class="cx"> extern NSArray* (*wkGetExtensionsForMIMEType)(NSString*);
</span><span class="cx"> extern NSString* (*wkGetMIMETypeForExtension)(NSString*);
</span></span></pre></div>
<a id="trunkWebCoreplatformmacWebCoreSystemInterfacemm"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/platform/mac/WebCoreSystemInterface.mm (45473 => 45474)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/platform/mac/WebCoreSystemInterface.mm        2009-07-02 14:15:35 UTC (rev 45473)
+++ trunk/WebCore/platform/mac/WebCoreSystemInterface.mm        2009-07-02 15:47:55 UTC (rev 45474)
</span><span class="lines">@@ -41,7 +41,7 @@
</span><span class="cx"> BOOL (*wkGetGlyphTransformedAdvances)(CGFontRef, NSFont*, CGAffineTransform*, ATSGlyphRef*, CGSize* advance);
</span><span class="cx"> void (*wkDrawMediaSliderTrack)(int themeStyle, CGContextRef context, CGRect rect, float timeLoaded, float currentTime, float duration);
</span><span class="cx"> BOOL (*wkHitTestMediaUIPart)(int part, int themeStyle, CGRect bounds, CGPoint point);
</span><del>-void (*wkDrawMediaUIPart)(int part, int themeStyle, CGContextRef context, CGRect rect, BOOL active);
</del><ins>+void (*wkDrawMediaUIPart)(int part, int themeStyle, CGContextRef context, CGRect rect, int state);
</ins><span class="cx"> void (*wkMeasureMediaUIPart)(int part, int themeStyle, CGRect *bounds, CGSize *naturalSize);
</span><span class="cx"> NSString* (*wkGetPreferredExtensionForMIMEType)(NSString*);
</span><span class="cx"> NSArray* (*wkGetExtensionsForMIMEType)(NSString*);
</span></span></pre></div>
<a id="trunkWebCorerenderingMediaControlElementscpp"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/rendering/MediaControlElements.cpp (45473 => 45474)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/rendering/MediaControlElements.cpp        2009-07-02 14:15:35 UTC (rev 45473)
+++ trunk/WebCore/rendering/MediaControlElements.cpp        2009-07-02 15:47:55 UTC (rev 45474)
</span><span class="lines">@@ -32,6 +32,7 @@
</span><span class="cx"> 
</span><span class="cx"> #include &quot;MediaControlElements.h&quot;
</span><span class="cx"> 
</span><ins>+#import &quot;LocalizedStrings.h&quot;
</ins><span class="cx"> #include &quot;EventNames.h&quot;
</span><span class="cx"> #include &quot;FloatConversion.h&quot;
</span><span class="cx"> #include &quot;Frame.h&quot;
</span><span class="lines">@@ -40,6 +41,7 @@
</span><span class="cx"> #include &quot;RenderMedia.h&quot;
</span><span class="cx"> #include &quot;RenderSlider.h&quot;
</span><span class="cx"> #include &quot;RenderTheme.h&quot;
</span><ins>+#include &quot;CString.h&quot;
</ins><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><span class="lines">@@ -73,52 +75,131 @@
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+
</ins><span class="cx"> // ----------------------------
</span><ins>+    
</ins><span class="cx"> 
</span><del>-MediaTextDisplayElement::MediaTextDisplayElement(Document* doc, PseudoId pseudo, HTMLMediaElement* mediaElement) 
</del><ins>+MediaControlElement::MediaControlElement(Document* doc, PseudoId pseudo, HTMLMediaElement* mediaElement) 
</ins><span class="cx">     : HTMLDivElement(divTag, doc)
</span><span class="cx">     , m_mediaElement(mediaElement)
</span><span class="cx">     , m_pseudoStyleId(pseudo)
</span><span class="cx"> {
</span><del>-    RenderStyle* style = m_mediaElement-&gt;renderer()-&gt;getCachedPseudoStyle(m_pseudoStyleId);
-    RenderObject* renderer = createRenderer(m_mediaElement-&gt;renderer()-&gt;renderArena(), style);
-    if (renderer) {
-        setRenderer(renderer);
-        renderer-&gt;setStyle(style);
-    }
-    setAttached();
</del><span class="cx">     setInDocument(true);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void MediaTextDisplayElement::attachToParent(Element* parent)
</del><ins>+void MediaControlElement::attachToParent(Element* parent)
</ins><span class="cx"> {
</span><span class="cx">     parent-&gt;addChild(this);
</span><del>-    if (renderer() &amp;&amp; parent-&gt;renderer())
-        parent-&gt;renderer()-&gt;addChild(renderer());
</del><span class="cx"> }
</span><span class="cx"> 
</span><del>-void MediaTextDisplayElement::update()
</del><ins>+void MediaControlElement::update()
</ins><span class="cx"> {
</span><span class="cx">     if (renderer())
</span><span class="cx">         renderer()-&gt;updateFromElement();
</span><span class="cx">     updateStyle();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void MediaTextDisplayElement::updateStyle()
</del><ins>+void MediaControlElement::updateStyle()
</ins><span class="cx"> {
</span><del>-    if (renderer() &amp;&amp; m_mediaElement-&gt;renderer()) {
-        RenderStyle* style = m_mediaElement-&gt;renderer()-&gt;getCachedPseudoStyle(m_pseudoStyleId);
</del><ins>+    if (!m_mediaElement || !m_mediaElement-&gt;renderer())
+        return;
+
+    RenderStyle* style = m_mediaElement-&gt;renderer()-&gt;getCachedPseudoStyle(m_pseudoStyleId);
+    if (!style)
+        return;
+
+    bool needsRenderer = rendererIsNeeded(style) &amp;&amp; parent() &amp;&amp; parent()-&gt;renderer();
+    if (renderer() &amp;&amp; !needsRenderer)
+        detach();
+    else if (!renderer() &amp;&amp; needsRenderer) {
+        RenderObject* renderer = createRenderer(m_mediaElement-&gt;renderer()-&gt;renderArena(), style);
+        if (!renderer)
+            return;
+        renderer-&gt;setStyle(style);
+        setRenderer(renderer);
+        setAttached();
+        if (parent() &amp;&amp; parent()-&gt;renderer()) {
+            // Find next sibling with a renderer to determine where to insert.
+            Node* sibling = nextSibling();
+            while (sibling &amp;&amp; !sibling-&gt;renderer())
+                sibling = sibling-&gt;nextSibling();
+            parent()-&gt;renderer()-&gt;addChild(renderer, sibling ? sibling-&gt;renderer() : 0);
+        }
+    } else if (renderer())
</ins><span class="cx">         renderer()-&gt;setStyle(style);
</span><ins>+}
+
+// ----------------------------
+
+MediaControlTimelineContainerElement::MediaControlTimelineContainerElement(Document* doc, HTMLMediaElement* element)
+: MediaControlElement(doc, MEDIA_CONTROLS_TIMELINE_CONTAINER, element)
+{
+}
+
+bool MediaControlTimelineContainerElement::rendererIsNeeded(RenderStyle* style)
+{
+    if (!HTMLDivElement::rendererIsNeeded(style))
+        return false;
+
+    // This is for MediaControllerThemeClassic:
+    // If there is no style for MediaControlStatusDisplayElement style, don't hide
+    // the timeline.
+    if (!m_mediaElement-&gt;renderer()-&gt;getCachedPseudoStyle(MEDIA_CONTROLS_STATUS_DISPLAY))
+        return true;
+
+    float duration = m_mediaElement-&gt;duration();
+    return !isnan(duration) &amp;&amp; !isinf(duration);
+}
+
+    
+// ----------------------------
+
+MediaControlStatusDisplayElement::MediaControlStatusDisplayElement(Document* doc, HTMLMediaElement* element)
+: MediaControlElement(doc, MEDIA_CONTROLS_STATUS_DISPLAY, element)
+, m_stateBeingDisplayed(Nothing)
+{
+}
+
+void MediaControlStatusDisplayElement::update()
+{
+    MediaControlElement::update();
+
+    // Get the new state that we'll have to display.
+    StateBeingDisplayed newStateToDisplay = Nothing;
+    if (m_mediaElement-&gt;readyState() != HTMLMediaElement::HAVE_ENOUGH_DATA)
+        newStateToDisplay = Loading;
+    else if (m_mediaElement-&gt;isStreaming())
+        newStateToDisplay = LiveBroadcast;
+
+    // Propagate only if needed.
+    if (newStateToDisplay == m_stateBeingDisplayed)
+        return;
+    m_stateBeingDisplayed = newStateToDisplay;
+
+    ExceptionCode e;
+    switch (m_stateBeingDisplayed) {
+    case Nothing:
+        setInnerText(&quot;&quot;, e);
+        break;
+    case Loading:
+        setInnerText(mediaElementLoadingStateText(), e);
+        break;
+    case LiveBroadcast:
+        setInnerText(mediaElementLiveBroadcastStateText(), e);
+        break;
</ins><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-MediaTimeDisplayElement::MediaTimeDisplayElement(Document* doc, HTMLMediaElement* element, bool currentTime)
-    : MediaTextDisplayElement(doc, currentTime ? MEDIA_CONTROLS_CURRENT_TIME_DISPLAY : MEDIA_CONTROLS_TIME_REMAINING_DISPLAY, element)
</del><ins>+bool MediaControlStatusDisplayElement::rendererIsNeeded(RenderStyle* style)
</ins><span class="cx"> {
</span><ins>+    if (!HTMLDivElement::rendererIsNeeded(style))
+        return false;
+    float duration = m_mediaElement-&gt;duration();
+    return (isnan(duration) || isinf(duration));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> // ----------------------------
</span><del>-
</del><ins>+    
</ins><span class="cx"> MediaControlInputElement::MediaControlInputElement(Document* doc, PseudoId pseudo, const String&amp; type, HTMLMediaElement* mediaElement, MediaControlElementType displayType) 
</span><span class="cx">     : HTMLInputElement(inputTag, doc)
</span><span class="cx">     , m_mediaElement(mediaElement)
</span><span class="lines">@@ -126,15 +207,12 @@
</span><span class="cx">     , m_displayType(displayType)
</span><span class="cx"> {
</span><span class="cx">     setInputType(type);
</span><del>-    updateStyle();
</del><span class="cx">     setInDocument(true);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void MediaControlInputElement::attachToParent(Element* parent)
</span><span class="cx"> {
</span><span class="cx">     parent-&gt;addChild(this);
</span><del>-    if (renderer() &amp;&amp; parent-&gt;renderer())
-        parent-&gt;renderer()-&gt;addChild(renderer());
</del><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void MediaControlInputElement::update()
</span><span class="lines">@@ -149,10 +227,12 @@
</span><span class="cx"> {
</span><span class="cx">     if (!m_mediaElement || !m_mediaElement-&gt;renderer())
</span><span class="cx">         return;
</span><del>-    
</del><ins>+
</ins><span class="cx">     RenderStyle* style = m_mediaElement-&gt;renderer()-&gt;getCachedPseudoStyle(m_pseudoStyleId);
</span><del>-    
-    bool needsRenderer = rendererIsNeeded(style);
</del><ins>+    if (!style)
+        return;
+
+    bool needsRenderer = rendererIsNeeded(style) &amp;&amp; parent() &amp;&amp; parent()-&gt;renderer();
</ins><span class="cx">     if (renderer() &amp;&amp; !needsRenderer)
</span><span class="cx">         detach();
</span><span class="cx">     else if (!renderer() &amp;&amp; needsRenderer) {
</span><span class="lines">@@ -285,6 +365,43 @@
</span><span class="cx"> 
</span><span class="cx"> // ----------------------------
</span><span class="cx"> 
</span><ins>+MediaControlRewindButtonElement::MediaControlRewindButtonElement(Document* doc, HTMLMediaElement* element)
+: MediaControlInputElement(doc, MEDIA_CONTROLS_REWIND_BUTTON, &quot;button&quot;, element, MediaRewindButton)
+{
+}
+
+void MediaControlRewindButtonElement::defaultEventHandler(Event* event)
+{
+    if (event-&gt;type() == eventNames().clickEvent) {
+        m_mediaElement-&gt;rewind(30);
+        event-&gt;setDefaultHandled();
+    }    
+    HTMLInputElement::defaultEventHandler(event);
+}
+
+// ----------------------------
+
+MediaControlReturnToRealtimeButtonElement::MediaControlReturnToRealtimeButtonElement(Document* doc, HTMLMediaElement* element)
+: MediaControlInputElement(doc, MEDIA_CONTROLS_RETURN_TO_REALTIME_BUTTON, &quot;button&quot;, element, MediaReturnToRealtimeButton)
+{
+}
+
+void MediaControlReturnToRealtimeButtonElement::defaultEventHandler(Event* event)
+{
+    if (event-&gt;type() == eventNames().clickEvent) {
+        m_mediaElement-&gt;returnToRealtime();
+        event-&gt;setDefaultHandled();
+    }
+    HTMLInputElement::defaultEventHandler(event);
+}
+
+bool MediaControlReturnToRealtimeButtonElement::rendererIsNeeded(RenderStyle* style)
+{
+    return HTMLInputElement::rendererIsNeeded(style) &amp;&amp; m_mediaElement-&gt;isStreaming();
+}
+
+// ----------------------------
+
</ins><span class="cx"> MediaControlTimelineElement::MediaControlTimelineElement(Document* document, HTMLMediaElement* element)
</span><span class="cx">     : MediaControlInputElement(document, MEDIA_CONTROLS_TIMELINE, &quot;range&quot;, element, MediaTimelineContainer)
</span><span class="cx"> { 
</span><span class="lines">@@ -295,7 +412,7 @@
</span><span class="cx">     if (event-&gt;type() == eventNames().mousedownEvent)
</span><span class="cx">         m_mediaElement-&gt;beginScrubbing();
</span><span class="cx"> 
</span><del>-    HTMLInputElement::defaultEventHandler(event);
</del><ins>+    MediaControlInputElement::defaultEventHandler(event);
</ins><span class="cx"> 
</span><span class="cx">      if (event-&gt;type() == eventNames().mouseoverEvent || event-&gt;type() == eventNames().mouseoutEvent || event-&gt;type() == eventNames().mousemoveEvent ) {
</span><span class="cx">         return;
</span><span class="lines">@@ -322,6 +439,7 @@
</span><span class="cx">         setAttribute(maxAttr, String::number(isfinite(dur) ? dur : 0));
</span><span class="cx">     }
</span><span class="cx">     setValue(String::number(m_mediaElement-&gt;currentTime()));
</span><ins>+    MediaControlInputElement::update();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> // ----------------------------
</span><span class="lines">@@ -341,7 +459,7 @@
</span><span class="cx"> 
</span><span class="cx"> bool MediaControlFullscreenButtonElement::rendererIsNeeded(RenderStyle* style)
</span><span class="cx"> {
</span><del>-    return m_mediaElement-&gt;supportsFullscreen() &amp;&amp; MediaControlInputElement::rendererIsNeeded(style);
</del><ins>+    return MediaControlInputElement::rendererIsNeeded(style) &amp;&amp; m_mediaElement-&gt;supportsFullscreen();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkWebCorerenderingMediaControlElementsh"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/rendering/MediaControlElements.h (45473 => 45474)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/rendering/MediaControlElements.h        2009-07-02 14:15:35 UTC (rev 45473)
+++ trunk/WebCore/rendering/MediaControlElements.h        2009-07-02 15:47:55 UTC (rev 45474)
</span><span class="lines">@@ -43,11 +43,24 @@
</span><span class="cx"> class Event;
</span><span class="cx"> class Frame;
</span><span class="cx"> 
</span><ins>+// Must match WebKitSystemInterface.h
</ins><span class="cx"> enum MediaControlElementType {
</span><del>-    MediaFullscreenButton, MediaMuteButton, MediaPlayButton,
-    MediaSeekBackButton, MediaSeekForwardButton, MediaSlider, MediaSliderThumb,
-    MediaUnMuteButton, MediaPauseButton, MediaTimelineContainer, MediaCurrentTimeDisplay, 
-    MediaTimeRemainingDisplay, MediaControlsPanel
</del><ins>+    MediaFullscreenButton = 0,
+    MediaMuteButton,
+    MediaPlayButton,
+    MediaSeekBackButton,
+    MediaSeekForwardButton,
+    MediaSlider,
+    MediaSliderThumb,
+    MediaRewindButton,
+    MediaReturnToRealtimeButton,
+    MediaUnMuteButton,
+    MediaPauseButton,
+    MediaTimelineContainer,
+    MediaCurrentTimeDisplay, 
+    MediaTimeRemainingDisplay,
+    MediaStatusDisplay,
+    MediaControlsPanel
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> class MediaControlShadowRootElement : public HTMLDivElement {
</span><span class="lines">@@ -63,12 +76,12 @@
</span><span class="cx">     HTMLMediaElement* m_mediaElement;    
</span><span class="cx"> };
</span><span class="cx"> 
</span><del>- // ----------------------------

-class MediaTextDisplayElement : public HTMLDivElement
</del><ins>+// ----------------------------
+
+class MediaControlElement : public HTMLDivElement
</ins><span class="cx"> {
</span><span class="cx"> public:
</span><del>-    MediaTextDisplayElement(Document*, PseudoId, HTMLMediaElement*);
</del><ins>+    MediaControlElement(Document*, PseudoId, HTMLMediaElement*);
</ins><span class="cx">     void attachToParent(Element*);
</span><span class="cx">     void update();
</span><span class="cx">     void updateStyle();
</span><span class="lines">@@ -79,13 +92,26 @@
</span><span class="cx"> 
</span><span class="cx"> // ----------------------------
</span><span class="cx"> 
</span><del>-class MediaTimeDisplayElement : public MediaTextDisplayElement {
</del><ins>+class MediaControlTimelineContainerElement : public MediaControlElement {
</ins><span class="cx"> public:
</span><del>-    MediaTimeDisplayElement(Document*, HTMLMediaElement*, bool currentTime);
</del><ins>+    MediaControlTimelineContainerElement(Document*, HTMLMediaElement*);
+    virtual bool rendererIsNeeded(RenderStyle* style);
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> // ----------------------------
</span><span class="cx"> 
</span><ins>+class MediaControlStatusDisplayElement : public MediaControlElement {
+public:
+    MediaControlStatusDisplayElement(Document*, HTMLMediaElement*);
+    virtual void update();
+    virtual bool rendererIsNeeded(RenderStyle* style);
+private:
+    enum StateBeingDisplayed { Nothing, Loading, LiveBroadcast };
+    StateBeingDisplayed m_stateBeingDisplayed;
+};
+
+// ----------------------------
+
</ins><span class="cx"> class MediaControlInputElement : public HTMLInputElement {
</span><span class="cx"> public:
</span><span class="cx">     MediaControlInputElement(Document*, PseudoId, const String&amp; type, HTMLMediaElement*, MediaControlElementType);
</span><span class="lines">@@ -136,9 +162,26 @@
</span><span class="cx">     bool m_capturing;
</span><span class="cx">     Timer&lt;MediaControlSeekButtonElement&gt; m_seekTimer;
</span><span class="cx"> };
</span><ins>+    
+// ----------------------------
</ins><span class="cx"> 
</span><ins>+class MediaControlRewindButtonElement : public MediaControlInputElement {
+public:
+    MediaControlRewindButtonElement(Document*, HTMLMediaElement*);
+    virtual void defaultEventHandler(Event*);
+};
+
</ins><span class="cx"> // ----------------------------
</span><span class="cx"> 
</span><ins>+class MediaControlReturnToRealtimeButtonElement : public MediaControlInputElement {
+public:
+    MediaControlReturnToRealtimeButtonElement(Document*, HTMLMediaElement*);
+    virtual void defaultEventHandler(Event*);
+    virtual bool rendererIsNeeded(RenderStyle*);
+};    
+
+// ----------------------------
+
</ins><span class="cx"> class MediaControlTimelineElement : public MediaControlInputElement {
</span><span class="cx"> public:
</span><span class="cx">     MediaControlTimelineElement(Document*, HTMLMediaElement*);
</span><span class="lines">@@ -162,7 +205,7 @@
</span><span class="cx">     RenderMediaControlShadowRoot(Element* e) : RenderBlock(e) { }
</span><span class="cx">     void setParent(RenderObject* p) { RenderObject::setParent(p); }
</span><span class="cx"> };
</span><del>-
</del><ins>+    
</ins><span class="cx"> // ----------------------------
</span><span class="cx"> 
</span><span class="cx"> } //namespace WebCore
</span></span></pre></div>
<a id="trunkWebCorerenderingRenderMediacpp"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/rendering/RenderMedia.cpp (45473 => 45474)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/rendering/RenderMedia.cpp        2009-07-02 14:15:35 UTC (rev 45473)
+++ trunk/WebCore/rendering/RenderMedia.cpp        2009-07-02 15:47:55 UTC (rev 45474)
</span><span class="lines">@@ -104,16 +104,15 @@
</span><span class="cx">     RenderReplaced::styleDidChange(diff, oldStyle);
</span><span class="cx"> 
</span><span class="cx">     if (m_controlsShadowRoot) {
</span><del>-        if (m_panel-&gt;renderer())
-            m_panel-&gt;renderer()-&gt;setStyle(getCachedPseudoStyle(MEDIA_CONTROLS_PANEL));
-
-        if (m_timelineContainer-&gt;renderer())
-            m_timelineContainer-&gt;renderer()-&gt;setStyle(getCachedPseudoStyle(MEDIA_CONTROLS_TIMELINE_CONTAINER));
-        
</del><ins>+        m_panel-&gt;updateStyle();
</ins><span class="cx">         m_muteButton-&gt;updateStyle();
</span><span class="cx">         m_playButton-&gt;updateStyle();
</span><span class="cx">         m_seekBackButton-&gt;updateStyle();
</span><span class="cx">         m_seekForwardButton-&gt;updateStyle();
</span><ins>+        m_rewindButton-&gt;updateStyle();
+        m_returnToRealtimeButton-&gt;updateStyle();
+        m_statusDisplay-&gt;updateStyle();
+        m_timelineContainer-&gt;updateStyle();
</ins><span class="cx">         m_timeline-&gt;updateStyle();
</span><span class="cx">         m_fullscreenButton-&gt;updateStyle();
</span><span class="cx">         m_currentTimeDisplay-&gt;updateStyle();
</span><span class="lines">@@ -151,17 +150,8 @@
</span><span class="cx"> void RenderMedia::createPanel()
</span><span class="cx"> {
</span><span class="cx">     ASSERT(!m_panel);
</span><del>-    RenderStyle* style = getCachedPseudoStyle(MEDIA_CONTROLS_PANEL);
-    m_panel = new HTMLDivElement(HTMLNames::divTag, document());
-    RenderObject* renderer = m_panel-&gt;createRenderer(renderArena(), style);
-    if (renderer) {
-        m_panel-&gt;setRenderer(renderer);
-        renderer-&gt;setStyle(style);
-        m_panel-&gt;setAttached();
-        m_panel-&gt;setInDocument(true);
-        m_controlsShadowRoot-&gt;addChild(m_panel);
-        m_controlsShadowRoot-&gt;renderer()-&gt;addChild(renderer);
-    }
</del><ins>+    m_panel = new MediaControlElement(document(), MEDIA_CONTROLS_PANEL, mediaElement());
+    m_panel-&gt;attachToParent(m_controlsShadowRoot.get());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void RenderMedia::createMuteButton()
</span><span class="lines">@@ -192,20 +182,32 @@
</span><span class="cx">     m_seekForwardButton-&gt;attachToParent(m_panel.get());
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void RenderMedia::createRewindButton()
+{
+    ASSERT(!m_rewindButton);
+    m_rewindButton = new MediaControlRewindButtonElement(document(), mediaElement());
+    m_rewindButton-&gt;attachToParent(m_panel.get());
+}
+
+void RenderMedia::createReturnToRealtimeButton()
+{
+    ASSERT(!m_returnToRealtimeButton);
+    m_returnToRealtimeButton = new MediaControlReturnToRealtimeButtonElement(document(), mediaElement());
+    m_returnToRealtimeButton-&gt;attachToParent(m_panel.get());
+}
+
+void RenderMedia::createStatusDisplay()
+{
+    ASSERT(!m_statusDisplay);
+    m_statusDisplay = new MediaControlStatusDisplayElement(document(), mediaElement());
+    m_statusDisplay-&gt;attachToParent(m_panel.get());
+}
+
</ins><span class="cx"> void RenderMedia::createTimelineContainer()
</span><span class="cx"> {
</span><span class="cx">     ASSERT(!m_timelineContainer);
</span><del>-    RenderStyle* style = getCachedPseudoStyle(MEDIA_CONTROLS_TIMELINE_CONTAINER);
-    m_timelineContainer = new HTMLDivElement(HTMLNames::divTag, document());
-    RenderObject* renderer = m_timelineContainer-&gt;createRenderer(renderArena(), style);
-    if (renderer) {
-        m_timelineContainer-&gt;setRenderer(renderer);
-        renderer-&gt;setStyle(style);
-        m_timelineContainer-&gt;setAttached();
-        m_timelineContainer-&gt;setInDocument(true);
-        m_panel-&gt;addChild(m_timelineContainer);
-        m_panel-&gt;renderer()-&gt;addChild(renderer);
-    }
</del><ins>+    m_timelineContainer = new MediaControlTimelineContainerElement(document(), mediaElement());
+    m_timelineContainer-&gt;attachToParent(m_panel.get());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void RenderMedia::createTimeline()
</span><span class="lines">@@ -215,18 +217,18 @@
</span><span class="cx">     m_timeline-&gt;setAttribute(precisionAttr, &quot;float&quot;);
</span><span class="cx">     m_timeline-&gt;attachToParent(m_timelineContainer.get());
</span><span class="cx"> }
</span><del>-  
</del><ins>+
</ins><span class="cx"> void RenderMedia::createCurrentTimeDisplay()
</span><span class="cx"> {
</span><span class="cx">     ASSERT(!m_currentTimeDisplay);
</span><del>-    m_currentTimeDisplay = new MediaTimeDisplayElement(document(), mediaElement(), true);
</del><ins>+    m_currentTimeDisplay = new MediaControlElement(document(), MEDIA_CONTROLS_CURRENT_TIME_DISPLAY, mediaElement());
</ins><span class="cx">     m_currentTimeDisplay-&gt;attachToParent(m_timelineContainer.get());
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void RenderMedia::createTimeRemainingDisplay()
</span><span class="cx"> {
</span><span class="cx">     ASSERT(!m_timeRemainingDisplay);
</span><del>-    m_timeRemainingDisplay = new MediaTimeDisplayElement(document(), mediaElement(), false);
</del><ins>+    m_timeRemainingDisplay = new MediaControlElement(document(), MEDIA_CONTROLS_TIME_REMAINING_DISPLAY, mediaElement());
</ins><span class="cx">     m_timeRemainingDisplay-&gt;attachToParent(m_timelineContainer.get());
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -251,10 +253,13 @@
</span><span class="cx">             m_panel = 0;
</span><span class="cx">             m_muteButton = 0;
</span><span class="cx">             m_playButton = 0;
</span><ins>+            m_statusDisplay = 0;
</ins><span class="cx">             m_timelineContainer = 0;
</span><span class="cx">             m_timeline = 0;
</span><span class="cx">             m_seekBackButton = 0;
</span><span class="cx">             m_seekForwardButton = 0;
</span><ins>+            m_rewindButton = 0;
+            m_returnToRealtimeButton = 0;
</ins><span class="cx">             m_currentTimeDisplay = 0;
</span><span class="cx">             m_timeRemainingDisplay = 0;
</span><span class="cx">             m_fullscreenButton = 0;
</span><span class="lines">@@ -269,15 +274,18 @@
</span><span class="cx">     if (!m_controlsShadowRoot) {
</span><span class="cx">         createControlsShadowRoot();
</span><span class="cx">         createPanel();
</span><del>-        if (m_panel &amp;&amp; m_panel-&gt;renderer()) {
</del><ins>+        if (m_panel) {
+            createRewindButton();
</ins><span class="cx">             createMuteButton();
</span><span class="cx">             createPlayButton();
</span><ins>+            createReturnToRealtimeButton();
+            createStatusDisplay();
</ins><span class="cx">             createTimelineContainer();
</span><span class="cx">             createSeekBackButton();
</span><span class="cx">             createSeekForwardButton();
</span><del>-            createFullscreenButton();            
</del><ins>+            createFullscreenButton();
</ins><span class="cx">         }
</span><del>-        if (m_timelineContainer &amp;&amp; m_timelineContainer-&gt;renderer()) {
</del><ins>+        if (m_timelineContainer) {
</ins><span class="cx">             createCurrentTimeDisplay();
</span><span class="cx">             createTimeline();
</span><span class="cx">             createTimeRemainingDisplay();
</span><span class="lines">@@ -293,10 +301,14 @@
</span><span class="cx"> 
</span><span class="cx">     m_previousVisible = style()-&gt;visibility();
</span><span class="cx">     
</span><ins>+    if (m_panel)
+        m_panel-&gt;update();
</ins><span class="cx">     if (m_muteButton)
</span><span class="cx">         m_muteButton-&gt;update();
</span><span class="cx">     if (m_playButton)
</span><span class="cx">         m_playButton-&gt;update();
</span><ins>+    if (m_timelineContainer)
+        m_timelineContainer-&gt;update();
</ins><span class="cx">     if (m_timeline)
</span><span class="cx">         m_timeline-&gt;update();
</span><span class="cx">     if (m_currentTimeDisplay)
</span><span class="lines">@@ -307,6 +319,12 @@
</span><span class="cx">         m_seekBackButton-&gt;update();
</span><span class="cx">     if (m_seekForwardButton)
</span><span class="cx">         m_seekForwardButton-&gt;update();
</span><ins>+    if (m_rewindButton)
+        m_rewindButton-&gt;update();
+    if (m_returnToRealtimeButton)
+        m_returnToRealtimeButton-&gt;update();
+    if (m_statusDisplay)
+        m_statusDisplay-&gt;update();
</ins><span class="cx">     if (m_fullscreenButton)
</span><span class="cx">         m_fullscreenButton-&gt;update();
</span><span class="cx">     updateTimeDisplay();
</span><span class="lines">@@ -426,6 +444,12 @@
</span><span class="cx">         if (m_seekForwardButton &amp;&amp; m_seekForwardButton-&gt;hitTest(point))
</span><span class="cx">             m_seekForwardButton-&gt;defaultEventHandler(event);
</span><span class="cx"> 
</span><ins>+        if (m_rewindButton &amp;&amp; m_rewindButton-&gt;hitTest(point))
+            m_rewindButton-&gt;defaultEventHandler(event);
+
+        if (m_returnToRealtimeButton &amp;&amp; m_returnToRealtimeButton-&gt;hitTest(point))
+            m_returnToRealtimeButton-&gt;defaultEventHandler(event);
+
</ins><span class="cx">         if (m_timeline &amp;&amp; m_timeline-&gt;hitTest(point))
</span><span class="cx">             m_timeline-&gt;defaultEventHandler(event);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkWebCorerenderingRenderMediah"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/rendering/RenderMedia.h (45473 => 45474)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/rendering/RenderMedia.h        2009-07-02 14:15:35 UTC (rev 45473)
+++ trunk/WebCore/rendering/RenderMedia.h        2009-07-02 15:47:55 UTC (rev 45474)
</span><span class="lines">@@ -38,9 +38,14 @@
</span><span class="cx"> class MediaControlMuteButtonElement;
</span><span class="cx"> class MediaControlPlayButtonElement;
</span><span class="cx"> class MediaControlSeekButtonElement;
</span><ins>+class MediaControlRewindButtonElement;
+class MediaControlReturnToRealtimeButtonElement;
</ins><span class="cx"> class MediaControlTimelineElement;
</span><span class="cx"> class MediaControlFullscreenButtonElement;
</span><del>-class MediaTimeDisplayElement;
</del><ins>+class MediaControlTimeDisplayElement;
+class MediaControlStatusDisplayElement;
+class MediaControlTimelineContainerElement;
+class MediaControlElement;
</ins><span class="cx"> class MediaPlayer;
</span><span class="cx"> 
</span><span class="cx"> class RenderMedia : public RenderReplaced {
</span><span class="lines">@@ -85,6 +90,9 @@
</span><span class="cx">     void createPlayButton();
</span><span class="cx">     void createSeekBackButton();
</span><span class="cx">     void createSeekForwardButton();
</span><ins>+    void createRewindButton();
+    void createReturnToRealtimeButton();
+    void createStatusDisplay();
</ins><span class="cx">     void createTimelineContainer();
</span><span class="cx">     void createTimeline();
</span><span class="cx">     void createCurrentTimeDisplay();
</span><span class="lines">@@ -100,16 +108,19 @@
</span><span class="cx">     virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle);
</span><span class="cx"> 
</span><span class="cx">     RefPtr&lt;HTMLElement&gt; m_controlsShadowRoot;
</span><del>-    RefPtr&lt;HTMLElement&gt; m_panel;
</del><ins>+    RefPtr&lt;MediaControlElement&gt; m_panel;
</ins><span class="cx">     RefPtr&lt;MediaControlMuteButtonElement&gt; m_muteButton;
</span><span class="cx">     RefPtr&lt;MediaControlPlayButtonElement&gt; m_playButton;
</span><span class="cx">     RefPtr&lt;MediaControlSeekButtonElement&gt; m_seekBackButton;
</span><span class="cx">     RefPtr&lt;MediaControlSeekButtonElement&gt; m_seekForwardButton;
</span><ins>+    RefPtr&lt;MediaControlRewindButtonElement&gt; m_rewindButton;
+    RefPtr&lt;MediaControlReturnToRealtimeButtonElement&gt; m_returnToRealtimeButton;
</ins><span class="cx">     RefPtr&lt;MediaControlTimelineElement&gt; m_timeline;
</span><span class="cx">     RefPtr&lt;MediaControlFullscreenButtonElement&gt; m_fullscreenButton;
</span><del>-    RefPtr&lt;HTMLElement&gt; m_timelineContainer;
-    RefPtr&lt;MediaTimeDisplayElement&gt; m_currentTimeDisplay;
-    RefPtr&lt;MediaTimeDisplayElement&gt; m_timeRemainingDisplay;
</del><ins>+    RefPtr&lt;MediaControlTimelineContainerElement&gt; m_timelineContainer;
+    RefPtr&lt;MediaControlElement&gt; m_currentTimeDisplay;
+    RefPtr&lt;MediaControlElement&gt; m_timeRemainingDisplay;
+    RefPtr&lt;MediaControlStatusDisplayElement&gt; m_statusDisplay;
</ins><span class="cx">     RenderObjectChildList m_children;
</span><span class="cx">     Node* m_lastUnderNode;
</span><span class="cx">     Node* m_nodeUnderMouse;
</span></span></pre></div>
<a id="trunkWebCorerenderingRenderThemecpp"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/rendering/RenderTheme.cpp (45473 => 45474)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/rendering/RenderTheme.cpp        2009-07-02 14:15:35 UTC (rev 45473)
+++ trunk/WebCore/rendering/RenderTheme.cpp        2009-07-02 15:47:55 UTC (rev 45474)
</span><span class="lines">@@ -262,6 +262,10 @@
</span><span class="cx">             return paintMediaSeekBackButton(o, paintInfo, r);
</span><span class="cx">         case MediaSeekForwardButtonPart:
</span><span class="cx">             return paintMediaSeekForwardButton(o, paintInfo, r);
</span><ins>+        case MediaRewindButtonPart:
+            return paintMediaRewindButton(o, paintInfo, r);
+        case MediaReturnToRealtimeButtonPart:
+            return paintMediaReturnToRealtimeButton(o, paintInfo, r);
</ins><span class="cx">         case MediaSliderPart:
</span><span class="cx">             return paintMediaSliderTrack(o, paintInfo, r);
</span><span class="cx">         case MediaSliderThumbPart:
</span><span class="lines">@@ -272,8 +276,8 @@
</span><span class="cx">             return paintMediaTimeRemaining(o, paintInfo, r);
</span><span class="cx">         case MediaCurrentTimePart:
</span><span class="cx">             return paintMediaCurrentTime(o, paintInfo, r);
</span><del>-        case MediaTimelineContainerPart:
-            return paintMediaTimelineContainer(o, paintInfo, r);
</del><ins>+        case MediaControlsBackgroundPart:
+            return paintMediaControlsBackground(o, paintInfo, r);
</ins><span class="cx">         case MenulistButtonPart:
</span><span class="cx">         case TextFieldPart:
</span><span class="cx">         case TextAreaPart:
</span></span></pre></div>
<a id="trunkWebCorerenderingRenderThemeh"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/rendering/RenderTheme.h (45473 => 45474)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/rendering/RenderTheme.h        2009-07-02 14:15:35 UTC (rev 45473)
+++ trunk/WebCore/rendering/RenderTheme.h        2009-07-02 15:47:55 UTC (rev 45474)
</span><span class="lines">@@ -242,7 +242,9 @@
</span><span class="cx">     virtual bool paintMediaSeekForwardButton(RenderObject*, const RenderObject::PaintInfo&amp;, const IntRect&amp;) { return true; }
</span><span class="cx">     virtual bool paintMediaSliderTrack(RenderObject*, const RenderObject::PaintInfo&amp;, const IntRect&amp;) { return true; }
</span><span class="cx">     virtual bool paintMediaSliderThumb(RenderObject*, const RenderObject::PaintInfo&amp;, const IntRect&amp;) { return true; }
</span><del>-    virtual bool paintMediaTimelineContainer(RenderObject*, const RenderObject::PaintInfo&amp;, const IntRect&amp;) { return true; }
</del><ins>+    virtual bool paintMediaRewindButton(RenderObject*, const RenderObject::PaintInfo&amp;, const IntRect&amp;) { return true; }
+    virtual bool paintMediaReturnToRealtimeButton(RenderObject*, const RenderObject::PaintInfo&amp;, const IntRect&amp;) { return true; }
+    virtual bool paintMediaControlsBackground(RenderObject*, const RenderObject::PaintInfo&amp;, const IntRect&amp;) { return true; }
</ins><span class="cx">     virtual bool paintMediaCurrentTime(RenderObject*, const RenderObject::PaintInfo&amp;, const IntRect&amp;) { return true; }
</span><span class="cx">     virtual bool paintMediaTimeRemaining(RenderObject*, const RenderObject::PaintInfo&amp;, const IntRect&amp;) { return true; }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkWebCorerenderingRenderThemeMach"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/rendering/RenderThemeMac.h (45473 => 45474)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/rendering/RenderThemeMac.h        2009-07-02 14:15:35 UTC (rev 45473)
+++ trunk/WebCore/rendering/RenderThemeMac.h        2009-07-02 15:47:55 UTC (rev 45474)
</span><span class="lines">@@ -124,7 +124,9 @@
</span><span class="cx">     virtual bool paintMediaSeekForwardButton(RenderObject*, const RenderObject::PaintInfo&amp;, const IntRect&amp;);
</span><span class="cx">     virtual bool paintMediaSliderTrack(RenderObject*, const RenderObject::PaintInfo&amp;, const IntRect&amp;);
</span><span class="cx">     virtual bool paintMediaSliderThumb(RenderObject*, const RenderObject::PaintInfo&amp;, const IntRect&amp;);
</span><del>-    virtual bool paintMediaTimelineContainer(RenderObject*, const RenderObject::PaintInfo&amp;, const IntRect&amp;);
</del><ins>+    virtual bool paintMediaRewindButton(RenderObject*, const RenderObject::PaintInfo&amp;, const IntRect&amp;);
+    virtual bool paintMediaReturnToRealtimeButton(RenderObject*, const RenderObject::PaintInfo&amp;, const IntRect&amp;);
+    virtual bool paintMediaControlsBackground(RenderObject*, const RenderObject::PaintInfo&amp;, const IntRect&amp;);
</ins><span class="cx">     virtual bool paintMediaCurrentTime(RenderObject*, const RenderObject::PaintInfo&amp;, const IntRect&amp;);
</span><span class="cx">     virtual bool paintMediaTimeRemaining(RenderObject*, const RenderObject::PaintInfo&amp;, const IntRect&amp;);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkWebCorerenderingRenderThemeMacmm"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/rendering/RenderThemeMac.mm (45473 => 45474)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/rendering/RenderThemeMac.mm        2009-07-02 14:15:35 UTC (rev 45473)
+++ trunk/WebCore/rendering/RenderThemeMac.mm        2009-07-02 15:47:55 UTC (rev 45474)
</span><span class="lines">@@ -1572,13 +1572,36 @@
</span><span class="cx">     wkDrawMediaUIPart(MediaSliderThumb, mediaControllerTheme(), paintInfo.context-&gt;platformContext(), r, node-&gt;active());
</span><span class="cx">     return false;
</span><span class="cx"> }
</span><ins>+    
+bool RenderThemeMac::paintMediaRewindButton(RenderObject* o, const RenderObject::PaintInfo&amp; paintInfo, const IntRect&amp; r)
+{
+    Node* node = o-&gt;node();
+    if (!node)
+        return false;
+    
+    LocalCurrentGraphicsContext localContext(paintInfo.context);
+    wkDrawMediaUIPart(MediaRewindButton, mediaControllerTheme(), paintInfo.context-&gt;platformContext(), r, node-&gt;active());
+    return false;
+}
</ins><span class="cx"> 
</span><del>-bool RenderThemeMac::paintMediaTimelineContainer(RenderObject* o, const RenderObject::PaintInfo&amp; paintInfo, const IntRect&amp; r)
</del><ins>+bool RenderThemeMac::paintMediaReturnToRealtimeButton(RenderObject* o, const RenderObject::PaintInfo&amp; paintInfo, const IntRect&amp; r)
</ins><span class="cx"> {
</span><span class="cx">     Node* node = o-&gt;node();
</span><span class="cx">     if (!node)
</span><span class="cx">         return false;
</span><ins>+    
+    LocalCurrentGraphicsContext localContext(paintInfo.context);
+    wkDrawMediaUIPart(MediaReturnToRealtimeButton, mediaControllerTheme(), paintInfo.context-&gt;platformContext(), r, node-&gt;active());
+    return false;
+}
</ins><span class="cx"> 
</span><ins>+
+bool RenderThemeMac::paintMediaControlsBackground(RenderObject* o, const RenderObject::PaintInfo&amp; paintInfo, const IntRect&amp; r)
+{
+    Node* node = o-&gt;node();
+    if (!node)
+        return false;
+
</ins><span class="cx">     LocalCurrentGraphicsContext localContext(paintInfo.context);
</span><span class="cx">     wkDrawMediaUIPart(MediaTimelineContainer, mediaControllerTheme(), paintInfo.context-&gt;platformContext(), r, node-&gt;active());
</span><span class="cx">     return false;
</span></span></pre></div>
<a id="trunkWebCorerenderingstyleRenderStyleConstantsh"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/rendering/style/RenderStyleConstants.h (45473 => 45474)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/rendering/style/RenderStyleConstants.h        2009-07-02 14:15:35 UTC (rev 45473)
+++ trunk/WebCore/rendering/style/RenderStyleConstants.h        2009-07-02 15:47:55 UTC (rev 45474)
</span><span class="lines">@@ -69,7 +69,8 @@
</span><span class="cx">     SLIDER_THUMB, SEARCH_CANCEL_BUTTON, SEARCH_DECORATION, SEARCH_RESULTS_DECORATION, SEARCH_RESULTS_BUTTON, MEDIA_CONTROLS_PANEL,
</span><span class="cx">     MEDIA_CONTROLS_PLAY_BUTTON, MEDIA_CONTROLS_MUTE_BUTTON, MEDIA_CONTROLS_TIMELINE, MEDIA_CONTROLS_TIMELINE_CONTAINER,
</span><span class="cx">     MEDIA_CONTROLS_CURRENT_TIME_DISPLAY, MEDIA_CONTROLS_TIME_REMAINING_DISPLAY, MEDIA_CONTROLS_SEEK_BACK_BUTTON, 
</span><del>-    MEDIA_CONTROLS_SEEK_FORWARD_BUTTON, MEDIA_CONTROLS_FULLSCREEN_BUTTON, 
</del><ins>+    MEDIA_CONTROLS_SEEK_FORWARD_BUTTON, MEDIA_CONTROLS_FULLSCREEN_BUTTON, MEDIA_CONTROLS_REWIND_BUTTON,
+    MEDIA_CONTROLS_RETURN_TO_REALTIME_BUTTON, MEDIA_CONTROLS_STATUS_DISPLAY,
</ins><span class="cx">     SCROLLBAR_THUMB, SCROLLBAR_BUTTON, SCROLLBAR_TRACK, SCROLLBAR_TRACK_PIECE, SCROLLBAR_CORNER, RESIZER,
</span><span class="cx"> 
</span><span class="cx">     FIRST_INTERNAL_PSEUDOID = FILE_UPLOAD_BUTTON
</span></span></pre></div>
<a id="trunkWebKitChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/WebKit/ChangeLog (45473 => 45474)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebKit/ChangeLog        2009-07-02 14:15:35 UTC (rev 45473)
+++ trunk/WebKit/ChangeLog        2009-07-02 15:47:55 UTC (rev 45474)
</span><span class="lines">@@ -1,3 +1,13 @@
</span><ins>+2009-07-02  Pierre d'Herbemont  &lt;pdherbemont@apple.com&gt;
+
+        Reviewed by Simon Fraser.
+
+        &lt;rdar://problem/6518119&gt;
+
+        Add localized strings for media controller status messages.
+
+        * English.lproj/Localizable.strings: Localized text.
+
</ins><span class="cx"> 2009-06-08  Dan Bernstein  &lt;mitz@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Rubber-stamped by Mark Rowe.
</span></span></pre></div>
<a id="trunkWebKitEnglishlprojLocalizablestrings"></a>
<div class="modfile"><h4>Modified: trunk/WebKit/English.lproj/Localizable.strings (45473 => 45474)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebKit/English.lproj/Localizable.strings        2009-07-02 14:15:35 UTC (rev 45473)
+++ trunk/WebKit/English.lproj/Localizable.strings        2009-07-02 15:47:55 UTC (rev 45474)
</span><span class="lines">@@ -157,6 +157,12 @@
</span><span class="cx"> /* Left to Right context menu item */
</span><span class="cx"> &quot;Left to Right&quot; = &quot;Left to Right&quot;;
</span><span class="cx"> 
</span><ins>+/* text that shows up in the media controller when watching a live broadcast */
+&quot;Live Broadcast&quot; = &quot;Live Broadcast&quot;;
+
+/* text that shows up in the media controller when the media is loading */
+&quot;Loading...&quot; = &quot;Loading...&quot;;
+
</ins><span class="cx"> /* Look Up in Dictionary context menu item */
</span><span class="cx"> &quot;Look Up in Dictionary&quot; = &quot;Look Up in Dictionary&quot;;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkWebKitmacChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/WebKit/mac/ChangeLog (45473 => 45474)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebKit/mac/ChangeLog        2009-07-02 14:15:35 UTC (rev 45473)
+++ trunk/WebKit/mac/ChangeLog        2009-07-02 15:47:55 UTC (rev 45474)
</span><span class="lines">@@ -1,3 +1,15 @@
</span><ins>+2009-07-02  Pierre d'Herbemont  &lt;pdherbemont@apple.com&gt;
+
+        Reviewed by Simon Fraser.
+
+        &lt;rdar://problem/6518119&gt;
+
+        Add localized strings for media controller status messages.
+
+        * WebCoreSupport/WebViewFactory.mm: Add new localized text.
+        (-[WebViewFactory mediaElementLoadingStateText]):
+        (-[WebViewFactory mediaElementLiveBroadcastStateText]):
+
</ins><span class="cx"> 2009-07-01  Brady Eidson  &lt;beidson@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Reviewed by Sam Weinig.
</span></span></pre></div>
<a id="trunkWebKitmacWebCoreSupportWebViewFactorymm"></a>
<div class="modfile"><h4>Modified: trunk/WebKit/mac/WebCoreSupport/WebViewFactory.mm (45473 => 45474)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebKit/mac/WebCoreSupport/WebViewFactory.mm        2009-07-02 14:15:35 UTC (rev 45473)
+++ trunk/WebKit/mac/WebCoreSupport/WebViewFactory.mm        2009-07-02 15:47:55 UTC (rev 45474)
</span><span class="lines">@@ -598,4 +598,14 @@
</span><span class="cx">     return [NSString stringWithFormat:UI_STRING(&quot;%@ %d×%d pixels&quot;, &quot;window title for a standalone image (uses multiplication symbol, not x)&quot;), filename, width, height];
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+- (NSString*)mediaElementLoadingStateText
+{
+    return UI_STRING(&quot;Loading...&quot;, &quot;text that shows up in the media controller when the media is loading&quot;);
+}
+
+- (NSString*)mediaElementLiveBroadcastStateText
+{
+    return UI_STRING(&quot;Live Broadcast&quot;, &quot;text that shows up in the media controller when watching a live broadcast&quot;);
+}
+
</ins><span class="cx"> @end
</span></span></pre></div>
<a id="trunkWebKitLibrariesChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/WebKitLibraries/ChangeLog (45473 => 45474)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebKitLibraries/ChangeLog        2009-07-02 14:15:35 UTC (rev 45473)
+++ trunk/WebKitLibraries/ChangeLog        2009-07-02 15:47:55 UTC (rev 45474)
</span><span class="lines">@@ -1,3 +1,14 @@
</span><ins>+2009-07-02  Pierre d'Herbemont  &lt;pdherbemont@apple.com&gt;
+
+        Reviewed by Simon Fraser.
+
+        Update WebKitSystemInterface for &lt;rdar://problem/6518119&gt;
+
+        * WebKitSystemInterface.h:
+        * libWebKitSystemInterfaceLeopard.a:
+        * libWebKitSystemInterfaceSnowLeopard.a:
+        * libWebKitSystemInterfaceTiger.a:
+
</ins><span class="cx"> 2009-07-01  Eric Carlson  &lt;eric.carlson@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Reviewed by Simon Fraser.
</span></span></pre></div>
<a id="trunkWebKitLibrariesWebKitSystemInterfaceh"></a>
<div class="modfile"><h4>Modified: trunk/WebKitLibraries/WebKitSystemInterface.h (45473 => 45474)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebKitLibraries/WebKitSystemInterface.h        2009-07-02 14:15:35 UTC (rev 45473)
+++ trunk/WebKitLibraries/WebKitSystemInterface.h        2009-07-02 15:47:55 UTC (rev 45474)
</span><span class="lines">@@ -199,17 +199,19 @@
</span><span class="cx"> 
</span><span class="cx"> typedef enum {
</span><span class="cx">     WKMediaUIPartFullscreenButton   = 0,
</span><del>-    WKMediaUIPartMuteButton         = 1,
-    WKMediaUIPartPlayButton         = 2,
-    WKMediaUIPartSeekBackButton     = 3,
-    WKMediaUIPartSeekForwardButton  = 4,
-    WKMediaUIPartSlider             = 5,
-    WKMediaUIPartSliderThumb        = 6,
-    WKMediaUIPartUnMuteButton       = 7,
-    WKMediaUIPartPauseButton        = 8,
-    WKMediaUIPartTimelineContainer  = 9,
-    WKMediaUIPartCurrentTimeDisplay = 10,
-    WKMediaUIPartTimeRemainingDisplay= 11
</del><ins>+    WKMediaUIPartMuteButton,
+    WKMediaUIPartPlayButton,
+    WKMediaUIPartSeekBackButton,
+    WKMediaUIPartSeekForwardButton,
+    WKMediaUIPartSlider,
+    WKMediaUIPartSliderThumb,
+    WKMediaUIPartRewindButton,
+    WKMediaUIPartSeekToRealtimeButton,
+    WKMediaUIPartUnMuteButton,
+    WKMediaUIPartPauseButton,
+    WKMediaUIPartBackground,
+    WKMediaUIPartCurrentTimeDisplay,
+    WKMediaUIPartTimeRemainingDisplay
</ins><span class="cx"> } WKMediaUIPart;
</span><span class="cx"> 
</span><span class="cx"> typedef enum {
</span><span class="lines">@@ -217,9 +219,15 @@
</span><span class="cx">     WKMediaControllerThemeQT        = 2
</span><span class="cx"> } WKMediaControllerThemeStyle;
</span><span class="cx"> 
</span><ins>+typedef enum {
+    WKMediaControllerStateNormal     = 0,
+    WKMediaControllerStateActivated  = 1,
+    WKMediaControllerStateDisabled   = 2
+} WKMediaControllerThemeState;
+
</ins><span class="cx"> BOOL WKHitTestMediaUIPart(int part, int themeStyle, CGRect bounds, CGPoint point);
</span><span class="cx"> void WKMeasureMediaUIPart(int part, int themeStyle, CGRect *bounds, CGSize *naturalSize);
</span><del>-void WKDrawMediaUIPart(int part, int themeStyle, CGContextRef context, CGRect rect, BOOL active);
</del><ins>+void WKDrawMediaUIPart(int part, int themeStyle, CGContextRef context, CGRect rect, int state);
</ins><span class="cx"> void WKDrawMediaSliderTrack(int themeStyle, CGContextRef context, CGRect rect, float timeLoaded, float currentTime, float duration);
</span><span class="cx"> 
</span><span class="cx"> #if !defined(BUILDING_ON_TIGER) &amp;&amp; !defined(BUILDING_ON_LEOPARD) &amp;&amp; defined(__x86_64__)
</span></span></pre></div>
<a id="trunkWebKitLibrarieslibWebKitSystemInterfaceLeoparda"></a>
<div class="binary"><h4>Modified: trunk/WebKitLibraries/libWebKitSystemInterfaceLeopard.a</h4>
<pre class="diff"><span>
<span class="cx">(Binary files differ)
</span></span></pre></div>
<a id="trunkWebKitLibrarieslibWebKitSystemInterfaceSnowLeoparda"></a>
<div class="binary"><h4>Modified: trunk/WebKitLibraries/libWebKitSystemInterfaceSnowLeopard.a</h4>
<pre class="diff"><span>
<span class="cx">(Binary files differ)
</span></span></pre></div>
<a id="trunkWebKitLibrarieslibWebKitSystemInterfaceTigera"></a>
<div class="binary"><h4>Modified: trunk/WebKitLibraries/libWebKitSystemInterfaceTiger.a</h4>
<pre class="diff"><span>
<span class="cx">(Binary files differ)
</span></span></pre></div>
</div>

</body>
</html>