RESOLVED DUPLICATE of bug 28689 29621
Add port-specific control over rendering of media control elements
https://bugs.webkit.org/show_bug.cgi?id=29621
Summary Add port-specific control over rendering of media control elements
Andrew Scherkus
Reported 2009-09-21 16:08:42 PDT
Ports should be able to control whether a media control element is rendered or not.
Attachments
Draft (5.53 KB, patch)
2009-09-21 16:13 PDT, Andrew Scherkus
no flags
Andrew Scherkus
Comment 1 2009-09-21 16:13:07 PDT
Created attachment 39891 [details] Draft This is a draft of deferring the decision on rendering a media control element to the RenderTheme. This is my first real dive into Element/RenderObject/Style/Theme interaction, so feel free to point out my mistakes :)
Andrew Scherkus
Comment 2 2009-09-21 16:15:03 PDT
The overall change is: 1) Media control elements will always create a renderer 2) RenderTheme decides whether those renderers will be visible based on inspecting the HTMLMediaElement
Andrew Scherkus
Comment 3 2009-09-21 18:38:56 PDT
Forgot I had left my previous bug open. Closing. *** This bug has been marked as a duplicate of bug 28689 ***
Eric Carlson
Comment 4 2009-09-22 08:39:37 PDT
> + > + // Alternatively we could pass in the theme for fine-tuned adjustment. If > + // we keep it as simply setting display to NONE then I might rename this method > + // shouldDisplayMediaControlPart instead. > + if (!renderer->theme()->shouldRenderMediaControlPart(renderer)) > + style->setDisplay(NONE); This shouldn't be necessary. I think if have both MediaControlElement:: rendererIsNeeded and MediaControlInputElement:: rendererIsNeeded call the theme method it should just work. > bool MediaControlMuteButtonElement::rendererIsNeeded(RenderStyle* style) > { > - return MediaControlInputElement::rendererIsNeeded(style) && !disabled(); > + // All subclasses will probably end up NOT implementing this method anymore. > + return MediaControlInputElement::rendererIsNeeded(style); We do want to call the the base class method, an element could not need a renderer for other reasons (eg. CSS).
Eric Carlson
Comment 5 2009-09-22 08:42:38 PDT
oops, wrong bug.
Note You need to log in before you can comment on or make changes to this bug.