Bug 29161

Summary: Implement default media UI for mac chromium.
Product: WebKit Reporter: Albert J. Wong <ajwong>
Component: WebCore Misc.Assignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: brettw, eric, levin
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Mac   
OS: OS X 10.5   
Attachments:
Description Flags
Reimplement default media UI for Mac Chromium to match the style
none
Reimplement default media UI for Mac Chromium to match the style
none
Screenshot o new UI on white background.
none
Reimplement default media UI for Mac Chromium to match the style eric: review-, levin: commit-queue-

Albert J. Wong
Reported 2009-09-10 16:51:40 PDT
The render theme code for mac chromium uses native mac widgets for media controls. This is inconsistent with the chromium UI for other platforms. Redo the render theme code in the style of the Windows and Linux ports.
Attachments
Reimplement default media UI for Mac Chromium to match the style (22.71 KB, patch)
2009-09-10 17:02 PDT, Albert J. Wong
no flags
Reimplement default media UI for Mac Chromium to match the style (22.38 KB, patch)
2009-09-10 17:06 PDT, Albert J. Wong
no flags
Screenshot o new UI on white background. (11.08 KB, image/png)
2009-09-10 17:09 PDT, Albert J. Wong
no flags
Reimplement default media UI for Mac Chromium to match the style (22.36 KB, patch)
2009-09-10 17:49 PDT, Albert J. Wong
eric: review-
levin: commit-queue-
Albert J. Wong
Comment 1 2009-09-10 17:02:54 PDT
Created attachment 39393 [details] Reimplement default media UI for Mac Chromium to match the style of the Windows and Linux versions. Also breaks the dependency on the internal wk* functions that were previously used to render the media controller widgets. https://bugs.webkit.org/show_bug.cgi?id=29161 Patch by Albert J. Wong <ajwong@chromium.org> on 2009-09-10 Reviewed by NOBODY (OOPS!). No media layout tests are currently enabled in Mac Chromium, so nothing needs rebaselineing, etc. * css/mediaControlsChromium.css: * rendering/RenderThemeChromiumMac.h: * rendering/RenderThemeChromiumMac.mm: (WebCore::mediaElementParent): (WebCore::RenderThemeChromiumMac::extraMediaControlsStyleSheet): (WebCore::mediaSliderThumbImage): (WebCore::mediaVolumeSliderThumbImage): (WebCore::RenderThemeChromiumMac::paintSliderTrack): (WebCore::RenderThemeChromiumMac::adjustSliderThumbSize): (WebCore::RenderThemeChromiumMac::paintMediaButtonInternal): (WebCore::RenderThemeChromiumMac::paintMediaPlayButton): (WebCore::RenderThemeChromiumMac::paintMediaMuteButton): (WebCore::RenderThemeChromiumMac::paintMediaSliderTrack): (WebCore::RenderThemeChromiumMac::paintMediaVolumeSliderTrack): (WebCore::RenderThemeChromiumMac::paintMediaSliderThumb): (WebCore::RenderThemeChromiumMac::paintMediaVolumeSliderThumb): (WebCore::RenderThemeChromiumMac::paintMediaControlsBackground): * rendering/RenderThemeChromiumSkia.cpp: (WebCore::RenderThemeChromiumSkia::adjustSliderThumbSize): --- 5 files changed, 256 insertions(+), 99 deletions(-)
Albert J. Wong
Comment 2 2009-09-10 17:06:57 PDT
Created attachment 39394 [details] Reimplement default media UI for Mac Chromium to match the style of the Windows and Linux versions. Also breaks the dependency on the internal wk* functions that were previously used to render the media controller widgets. https://bugs.webkit.org/show_bug.cgi?id=29161 Patch by Albert J. Wong <ajwong@chromium.org> on 2009-09-10 Reviewed by NOBODY (OOPS!). No media layout tests are currently enabled in Mac Chromium, so nothing needs rebaselineing, etc. * css/mediaControlsChromium.css: * rendering/RenderThemeChromiumMac.h: * rendering/RenderThemeChromiumMac.mm: (WebCore::mediaElementParent): (WebCore::RenderThemeChromiumMac::extraMediaControlsStyleSheet): (WebCore::mediaSliderThumbImage): (WebCore::mediaVolumeSliderThumbImage): (WebCore::RenderThemeChromiumMac::paintSliderTrack): (WebCore::RenderThemeChromiumMac::adjustSliderThumbSize): (WebCore::RenderThemeChromiumMac::paintMediaButtonInternal): (WebCore::RenderThemeChromiumMac::paintMediaPlayButton): (WebCore::RenderThemeChromiumMac::paintMediaMuteButton): (WebCore::RenderThemeChromiumMac::paintMediaSliderTrack): (WebCore::RenderThemeChromiumMac::paintMediaVolumeSliderTrack): (WebCore::RenderThemeChromiumMac::paintMediaSliderThumb): (WebCore::RenderThemeChromiumMac::paintMediaVolumeSliderThumb): (WebCore::RenderThemeChromiumMac::paintMediaControlsBackground): * rendering/RenderThemeChromiumSkia.cpp: (WebCore::RenderThemeChromiumSkia::adjustSliderThumbSize): --- 5 files changed, 255 insertions(+), 98 deletions(-)
Albert J. Wong
Comment 3 2009-09-10 17:09:49 PDT
Created attachment 39395 [details] Screenshot o new UI on white background.
Albert J. Wong
Comment 4 2009-09-10 17:10:38 PDT
If this looks good, please also commit-queue+.
Albert J. Wong
Comment 5 2009-09-10 17:49:27 PDT
Created attachment 39401 [details] Reimplement default media UI for Mac Chromium to match the style of the Windows and Linux versions. Also breaks the dependency on the internal wk* functions that were previously used to render the media controller widgets. https://bugs.webkit.org/show_bug.cgi?id=29161 Patch by Albert J. Wong <ajwong@chromium.org> on 2009-09-10 Reviewed by NOBODY (OOPS!). No media layout tests are currently enabled in Mac Chromium, so nothing needs rebaselineing, etc. * css/mediaControlsChromium.css: * rendering/RenderThemeChromiumMac.h: * rendering/RenderThemeChromiumMac.mm: (WebCore::mediaElementParent): (WebCore::RenderThemeChromiumMac::extraMediaControlsStyleSheet): (WebCore::mediaSliderThumbImage): (WebCore::mediaVolumeSliderThumbImage): (WebCore::RenderThemeChromiumMac::paintSliderTrack): (WebCore::RenderThemeChromiumMac::adjustSliderThumbSize): (WebCore::RenderThemeChromiumMac::paintMediaButtonInternal): (WebCore::RenderThemeChromiumMac::paintMediaPlayButton): (WebCore::RenderThemeChromiumMac::paintMediaMuteButton): (WebCore::RenderThemeChromiumMac::paintMediaSliderTrack): (WebCore::RenderThemeChromiumMac::paintMediaVolumeSliderTrack): (WebCore::RenderThemeChromiumMac::paintMediaSliderThumb): (WebCore::RenderThemeChromiumMac::paintMediaVolumeSliderThumb): (WebCore::RenderThemeChromiumMac::paintMediaControlsBackground): * rendering/RenderThemeChromiumSkia.cpp: (WebCore::RenderThemeChromiumSkia::adjustSliderThumbSize): --- 5 files changed, 252 insertions(+), 98 deletions(-)
Albert J. Wong
Comment 6 2009-09-10 17:52:07 PDT
FYI, hclam@chromium.org also looked this over and thinks it is sane. He did default UI implementation for Windows/Linux.
Eric Seidel (no email)
Comment 7 2009-09-10 17:52:42 PDT
You can always set cq=? if you want folks to know to cq+ when reviewing.
Albert J. Wong
Comment 8 2009-09-10 18:10:04 PDT
Ah, didn't realize that. cq=? set.
David Levin
Comment 9 2009-09-11 07:30:28 PDT
Comment on attachment 39401 [details] Reimplement default media UI for Mac Chromium to match the style Just a few nits to fix up and then commit. > diff --git a/WebCore/rendering/RenderThemeChromiumMac.mm b/WebCore/rendering/RenderThemeChromiumMac.mm > +#if ENABLE(VIDEO) > +// Attempt to retrieve a HTMLMediaElement from a Node. Returns NULL if one cannot be found. Use 0 instead of NULL. check-webkit-style would have flagged this :) > + static Image* soundFull = Image::loadPlatformResource("mediaSoundFull").releaseRef(); > + static Image* soundNone = Image::loadPlatformResource("mediaSoundNone").releaseRef(); > + static Image* soundDisabled = Image::loadPlatformResource("mediaSoundDisabled").releaseRef(); > + > + if (mediaElement->networkState() == HTMLMediaElement::NETWORK_NO_SOURCE || !mediaElement->hasAudio()) > + return paintMediaButtonInternal(paintInfo.context, rect, soundDisabled); > + > + return paintMediaButtonInternal(paintInfo.context, rect, mediaElement->muted() ? soundNone: soundFull); Add a space before the : > + if (bufferedRect.width() > 0 && bufferedRect.height() > 0) { > + FloatPoint p0 = bufferedRect.location(); > + FloatPoint p1 = p0; Can you think of more meaningful names than p0 and p1? (sliderTop, sliderBottom?)
Albert J. Wong
Comment 10 2009-09-16 14:46:40 PDT
Brett Wilson (Google)
Comment 11 2009-09-16 19:35:59 PDT
I rolled back this change because it did not compile. WebCore/rendering/RenderThemeChromiumMac.mm: In member function 'virtual bool WebCore::RenderThemeChromiumMac::paintMediaSliderTrack(WebCore::RenderObject*, const WebCore::RenderObject::PaintInfo&, const WebCore::IntRect&)': /b/slave/webkit-rel-mac-webkit-org/build/src/webkit/../third_party/WebKit/WebCore/rendering/RenderThemeChromiumMac.mm:1966: error: 'p1' was not declared in this scope
Eric Seidel (no email)
Comment 12 2009-09-18 13:22:41 PDT
Comment on attachment 39401 [details] Reimplement default media UI for Mac Chromium to match the style Marking this change as r- since it was rolled out.
Albert J. Wong
Comment 13 2009-09-18 13:24:38 PDT
Resolving bug since it has been committed again.
Note You need to log in before you can comment on or make changes to this bug.