WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
92132
Add an overlay play button to media controls on android
https://bugs.webkit.org/show_bug.cgi?id=92132
Summary
Add an overlay play button to media controls on android
Min Qin
Reported
2012-07-24 09:34:27 PDT
Add an overlay play button to media controls on android
Attachments
Patch
(25.95 KB, patch)
2012-07-24 09:46 PDT
,
Min Qin
no flags
Details
Formatted Diff
Diff
Patch
(33.75 KB, patch)
2012-07-25 14:53 PDT
,
Min Qin
no flags
Details
Formatted Diff
Diff
Patch
(33.67 KB, patch)
2012-07-26 09:27 PDT
,
Min Qin
no flags
Details
Formatted Diff
Diff
Patch
(33.63 KB, patch)
2012-07-26 23:59 PDT
,
Min Qin
no flags
Details
Formatted Diff
Diff
Patch
(34.00 KB, patch)
2012-07-27 11:39 PDT
,
Min Qin
no flags
Details
Formatted Diff
Diff
Patch
(34.57 KB, patch)
2012-07-28 01:02 PDT
,
Min Qin
no flags
Details
Formatted Diff
Diff
Patch
(35.03 KB, patch)
2012-07-28 01:11 PDT
,
Min Qin
no flags
Details
Formatted Diff
Diff
Show Obsolete
(6)
View All
Add attachment
proposed patch, testcase, etc.
Min Qin
Comment 1
2012-07-24 09:46:31 PDT
Created
attachment 154087
[details]
Patch
Eric Carlson
Comment 2
2012-07-24 11:06:49 PDT
Comment on
attachment 154087
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=154087&action=review
> Source/WebCore/css/mediaControls.css:86 > + display: -webkit-box;
Shouldn't this be display:none, and then each port that wants to display it can override?
> Source/WebCore/html/shadow/MediaControlElements.h:283 > + MediaControlOverlayPlayButtonElement(Document*);
All single-argument constructors should be marked "explicit" so the compiler doesn't try to implicitly create a MediaControlCromiumEnclosureElement from a Document*.
> Source/WebCore/html/shadow/MediaControlRootElementChromium.cpp:78 > +#if ENABLE(MEDIA_OVERLAY_PLAY_BUTTON) > +MediaControlOverlayEnclosureElement::MediaControlOverlayEnclosureElement(Document* document) > + : MediaControlChromiumEnclosureElement(document) > +{ > +} > +
Is there any reason to not do this by subclassing MediaControlRootElementChromium instead of adding compile flags?
> Source/WebCore/rendering/RenderMediaControlsChromium.cpp:116 > +#if ENABLE(MEDIA_OVERLAY_PLAY_BUTTON) > +static bool paintMediaOverlayPlayButton(RenderObject* object, const PaintInfo& paintInfo, const IntRect& rect) > +{
Again, is there any reason to not do this by subclassing?
Min Qin
Comment 3
2012-07-25 14:53:56 PDT
Created
attachment 154452
[details]
Patch
Min Qin
Comment 4
2012-07-25 15:01:35 PDT
Removed the ENABLE(MEDIA_OVERLAY_PLAY_BUTTON) flag, PTAL. (In reply to
comment #2
)
> (From update of
attachment 154087
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=154087&action=review
> > > Source/WebCore/css/mediaControls.css:86 > > + display: -webkit-box; > > Shouldn't this be display:none, and then each port that wants to display it can override?
Done.
> > > Source/WebCore/html/shadow/MediaControlElements.h:283 > > + MediaControlOverlayPlayButtonElement(Document*); > > All single-argument constructors should be marked "explicit" so the compiler doesn't try to implicitly create a MediaControlCromiumEnclosureElement from a Document*. > > > Source/WebCore/html/shadow/MediaControlRootElementChromium.cpp:78 > > +#if ENABLE(MEDIA_OVERLAY_PLAY_BUTTON) > > +MediaControlOverlayEnclosureElement::MediaControlOverlayEnclosureElement(Document* document) > > + : MediaControlChromiumEnclosureElement(document) > > +{ > > +} > > + > > Is there any reason to not do this by subclassing MediaControlRootElementChromium instead of adding compile flags?
Refactored MediaControlRootElementChromium and added a subclass MediaControlRootElementChromiumAndroid to implement the functionality of the overlay play button.
> > > Source/WebCore/rendering/RenderMediaControlsChromium.cpp:116 > > +#if ENABLE(MEDIA_OVERLAY_PLAY_BUTTON) > > +static bool paintMediaOverlayPlayButton(RenderObject* object, const PaintInfo& paintInfo, const IntRect& rect) > > +{ > > Again, is there any reason to not do this by subclassing?
This class is full of static functions. So subclassing it does not help too much. I removed the "#if ENABLE(MEDIA_OVERLAY_PLAY_BUTTON)" in the file, the code will only be hit in the android port (called from RenderThemeChromiumAndroid)
Eric Carlson
Comment 5
2012-07-26 06:22:30 PDT
Comment on
attachment 154452
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=154452&action=review
This looks great with the minor nit noted. Thank you for taking the time to change your approach and then refactor, this is a huge improvement!
> Source/WebCore/css/mediaControlsChromiumAndroid.css:113 > +audio::-webkit-media-controls-overlay-play-button { > + display: none; > +}
This should be unnecessary.
Min Qin
Comment 6
2012-07-26 09:27:51 PDT
Created
attachment 154668
[details]
Patch
Min Qin
Comment 7
2012-07-26 09:28:57 PDT
(In reply to
comment #5
)
> (From update of
attachment 154452
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=154452&action=review
> > This looks great with the minor nit noted. Thank you for taking the time to change your approach and then refactor, this is a huge improvement! > > > Source/WebCore/css/mediaControlsChromiumAndroid.css:113 > > +audio::-webkit-media-controls-overlay-play-button { > > + display: none; > > +} > > This should be unnecessary.
Done, removed.
Adam Barth
Comment 8
2012-07-26 23:32:23 PDT
Comment on
attachment 154668
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=154668&action=review
> Source/WebCore/rendering/RenderThemeChromiumAndroid.cpp:92 > +#if ENABLE(VIDEO) && ENABLE(MEDIA_OVERLAY_PLAY_BUTTON)
I thought you removed ENABLE(MEDIA_OVERLAY_PLAY_BUTTON) ?
Min Qin
Comment 9
2012-07-26 23:59:23 PDT
Created
attachment 154858
[details]
Patch
Min Qin
Comment 10
2012-07-27 00:02:12 PDT
(In reply to
comment #8
)
> (From update of
attachment 154668
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=154668&action=review
> > > Source/WebCore/rendering/RenderThemeChromiumAndroid.cpp:92 > > +#if ENABLE(VIDEO) && ENABLE(MEDIA_OVERLAY_PLAY_BUTTON) > > I thought you removed ENABLE(MEDIA_OVERLAY_PLAY_BUTTON) ?
Sorry, missed it. Yes, ENABLE(MEDIA_OVERLAY_PLAY_BUTTON) was removed.
Adam Barth
Comment 11
2012-07-27 00:17:35 PDT
Looks like your latest patch doesn't apply cleanly to top-of-tree.
Min Qin
Comment 12
2012-07-27 11:39:52 PDT
Created
attachment 154998
[details]
Patch
Min Qin
Comment 13
2012-07-27 11:41:27 PDT
Rebased the patch to the top of the tree, resolved some of the conflicts there. (In reply to
comment #11
)
> Looks like your latest patch doesn't apply cleanly to top-of-tree.
Adam Barth
Comment 14
2012-07-27 11:52:02 PDT
Comment on
attachment 154998
[details]
Patch Thanks. R+ based on my (limited) understanding of this code and Eric's
Comment #5
.
WebKit Review Bot
Comment 15
2012-07-27 12:38:52 PDT
Comment on
attachment 154998
[details]
Patch Clearing flags on attachment: 154998 Committed
r123908
: <
http://trac.webkit.org/changeset/123908
>
WebKit Review Bot
Comment 16
2012-07-27 12:38:58 PDT
All reviewed patches have been landed. Closing bug.
WebKit Review Bot
Comment 17
2012-07-27 22:34:37 PDT
Re-opened since this is blocked by 92572
Peter Kasting
Comment 18
2012-07-27 22:46:04 PDT
This broke the Chromium-Linux canary compile. Sample build log available at
http://build.chromium.org/p/chromium.webkit/builders/Webkit%20Linux%20%28dbg%29/builds/9510/steps/compile/logs/stdio
. The relevant info is: out/Debug/../../third_party/gold/gold64: error: out/Debug/obj.target/third_party/WebKit/Source/WebCore/WebCore.gyp/libwebcore_html.a(out/Debug/obj.target/third_party/WebKit/Source/WebCore/WebCore.gyp/../../../../../webcore_html/third_party/WebKit/Source/WebCore/html/shadow/MediaControlRootElementChromiumAndroid.o): multiple definition of 'WebCore::MediaControls::create(WebCore::Document*)' out/Debug/../../third_party/gold/gold64: out/Debug/obj.target/third_party/WebKit/Source/WebCore/WebCore.gyp/libwebcore_html.a(out/Debug/obj.target/third_party/WebKit/Source/WebCore/WebCore.gyp/../../../../../webcore_html/third_party/WebKit/Source/WebCore/html/shadow/MediaControlRootElementChromium.o): previous definition here Looks to me like the newly-added MediaControlRootElementChromiumAndroid.cpp file is not getting properly excluded from the Linux build. Rolling this out on
bug 92572
.
Min Qin
Comment 19
2012-07-28 01:02:33 PDT
Created
attachment 155118
[details]
Patch
Min Qin
Comment 20
2012-07-28 01:06:41 PDT
html/ happens to be one of the directory that *Android.cpp files are not excluded. So that's why my android build works fine while the linux build is broken. Updated the webcore.gyp file to exclude all the *Android.cpp files from html/ directory for non-android build. (In reply to
comment #18
)
> This broke the Chromium-Linux canary compile. Sample build log available at
http://build.chromium.org/p/chromium.webkit/builders/Webkit%20Linux%20%28dbg%29/builds/9510/steps/compile/logs/stdio
. > > The relevant info is: > > out/Debug/../../third_party/gold/gold64: error: out/Debug/obj.target/third_party/WebKit/Source/WebCore/WebCore.gyp/libwebcore_html.a(out/Debug/obj.target/third_party/WebKit/Source/WebCore/WebCore.gyp/../../../../../webcore_html/third_party/WebKit/Source/WebCore/html/shadow/MediaControlRootElementChromiumAndroid.o): multiple definition of 'WebCore::MediaControls::create(WebCore::Document*)' > out/Debug/../../third_party/gold/gold64: out/Debug/obj.target/third_party/WebKit/Source/WebCore/WebCore.gyp/libwebcore_html.a(out/Debug/obj.target/third_party/WebKit/Source/WebCore/WebCore.gyp/../../../../../webcore_html/third_party/WebKit/Source/WebCore/html/shadow/MediaControlRootElementChromium.o): previous definition here > > Looks to me like the newly-added MediaControlRootElementChromiumAndroid.cpp file is not getting properly excluded from the Linux build. > > Rolling this out on
bug 92572
.
Min Qin
Comment 21
2012-07-28 01:11:34 PDT
Created
attachment 155119
[details]
Patch
Adam Barth
Comment 22
2012-07-28 11:46:50 PDT
@dpranke: This comments above explain the problems you were having with the component build too.
WebKit Review Bot
Comment 23
2012-07-28 12:24:09 PDT
Comment on
attachment 155119
[details]
Patch Clearing flags on attachment: 155119 Committed
r123969
: <
http://trac.webkit.org/changeset/123969
>
WebKit Review Bot
Comment 24
2012-07-28 12:24:15 PDT
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug