Bug 1374106, part 3 - Split up the video control closed captions on/off icon and convert it to use SVG context paint. r=dao

MozReview-Commit-ID: KB8nARiNIkK
This commit is contained in:
Jonathan Watt 2017-05-26 17:04:36 +01:00
Родитель 51919288a8
Коммит 3dfe119f2a
5 изменённых файлов: 41 добавлений и 72 удалений

Просмотреть файл

@ -72,6 +72,8 @@ toolkit.jar:
skin/classic/global/media/audioMutedButton.svg (../../shared/media/audioMutedButton.svg)
skin/classic/global/media/audioNoAudioButton.svg (../../shared/media/audioNoAudioButton.svg)
skin/classic/global/media/audioUnmutedButton.svg (../../shared/media/audioUnmutedButton.svg)
skin/classic/global/media/closedCaptionButton-cc-off.svg (../../shared/media/closedCaptionButton-cc-off.svg)
skin/classic/global/media/closedCaptionButton-cc-on.svg (../../shared/media/closedCaptionButton-cc-on.svg)
skin/classic/global/media/TopLevelImageDocument.css (../../shared/media/TopLevelImageDocument.css)
skin/classic/global/media/TopLevelVideoDocument.css (../../shared/media/TopLevelVideoDocument.css)
skin/classic/global/media/imagedoc-lightnoise.png (../../shared/media/imagedoc-lightnoise.png)
@ -79,7 +81,6 @@ toolkit.jar:
* skin/classic/global/media/videocontrols.css (../../shared/media/videocontrols.css)
skin/classic/global/media/pauseButton.svg (../../shared/media/pauseButton.svg)
skin/classic/global/media/playButton.svg (../../shared/media/playButton.svg)
skin/classic/global/media/closedCaptionButton.svg (../../shared/media/closedCaptionButton.svg)
skin/classic/global/media/fullscreenButton.svg (../../shared/media/fullscreenButton.svg)
skin/classic/global/media/error.png (../../shared/media/error.png)
skin/classic/global/media/throbber.png (../../shared/media/throbber.png)

Просмотреть файл

@ -0,0 +1,16 @@
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<svg xmlns="http://www.w3.org/2000/svg"
width="18px" height="18px" viewBox="0 0 18 18">
<path fill="context-fill" fill-rule="evenodd"
d="M16.531,16.107H5.267l1.982-2H15c0.6,0,1-0.4,1-1V5.274
l1.946-1.964C17.963,3.399,18,3.483,18,3.576v11.031C18,15.407,17.331,16.107,16.531,16.107z M14.016,8.506h-1.218l1.005-1.014
C13.913,7.789,13.984,8.128,14.016,8.506z M11.786,12.361c-0.828,0-1.476-0.326-1.913-0.902l1.09-1.101
c0.136,0.323,0.374,0.541,0.796,0.541c0.514,0,0.695-0.44,0.756-1.014h1.535C13.908,11.43,13.071,12.361,11.786,12.361z
M1.496,16.106C0.697,16.104,0,15.406,0,14.607V3.576c0-0.8,0.7-1.5,1.5-1.5h12.846L16.299,0l1.316,1.283L2.615,17.13L1.496,16.106
z M3,4.107c-0.6,0-1,0.4-1,1v8c0,0.6,0.4,1,1,1h0.029l2.031-2.16c-0.757-0.503-1.191-1.457-1.191-2.744
c0-1.936,1.069-3.14,2.428-3.14c1.357,0,2.136,0.76,2.361,2.059l3.777-4.016H3z M8.298,8.506H7.355
c-0.047-0.623-0.49-1.23-0.99-1.23c-0.561,0-1.337,0.84-1.337,1.995c0,0.674,0.381,1.427,0.95,1.702L8.298,8.506z"/>
</svg>

После

Ширина:  |  Высота:  |  Размер: 1.2 KiB

Просмотреть файл

@ -0,0 +1,17 @@
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<svg xmlns="http://www.w3.org/2000/svg"
width="18px" height="18px" viewBox="0 0 18 18">
<path fill="context-fill"
d="M16.531,1.984H1.5c-0.8,0-1.5,0.7-1.5,1.5v11.031c0,0.8,0.7,1.5,1.5,1.5h15.031
c0.8,0,1.469-0.7,1.469-1.5V3.484C18,2.684,17.331,1.984,16.531,1.984z
M16,13.016c0,0.6-0.4,1-1,1H3c-0.6,0-1-0.4-1-1v-8c0-0.6,0.4-1,1-1h12c0.6,0,1,0.4,1,1V13.016z
M6.426,10.807c-0.811,0-0.96-0.789-0.96-1.628c0-1.155,0.338-1.745,0.899-1.745c0.5,0,0.818,0.357,0.866,0.98
h1.484C8.585,6.877,7.785,5.972,6.297,5.972c-1.359,0-2.428,1.205-2.428,3.14c0,1.944,0.974,3.157,2.583,3.157
c1.285,0,2.153-0.93,2.295-2.476H7.244C7.183,10.367,6.94,10.807,6.426,10.807z
M11.759,10.807c-0.811,0-0.96-0.789-0.96-1.628c0-1.155,0.338-1.745,0.899-1.745c0.5,0,0.756,0.357,0.803,0.98h1.515
c-0.129-1.537-0.898-2.443-2.385-2.443c-1.359,0-2.396,1.205-2.396,3.14c0,1.944,0.943,3.157,2.552,3.157
c1.285,0,2.122-0.93,2.264-2.476h-1.535C12.454,10.367,12.273,10.807,11.759,10.807z"/>
</svg>

После

Ширина:  |  Высота:  |  Размер: 1.2 KiB

Просмотреть файл

@ -1,55 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="18px" height="18px" viewBox="0 0 18 18">
<style>
use:not(:target) {
display: none;
}
use {
fill: #ffffff;
}
use[id$="-hover"] {
fill: #48a0f7;
}
use[id$="-active"] {
fill: #2d89e6;
}
use[id$="-focus"] {
fill: #48a0f7;
}
use[id$="-disabled"] {
fill: #ffffff;
}
</style>
<symbol id="cc-off-shape">
<path fill-rule="evenodd" clip-rule="evenodd" d="M16.531,16.107H5.267l1.982-2H15c0.6,0,1-0.4,1-1V5.274
l1.946-1.964C17.963,3.399,18,3.483,18,3.576v11.031C18,15.407,17.331,16.107,16.531,16.107z M14.016,8.506h-1.218l1.005-1.014
C13.913,7.789,13.984,8.128,14.016,8.506z M11.786,12.361c-0.828,0-1.476-0.326-1.913-0.902l1.09-1.101
c0.136,0.323,0.374,0.541,0.796,0.541c0.514,0,0.695-0.44,0.756-1.014h1.535C13.908,11.43,13.071,12.361,11.786,12.361z
M1.496,16.106C0.697,16.104,0,15.406,0,14.607V3.576c0-0.8,0.7-1.5,1.5-1.5h12.846L16.299,0l1.316,1.283L2.615,17.13L1.496,16.106
z M3,4.107c-0.6,0-1,0.4-1,1v8c0,0.6,0.4,1,1,1h0.029l2.031-2.16c-0.757-0.503-1.191-1.457-1.191-2.744
c0-1.936,1.069-3.14,2.428-3.14c1.357,0,2.136,0.76,2.361,2.059l3.777-4.016H3z M8.298,8.506H7.355
c-0.047-0.623-0.49-1.23-0.99-1.23c-0.561,0-1.337,0.84-1.337,1.995c0,0.674,0.381,1.427,0.95,1.702L8.298,8.506z"/>
</symbol>
<symbol id="cc-shape">
<path d="M16.531,1.984H1.5c-0.8,0-1.5,0.7-1.5,1.5v11.031c0,0.8,0.7,1.5,1.5,1.5h15.031
c0.8,0,1.469-0.7,1.469-1.5V3.484C18,2.684,17.331,1.984,16.531,1.984z M16,13.016c0,0.6-0.4,1-1,1H3c-0.6,0-1-0.4-1-1v-8
c0-0.6,0.4-1,1-1h12c0.6,0,1,0.4,1,1V13.016z M6.426,10.807c-0.811,0-0.96-0.789-0.96-1.628c0-1.155,0.338-1.745,0.899-1.745
c0.5,0,0.818,0.357,0.866,0.98h1.484C8.585,6.877,7.785,5.972,6.297,5.972c-1.359,0-2.428,1.205-2.428,3.14
c0,1.944,0.974,3.157,2.583,3.157c1.285,0,2.153-0.93,2.295-2.476H7.244C7.183,10.367,6.94,10.807,6.426,10.807z M11.759,10.807
c-0.811,0-0.96-0.789-0.96-1.628c0-1.155,0.338-1.745,0.899-1.745c0.5,0,0.756,0.357,0.803,0.98h1.515
c-0.129-1.537-0.898-2.443-2.385-2.443c-1.359,0-2.396,1.205-2.396,3.14c0,1.944,0.943,3.157,2.552,3.157
c1.285,0,2.122-0.93,2.264-2.476h-1.535C12.454,10.367,12.273,10.807,11.759,10.807z"/>
</symbol>
<use id="cc" xlink:href="#cc-shape"/>
<use id="cc-hover" xlink:href="#cc-shape"/>
<use id="cc-active" xlink:href="#cc-shape"/>
<use id="cc-focus" xlink:href="#cc-shape"/>
<use id="cc-disabled" xlink:href="#cc-shape"/>
<use id="cc-off" xlink:href="#cc-off-shape"/>
<use id="cc-off-hover" xlink:href="#cc-off-shape"/>
<use id="cc-off-active" xlink:href="#cc-off-shape"/>
<use id="cc-off-focus" xlink:href="#cc-off-shape"/>
<use id="cc-off-disabled" xlink:href="#cc-off-shape"/>
</svg>

До

Ширина:  |  Высота:  |  Размер: 2.8 KiB

Просмотреть файл

@ -98,12 +98,14 @@ audio > xul|videocontrols {
}
.playButton:hover,
.muteButton:hover {
.muteButton:hover,
.closedCaptionButton:hover {
fill: #48a0f7;
}
.playButton:hover:active,
.muteButton:hover:active {
.muteButton:hover:active,
.closedCaptionButton:hover:active {
fill: #2d89e6;
}
@ -131,22 +133,10 @@ audio > xul|videocontrols {
}
.closedCaptionButton {
background-image: url(chrome://global/skin/media/closedCaptionButton.svg#cc-off);
}
.closedCaptionButton:hover {
background-image: url(chrome://global/skin/media/closedCaptionButton.svg#cc-off-hover);
}
.closedCaptionButton:hover:active {
background-image: url(chrome://global/skin/media/closedCaptionButton.svg#cc-off-active);
background-image: url(chrome://global/skin/media/closedCaptionButton-cc-off.svg);
}
.closedCaptionButton[enabled] {
background-image: url(chrome://global/skin/media/closedCaptionButton.svg#cc);
}
.closedCaptionButton[enabled]:hover {
background-image: url(chrome://global/skin/media/closedCaptionButton.svg#cc-hover);
}
.closedCaptionButton[enabled]:hover:active {
background-image: url(chrome://global/skin/media/closedCaptionButton.svg#cc-active);
background-image: url(chrome://global/skin/media/closedCaptionButton-cc-on.svg);
}
.fullscreenButton {