Changeset 218878 in webkit


Ignore:
Timestamp:
Jun 28, 2017 9:32:49 AM (7 years ago)
Author:
Carlos Garcia Campos
Message:

[GTK] Some web pages disappear immediately after rendering
https://bugs.webkit.org/show_bug.cgi?id=173768

Reviewed by Xabier Rodriguez-Calvar.

This is happening with websites having a "hidden" class in HTML tag when a media element is added. In the GTK+
port the media controls CSS contains the following code:

.hidden {

display: none !important;

}

That causes the whole HTML document to become display: none. That's why we just render a white page, and also
the reason why it only happens with the GTK+ port and only with some specific websites. We should limit the
scope of the hidden class to the media control elements.

  • css/mediaControlsGtk.css:

(audio::-webkit-media-controls-panel.hidden,):
(audio::-webkit-media-controls-panel div.mute-box.hidden,):
(audio::-webkit-media-controls-current-time-display.hidden,):
(audio::-webkit-media-controls-timeline.hidden,):
(audio::-webkit-media-controls-toggle-closed-captions-button, video::-webkit-media-controls-toggle-closed-captions-button):
(audio::-webkit-media-controls-toggle-closed-captions-button.hidden,):
(video::-webkit-media-controls-closed-captions-container.hidden):
(audio::-webkit-media-controls-fullscreen-button.hidden,):
(.hidden): Deleted.

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r218877 r218878  
     12017-06-28  Carlos Garcia Campos  <cgarcia@igalia.com>
     2
     3        [GTK] Some web pages disappear immediately after rendering
     4        https://bugs.webkit.org/show_bug.cgi?id=173768
     5
     6        Reviewed by Xabier Rodriguez-Calvar.
     7
     8        This is happening with websites having a "hidden" class in HTML tag when a media element is added. In the GTK+
     9        port the media controls CSS contains the following code:
     10
     11        .hidden {
     12            display: none !important;
     13        }
     14
     15        That causes the whole HTML document to become display: none. That's why we just render a white page, and also
     16        the reason why it only happens with the GTK+ port and only with some specific websites. We should limit the
     17        scope of the hidden class to the media control elements.
     18
     19        * css/mediaControlsGtk.css:
     20        (audio::-webkit-media-controls-panel.hidden,):
     21        (audio::-webkit-media-controls-panel div.mute-box.hidden,):
     22        (audio::-webkit-media-controls-current-time-display.hidden,):
     23        (audio::-webkit-media-controls-timeline.hidden,):
     24        (audio::-webkit-media-controls-toggle-closed-captions-button, video::-webkit-media-controls-toggle-closed-captions-button):
     25        (audio::-webkit-media-controls-toggle-closed-captions-button.hidden,):
     26        (video::-webkit-media-controls-closed-captions-container.hidden):
     27        (audio::-webkit-media-controls-fullscreen-button.hidden,):
     28        (.hidden): Deleted.
     29
    1302017-06-28  Antoine Quint  <graouts@apple.com>
    231
  • trunk/Source/WebCore/css/mediaControlsGtk.css

    r190205 r218878  
    2828/* These are based on the Chromium media controls */
    2929
    30 .hidden {
    31     display: none !important;
    32 }
    33 
    3430video::-webkit-media-controls-panel *:active,
    3531video::-webkit-media-controls-panel *:focus,
     
    4238audio::-webkit-media-controls-panel.down *:focus {
    4339    background-image: linear-gradient(rgba(255, 255, 255, .05), rgba(0, 0, 0, .05)) !important;
     40}
     41
     42audio::-webkit-media-controls-panel.hidden,
     43video::-webkit-media-controls-panel.hidden {
     44    display: none !important;
    4445}
    4546
     
    121122}
    122123
     124audio::-webkit-media-controls-panel div.mute-box.hidden,
     125video::-webkit-media-controls-panel div.mute-box.hidden {
     126    display: none !important;
     127}
     128
    123129audio::-webkit-media-controls-mute-button, video::-webkit-media-controls-mute-button {
    124130    -webkit-appearance: media-mute-button;
     
    177183    text-shadow: none;
    178184    text-decoration: none;
     185}
     186
     187audio::-webkit-media-controls-current-time-display.hidden,
     188video::-webkit-media-controls-current-time-display.hidden,
     189audio::-webkit-media-controls-time-remaining-display.hidden,
     190video::-webkit-media-controls-time-remaining-display.hidden {
     191    display: none !important;
    179192}
    180193
     
    195208audio::-webkit-media-controls-timeline[disabled], video::-webkit-media-controls-timeline[disabled] {
    196209    opacity: 0.3 !important;
     210}
     211
     212audio::-webkit-media-controls-timeline.hidden,
     213video::-webkit-media-controls-timeline.hidden {
     214    display: none !important;
    197215}
    198216
     
    296314    margin: 0 9px 0 -7px;
    297315    outline: none;
     316}
     317
     318audio::-webkit-media-controls-toggle-closed-captions-button.hidden,
     319video::-webkit-media-controls-toggle-closed-captions-button.hidden {
     320    display: none !important;
    298321}
    299322
     
    323346}
    324347
     348video::-webkit-media-controls-closed-captions-container.hidden {
     349    display: none !important;
     350}
     351
    325352video::-webkit-media-controls-closed-captions-container h3 {
    326353    padding-top: 8px;
     
    369396    outline: none;
    370397}
     398
     399audio::-webkit-media-controls-fullscreen-button.hidden,
     400video::-webkit-media-controls-fullscreen-button.hidden {
     401    display: none !important;
     402}
Note: See TracChangeset for help on using the changeset viewer.