Bug 1372537 - display:none of symbol should be important r=longsonr,emilio
authorviolet <violet.bugreport@gmail.com>
Mon, 29 Apr 2019 00:20:30 +0000
changeset 530525 90c4bb8c0d5cb33135e4229c982f746bc1aa9ee7
parent 530523 54cbb3745cdb9a8aa0a4428d405b3b2e1c7d13c2
child 530526 900ceaf4d39c8968eb4ba8c7769b47064f34ad18
push id11265
push userffxbld-merge
push dateMon, 13 May 2019 10:53:39 +0000
treeherdermozilla-beta@77e0fe8dbdd3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerslongsonr, emilio
bugs1372537
milestone68.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1372537 - display:none of symbol should be important r=longsonr,emilio Differential Revision: https://phabricator.services.mozilla.com/D29099
layout/reftests/svg/symbol-01.svg
layout/svg/svg.css
--- a/layout/reftests/svg/symbol-01.svg
+++ b/layout/reftests/svg/symbol-01.svg
@@ -1,15 +1,21 @@
 <!--
      Any copyright is dedicated to the Public Domain.
      http://creativecommons.org/publicdomain/zero/1.0/
 -->
 <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink='http://www.w3.org/1999/xlink'>
+  <style type="text/css"><![CDATA[
+    #s {
+      display: inline;
+    }
+  ]]></style>
   <!--
     A basic test that referencing a <symbol> with a <use> works.
     Note that the fill specified on the <use> inherits into the
     <use> shadow tree.
+    Also <symbol> itself should have |display:none !important|.
     -->
   <symbol id='s' viewBox='100 100 10 10'>
     <circle cx='105' cy='105' r='4'/>
   </symbol>
   <use xlink:href='#s' x='0' y='0' width='100' height='100' fill='green'/>
 </svg>
--- a/layout/svg/svg.css
+++ b/layout/svg/svg.css
@@ -2,20 +2,25 @@
  *
  * 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 {
+style, script {
  display: none;
 }
 
+/* This is only to be overridden by the rule right below. */
+symbol {
+ display: none !important;
+}
+
 symbol:-moz-use-shadow-tree-root {
   display: inline !important;
 }
 
 switch {
  -moz-binding: none !important;
 }