RESOLVED FIXED 26661
Fullscreen button should be hidden when the backend doesn't support it.
https://bugs.webkit.org/show_bug.cgi?id=26661
Summary Fullscreen button should be hidden when the backend doesn't support it.
Pierre d'Herbemont
Reported 2009-06-23 14:16:58 PDT
Attachments
patch 1/2 - v1. (5.35 KB, patch)
2009-06-23 14:33 PDT, Pierre d'Herbemont
no flags
patch 2/2 - v1. (1.58 KB, patch)
2009-06-23 14:34 PDT, Pierre d'Herbemont
no flags
patch 1/2 - v2. (6.72 KB, patch)
2009-06-23 15:54 PDT, Pierre d'Herbemont
eric: review+
patch 2/2 - v2. (1.89 KB, patch)
2009-06-23 15:55 PDT, Pierre d'Herbemont
eric: review+
patch 1/2 - v3. (6.52 KB, patch)
2009-06-25 10:25 PDT, Pierre d'Herbemont
simon.fraser: review+
patch 1/2 - v4. (5.08 KB, patch)
2009-06-25 16:40 PDT, Pierre d'Herbemont
simon.fraser: review+
Pierre d'Herbemont
Comment 1 2009-06-23 14:33:34 PDT
Created attachment 31739 [details] patch 1/2 - v1.
Pierre d'Herbemont
Comment 2 2009-06-23 14:34:25 PDT
Created attachment 31740 [details] patch 2/2 - v1.
Pierre d'Herbemont
Comment 3 2009-06-23 15:54:30 PDT
Created attachment 31750 [details] patch 1/2 - v2. With ChangeLog.
Pierre d'Herbemont
Comment 4 2009-06-23 15:55:16 PDT
Created attachment 31751 [details] patch 2/2 - v2. With ChangeLog.
Eric Seidel (no email)
Comment 5 2009-06-23 17:34:24 PDT
Comment on attachment 31750 [details] patch 1/2 - v2. I bet there are still ways to test this... but ok.
Eric Seidel (no email)
Comment 6 2009-06-23 17:35:28 PDT
Comment on attachment 31751 [details] patch 2/2 - v2. Looks OK.
Eric Seidel (no email)
Comment 7 2009-06-24 18:50:50 PDT
Pierre will you commit these yourself, or does someone need to commit them for you?
Pierre d'Herbemont
Comment 8 2009-06-24 19:20:07 PDT
(In reply to comment #7) > Pierre will you commit these yourself, or does someone need to commit them for > you? I don't have commit access... So I still need someone to commit them.
Pierre d'Herbemont
Comment 9 2009-06-25 10:25:29 PDT
Created attachment 31863 [details] patch 1/2 - v3. supportsFullscreen() shouldn't be pure virtual. Return false by default.
Pierre d'Herbemont
Comment 10 2009-06-25 10:26:33 PDT
Comment on attachment 31863 [details] patch 1/2 - v3. I think it's still r+ by Eric Seidel, even after this change. Yet. Marquing as r?
Simon Fraser (smfr)
Comment 11 2009-06-25 11:36:50 PDT
Comment on attachment 31863 [details] patch 1/2 - v3. > diff --git a/WebCore/html/HTMLMediaElement.h b/WebCore/html/HTMLMediaElement.h > index 2a08e3c..18b263a 100644 > --- a/WebCore/html/HTMLMediaElement.h > +++ b/WebCore/html/HTMLMediaElement.h > @@ -65,7 +65,9 @@ public: > > virtual bool isVideo() const { return false; } > virtual bool hasVideo() const { return false; } > - > + > + virtual bool supportsFullscreen() const { return false; } Try to avoid changing whitespace. > +void MediaControlFullscreenButtonElement::update() > +{ > + setHidden(!m_mediaElement->supportsFullscreen()); > + MediaControlInputElement::update(); Will need to change when setHidden goes away. > diff --git a/WebCore/rendering/MediaControlElements.h b/WebCore/rendering/MediaControlElements.h > index 0c95976..4d8647e 100644 > --- a/WebCore/rendering/MediaControlElements.h > +++ b/WebCore/rendering/MediaControlElements.h > @@ -154,6 +154,7 @@ class MediaControlFullscreenButtonElement : public MediaControlInputElement { > public: > MediaControlFullscreenButtonElement(Document*, HTMLMediaElement*); > virtual void defaultEventHandler(Event*); > + void update(); You'll need to make update() virtual on MediaControlInputElement, then declare if virtual here. OK with these changes.
Pierre d'Herbemont
Comment 12 2009-06-25 16:40:02 PDT
Created attachment 31886 [details] patch 1/2 - v4. With Simon's comment.
Eric Seidel (no email)
Comment 13 2009-06-25 17:07:19 PDT
Comment on attachment 31886 [details] patch 1/2 - v4. No argument name needed: virtual bool rendererIsNeeded(RenderStyle* style); according to WK style. I think simon should review this.
Simon Fraser (smfr)
Comment 14 2009-06-26 11:14:50 PDT
Comment on attachment 31886 [details] patch 1/2 - v4. > +bool MediaControlFullscreenButtonElement::rendererIsNeeded(RenderStyle* style) > +{ > + return m_mediaElement->supportsFullscreen() && HTMLInputElement::rendererIsNeeded(style); Should just call up to the superclass here, not skip a generation.
Simon Fraser (smfr)
Comment 15 2009-06-26 11:28:55 PDT
Note You need to log in before you can comment on or make changes to this bug.