WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
60561
[Qt] Implements a disable appearance for Media Elements of Qt port.
https://bugs.webkit.org/show_bug.cgi?id=60561
Summary
[Qt] Implements a disable appearance for Media Elements of Qt port.
Alexis Menard (darktears)
Reported
2011-05-10 10:54:43 PDT
[Qt] Implements a disable appearance for Media Elements of Qt port.
Attachments
Patch
(2.73 KB, patch)
2011-05-10 10:58 PDT
,
Alexis Menard (darktears)
no flags
Details
Formatted Diff
Diff
Patch
(2.82 KB, patch)
2011-05-11 13:28 PDT
,
Alexis Menard (darktears)
no flags
Details
Formatted Diff
Diff
Patch
(3.08 KB, patch)
2011-05-11 15:55 PDT
,
Alexis Menard (darktears)
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Alexis Menard (darktears)
Comment 1
2011-05-10 10:58:20 PDT
Created
attachment 92984
[details]
Patch
Alexis Menard (darktears)
Comment 2
2011-05-10 11:02:26 PDT
Comment on
attachment 92984
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=92984&action=review
> Source/WebCore/platform/qt/RenderThemeQt.cpp:1228 > + fgColor = Qt::gray;
I could have used platformInactiveSelectionForegroundColor or platformInactiveSelectionBackgroundColor but they really look crap on my Linux KDE.
Eric Carlson
Comment 3
2011-05-10 11:28:56 PDT
Comment on
attachment 92984
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=92984&action=review
> Source/WebCore/platform/qt/RenderThemeQt.cpp:1227 > + if (mediaElement && (!hasSource(mediaElement) || !mediaElement->hasAudio()))
Do you really want paint the thumb as disabled if the element has no audio track?
Alexis Menard (darktears)
Comment 4
2011-05-10 11:36:59 PDT
(In reply to
comment #3
)
> (From update of
attachment 92984
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=92984&action=review
> > > Source/WebCore/platform/qt/RenderThemeQt.cpp:1227 > > + if (mediaElement && (!hasSource(mediaElement) || !mediaElement->hasAudio())) > > Do you really want paint the thumb as disabled if the element has no audio track?
Should I check instead if maxTimeSeekable > 0 ?
Eric Carlson
Comment 5
2011-05-10 11:39:51 PDT
(In reply to
comment #4
)
> (In reply to
comment #3
) > > (From update of
attachment 92984
[details]
[details]) > > View in context:
https://bugs.webkit.org/attachment.cgi?id=92984&action=review
> > > > > Source/WebCore/platform/qt/RenderThemeQt.cpp:1227 > > > + if (mediaElement && (!hasSource(mediaElement) || !mediaElement->hasAudio())) > > > > Do you really want paint the thumb as disabled if the element has no audio track? > > Should I check instead if maxTimeSeekable > 0 ?
It depends entirely on what you are trying to accomplish. If you want to make it look like seeking is disabled when a file has video but no audio, the current code is probably fine. How are you hoping to help the user with this UI change?
Alexis Menard (darktears)
Comment 6
2011-05-10 12:05:02 PDT
(In reply to
comment #5
)
> (In reply to
comment #4
) > > (In reply to
comment #3
) > > > (From update of
attachment 92984
[details]
[details] [details]) > > > View in context:
https://bugs.webkit.org/attachment.cgi?id=92984&action=review
> > > > > > > Source/WebCore/platform/qt/RenderThemeQt.cpp:1227 > > > > + if (mediaElement && (!hasSource(mediaElement) || !mediaElement->hasAudio())) > > > > > > Do you really want paint the thumb as disabled if the element has no audio track? > > > > Should I check instead if maxTimeSeekable > 0 ? > > It depends entirely on what you are trying to accomplish. If you want to make it look like seeking is disabled when a file has video but no audio, the current code is probably fine. > > How are you hoping to help the user with this UI change?
What I'm trying to achieve is that when we don't have yet meta-data, no source basically we're not able to play the video, the controls will look disabled. As soon as data comes in then they look active again. If you have Chromium you'll see.
Tor Arne Vestbø
Comment 7
2011-05-11 07:37:54 PDT
(In reply to
comment #6
)
> (In reply to
comment #5
) > > (In reply to
comment #4
) > > > (In reply to
comment #3
) > > > > (From update of
attachment 92984
[details]
[details] [details] [details]) > > > > View in context:
https://bugs.webkit.org/attachment.cgi?id=92984&action=review
> > > > > > > > > Source/WebCore/platform/qt/RenderThemeQt.cpp:1227 > > > > > + if (mediaElement && (!hasSource(mediaElement) || !mediaElement->hasAudio())) > > > > > > > > Do you really want paint the thumb as disabled if the element has no audio track? > > > > > > Should I check instead if maxTimeSeekable > 0 ? > > > > It depends entirely on what you are trying to accomplish. If you want to make it look like seeking is disabled when a file has video but no audio, the current code is probably fine. > > > > How are you hoping to help the user with this UI change? > > What I'm trying to achieve is that when we don't have yet meta-data, no source basically we're not able to play the video, the controls will look disabled. As soon as data comes in then they look active again. If you have Chromium you'll see.
How about we use the readyState: - HAVE_NOTHING: If preload is none, draw play-button i normal color (so the user can initiate load), everything else disabled. If preload is not none (metadata or auto), draw everything disabled, until.... - HAVE_METADATA: start drawing play-button using normal colors regardless, same goes for other controls, unless you want to delay them to HAVE_CURRENT_DATA? In all cases, if there are errors, we should reflect those by disabling (graying out) all controls.
Alexis Menard (darktears)
Comment 8
2011-05-11 13:28:46 PDT
Created
attachment 93166
[details]
Patch
Kenneth Rohde Christiansen
Comment 9
2011-05-11 14:11:49 PDT
Comment on
attachment 93166
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=93166&action=review
> Source/WebCore/platform/qt/RenderThemeQt.cpp:1232 > + if (!mediaElementCanPlay(o)) > + fgColor = Qt::gray;
Is disabled always grey with all themes?
> Source/WebCore/platform/qt/RenderThemeQt.cpp:1455 > + p.painter->setBrush(getMediaControlForegroundColor(o->parent()));
Maybe make it more clear who is the parent here
Alexis Menard (darktears)
Comment 10
2011-05-11 15:55:58 PDT
Created
attachment 93202
[details]
Patch
Alexis Menard (darktears)
Comment 11
2011-05-11 15:56:29 PDT
(In reply to
comment #10
)
> Created an attachment (id=93202) [details] > Patch
I use the palette now. So whatever color is used in Disabled will be picked.
Kenneth Rohde Christiansen
Comment 12
2011-05-11 15:57:22 PDT
Thanks ;-)
WebKit Commit Bot
Comment 13
2011-05-11 18:20:46 PDT
Comment on
attachment 93202
[details]
Patch Clearing flags on attachment: 93202 Committed
r86299
: <
http://trac.webkit.org/changeset/86299
>
WebKit Commit Bot
Comment 14
2011-05-11 18:20:53 PDT
All reviewed patches have been landed. Closing bug.
Ademar Reis
Comment 15
2011-05-16 14:03:03 PDT
Revision
r86299
cherry-picked into qtwebkit-2.2 with commit ba1970d <
http://gitorious.org/webkit/qtwebkit/commit/ba1970d
>
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