Skip to content

Commit

Permalink
Bug 1466826 - Use SVG context paint for the Windows tree twisties. r=dao
Browse files Browse the repository at this point in the history
  • Loading branch information
Paenglab committed Jun 21, 2018
1 parent 115c0c5 commit e850337
Show file tree
Hide file tree
Showing 9 changed files with 48 additions and 129 deletions.
30 changes: 11 additions & 19 deletions browser/themes/windows/syncedtabs/sidebar.css
Original file line number Diff line number Diff line change
Expand Up @@ -86,33 +86,25 @@
}

.item.client .item-twisty-container {
background-image: url("chrome://global/skin/tree/twisty.svg#open");
background-image: url("chrome://global/skin/tree/twisty-expanded.svg");
-moz-context-properties: fill, fill-opacity;
fill: #636363;
fill-opacity: 1;
}

.item.client.closed .item-twisty-container {
background-image: url("chrome://global/skin/tree/twisty.svg#clsd");
}

.item.client .item-twisty-container:hover {
background-image: url("chrome://global/skin/tree/twisty.svg#open-hover");
}

.item.client.closed .item-twisty-container:hover {
background-image: url("chrome://global/skin/tree/twisty.svg#clsd-hover");
}

.item.client .item-twisty-container:dir(rtl) {
background-image: url("chrome://global/skin/tree/twisty.svg#open-rtl");
background-image: url("chrome://global/skin/tree/twisty-collapsed.svg");
fill: #b6b6b6;
}

.item.client.closed .item-twisty-container:dir(rtl) {
background-image: url("chrome://global/skin/tree/twisty.svg#clsd-rtl");
background-image: url("chrome://global/skin/tree/twisty-collapsed-rtl.svg");
}

.item.client .item-twisty-container:hover:dir(rtl) {
background-image: url("chrome://global/skin/tree/twisty.svg#open-hover-rtl");
.item.client .item-twisty-container:hover {
fill: #4ed0f9;
}

.item.client.closed .item-twisty-container:hover:dir(rtl) {
background-image: url("chrome://global/skin/tree/twisty.svg#clsd-hover-rtl");
.item.client.selected .item-twisty-container:not(:hover) {
fill: currentColor;
}
7 changes: 5 additions & 2 deletions toolkit/themes/windows/global/button.css
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,13 @@ button.plain {
button[type="disclosure"] {
margin: 0;
-moz-appearance: none;
list-style-image: url("chrome://global/skin/tree/twisty.svg#clsd");
list-style-image: url("chrome://global/skin/tree/twisty-collapsed.svg");
-moz-context-properties: fill, fill-opacity;
fill: currentColor;
fill-opacity: 1;
min-width: 0;
}

button[type="disclosure"][open="true"] {
list-style-image: url("chrome://global/skin/tree/twisty.svg#open");
list-style-image: url("chrome://global/skin/tree/twisty-expanded.svg");
}
14 changes: 3 additions & 11 deletions toolkit/themes/windows/global/jar.mn
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,6 @@ toolkit.jar:
skin/classic/global/icons/windowControls.png (icons/windowControls.png)
* skin/classic/global/in-content/common.css (in-content/common.css)
* skin/classic/global/in-content/info-pages.css (in-content/info-pages.css)
skin/classic/global/tree/twisty.svg (tree/twisty.svg)
skin/classic/global/tree/twisty-preWin10.svg (tree/twisty-preWin10.svg)

% override chrome://global/skin/tree/twisty.svg#clsd chrome://global/skin/tree/twisty-preWin10.svg#clsd osversion<=6.3
% override chrome://global/skin/tree/twisty.svg#clsd-rtl chrome://global/skin/tree/twisty-preWin10.svg#clsd-rtl osversion<=6.3
% override chrome://global/skin/tree/twisty.svg#clsd-hover chrome://global/skin/tree/twisty-preWin10.svg#clsd-hover osversion<=6.3
% override chrome://global/skin/tree/twisty.svg#clsd-hover-rtl chrome://global/skin/tree/twisty-preWin10.svg#clsd-hover-rtl osversion<=6.3
% override chrome://global/skin/tree/twisty.svg#open chrome://global/skin/tree/twisty-preWin10.svg#open osversion<=6.3
% override chrome://global/skin/tree/twisty.svg#open-rtl chrome://global/skin/tree/twisty-preWin10.svg#open-rtl osversion<=6.3
% override chrome://global/skin/tree/twisty.svg#open-hover chrome://global/skin/tree/twisty-preWin10.svg#open-hover osversion<=6.3
% override chrome://global/skin/tree/twisty.svg#open-hover-rtl chrome://global/skin/tree/twisty-preWin10.svg#open-hover-rtl osversion<=6.3
skin/classic/global/tree/twisty-collapsed.svg (tree/twisty-collapsed.svg)
skin/classic/global/tree/twisty-collapsed-rtl.svg (tree/twisty-collapsed-rtl.svg)
skin/classic/global/tree/twisty-expanded.svg (tree/twisty-expanded.svg)
34 changes: 11 additions & 23 deletions toolkit/themes/windows/global/tree.css
Original file line number Diff line number Diff line change
Expand Up @@ -265,35 +265,23 @@ treechildren::-moz-tree-twisty {
padding-inline-end: 1px;
padding-top: 1px;
width: 9px; /* The image's width is 9 pixels */
list-style-image: url("chrome://global/skin/tree/twisty.svg#clsd");
list-style-image: url("chrome://global/skin/tree/twisty-collapsed.svg");
-moz-context-properties: fill, fill-opacity;
fill: #b6b6b6;
fill-opacity: 1;
}

treechildren::-moz-tree-twisty(open) {
list-style-image: url("chrome://global/skin/tree/twisty.svg#open");
}

treechildren::-moz-tree-twisty(hover) {
list-style-image: url("chrome://global/skin/tree/twisty.svg#clsd-hover");
}

treechildren::-moz-tree-twisty(hover, open) {
list-style-image: url("chrome://global/skin/tree/twisty.svg#open-hover");
treechildren:-moz-locale-dir(rtl)::-moz-tree-twisty(close) {
list-style-image: url("chrome://global/skin/tree/twisty-collapsed-rtl.svg");
}

treechildren:-moz-locale-dir(rtl)::-moz-tree-twisty {
list-style-image: url("chrome://global/skin/tree/twisty.svg#clsd-rtl");
}

treechildren:-moz-locale-dir(rtl)::-moz-tree-twisty(open) {
list-style-image: url("chrome://global/skin/tree/twisty.svg#open-rtl");
}

treechildren:-moz-locale-dir(rtl)::-moz-tree-twisty(hover) {
list-style-image: url("chrome://global/skin/tree/twisty.svg#clsd-hover-rtl");
treechildren::-moz-tree-twisty(open) {
list-style-image: url("chrome://global/skin/tree/twisty-expanded.svg");
fill: #636363;
}

treechildren:-moz-locale-dir(rtl)::-moz-tree-twisty(hover, open) {
list-style-image: url("chrome://global/skin/tree/twisty.svg#open-hover-rtl");
treechildren::-moz-tree-twisty(hover) {
fill: #4ed0f9;
}

treechildren::-moz-tree-indentation {
Expand Down
6 changes: 6 additions & 0 deletions toolkit/themes/windows/global/tree/twisty-collapsed-rtl.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions toolkit/themes/windows/global/tree/twisty-collapsed.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions toolkit/themes/windows/global/tree/twisty-expanded.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
39 changes: 0 additions & 39 deletions toolkit/themes/windows/global/tree/twisty-preWin10.svg

This file was deleted.

35 changes: 0 additions & 35 deletions toolkit/themes/windows/global/tree/twisty.svg

This file was deleted.

0 comments on commit e850337

Please sign in to comment.