gecko-dev/layout/svg/svg.css
Emilio Cobos Álvarez bd7c1e4e8c Bug 1468133: Remove the optimization to lazily load non-SVG styles since it's not relevant anymore. r=heycam
This was a memory-saving optimization introduced as part of dependencies for bug
686875, but a more general system landed in bug 77999 for Gecko and
https://github.com/servo/servo/pull/18509 for Servo.

So now it's probably even a bit of a pessimization (though probably not huge),
and given this causes bugs like bug 1462742, bug 1157592, and bug 1468145, and
fishiness like the one pointed out in this bug, we may as well remove it.

The performance impact of having to lookup through more rules should be minimal
given the bloom filter and the rule hash optimizations.

This makes me wonder whether we could remove the whole concept of on-demand UA
sheets, since they've caused pain, for example, when the frontend people try
loading <svg>s from NAC (since that triggers sheet loading from frame
construction, which is not good). I'm not concerned about loading mathml.css and
svg.css everywhere, though xul.css may not be as doable since it adds a bunch of
attribute-dependent selectors. Though on the other hand I asserted in the
xul.css code and we don't load it in content with <video> / <input
type="date/time/etc"> and such, afaict, so maybe now that legacy addons are gone
we can remove that sheet from content processes altogether.

MozReview-Commit-ID: 9JCWNZj6BkT
2018-06-22 03:42:46 +02:00

87 lines
1.9 KiB
CSS

/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* 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/. */
@namespace url(http://www.w3.org/2000/svg);
@namespace xml url(http://www.w3.org/XML/1998/namespace);
style, script, symbol {
display: none;
}
symbol:-moz-use-shadow-tree-root {
display: inline !important;
}
switch {
-moz-binding: none !important;
}
svg:not(:root), symbol, image, marker, pattern, foreignObject {
overflow: hidden;
}
@media all and (-moz-is-glyph) {
:root {
fill: context-fill;
fill-opacity: context-fill-opacity;
stroke: context-stroke;
stroke-opacity: context-stroke-opacity;
stroke-width: context-value;
stroke-dasharray: context-value;
stroke-dashoffset: context-value;
}
}
foreignObject {
-moz-appearance: none ! important;
margin: 0 ! important;
padding: 0 ! important;
border-width: 0 ! important;
white-space: normal;
}
@media all and (-moz-is-resource-document) {
foreignObject *|* {
-moz-appearance: none !important;
}
}
*|*::-moz-svg-foreign-content {
display: block !important;
/* We need to be an absolute and fixed container */
transform: translate(0) !important;
text-indent: 0;
}
/* Set |transform-origin:0 0;| for all SVG elements except outer-<svg>,
noting that 'svg' as a child of 'foreignObject' counts as outer-<svg>.
*/
*:not(svg),
*:not(foreignObject) > svg {
transform-origin:0 0;
}
*|*::-moz-svg-text {
unicode-bidi: inherit;
vector-effect: inherit;
}
*[xml|space=preserve] {
white-space: -moz-pre-space;
}
*|*::-moz-svg-marker-anon-child {
clip-path: inherit;
filter: inherit;
mask: inherit;
opacity: inherit;
}
*:-moz-focusring {
/* Don't specify the outline-color, we should always use initial value. */
outline: 1px dotted;
}