In present design, the tab would hide the unblocking icon when receives
the audio-playback event, but it means we can't hide the icon if the media isn't
audible.
For example, we won't show the unblocking icon for audio with audio track, but
we show the icon for audio with silent audio track which can only be detected
after starting decoding.
In this case, we can't receive the audio-playback after resuming that media.
Therefore, we should dispatch the different event to notify tab UI that the
tab has already been resumed.
MozReview-Commit-ID: 3xCWQU7nVCl
--HG--
extra : rebase_source : 7b4214f1f552ba75da94e4bb1795178983af20f7
In previous patch, we modify the behavior of nsDocument, now it would only resume
window when document has active media components.
However, it causes another issue. If the tab really goes to foreground, but
there is no active media component, the tab would still be blocked and it won't
be resumed anymore.
Therefore, we need to resume it by ourself if the tab is on the foreground but
doesn't be resumed yet.
MozReview-Commit-ID: EdnQ7sRkSJK
--HG--
extra : rebase_source : c2ab932cc3134531e5c49581c5e63b4aabef6ca4
For the first pinned tab, it would be set to visible first and then set to
invisible if there exists other tabs after restarting the whole browser.
If the tab is set to visible, we would activate the media component (set the
|mMediaSuspended| in outer window to none-suspend). In this case, the first
pinned tab would be set to visible briefly, but it doesn't mean the tab is in
the foreground, it's just how DOM manage the tab's visibility.
In that moment, none of the media component has been created yet. Therefore, we
would only activate the media component after the audio channel service exists.
MozReview-Commit-ID: 1FgdMq84yWX
--HG--
extra : rebase_source : d5d7568b9f4bfddf2abd0b2c2a4e9391a856882b
nsDocumentViewer knows which document is involved which will help us later.
Also, fix a typo in the comment.
--HG--
extra : rebase_source : 2d78ae196882d056bdf03e014ff928d7769ba81a
This introduces a basic framework for servo's style system to be able
to query the style of presentation attributes which it can then insert
into the cascade. It uses that framework to implement the size and
color attributes on <font>.
There are a number of improvements that can be done on top of this:
- Implement all other properties
- Abstractify the ruledata parameter of the mappers using templates or virtual dispatch so that it can be a Servo decl block instead
- Implement aforementiond abstraction over Servo decl blocks (this obsoletes the code in the first item above, so it might just be better to skip that and directly do this)
- Replace uses of nsHTMLStyleSheet with an abstract base class containing common elements between Servo and Gecko
I'd prefer for these to be done in separate steps.
MozReview-Commit-ID: GO60qfeZOfl
--HG--
extra : rebase_source : 516d369a8627e413983361aaf85ccb7132b0a06c