summaryrefslogtreecommitdiffstats
path: root/layout/style/res
diff options
context:
space:
mode:
Diffstat (limited to 'layout/style/res')
-rw-r--r--layout/style/res/accessiblecaret-normal@1.5x.pngbin0 -> 1453 bytes
-rw-r--r--layout/style/res/accessiblecaret-normal@1x.pngbin0 -> 999 bytes
-rw-r--r--layout/style/res/accessiblecaret-normal@2.25x.pngbin0 -> 2053 bytes
-rw-r--r--layout/style/res/accessiblecaret-normal@2x.pngbin0 -> 2118 bytes
-rw-r--r--layout/style/res/accessiblecaret-tilt-left@1.5x.pngbin0 -> 1443 bytes
-rw-r--r--layout/style/res/accessiblecaret-tilt-left@1x.pngbin0 -> 993 bytes
-rw-r--r--layout/style/res/accessiblecaret-tilt-left@2.25x.pngbin0 -> 2092 bytes
-rw-r--r--layout/style/res/accessiblecaret-tilt-left@2x.pngbin0 -> 1775 bytes
-rw-r--r--layout/style/res/accessiblecaret-tilt-right@1.5x.pngbin0 -> 1440 bytes
-rw-r--r--layout/style/res/accessiblecaret-tilt-right@1x.pngbin0 -> 982 bytes
-rw-r--r--layout/style/res/accessiblecaret-tilt-right@2.25x.pngbin0 -> 2075 bytes
-rw-r--r--layout/style/res/accessiblecaret-tilt-right@2x.pngbin0 -> 1766 bytes
-rw-r--r--layout/style/res/arrow-left.gifbin0 -> 57 bytes
-rw-r--r--layout/style/res/arrow-right.gifbin0 -> 57 bytes
-rw-r--r--layout/style/res/arrow.gifbin0 -> 56 bytes
-rw-r--r--layout/style/res/arrowd-left.gifbin0 -> 60 bytes
-rw-r--r--layout/style/res/arrowd-right.gifbin0 -> 59 bytes
-rw-r--r--layout/style/res/arrowd.gifbin0 -> 59 bytes
-rw-r--r--layout/style/res/counterstyles.css365
-rw-r--r--layout/style/res/forms.css1062
-rw-r--r--layout/style/res/html.css921
-rw-r--r--layout/style/res/noframes.css13
-rw-r--r--layout/style/res/noscript.css11
-rw-r--r--layout/style/res/plaintext.css40
-rw-r--r--layout/style/res/pluginproblem.css12
-rw-r--r--layout/style/res/quirk.css105
-rw-r--r--layout/style/res/ua.css591
-rw-r--r--layout/style/res/viewsource.css101
28 files changed, 3221 insertions, 0 deletions
diff --git a/layout/style/res/accessiblecaret-normal@1.5x.png b/layout/style/res/accessiblecaret-normal@1.5x.png
new file mode 100644
index 0000000000..6e2eb80dd3
--- /dev/null
+++ b/layout/style/res/accessiblecaret-normal@1.5x.png
Binary files differ
diff --git a/layout/style/res/accessiblecaret-normal@1x.png b/layout/style/res/accessiblecaret-normal@1x.png
new file mode 100644
index 0000000000..7410946c66
--- /dev/null
+++ b/layout/style/res/accessiblecaret-normal@1x.png
Binary files differ
diff --git a/layout/style/res/accessiblecaret-normal@2.25x.png b/layout/style/res/accessiblecaret-normal@2.25x.png
new file mode 100644
index 0000000000..cbe570c2ed
--- /dev/null
+++ b/layout/style/res/accessiblecaret-normal@2.25x.png
Binary files differ
diff --git a/layout/style/res/accessiblecaret-normal@2x.png b/layout/style/res/accessiblecaret-normal@2x.png
new file mode 100644
index 0000000000..fd5034b880
--- /dev/null
+++ b/layout/style/res/accessiblecaret-normal@2x.png
Binary files differ
diff --git a/layout/style/res/accessiblecaret-tilt-left@1.5x.png b/layout/style/res/accessiblecaret-tilt-left@1.5x.png
new file mode 100644
index 0000000000..7176191193
--- /dev/null
+++ b/layout/style/res/accessiblecaret-tilt-left@1.5x.png
Binary files differ
diff --git a/layout/style/res/accessiblecaret-tilt-left@1x.png b/layout/style/res/accessiblecaret-tilt-left@1x.png
new file mode 100644
index 0000000000..09fdb0286d
--- /dev/null
+++ b/layout/style/res/accessiblecaret-tilt-left@1x.png
Binary files differ
diff --git a/layout/style/res/accessiblecaret-tilt-left@2.25x.png b/layout/style/res/accessiblecaret-tilt-left@2.25x.png
new file mode 100644
index 0000000000..4b66547c2b
--- /dev/null
+++ b/layout/style/res/accessiblecaret-tilt-left@2.25x.png
Binary files differ
diff --git a/layout/style/res/accessiblecaret-tilt-left@2x.png b/layout/style/res/accessiblecaret-tilt-left@2x.png
new file mode 100644
index 0000000000..d32fed2173
--- /dev/null
+++ b/layout/style/res/accessiblecaret-tilt-left@2x.png
Binary files differ
diff --git a/layout/style/res/accessiblecaret-tilt-right@1.5x.png b/layout/style/res/accessiblecaret-tilt-right@1.5x.png
new file mode 100644
index 0000000000..cc7524ec8d
--- /dev/null
+++ b/layout/style/res/accessiblecaret-tilt-right@1.5x.png
Binary files differ
diff --git a/layout/style/res/accessiblecaret-tilt-right@1x.png b/layout/style/res/accessiblecaret-tilt-right@1x.png
new file mode 100644
index 0000000000..2712284d1e
--- /dev/null
+++ b/layout/style/res/accessiblecaret-tilt-right@1x.png
Binary files differ
diff --git a/layout/style/res/accessiblecaret-tilt-right@2.25x.png b/layout/style/res/accessiblecaret-tilt-right@2.25x.png
new file mode 100644
index 0000000000..c50c1b5e2f
--- /dev/null
+++ b/layout/style/res/accessiblecaret-tilt-right@2.25x.png
Binary files differ
diff --git a/layout/style/res/accessiblecaret-tilt-right@2x.png b/layout/style/res/accessiblecaret-tilt-right@2x.png
new file mode 100644
index 0000000000..d4a4138071
--- /dev/null
+++ b/layout/style/res/accessiblecaret-tilt-right@2x.png
Binary files differ
diff --git a/layout/style/res/arrow-left.gif b/layout/style/res/arrow-left.gif
new file mode 100644
index 0000000000..a8c2004473
--- /dev/null
+++ b/layout/style/res/arrow-left.gif
Binary files differ
diff --git a/layout/style/res/arrow-right.gif b/layout/style/res/arrow-right.gif
new file mode 100644
index 0000000000..044fe8152b
--- /dev/null
+++ b/layout/style/res/arrow-right.gif
Binary files differ
diff --git a/layout/style/res/arrow.gif b/layout/style/res/arrow.gif
new file mode 100644
index 0000000000..afb4641226
--- /dev/null
+++ b/layout/style/res/arrow.gif
Binary files differ
diff --git a/layout/style/res/arrowd-left.gif b/layout/style/res/arrowd-left.gif
new file mode 100644
index 0000000000..227def79b8
--- /dev/null
+++ b/layout/style/res/arrowd-left.gif
Binary files differ
diff --git a/layout/style/res/arrowd-right.gif b/layout/style/res/arrowd-right.gif
new file mode 100644
index 0000000000..999cf3983b
--- /dev/null
+++ b/layout/style/res/arrowd-right.gif
Binary files differ
diff --git a/layout/style/res/arrowd.gif b/layout/style/res/arrowd.gif
new file mode 100644
index 0000000000..02173c7004
--- /dev/null
+++ b/layout/style/res/arrowd.gif
Binary files differ
diff --git a/layout/style/res/counterstyles.css b/layout/style/res/counterstyles.css
new file mode 100644
index 0000000000..e665e02ec3
--- /dev/null
+++ b/layout/style/res/counterstyles.css
@@ -0,0 +1,365 @@
+/* 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/. */
+
+/* Defined in CSS Counter Styles Level 3 */
+
+/* 6 Simple Predefined Counter Styles */
+
+/* 6.1 Numeric */
+
+@counter-style decimal-leading-zero {
+ system: extends decimal;
+ pad: 2 '0';
+}
+
+@counter-style arabic-indic {
+ system: numeric;
+ symbols: '\660' '\661' '\662' '\663' '\664' '\665' '\666' '\667' '\668' '\669';
+}
+
+@counter-style armenian {
+ system: additive;
+ range: 1 9999;
+ additive-symbols: 9000 '\554', 8000 '\553', 7000 '\552', 6000 '\551', 5000 '\550', 4000 '\54F', 3000 '\54E', 2000 '\54D', 1000 '\54C', 900 '\54B', 800 '\54A', 700 '\549', 600 '\548', 500 '\547', 400 '\546', 300 '\545', 200 '\544', 100 '\543', 90 '\542', 80 '\541', 70 '\540', 60 '\53F', 50 '\53E', 40 '\53D', 30 '\53C', 20 '\53B', 10 '\53A', 9 '\539', 8 '\538', 7 '\537', 6 '\536', 5 '\535', 4 '\534', 3 '\533', 2 '\532', 1 '\531';
+}
+
+@counter-style upper-armenian {
+ system: additive;
+ range: 1 9999;
+ additive-symbols: 9000 '\554', 8000 '\553', 7000 '\552', 6000 '\551', 5000 '\550', 4000 '\54F', 3000 '\54E', 2000 '\54D', 1000 '\54C', 900 '\54B', 800 '\54A', 700 '\549', 600 '\548', 500 '\547', 400 '\546', 300 '\545', 200 '\544', 100 '\543', 90 '\542', 80 '\541', 70 '\540', 60 '\53F', 50 '\53E', 40 '\53D', 30 '\53C', 20 '\53B', 10 '\53A', 9 '\539', 8 '\538', 7 '\537', 6 '\536', 5 '\535', 4 '\534', 3 '\533', 2 '\532', 1 '\531';
+}
+
+@counter-style lower-armenian {
+ system: additive;
+ range: 1 9999;
+ additive-symbols: 9000 '\584', 8000 '\583', 7000 '\582', 6000 '\581', 5000 '\580', 4000 '\57F', 3000 '\57E', 2000 '\57D', 1000 '\57C', 900 '\57B', 800 '\57A', 700 '\579', 600 '\578', 500 '\577', 400 '\576', 300 '\575', 200 '\574', 100 '\573', 90 '\572', 80 '\571', 70 '\570', 60 '\56F', 50 '\56E', 40 '\56D', 30 '\56C', 20 '\56B', 10 '\56A', 9 '\569', 8 '\568', 7 '\567', 6 '\566', 5 '\565', 4 '\564', 3 '\563', 2 '\562', 1 '\561';
+}
+
+@counter-style bengali {
+ system: numeric;
+ symbols: '\9E6' '\9E7' '\9E8' '\9E9' '\9EA' '\9EB' '\9EC' '\9ED' '\9EE' '\9EF';
+}
+
+@counter-style cambodian {
+ system: extends khmer;
+}
+
+@counter-style khmer {
+ system: numeric;
+ symbols: '\17E0' '\17E1' '\17E2' '\17E3' '\17E4' '\17E5' '\17E6' '\17E7' '\17E8' '\17E9';
+}
+
+@counter-style cjk-decimal {
+ system: numeric;
+ range: 0 infinite;
+ symbols: '\3007' '\4E00' '\4E8C' '\4E09' '\56DB' '\4E94' '\516D' '\4E03' '\516B' '\4E5D';
+ suffix: '\3001';
+}
+
+@counter-style devanagari {
+ system: numeric;
+ symbols: '\966' '\967' '\968' '\969' '\96A' '\96B' '\96C' '\96D' '\96E' '\96F';
+}
+
+@counter-style georgian {
+ system: additive;
+ range: 1 19999;
+ additive-symbols: 10000 '\10F5', 9000 '\10F0', 8000 '\10EF', 7000 '\10F4', 6000 '\10EE', 5000 '\10ED', 4000 '\10EC', 3000 '\10EB', 2000 '\10EA', 1000 '\10E9', 900 '\10E8', 800 '\10E7', 700 '\10E6', 600 '\10E5', 500 '\10E4', 400 '\10F3', 300 '\10E2', 200 '\10E1', 100 '\10E0', 90 '\10DF', 80 '\10DE', 70 '\10DD', 60 '\10F2', 50 '\10DC', 40 '\10DB', 30 '\10DA', 20 '\10D9', 10 '\10D8', 9 '\10D7', 8 '\10F1', 7 '\10D6', 6 '\10D5', 5 '\10D4', 4 '\10D3', 3 '\10D2', 2 '\10D1', 1 '\10D0';
+}
+
+@counter-style gujarati {
+ system: numeric;
+ symbols: '\AE6' '\AE7' '\AE8' '\AE9' '\AEA' '\AEB' '\AEC' '\AED' '\AEE' '\AEF';
+}
+
+@counter-style gurmukhi {
+ system: numeric;
+ symbols: '\A66' '\A67' '\A68' '\A69' '\A6A' '\A6B' '\A6C' '\A6D' '\A6E' '\A6F';
+}
+
+/* hebrew is not included because our builtin algorithm can generate a wider
+ * range of number in this style than what the spec defines. */
+
+@counter-style kannada {
+ system: numeric;
+ symbols: '\CE6' '\CE7' '\CE8' '\CE9' '\CEA' '\CEB' '\CEC' '\CED' '\CEE' '\CEF';
+}
+
+@counter-style lao {
+ system: numeric;
+ symbols: '\ED0' '\ED1' '\ED2' '\ED3' '\ED4' '\ED5' '\ED6' '\ED7' '\ED8' '\ED9';
+}
+
+@counter-style malayalam {
+ system: numeric;
+ symbols: '\D66' '\D67' '\D68' '\D69' '\D6A' '\D6B' '\D6C' '\D6D' '\D6E' '\D6F';
+}
+
+@counter-style mongolian {
+ system: numeric;
+ symbols: '\1810' '\1811' '\1812' '\1813' '\1814' '\1815' '\1816' '\1817' '\1818' '\1819';
+}
+
+@counter-style myanmar {
+ system: numeric;
+ symbols: '\1040' '\1041' '\1042' '\1043' '\1044' '\1045' '\1046' '\1047' '\1048' '\1049';
+}
+
+@counter-style oriya {
+ system: numeric;
+ symbols: '\B66' '\B67' '\B68' '\B69' '\B6A' '\B6B' '\B6C' '\B6D' '\B6E' '\B6F';
+}
+
+@counter-style persian {
+ system: numeric;
+ symbols: '\6F0' '\6F1' '\6F2' '\6F3' '\6F4' '\6F5' '\6F6' '\6F7' '\6F8' '\6F9';
+}
+
+@counter-style lower-roman {
+ system: additive;
+ range: 1 3999;
+ additive-symbols: 1000 'm', 900 'cm', 500 'd', 400 'cd', 100 'c', 90 'xc', 50 'l', 40 'xl', 10 'x', 9 'ix', 5 'v', 4 'iv', 1 'i';
+}
+
+@counter-style upper-roman {
+ system: additive;
+ range: 1 3999;
+ additive-symbols: 1000 'M', 900 'CM', 500 'D', 400 'CD', 100 'C', 90 'XC', 50 'L', 40 'XL', 10 'X', 9 'IX', 5 'V', 4 'IV', 1 'I';
+}
+
+@counter-style tamil {
+ system: numeric;
+ symbols: '\BE6' '\BE7' '\BE8' '\BE9' '\BEA' '\BEB' '\BEC' '\BED' '\BEE' '\BEF';
+}
+
+@counter-style telugu {
+ system: numeric;
+ symbols: '\C66' '\C67' '\C68' '\C69' '\C6A' '\C6B' '\C6C' '\C6D' '\C6E' '\C6F';
+}
+
+@counter-style thai {
+ system: numeric;
+ symbols: '\E50' '\E51' '\E52' '\E53' '\E54' '\E55' '\E56' '\E57' '\E58' '\E59';
+}
+
+@counter-style tibetan {
+ system: numeric;
+ symbols: '\F20' '\F21' '\F22' '\F23' '\F24' '\F25' '\F26' '\F27' '\F28' '\F29';
+}
+
+/* 6.2 Alphabetic */
+
+@counter-style lower-alpha {
+ system: alphabetic;
+ symbols: 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 's' 't' 'u' 'v' 'w' 'x' 'y' 'z';
+}
+
+@counter-style lower-latin {
+ system: extends lower-alpha;
+}
+
+@counter-style upper-alpha {
+ system: alphabetic;
+ symbols: 'A' 'B' 'C' 'D' 'E' 'F' 'G' 'H' 'I' 'J' 'K' 'L' 'M' 'N' 'O' 'P' 'Q' 'R' 'S' 'T' 'U' 'V' 'W' 'X' 'Y' 'Z';
+}
+
+@counter-style upper-latin {
+ system: extends upper-alpha;
+}
+
+@counter-style cjk-heavenly-stem {
+ system: alphabetic;
+ symbols: '\7532' '\4E59' '\4E19' '\4E01' '\620A' '\5DF1' '\5E9A' '\8F9B' '\58EC' '\7678';
+ fallback: cjk-decimal;
+ suffix: '\3001';
+}
+
+@counter-style cjk-earthly-branch {
+ system: alphabetic;
+ symbols: '\5B50' '\4E11' '\5BC5' '\536F' '\8FB0' '\5DF3' '\5348' '\672A' '\7533' '\9149' '\620C' '\4EA5';
+ fallback: cjk-decimal;
+ suffix: '\3001';
+}
+
+@counter-style lower-greek {
+ system: alphabetic;
+ symbols: '\3B1' '\3B2' '\3B3' '\3B4' '\3B5' '\3B6' '\3B7' '\3B8' '\3B9' '\3BA' '\3BB' '\3BC' '\3BD' '\3BE' '\3BF' '\3C0' '\3C1' '\3C3' '\3C4' '\3C5' '\3C6' '\3C7' '\3C8' '\3C9';
+}
+
+@counter-style hiragana {
+ system: alphabetic;
+ symbols: '\3042' '\3044' '\3046' '\3048' '\304A' '\304B' '\304D' '\304F' '\3051' '\3053' '\3055' '\3057' '\3059' '\305B' '\305D' '\305F' '\3061' '\3064' '\3066' '\3068' '\306A' '\306B' '\306C' '\306D' '\306E' '\306F' '\3072' '\3075' '\3078' '\307B' '\307E' '\307F' '\3080' '\3081' '\3082' '\3084' '\3086' '\3088' '\3089' '\308A' '\308B' '\308C' '\308D' '\308F' '\3090' '\3091' '\3092' '\3093';
+ suffix: '\3001';
+}
+
+@counter-style hiragana-iroha {
+ system: alphabetic;
+ symbols: '\3044' '\308D' '\306F' '\306B' '\307B' '\3078' '\3068' '\3061' '\308A' '\306C' '\308B' '\3092' '\308F' '\304B' '\3088' '\305F' '\308C' '\305D' '\3064' '\306D' '\306A' '\3089' '\3080' '\3046' '\3090' '\306E' '\304A' '\304F' '\3084' '\307E' '\3051' '\3075' '\3053' '\3048' '\3066' '\3042' '\3055' '\304D' '\3086' '\3081' '\307F' '\3057' '\3091' '\3072' '\3082' '\305B' '\3059';
+ suffix: '\3001';
+}
+
+@counter-style katakana {
+ system: alphabetic;
+ symbols: '\30A2' '\30A4' '\30A6' '\30A8' '\30AA' '\30AB' '\30AD' '\30AF' '\30B1' '\30B3' '\30B5' '\30B7' '\30B9' '\30BB' '\30BD' '\30BF' '\30C1' '\30C4' '\30C6' '\30C8' '\30CA' '\30CB' '\30CC' '\30CD' '\30CE' '\30CF' '\30D2' '\30D5' '\30D8' '\30DB' '\30DE' '\30DF' '\30E0' '\30E1' '\30E2' '\30E4' '\30E6' '\30E8' '\30E9' '\30EA' '\30EB' '\30EC' '\30ED' '\30EF' '\30F0' '\30F1' '\30F2' '\30F3';
+ suffix: '\3001';
+}
+
+@counter-style katakana-iroha {
+ system: alphabetic;
+ symbols: '\30A4' '\30ED' '\30CF' '\30CB' '\30DB' '\30D8' '\30C8' '\30C1' '\30EA' '\30CC' '\30EB' '\30F2' '\30EF' '\30AB' '\30E8' '\30BF' '\30EC' '\30BD' '\30C4' '\30CD' '\30CA' '\30E9' '\30E0' '\30A6' '\30F0' '\30CE' '\30AA' '\30AF' '\30E4' '\30DE' '\30B1' '\30D5' '\30B3' '\30A8' '\30C6' '\30A2' '\30B5' '\30AD' '\30E6' '\30E1' '\30DF' '\30B7' '\30F1' '\30D2' '\30E2' '\30BB' '\30B9';
+ suffix: '\3001';
+}
+
+/* 6.3 Symbolic */
+
+/* symbolic counter styles are not included because they will be drew directly
+ * by the program instead of use alternative symbols defined in the spec */
+
+/* 7 Complex Predefined Counter Styles */
+
+/* only alias is included as other complex counter styles will be generated by
+ * specific algorithms to support the extended range. */
+
+@counter-style cjk-ideographic {
+ system: extends trad-chinese-informal;
+}
+
+/* Mozilla-specific counter styles */
+
+/* Numeric */
+
+@counter-style -moz-arabic-indic {
+ system: extends arabic-indic;
+}
+
+@counter-style -moz-persian {
+ system: extends persian;
+}
+
+@counter-style -moz-urdu {
+ system: extends persian;
+}
+
+@counter-style -moz-devanagari {
+ system: extends devanagari;
+}
+
+@counter-style -moz-bengali {
+ system: extends bengali;
+}
+
+@counter-style -moz-gurmukhi {
+ system: extends gurmukhi;
+}
+
+@counter-style -moz-gujarati {
+ system: extends gujarati;
+}
+
+@counter-style -moz-oriya {
+ system: extends oriya;
+}
+
+@counter-style -moz-tamil {
+ system: extends tamil;
+}
+
+@counter-style -moz-telugu {
+ system: extends telugu;
+}
+
+@counter-style -moz-kannada {
+ system: extends kannada;
+}
+
+@counter-style -moz-malayalam {
+ system: extends malayalam;
+}
+
+@counter-style -moz-thai {
+ system: extends thai;
+}
+
+@counter-style -moz-lao {
+ system: extends lao;
+}
+
+@counter-style -moz-myanmar {
+ system: extends myanmar;
+}
+
+@counter-style -moz-khmer {
+ system: extends khmer;
+}
+
+/* Alphabetic */
+
+@counter-style -moz-cjk-heavenly-stem {
+ system: extends cjk-heavenly-stem;
+}
+@counter-style -moz-cjk-earthly-branch {
+ system: extends cjk-earthly-branch;
+}
+
+@counter-style -moz-hangul {
+ system: alphabetic;
+ symbols: '\AC00' '\B098' '\B2E4' '\B77C' '\B9C8' '\BC14' '\C0AC' '\C544' '\C790' '\CC28' '\CE74' '\D0C0' '\D30C' '\D558';
+ suffix: ',';
+}
+@counter-style -moz-hangul-consonant {
+ system: alphabetic;
+ symbols: '\3131' '\3134' '\3137' '\3139' '\3141' '\3142' '\3145' '\3147' '\3148' '\314A' '\314B' '\314C' '\314D' '\314E';
+ suffix: ',';
+}
+
+/* Ge'ez set of Ethiopic ordered list. There are other locale-dependent sets.
+ * For the time being, let's implement two Ge'ez sets only
+ * per Momoi san's suggestion in bug 102252.
+ * For details, refer to http://www.ethiopic.org/Collation/OrderedLists.html. */
+@counter-style -moz-ethiopic-halehame {
+ system: alphabetic;
+ symbols: '\1200' '\1208' '\1210' '\1218' '\1220' '\1228' '\1230' '\1240' '\1260' '\1270' '\1280' '\1290' '\12A0' '\12A8' '\12C8' '\12D0' '\12D8' '\12E8' '\12F0' '\1308' '\1320' '\1330' '\1338' '\1340' '\1348' '\1350';
+}
+@counter-style -moz-ethiopic-halehame-am {
+ system: alphabetic;
+ symbols: '\1200' '\1208' '\1210' '\1218' '\1220' '\1228' '\1230' '\1238' '\1240' '\1260' '\1270' '\1278' '\1280' '\1290' '\1298' '\12A0' '\12A8' '\12B8' '\12C8' '\12D0' '\12D8' '\12E0' '\12E8' '\12F0' '\1300' '\1308' '\1320' '\1328' '\1330' '\1338' '\1340' '\1348' '\1350';
+}
+@counter-style -moz-ethiopic-halehame-ti-er {
+ system: alphabetic;
+ symbols: '\1200' '\1208' '\1210' '\1218' '\1228' '\1230' '\1238' '\1240' '\1250' '\1260' '\1270' '\1278' '\1290' '\1298' '\12A0' '\12A8' '\12B8' '\12C8' '\12D0' '\12D8' '\12E0' '\12E8' '\12F0' '\1300' '\1308' '\1320' '\1328' '\1330' '\1338' '\1348' '\1350';
+}
+@counter-style -moz-ethiopic-halehame-ti-et {
+ system: alphabetic;
+ symbols: '\1200' '\1208' '\1210' '\1218' '\1220' '\1228' '\1230' '\1238' '\1240' '\1250' '\1260' '\1270' '\1278' '\1280' '\1290' '\1298' '\12A0' '\12A8' '\12B8' '\12C8' '\12D0' '\12D8' '\12E0' '\12E8' '\12F0' '\1300' '\1308' '\1320' '\1328' '\1330' '\1338' '\1340' '\1348' '\1350';
+}
+
+/* Alias */
+
+@counter-style -moz-trad-chinese-informal {
+ system: extends trad-chinese-informal;
+}
+
+@counter-style -moz-trad-chinese-formal {
+ system: extends trad-chinese-formal;
+}
+
+@counter-style -moz-simp-chinese-informal {
+ system: extends simp-chinese-informal;
+}
+
+@counter-style -moz-simp-chinese-formal {
+ system: extends simp-chinese-formal;
+}
+
+@counter-style -moz-japanese-informal {
+ system: extends japanese-informal;
+}
+
+@counter-style -moz-japanese-formal {
+ system: extends japanese-formal;
+}
+
+@counter-style -moz-ethiopic-numeric {
+ system: extends ethiopic-numeric;
+}
diff --git a/layout/style/res/forms.css b/layout/style/res/forms.css
new file mode 100644
index 0000000000..ffd60060e5
--- /dev/null
+++ b/layout/style/res/forms.css
@@ -0,0 +1,1062 @@
+/* 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/. */
+
+/**
+ Styles for old GFX form widgets
+ **/
+
+
+@namespace url(http://www.w3.org/1999/xhtml); /* set default namespace to HTML */
+
+*|*::-moz-fieldset-content {
+ display: block; /* StyleAdjuster::adjust_for_fieldset_content overrides this in some cases */
+ unicode-bidi: inherit;
+ text-overflow: inherit;
+ overflow: inherit;
+ overflow-clip-box: inherit;
+ /* Need to inherit border-radius too, so when the fieldset has rounded
+ borders we don't leak out the corners for hit-testing purposes. */
+ border-radius: inherit;
+ padding: inherit;
+ box-decoration-break: inherit;
+ block-size: 100%; /* Need this so percentage block-sizes of kids work right */
+ /* Please keep the Multicol/Flex/Grid/Align sections below in sync with
+ ::-moz-scrolled-content in ua.css and ::-moz-button-content below. */
+ /* Multicol container */
+ column-count: inherit;
+ column-width: inherit;
+ column-gap: inherit;
+ column-rule: inherit;
+ column-fill: inherit;
+ /* Flex container */
+ flex-direction: inherit;
+ flex-wrap: inherit;
+ /* -webkit-box container (aliased from -webkit versions to -moz versions) */
+ -moz-box-orient: inherit;
+ -moz-box-direction: inherit;
+ -moz-box-pack: inherit;
+ -moz-box-align: inherit;
+ /* Grid container */
+ grid-auto-columns: inherit;
+ grid-auto-rows: inherit;
+ grid-auto-flow: inherit;
+ grid-column-gap: inherit;
+ grid-row-gap: inherit;
+ grid-template-areas: inherit;
+ grid-template-columns: inherit;
+ grid-template-rows: inherit;
+ /* CSS Align */
+ align-content: inherit;
+ align-items: inherit;
+ justify-content: inherit;
+ justify-items: inherit;
+}
+
+/* Miscellaneous form elements */
+
+fieldset > legend {
+ inline-size: -moz-fit-content;
+}
+
+legend {
+ display: block;
+ padding-inline: 2px;
+}
+
+fieldset {
+ display: block;
+ margin-inline: 2px;
+ padding-block: 0.35em 0.625em;
+ padding-inline: 0.75em;
+ border: 2px groove ThreeDFace;
+ min-inline-size: min-content;
+}
+
+label {
+ cursor: default;
+}
+
+/* Default inputs, text inputs, and selects */
+
+/* Note: Values in nsNativeTheme IsWidgetStyled function
+ need to match textfield background/border values here */
+
+input {
+ display: inline-block;
+ appearance: auto;
+ -moz-default-appearance: textfield;
+ /* The sum of border and padding on block-start and block-end
+ must be the same here, for buttons, and for <select> (including its
+ internal padding magic) */
+ padding: 1px;
+ border: 2px inset ThreeDLightShadow;
+ background-color: Field;
+ color: FieldText;
+ font: -moz-field;
+ text-rendering: optimizeLegibility;
+ cursor: text;
+ overflow-clip-box: padding-box content-box;
+}
+
+input::-moz-text-control-editing-root,
+input::placeholder {
+ word-wrap: normal;
+ /* Make the line-height equal to the available height */
+ line-height: -moz-block-height;
+}
+
+textarea {
+ appearance: auto;
+ -moz-default-appearance: textarea;
+ margin-block: 1px;
+ border: 2px inset ThreeDLightShadow;
+ /* The 1px inline padding is for parity with Win/IE */
+ padding-inline: 1px;
+ background-color: Field;
+ color: FieldText;
+ font: medium -moz-fixed;
+ text-rendering: optimizeLegibility;
+ vertical-align: text-bottom;
+ cursor: text;
+ resize: both;
+ white-space: pre-wrap;
+ word-wrap: break-word;
+ overflow-clip-box: content-box;
+}
+
+@media (-moz-non-native-content-theme) {
+ input, textarea {
+ padding-inline: 2px;
+ }
+}
+
+/* A few properties that we don't want to inherit by default: */
+input, textarea, select, button, ::file-selector-button {
+ text-align: initial;
+ text-indent: initial;
+ text-shadow: initial;
+ text-transform: initial;
+ word-spacing: initial;
+ letter-spacing: initial;
+ /* Note that line-height is also reset for all these, via the font shorthand */
+}
+
+textarea > scrollbar {
+ cursor: default;
+}
+
+::placeholder,
+::-moz-text-control-editing-root,
+::-moz-text-control-preview {
+ overflow: auto;
+ border: 0;
+ padding: inherit;
+ margin: 0;
+ text-decoration: inherit;
+ display: inline-block;
+ ime-mode: inherit;
+ resize: inherit;
+ scrollbar-width: inherit;
+ -moz-control-character-visibility: visible;
+ overflow-clip-box: inherit;
+}
+
+input::-moz-text-control-editing-root,
+input::placeholder,
+input::-moz-text-control-preview {
+ white-space: pre;
+}
+
+input[type=password]::-moz-text-control-editing-root,
+input[type=password]::-moz-text-control-preview {
+ /*
+ * In password fields, any character should be put same direction. Otherwise,
+ * caret position at typing tells everybody whether the character is an RTL
+ * or an LTR character. Unfortunately, this makes odd rendering when bidi
+ * text is unmasked.
+ */
+ unicode-bidi: bidi-override;
+}
+
+textarea::-moz-text-control-editing-root {
+ scroll-behavior: inherit;
+ overscroll-behavior: inherit;
+ /* StyleAdjuster makes sure that the overflow value ends up being scrollable */
+ overflow: inherit;
+}
+
+::placeholder,
+::-moz-text-control-preview {
+ /*
+ * Changing display to inline can leads to broken behaviour and will assert.
+ */
+ display: inline-block;
+
+ /*
+ * Changing resize would display a broken behaviour and will assert.
+ */
+ resize: none;
+
+ overflow: hidden;
+
+ /*
+ * The placeholder or preview should be ignored by pointer otherwise, we might have some
+ * unexpected behavior like the resize handle not being selectable.
+ */
+ pointer-events: none;
+}
+
+::placeholder {
+ opacity: 0.54;
+}
+
+textarea::placeholder,
+textarea::-moz-text-control-preview {
+ white-space: pre-wrap !important;
+}
+
+input:read-write,
+textarea:read-write {
+ -moz-user-modify: read-write !important;
+}
+
+select {
+ margin: 0;
+ border-color: ThreeDLightShadow;
+ font: -moz-list;
+ white-space: nowrap !important;
+ word-wrap: normal !important;
+ cursor: default;
+ box-sizing: border-box;
+ user-select: none;
+ border-width: 2px;
+ border-style: inset;
+ overflow: clip;
+ /* No text-decoration reaching inside, by default */
+ display: inline-block;
+ page-break-inside: avoid;
+ overflow-clip-box: padding-box !important; /* bug 992447 */
+
+ /* Set some styles for drop down selects. These are overridden below for
+ * list box selects. */
+ background-color: -moz-Combobox;
+ color: -moz-ComboboxText;
+ vertical-align: baseline;
+ padding-block: 0;
+ appearance: auto;
+ -moz-default-appearance: menulist;
+}
+
+select:-moz-select-list-box {
+ overflow: auto;
+ background-color: Field;
+ color: FieldText;
+ vertical-align: text-bottom;
+ padding-block: 1px;
+ appearance: auto;
+ -moz-default-appearance: listbox;
+}
+
+select > button {
+ inline-size: 12px;
+ white-space: nowrap;
+ position: static !important;
+ background-image: url("arrow.gif") !important;
+ background-repeat: no-repeat !important;
+ background-position: center !important;
+ appearance: auto;
+ -moz-default-appearance: -moz-menulist-arrow-button;
+
+ /* Make sure to size correctly if the combobox has a non-auto height. */
+ block-size: 100% !important;
+ box-sizing: border-box !important;
+
+ /*
+ Make sure to align properly with the display frame. Note that we
+ want the baseline of the combobox to match the baseline of the
+ display frame, so the dropmarker is what gets the vertical-align.
+ */
+ vertical-align: top !important;
+}
+
+select > button:active {
+ background-image: url("arrowd.gif") !important;
+}
+
+select > button[orientation="left"] {
+ background-image: url("arrow-left.gif") !important;
+}
+
+select > button[orientation="right"] {
+ background-image: url("arrow-right.gif") !important;
+}
+
+select > button[orientation="left"]:active {
+ background-image: url("arrowd-left.gif") !important;
+}
+
+select > button[orientation="right"]:active {
+ background-image: url("arrowd-right.gif") !important;
+}
+
+*|*::-moz-display-comboboxcontrol-frame {
+ overflow: clip;
+ /* This block-start/end padding plus the combobox block-start/end border need to
+ add up to the block-start/end borderpadding of text inputs and buttons */
+ padding-block: 1px;
+ padding-inline: 4px;
+ color: unset;
+ white-space: nowrap;
+ text-align: unset;
+ user-select: none;
+ /* Make sure to size correctly if the combobox has a non-auto block-size. */
+ block-size: 100%;
+ /* Try to always display our own text */
+ min-inline-size: max-content;
+ box-sizing: border-box;
+ line-height: -moz-block-height;
+}
+
+option[label]::before {
+ content: attr(label);
+}
+
+option {
+ display: block;
+ float: none !important;
+ position: static !important;
+ min-block-size: 1em;
+ padding-block: 2px;
+ /*
+ * Note that the "UA !important" tests in
+ * layout/style/test/test_animations.html depend on this rule, because
+ * they need some UA !important rule to test. If this changes, use a
+ * different one there.
+ */
+ line-height: normal !important;
+ user-select: none;
+ text-indent: 0;
+ white-space: nowrap !important;
+ word-wrap: normal !important;
+ text-align: match-parent;
+}
+
+select > option {
+ padding-inline: 4px;
+}
+
+option:checked {
+ background-color: -moz-html-cellhighlight !important;
+ color: -moz-html-cellhighlighttext !important;
+}
+
+select:focus > option:checked,
+select:focus > optgroup > option:checked {
+ background-color: Highlight !important;
+ color: HighlightText !important;
+}
+
+optgroup {
+ display: block;
+ float: none !important;
+ position: static !important;
+ font: -moz-list;
+ line-height: normal !important;
+ font-style: italic;
+ font-weight: bold;
+ font-size: unset;
+ user-select: none;
+ text-indent: 0;
+ white-space: nowrap !important;
+ word-wrap: normal !important;
+}
+
+optgroup > option {
+ padding-inline-start: 20px;
+ font-style: normal;
+ font-weight: normal;
+}
+
+optgroup:before {
+ display: block;
+ content: attr(label);
+}
+
+%ifdef ANDROID
+/* These elements are handled by the prompt module. */
+select option,
+select optgroup {
+ pointer-events: none;
+}
+%endif
+
+*|*::-moz-dropdown-list {
+ z-index: 2147483647;
+ background-color: inherit;
+ user-select: none;
+ position: static !important;
+ float: none !important;
+
+ /*
+ * We can't change the padding here, because that would affect our
+ * intrinsic inline-size, since we scroll. But at the same time, we want
+ * to make sure that our inline-start border+padding matches the inline-start
+ * border+padding of a combobox so that our scrollbar will line up
+ * with the dropmarker. So set our inline-start border to 2px.
+ */
+ border: 1px outset black !important;
+ border-inline-start-width: 2px !important;
+}
+
+input:disabled,
+textarea:disabled,
+option:disabled,
+optgroup:disabled,
+select:disabled {
+ color: GrayText;
+ background-color: ThreeDLightShadow;
+ cursor: unset;
+}
+
+input:disabled,
+textarea:disabled {
+ cursor: default;
+}
+
+option:disabled,
+optgroup:disabled {
+ background-color: transparent;
+}
+
+/* hidden inputs */
+input[type=hidden] {
+ appearance: none;
+ -moz-default-appearance: none;
+ display: none !important;
+ padding: unset;
+ border: 0;
+ cursor: auto;
+ -moz-user-focus: ignore;
+}
+
+/* image buttons */
+input[type=image] {
+ appearance: none;
+ -moz-default-appearance: none;
+ padding: unset;
+ border: none;
+ background-color: transparent;
+ font-family: sans-serif;
+ font-size: small;
+ cursor: pointer;
+}
+
+input[type=image]:disabled {
+ cursor: unset;
+}
+
+/* colored part of the color selector button */
+::-moz-color-swatch {
+ width: 100%;
+ height: 100%;
+ min-width: 3px;
+ min-height: 3px;
+ margin-inline: auto;
+ box-sizing: border-box;
+ border: 1px solid grey;
+ display: block;
+}
+
+/* radio buttons */
+input[type=radio] {
+ appearance: auto;
+ -moz-default-appearance: radio;
+ margin-block: 3px 0;
+ margin-inline: 5px 3px;
+}
+
+/* check boxes */
+input[type=checkbox] {
+ appearance: auto;
+ -moz-default-appearance: checkbox;
+ margin-block: 3px;
+ margin-inline: 4px 3px;
+}
+
+/* Common features of radio buttons and check boxes */
+
+input[type=radio],
+input[type=checkbox] {
+ box-sizing: border-box;
+ cursor: default;
+ /* unset some values from the general 'input' rule above: */
+ padding: unset;
+ border: unset;
+ background-color: unset;
+ color: unset;
+}
+
+input:is([type=radio], [type=checkbox]):is(:disabled, :disabled:active, :disabled:hover:active) {
+ cursor: unset;
+}
+
+input:not([type=file], [type=image]):-moz-focusring,
+select:-moz-focusring,
+button:-moz-focusring,
+textarea:-moz-focusring {
+ /* These elements can handle outline themselves when themed, so we use
+ * outline-style: auto and skip rendering the outline only when themed and
+ * the theme allows so */
+ outline-style: auto;
+}
+
+input[type=search] {
+ box-sizing: border-box;
+}
+
+/* buttons */
+
+/* Note: Values in nsNativeTheme IsWidgetStyled function
+ need to match button background/border values here */
+
+/* Non text-related properties for buttons: these ones are shared with
+ input[type=color] */
+button,
+::file-selector-button,
+input:is([type=color], [type=reset], [type=button], [type=submit]) {
+ appearance: auto;
+ -moz-default-appearance: button;
+ /* The sum of border and padding on block-start and block-end
+ must be the same here, for text inputs, and for <select>.
+ Note -moz-focus-inner padding does not affect button size. */
+ padding-block: 0;
+ padding-inline: 8px;
+ border: 2px outset ThreeDLightShadow;
+ background-color: ButtonFace;
+ cursor: default;
+ box-sizing: border-box;
+ user-select: none;
+}
+
+/* Text-related properties for buttons: these ones are not shared with
+ input[type=color] */
+button,
+::file-selector-button,
+input:is([type=reset], [type=button], [type=submit]) {
+ color: ButtonText;
+ font: -moz-button;
+ white-space: pre;
+ text-align: center;
+ overflow-clip-box: padding-box;
+}
+
+input[type=color] {
+ inline-size: 64px;
+ block-size: 23px;
+}
+
+@media (-moz-non-native-content-theme) {
+ button,
+ ::file-selector-button,
+ input:is([type=reset], [type=button], [type=submit]) {
+ padding-inline: 4px;
+ }
+
+ input[type=color] {
+ padding: 4px;
+ }
+}
+
+button,
+::file-selector-button {
+ /* Buttons should lay out like "normal" html, mostly */
+ white-space: unset;
+ text-indent: 0;
+ /* But no text-decoration reaching inside, by default */
+ display: inline-block;
+}
+
+*|*::-moz-button-content {
+ display: block;
+ /* Please keep the Multicol/Flex/Grid/Align sections below in sync with
+ ::-moz-scrolled-content in ua.css and ::-moz-fieldset-content above. */
+ /* Multicol container */
+ column-count: inherit;
+ column-width: inherit;
+ column-gap: inherit;
+ column-rule: inherit;
+ column-fill: inherit;
+ /* Flex container */
+ flex-direction: inherit;
+ flex-wrap: inherit;
+ /* -webkit-box container (aliased from -webkit versions to -moz versions) */
+ -moz-box-orient: inherit;
+ -moz-box-direction: inherit;
+ -moz-box-pack: inherit;
+ -moz-box-align: inherit;
+ /* Grid container */
+ grid-auto-columns: inherit;
+ grid-auto-rows: inherit;
+ grid-auto-flow: inherit;
+ grid-column-gap: inherit;
+ grid-row-gap: inherit;
+ grid-template-areas: inherit;
+ grid-template-columns: inherit;
+ grid-template-rows: inherit;
+ /* CSS Align */
+ align-content: inherit;
+ align-items: inherit;
+ justify-content: inherit;
+ justify-items: inherit;
+}
+
+::file-selector-button:hover,
+button:hover,
+input:is([type=reset], [type=button], [type=submit], [type=color]):hover {
+ background-color: -moz-buttonhoverface;
+}
+
+::file-selector-button:hover,
+button:hover,
+input:is([type=reset], [type=button], [type=submit]):hover {
+ color: -moz-buttonhovertext;
+}
+
+::file-selector-button:active:hover,
+button:active:hover,
+input:is([type=reset], [type=button], [type=submit], [type=color]):active:hover {
+%ifndef XP_MACOSX
+ padding-block: 0;
+ padding-inline: 9px 7px;
+%endif
+ border-style: inset;
+ background-color: ButtonFace;
+}
+
+::file-selector-button:active:hover,
+button:active:hover,
+input:is([type=reset], [type=button], [type=submit]):active:hover {
+%ifdef MOZ_WIDGET_GTK
+ color: -moz-gtk-buttonactivetext;
+%else
+ color: ButtonText;
+%endif
+}
+
+::-moz-focus-inner {
+ /* Note this padding only affects the -moz-focus-inner ring, not the button itself */
+ padding-block: 0;
+ padding-inline: 2px;
+ border: 1px dotted transparent;
+}
+
+:-moz-focusring::-moz-focus-inner {
+ border-color: currentColor;
+}
+
+:is(:disabled, :disabled:active)::file-selector-button,
+button:is(:disabled, :disabled:active),
+input:is([type=reset], [type=button], [type=submit], [type=color]):is(:disabled, :disabled:active),
+select:is(:disabled, :disabled:active) > button {
+ /* The sum of border and padding on block-start and block-end
+ must be the same here and for text inputs */
+ padding-block: 0;
+ padding-inline: 8px;
+ border: 2px outset ThreeDLightShadow;
+ cursor: unset;
+}
+
+:is(:disabled, :disabled:active)::file-selector-button,
+button:is(:disabled, :disabled:active),
+input:is([type=reset], [type=button], [type=submit]):is(:disabled, :disabled:active),
+select:is(:disabled, :disabled:active) > button {
+ color: GrayText;
+}
+
+/* file selector */
+input[type=file] {
+ white-space: nowrap !important;
+ overflow: hidden !important;
+ overflow-clip-box: padding-box;
+ color: unset;
+
+ /* Revert rules which apply on all inputs. */
+ appearance: none;
+ -moz-default-appearance: none;
+ cursor: default;
+
+ border: none;
+ background-color: transparent;
+ padding: unset;
+}
+
+input[type=file] > label {
+ display: inline-block;
+ min-inline-size: 12em;
+ text-align: match-parent;
+
+ color: unset;
+ font-size: unset;
+ letter-spacing: unset;
+
+ user-select: none;
+ unicode-bidi: plaintext;
+}
+
+/* button part of file selector */
+::file-selector-button {
+ font-size: unset;
+ letter-spacing: unset;
+ cursor: unset;
+ margin-inline-end: 5px;
+}
+
+ /*
+ * Make form controls inherit 'unicode-bidi' transparently as required by
+ * their various anonymous descendants and pseudo-elements:
+ *
+ * <textarea> and <input type=text>:
+ * inherit into the scroll frame with pseudo ::-moz-text-control-editing-root
+ * which is a (direct or indirect) child of the text control.
+ *
+ * Buttons (either <button>, <input type=submit>, <input type=button>
+ * or <input type=reset>)
+ * inherit into the ':-moz-button-content' pseudo-element.
+ *
+ * <select>:
+ * inherit into the ':-moz-display-comboboxcontrol-frame' pseudo-element and
+ * the <optgroup>'s ':before' pseudo-element, which is where the label of
+ * the <optgroup> gets displayed. The <option>s don't use anonymous boxes,
+ * so they need no special rules.
+ */
+::placeholder,
+::-moz-text-control-editing-root,
+*|*::-moz-button-content,
+*|*::-moz-display-comboboxcontrol-frame,
+optgroup:before {
+ unicode-bidi: inherit;
+ text-overflow: inherit;
+}
+
+/**
+ * Set default style for invalid elements.
+ */
+:-moz-ui-invalid {
+ box-shadow: 0 0 1.5px 1px red;
+}
+
+:-moz-ui-invalid:-moz-focusring {
+ box-shadow: 0 0 2px 2px rgba(255,0,0,0.4);
+}
+
+output:-moz-ui-invalid {
+ box-shadow: initial;
+ color: red;
+}
+
+@media print {
+ input, textarea, select, button {
+ -moz-user-input: none !important;
+ }
+
+ input[type=file] {
+ height: 2em;
+ }
+}
+
+progress {
+ appearance: auto;
+ -moz-default-appearance: progress-bar;
+ display: inline-block;
+ vertical-align: -0.2em;
+
+ /* Default style in case of there is appearance: none; */
+ border: 1px solid ThreeDShadow;
+ border-right-color: ThreeDHighlight;
+ border-bottom-color: ThreeDHighlight;
+ /* #e6e6e6 is a light gray. */
+ background-color: #e6e6e6;
+}
+
+::-moz-progress-bar {
+ /* Prevent styling that would change the type of frame we construct. */
+ display: inline-block !important;
+ float: none !important;
+ position: static !important;
+ overflow: visible !important;
+ box-sizing: border-box !important;
+
+ appearance: auto;
+ -moz-default-appearance: progresschunk;
+ height: 100%;
+ width: 100%;
+
+ /* Default style in case of there is appearance: none; */
+ background-color: #0064b4; /* blue */
+}
+
+meter {
+ appearance: auto;
+ -moz-default-appearance: meter;
+ display: inline-block;
+ vertical-align: -0.2em;
+ background: linear-gradient(#e6e6e6, #e6e6e6, #eeeeee 20%, #cccccc 45%, #cccccc 55%);
+}
+
+::-moz-meter-bar {
+ /* Block styles that would change the type of frame we construct. */
+ display: inline-block !important;
+ float: none !important;
+ position: static !important;
+ overflow: visible !important;
+
+ appearance: auto;
+ -moz-default-appearance: meterchunk;
+ height: 100%;
+ width: 100%;
+}
+
+:-moz-meter-optimum::-moz-meter-bar {
+ /* green. */
+ background: linear-gradient(#ad7, #ad7, #cea 20%, #7a3 45%, #7a3 55%);
+}
+:-moz-meter-sub-optimum::-moz-meter-bar {
+ /* orange. */
+ background: linear-gradient(#fe7, #fe7, #ffc 20%, #db3 45%, #db3 55%);
+}
+:-moz-meter-sub-sub-optimum::-moz-meter-bar {
+ /* red. */
+ background: linear-gradient(#f77, #f77, #fcc 20%, #d44 45%, #d44 55%);
+}
+
+input[type=range] {
+ appearance: auto;
+ -moz-default-appearance: range;
+ margin: 2px;
+ /* Override some rules that apply on all input types: */
+ cursor: default;
+ padding: unset;
+ border: unset;
+ /* Prevent nsIFrame::HandlePress setting mouse capture to this element. */
+ user-select: none !important;
+}
+
+/**
+ * Layout handles positioning of this pseudo-element specially (so that content
+ * authors can concentrate on styling the thumb without worrying about the
+ * logic to position it). Specifically the 'margin', 'top' and 'left'
+ * properties are ignored.
+ *
+ * If content authors want to have a vertical range, they will also need to
+ * set the width/height of this pseudo-element.
+ */
+input[type=range]::-moz-range-track {
+ /* Prevent styling that would change the type of frame we construct. */
+ display: block !important;
+ float: none !important;
+ position: static !important;
+ writing-mode: unset !important;
+ direction: unset !important;
+ block-size: 0.2em; /* same as inline-size below */
+ /* Prevent nsIFrame::HandlePress setting mouse capture to this element. */
+ user-select: none !important;
+}
+
+input[type=range][orient=vertical]::-moz-range-track {
+ inline-size: 0.2em; /* same as block-size above */
+ block-size: 100%;
+}
+
+/**
+ * Layout handles positioning of this pseudo-element specially (so that content
+ * authors can concentrate on styling this pseudo-element without worrying
+ * about the logic to position it). Specifically the 'margin', 'top' and 'left'
+ * properties are ignored. Additionally, if the range is horizontal, the width
+ * property is ignored, and if the range range is vertical, the height property
+ * is ignored.
+ */
+input[type=range]::-moz-range-progress {
+ /* Prevent styling that would change the type of frame we construct. */
+ display: block !important;
+ float: none !important;
+ position: static !important;
+ writing-mode: unset !important;
+ direction: unset !important;
+ /* Since one of width/height will be ignored, this just sets the "other"
+ dimension.
+ */
+ width: 0.2em;
+ height: 0.2em;
+ /* Prevent nsIFrame::HandlePress setting mouse capture to this element. */
+ user-select: none !important;
+}
+
+/**
+ * Layout handles positioning of this pseudo-element specially (so that content
+ * authors can concentrate on styling the thumb without worrying about the
+ * logic to position it). Specifically the 'margin', 'top' and 'left'
+ * properties are ignored.
+ */
+input[type=range]::-moz-range-thumb {
+ /* Native theming is atomic for range. Set appearance on the range
+ * to get rid of it. The thumb's appearance is fixed.
+ */
+ appearance: auto !important;
+ -moz-default-appearance: range-thumb !important;
+ /* Prevent styling that would change the type of frame we construct. */
+ display: block !important;
+ float: none !important;
+ position: static !important;
+ writing-mode: unset !important;
+ direction: unset !important;
+
+ width: 1em;
+ height: 1em;
+ border: 0.1em solid #999;
+ border-radius: 0.5em;
+ background-color: #F0F0F0;
+ /* Prevent nsIFrame::HandlePress setting mouse capture to this element. */
+ user-select: none !important;
+}
+
+input[type=number] {
+ appearance: auto;
+ -moz-default-appearance: number-input;
+}
+
+input:is([type=number], [type=search])::-moz-complex-control-wrapper {
+ /* Prevent styling that would change the type of frame we construct. */
+ display: flex;
+ float: none !important;
+ position: static !important;
+ block-size: 100%;
+ /* The align-self: center bit below allows the editor to be potentially
+ * bigger than us. Clip it to match other text fields. */
+ overflow: clip;
+}
+
+input:is([type=number], [type=search])::-moz-text-control-editing-root {
+ display: block; /* Flex items must be block-level. Normally we do fixup in
+ the style system to ensure this, but that fixup is disabled
+ inside of form controls. So, we hardcode display here. */
+ flex: 1;
+ min-inline-size: 0;
+ /* This makes it overflow into the flex container padding if needed, instead
+ * of getting squashed or pushed down by it */
+ align-self: center;
+ /* This prevents double-applying the padding, which our flex container gets
+ * via the override in nsTextControlFrame::ReflowTextControlChild */
+ padding: 0;
+}
+
+input[type=number]::-moz-number-spin-box {
+ writing-mode: horizontal-tb;
+ display: flex;
+ flex-direction: column;
+%ifdef XP_WIN
+ /* The Window's Theme's spin buttons have a very narrow minimum width, so
+ * make it something reasonable:
+ */
+ width: 16px;
+%endif
+ /* If the spin-box has auto height, it ends up enlarging the default height
+ * of the control, so we limit it to 1em here. The height doesn't affect
+ * the rendering of the spinner-buttons; it's only for layout purposes.
+ *
+ * This is a temporary hack until we implement better positioning for the
+ * spin-box in vertical mode; it works OK at default size but less well
+ * if the font-size is made substantially larger or smaller. (Bug 1175074.)
+ */
+ height: 1em;
+ max-height: 1em;
+ align-self: center;
+ justify-content: center;
+}
+
+input[type=number]::-moz-number-spin-up {
+ writing-mode: horizontal-tb;
+ appearance: auto;
+ -moz-default-appearance: spinner-upbutton;
+ display: block; /* bug 926670 */
+ flex-grow: 1;
+ cursor: default;
+ /* Style for when native theming is off: */
+ background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="6" height="5"><path d="M1,4 L3,0 5,4" fill="dimgrey"/></svg>');
+ background-repeat: no-repeat;
+ background-position: center bottom;
+ border: 1px solid darkgray;
+ border-bottom: none;
+ /* [JK] I think the border-*-*-radius properties here can remain physical,
+ as we probably don't want to turn the spinner sideways in vertical writing mode */
+ border-top-left-radius: 4px;
+ border-top-right-radius: 4px;
+}
+
+input[type=number]::-moz-number-spin-down {
+ writing-mode: horizontal-tb;
+ appearance: auto;
+ -moz-default-appearance: spinner-downbutton;
+ display: block; /* bug 926670 */
+ flex-grow: 1;
+ cursor: default;
+ /* Style for when native theming is off: */
+ background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="6" height="5"><path d="M1,1 L3,5 5,1" fill="dimgrey"/></svg>');
+ background-repeat: no-repeat;
+ background-position: center top;
+ border: 1px solid darkgray;
+ border-top: none;
+ border-bottom-left-radius: 4px;
+ border-bottom-right-radius: 4px;
+}
+
+input[type=number] > div > div > div:hover {
+ /* Give some indication of hover state for the up/down buttons */
+ background-color: lightblue;
+}
+
+@media (-moz-non-native-content-theme) {
+ input[type=number] {
+ padding-inline-end: 0;
+ }
+}
+
+input[type=search]::-moz-search-clear-button {
+ display: block;
+ cursor: default;
+ width: 1em;
+ height: 1em;
+ max-height: 1em;
+ margin-inline-start: 1px;
+ align-self: center;
+ background-image: url(chrome://global/skin/icons/searchfield-cancel.svg);
+ background-repeat: no-repeat;
+ background-position: center;
+ background-size: contain;
+}
+
+input:is([type=date], [type=time]) {
+ overflow: hidden !important;
+ font-family: -moz-fixed;
+ cursor: default;
+}
+
+input:is([type=date], [type=time]):is(:disabled, :read-only) {
+ color: GrayText;
+}
+
+@media (-moz-non-native-content-theme) {
+ /* TODO(emilio): This is an odd special-case... */
+ input:is([type=date], [type=time]) {
+ padding-inline: 3px;
+ padding-block: 2px 0;
+ }
+}
+
+input:autofill, input:-moz-autofill-preview {
+ filter: grayscale(21%) brightness(88%) contrast(161%) invert(10%) sepia(40%) saturate(206%);
+}
+
+input:-moz-autofill-preview {
+ color: GrayText;
+}
diff --git a/layout/style/res/html.css b/layout/style/res/html.css
new file mode 100644
index 0000000000..b54e450b2e
--- /dev/null
+++ b/layout/style/res/html.css
@@ -0,0 +1,921 @@
+/* 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/1999/xhtml); /* set default namespace to HTML */
+@namespace xul url(http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul);
+
+/* bidi */
+
+:-moz-has-dir-attr {
+ unicode-bidi: isolate;
+}
+:-moz-dir-attr-rtl {
+ direction: rtl;
+}
+:-moz-dir-attr-ltr {
+ direction: ltr;
+}
+
+:-moz-dir-attr-like-auto:dir(ltr) { direction: ltr; }
+:-moz-dir-attr-like-auto:dir(rtl) { direction: rtl; }
+
+/* To ensure http://www.w3.org/TR/REC-html40/struct/dirlang.html#style-bidi:
+ *
+ * "When a block element that does not have a dir attribute is transformed to
+ * the style of an inline element by a style sheet, the resulting presentation
+ * should be equivalent, in terms of bidirectional formatting, to the
+ * formatting obtained by explicitly adding a dir attribute (assigned the
+ * inherited value) to the transformed element."
+ *
+ * and the rules in http://dev.w3.org/html5/spec/rendering.html#rendering
+ */
+
+address,
+article,
+aside,
+blockquote,
+body,
+caption,
+center,
+col,
+colgroup,
+dd,
+dir,
+div,
+dl,
+dt,
+fieldset,
+figcaption,
+figure,
+footer,
+form,
+h1,
+h2,
+h3,
+h4,
+h5,
+h6,
+header,
+hgroup,
+hr,
+html,
+legend,
+li,
+listing,
+main,
+marquee,
+menu,
+nav,
+noframes,
+ol,
+p,
+plaintext,
+pre,
+section,
+summary,
+table,
+tbody,
+td,
+tfoot,
+th,
+thead,
+tr,
+ul,
+xmp {
+ unicode-bidi: isolate;
+}
+
+bdi, output {
+ unicode-bidi: isolate;
+}
+/* We need the "bdo:-moz-has-dir-attr" bit because "bdo" has lower
+ specificity than the ":-moz-has-dir-attr" selector above. */
+bdo, bdo:-moz-has-dir-attr {
+ unicode-bidi: isolate-override;
+}
+textarea:-moz-dir-attr-like-auto,
+pre:-moz-dir-attr-like-auto {
+ unicode-bidi: plaintext;
+}
+
+/* blocks */
+
+article,
+aside,
+details,
+div,
+dt,
+figcaption,
+footer,
+form,
+header,
+hgroup,
+html,
+main,
+nav,
+section,
+summary {
+ display: block;
+}
+
+body {
+ display: block;
+ margin: 8px;
+}
+
+p, dl, multicol {
+ display: block;
+ margin-block-start: 1em;
+ margin-block-end: 1em;
+}
+
+dd {
+ display: block;
+ margin-inline-start: 40px;
+}
+
+blockquote, figure {
+ display: block;
+ margin-block-start: 1em;
+ margin-block-end: 1em;
+ margin-inline-start: 40px;
+ margin-inline-end: 40px;
+}
+
+address {
+ display: block;
+ font-style: italic;
+}
+
+center {
+ display: block;
+ text-align: -moz-center;
+}
+
+blockquote[type=cite] {
+ display: block;
+ margin-block-start: 1em;
+ margin-block-end: 1em;
+ margin-inline-start: 0;
+ margin-inline-end: 0;
+ padding-inline-start: 1em;
+ border-inline-start: solid;
+ border-color: blue;
+ border-width: thin;
+}
+
+span[_moz_quote=true] {
+ color: blue;
+}
+
+pre[_moz_quote=true] {
+ color: blue;
+}
+
+h1 {
+ display: block;
+ font-size: 2em;
+ font-weight: bold;
+ margin-block-start: .67em;
+ margin-block-end: .67em;
+}
+
+h2,
+:is(article, aside, nav, section)
+h1 {
+ display: block;
+ font-size: 1.5em;
+ font-weight: bold;
+ margin-block-start: .83em;
+ margin-block-end: .83em;
+}
+
+h3,
+:is(article, aside, nav, section)
+:is(article, aside, nav, section)
+h1 {
+ display: block;
+ font-size: 1.17em;
+ font-weight: bold;
+ margin-block-start: 1em;
+ margin-block-end: 1em;
+}
+
+h4,
+:is(article, aside, nav, section)
+:is(article, aside, nav, section)
+:is(article, aside, nav, section)
+h1 {
+ display: block;
+ font-size: 1.00em;
+ font-weight: bold;
+ margin-block-start: 1.33em;
+ margin-block-end: 1.33em;
+}
+
+h5,
+:is(article, aside, nav, section)
+:is(article, aside, nav, section)
+:is(article, aside, nav, section)
+:is(article, aside, nav, section)
+h1 {
+ display: block;
+ font-size: 0.83em;
+ font-weight: bold;
+ margin-block-start: 1.67em;
+ margin-block-end: 1.67em;
+}
+
+h6,
+:is(article, aside, nav, section)
+:is(article, aside, nav, section)
+:is(article, aside, nav, section)
+:is(article, aside, nav, section)
+:is(article, aside, nav, section)
+h1 {
+ display: block;
+ font-size: 0.67em;
+ font-weight: bold;
+ margin-block-start: 2.33em;
+ margin-block-end: 2.33em;
+}
+
+listing {
+ display: block;
+ font-family: -moz-fixed;
+ font-size: medium;
+ white-space: pre;
+ margin-block-start: 1em;
+ margin-block-end: 1em;
+}
+
+xmp, pre, plaintext {
+ display: block;
+ font-family: -moz-fixed;
+ white-space: pre;
+ margin-block-start: 1em;
+ margin-block-end: 1em;
+}
+
+/* tables */
+
+table {
+ display: table;
+ border-spacing: 2px;
+ border-collapse: separate;
+ /* XXXldb do we want this if we're border-collapse:collapse ? */
+ box-sizing: border-box;
+ text-indent: 0;
+}
+
+table[align="left"] {
+ float: left;
+}
+
+table[align="right"] {
+ float: right;
+ text-align: start;
+}
+
+
+/* border collapse rules */
+
+ /* Set hidden if we have 'frame' or 'rules' attribute.
+ Set it on all sides when we do so there's more consistency
+ in what authors should expect */
+
+ /* Put this first so 'border' and 'frame' rules can override it. */
+table[rules] {
+ border-width: thin;
+ border-style: hidden;
+}
+
+ /* 'border' before 'frame' so 'frame' overrides
+ A border with a given value should, of course, pass that value
+ as the border-width in pixels -> attr mapping */
+
+ /* :-moz-table-border-nonzero is like [border]:not([border="0"]) except it
+ also checks for other zero-like values according to HTML attribute
+ parsing rules */
+table:-moz-table-border-nonzero {
+ border-width: thin;
+ border-style: outset;
+}
+
+table[frame] {
+ border: thin hidden;
+}
+
+/* specificity must beat table:-moz-table-border-nonzero rule above */
+table[frame="void"] { border-style: hidden; }
+table[frame="above"] { border-style: outset hidden hidden hidden; }
+table[frame="below"] { border-style: hidden hidden outset hidden; }
+table[frame="lhs"] { border-style: hidden hidden hidden outset; }
+table[frame="rhs"] { border-style: hidden outset hidden hidden; }
+table[frame="hsides"] { border-style: outset hidden; }
+table[frame="vsides"] { border-style: hidden outset; }
+table[frame="box"],
+table[frame="border"] { border-style: outset; }
+
+
+/* Internal Table Borders */
+
+ /* 'border' cell borders first */
+
+table:-moz-table-border-nonzero > * > tr > td,
+table:-moz-table-border-nonzero > * > tr > th,
+table:-moz-table-border-nonzero > * > td,
+table:-moz-table-border-nonzero > * > th,
+table:-moz-table-border-nonzero > td,
+table:-moz-table-border-nonzero > th
+{
+ border-width: thin;
+ border-style: inset;
+}
+
+/* collapse only if rules are really specified */
+table[rules]:not([rules="none"], [rules=""]) {
+ border-collapse: collapse;
+}
+
+/* only specified rules override 'border' settings
+ (increased specificity to achieve this) */
+table[rules]:not([rules=""])> tr > td,
+table[rules]:not([rules=""])> * > tr > td,
+table[rules]:not([rules=""])> tr > th,
+table[rules]:not([rules=""])> * > tr > th,
+table[rules]:not([rules=""])> td,
+table[rules]:not([rules=""])> th
+{
+ border-width: thin;
+ border-style: none;
+}
+
+
+table[rules][rules="none"] > tr > td,
+table[rules][rules="none"] > * > tr > td,
+table[rules][rules="none"] > tr > th,
+table[rules][rules="none"] > * > tr > th,
+table[rules][rules="none"] > td,
+table[rules][rules="none"] > th
+{
+ border-width: thin;
+ border-style: none;
+}
+
+table[rules][rules="all"] > tr > td,
+table[rules][rules="all"] > * > tr > td,
+table[rules][rules="all"] > tr > th,
+table[rules][rules="all"] > * > tr > th,
+table[rules][rules="all"] > td,
+table[rules][rules="all"] > th
+{
+ border-width: thin;
+ border-style: solid;
+}
+
+table[rules][rules="rows"] > tr,
+table[rules][rules="rows"] > * > tr {
+ border-block-start-width: thin;
+ border-block-end-width: thin;
+ border-block-start-style: solid;
+ border-block-end-style: solid;
+}
+
+
+table[rules][rules="cols"] > tr > td,
+table[rules][rules="cols"] > * > tr > td,
+table[rules][rules="cols"] > tr > th,
+table[rules][rules="cols"] > * > tr > th {
+ border-inline-start-width: thin;
+ border-inline-end-width: thin;
+ border-inline-start-style: solid;
+ border-inline-end-style: solid;
+}
+
+table[rules][rules="groups"] > colgroup {
+ border-inline-start-width: thin;
+ border-inline-end-width: thin;
+ border-inline-start-style: solid;
+ border-inline-end-style: solid;
+}
+table[rules][rules="groups"] > tfoot,
+table[rules][rules="groups"] > thead,
+table[rules][rules="groups"] > tbody {
+ border-block-start-width: thin;
+ border-block-end-width: thin;
+ border-block-start-style: solid;
+ border-block-start-style: solid;
+}
+
+
+/* caption inherits from table not table-outer */
+caption {
+ display: table-caption;
+ text-align: center;
+}
+
+table[align="center"] > caption {
+ margin-inline-start: auto;
+ margin-inline-end: auto;
+}
+
+table[align="center"] > caption[align="left"]:dir(ltr) {
+ margin-inline-end: 0;
+}
+table[align="center"] > caption[align="left"]:dir(rtl) {
+ margin-inline-start: 0;
+}
+
+table[align="center"] > caption[align="right"]:dir(ltr) {
+ margin-inline-start: 0;
+}
+table[align="center"] > caption[align="right"]:dir(rtl) {
+ margin-inline-end: 0;
+}
+
+tr {
+ display: table-row;
+ vertical-align: inherit;
+}
+
+col {
+ display: table-column;
+}
+
+colgroup {
+ display: table-column-group;
+}
+
+tbody {
+ display: table-row-group;
+ vertical-align: middle;
+}
+
+thead {
+ display: table-header-group;
+ vertical-align: middle;
+}
+
+tfoot {
+ display: table-footer-group;
+ vertical-align: middle;
+}
+
+/* for XHTML tables without tbody */
+table > tr {
+ vertical-align: middle;
+}
+
+td {
+ display: table-cell;
+ vertical-align: inherit;
+ text-align: unset;
+ padding: 1px;
+}
+
+th {
+ display: table-cell;
+ vertical-align: inherit;
+ font-weight: bold;
+ padding: 1px;
+}
+
+tr > form:-moz-is-html, tbody > form:-moz-is-html,
+thead > form:-moz-is-html, tfoot > form:-moz-is-html,
+table > form:-moz-is-html {
+ /* Important: don't show these forms in HTML */
+ display: none !important;
+}
+
+table[bordercolor] > tbody,
+table[bordercolor] > thead,
+table[bordercolor] > tfoot,
+table[bordercolor] > col,
+table[bordercolor] > colgroup,
+table[bordercolor] > tr,
+table[bordercolor] > * > tr,
+table[bordercolor] > tr > td,
+table[bordercolor] > * > tr > td,
+table[bordercolor] > tr > th,
+table[bordercolor] > * > tr > th {
+ border-color: inherit;
+}
+
+/* inlines */
+
+q:before {
+ content: open-quote;
+}
+
+q:after {
+ content: close-quote;
+}
+
+b, strong {
+ font-weight: bolder;
+}
+
+i, cite, em, var, dfn {
+ font-style: italic;
+}
+
+tt, code, kbd, samp {
+ font-family: -moz-fixed;
+}
+
+u, ins {
+ text-decoration: underline;
+}
+
+s, strike, del {
+ text-decoration: line-through;
+}
+
+big {
+ font-size: larger;
+}
+
+small {
+ font-size: smaller;
+}
+
+sub {
+ vertical-align: sub;
+ font-size: smaller;
+}
+
+sup {
+ vertical-align: super;
+ font-size: smaller;
+}
+
+nobr {
+ white-space: nowrap;
+}
+
+mark {
+ background: yellow;
+ color: black;
+}
+
+/* titles */
+abbr[title], acronym[title] {
+ text-decoration: dotted underline;
+}
+
+/* lists */
+
+ul, menu, dir {
+ display: block;
+ list-style-type: disc;
+ margin-block-start: 1em;
+ margin-block-end: 1em;
+ padding-inline-start: 40px;
+}
+
+@supports -moz-bool-pref("dom.menuitem.enabled") {
+ menu[type="context"] {
+ display: none !important;
+ }
+}
+
+ul, ol, menu {
+ counter-reset: list-item;
+ -moz-list-reversed: false;
+}
+
+ol[reversed] {
+ -moz-list-reversed: true;
+}
+
+ol {
+ display: block;
+ list-style-type: decimal;
+ margin-block-start: 1em;
+ margin-block-end: 1em;
+ padding-inline-start: 40px;
+}
+
+li {
+ display: list-item;
+ text-align: match-parent;
+}
+
+/* nested lists have no top/bottom margins */
+:is(ul, ol, dir, menu, dl) ul,
+:is(ul, ol, dir, menu, dl) ol,
+:is(ul, ol, dir, menu, dl) dir,
+:is(ul, ol, dir, menu, dl) menu,
+:is(ul, ol, dir, menu, dl) dl {
+ margin-block-start: 0;
+ margin-block-end: 0;
+}
+
+/* 2 deep unordered lists use a circle */
+:is(ol, ul, menu, dir) ul,
+:is(ol, ul, menu, dir) menu,
+:is(ol, ul, menu, dir) dir {
+ list-style-type: circle;
+}
+
+/* 3 deep (or more) unordered lists use a square */
+:is(ol, ul, menu, dir) :is(ol, ul, menu, dir) ul,
+:is(ol, ul, menu, dir) :is(ol, ul, menu, dir) menu,
+:is(ol, ul, menu, dir) :is(ol, ul, menu, dir) dir {
+ list-style-type: square;
+}
+
+
+/* leafs */
+
+/* <hr> noshade and color attributes are handled completely by
+ * the nsHTMLHRElement attribute mapping code
+ */
+hr {
+ display: block;
+ border: 1px inset;
+ margin-block-start: 0.5em;
+ margin-block-end: 0.5em;
+ margin-inline-start: auto;
+ margin-inline-end: auto;
+ color: gray;
+ -moz-float-edge: margin-box;
+ box-sizing: content-box;
+}
+
+hr[size="1"] {
+ border-style: solid none none none;
+}
+
+input:-moz-broken::before,
+img:-moz-broken::before {
+ content: -moz-alt-content !important;
+ unicode-bidi: isolate;
+}
+
+object:-moz-broken > *|* {
+ /*
+ Inherit in the object's alignment so that if we aren't aligned explicitly
+ we'll end up in the right place vertically. See bug 36997. Note that this
+ is not !important because we _might_ be aligned explicitly.
+ */
+ vertical-align: inherit;
+}
+
+img[usemap], object[usemap] {
+ color: blue;
+}
+
+frameset {
+ display: block ! important;
+ overflow: clip;
+ position: static ! important;
+ float: none ! important;
+ border: none ! important;
+}
+
+link {
+ display: none;
+}
+
+frame {
+ border-radius: 0 ! important;
+}
+
+iframe {
+ border: 2px inset;
+}
+
+noframes {
+ display: none;
+}
+
+spacer {
+ position: static ! important;
+ float: none ! important;
+}
+
+canvas {
+ user-select: none;
+}
+
+/* focusable content: anything w/ tabindex >=0 is focusable */
+:-moz-focusring {
+ /* Don't specify the outline-color, we should always use initial value. */
+ outline: 1px dotted;
+}
+
+iframe:-moz-focusring,
+body:-moz-focusring,
+html:-moz-focusring {
+ /* These elements historically don't show outlines when focused by default.
+ * We could consider changing that if needed. */
+ outline-style: none;
+}
+
+/* hidden elements */
+base, basefont, datalist, head, meta, script, style, title,
+noembed, param, template {
+ display: none;
+}
+
+area {
+ /* Don't give it frames other than its imageframe */
+ display: none ! important;
+}
+
+iframe:fullscreen {
+ /* iframes in full-screen mode don't show a border. */
+ border: none !important;
+ padding: unset !important;
+}
+
+/* media elements */
+video {
+ object-fit: contain;
+}
+
+video > img:-moz-native-anonymous {
+ /* Video poster images should render with the video element's "object-fit" &
+ "object-position" properties */
+ object-fit: inherit !important;
+ object-position: inherit !important;
+}
+
+audio:not([controls]) {
+ display: none;
+}
+
+audio[controls] {
+ /* This ensures that intrinsic sizing can reliably shrinkwrap our
+ controls (which are also always horizontal) and produce a
+ reasonable intrinsic size from them. */
+ writing-mode: horizontal-tb !important;
+}
+
+*|*::-moz-html-canvas-content {
+ display: block !important;
+ /* we want to be an absolute and fixed container */
+ transform: translate(0) !important;
+}
+
+video > .caption-box {
+ width: 100%;
+ height: 100%;
+ position: relative;
+}
+
+/**
+ * The pseudo element won't inheirt CSS styles from its direct parent, `::cue`
+ * would acutally inherit styles from video because it's video's pseudo element.
+ * Therefore, we have to explicitly set some styles which are aleady defined in
+ * its parent element in vtt.jsm.
+ */
+::cue {
+ color: rgba(255, 255, 255, 1);
+ white-space: pre-line;
+ background-color: rgba(0, 0, 0, 0.8);
+ font: var(--cue-font-size) sans-serif;
+ writing-mode: var(--cue-writing-mode, inherit);
+ overflow-wrap: break-word;
+ /* TODO : enable unicode-bidi, right now enable it would cause incorrect
+ display direction, maybe related with bug 1558431. */
+}
+
+/* details & summary */
+details > summary:-moz-native-anonymous {
+ /* TODO(krosylight): Remove this when fixing bug 1308080 */
+ user-select: none;
+}
+
+details > summary:is(:first-of-type, :-moz-native-anonymous) {
+ display: list-item;
+ counter-increment: list-item 0;
+ list-style: disclosure-closed inside;
+}
+
+details[open] > summary:is(:first-of-type, :-moz-native-anonymous) {
+ list-style-type: disclosure-open;
+}
+
+details > summary:first-of-type > *|* {
+ /* Cancel "list-style-position: inside" inherited from summary. */
+ list-style-position: initial;
+}
+
+/* <dialog> element styles */
+
+dialog {
+ position: absolute;
+ inset-inline-start: 0;
+ inset-inline-end: 0;
+ color: black;
+ margin: auto;
+ border-width: initial;
+ border-style: solid;
+ border-color: initial;
+ border-image: initial;
+ padding: 1em;
+ background: white;
+ width: -moz-fit-content;
+ height: -moz-fit-content;
+}
+
+dialog:not([open]) {
+ display: none;
+}
+
+/* This pseudo-class is used to remove the inertness for
+ the topmost modal dialog in top layer. This reverts
+ what StyleAdjuster's adjust_for_inert does.
+*/
+dialog:-moz-topmost-modal-dialog {
+ -moz-inert: none;
+ -moz-user-focus: initial;
+ -moz-user-input: initial;
+ -moz-user-modify: initial;
+ user-select: text;
+ pointer-events: initial;
+ cursor: initial;
+}
+
+dialog:-moz-modal-dialog {
+ -moz-top-layer: top !important;
+ position: fixed;
+ overflow: auto;
+ inset-block-start: 0;
+ inset-block-end: 0;
+ max-width: calc(100% - 6px - 2em);
+ max-height: calc(100% - 6px - 2em);
+}
+
+/* https://html.spec.whatwg.org/#flow-content-3 */
+dialog::backdrop {
+ background: rgba(0, 0, 0, 0.1);
+}
+
+marquee {
+ inline-size: -moz-available;
+ display: inline-block;
+ vertical-align: text-bottom;
+ text-align: start;
+}
+
+marquee:is([direction="up"], [direction="down"]) {
+ block-size: 200px;
+}
+
+/* Ruby */
+
+ruby {
+ display: ruby;
+}
+rb {
+ display: ruby-base;
+ white-space: nowrap;
+}
+rp {
+ display: none;
+}
+rt {
+ display: ruby-text;
+}
+rtc {
+ display: ruby-text-container;
+}
+rtc, rt {
+ white-space: nowrap;
+ font-size: 50%;
+ -moz-min-font-size-ratio: 50%;
+ line-height: 1;
+%ifndef XP_WIN
+ /* The widely-used Windows font Meiryo doesn't work fine with this
+ * setting, so disable this on Windows. We should re-enable it once
+ * Microsoft fixes this issue. See bug 1164279. */
+ font-variant-east-asian: ruby;
+%endif
+}
+rtc, rt {
+ text-emphasis: none;
+}
+rtc:lang(zh), rt:lang(zh) {
+ ruby-align: center;
+}
+rtc:lang(zh-TW), rt:lang(zh-TW) {
+ font-size: 30%; /* bopomofo */
+ -moz-min-font-size-ratio: 30%;
+}
+rtc > rt {
+ font-size: unset;
+}
+ruby, rb, rt, rtc {
+ unicode-bidi: isolate;
+}
+
+/* Shadow DOM v1
+ * https://drafts.csswg.org/css-scoping/#slots-in-shadow-tree */
+slot {
+ display: contents;
+}
diff --git a/layout/style/res/noframes.css b/layout/style/res/noframes.css
new file mode 100644
index 0000000000..4d1adfdc1f
--- /dev/null
+++ b/layout/style/res/noframes.css
@@ -0,0 +1,13 @@
+/* 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/. */
+
+/* This sheet is added to the style set for documents with frames disabled */
+
+noframes {
+ display: block;
+}
+
+frame, frameset, iframe {
+ display: none !important;
+}
diff --git a/layout/style/res/noscript.css b/layout/style/res/noscript.css
new file mode 100644
index 0000000000..21e579d3e2
--- /dev/null
+++ b/layout/style/res/noscript.css
@@ -0,0 +1,11 @@
+/* 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/. */
+
+/* This sheet is added to the style set for documents with script enabled */
+
+@namespace url(http://www.w3.org/1999/xhtml);
+
+noscript {
+ display: none !important;
+}
diff --git a/layout/style/res/plaintext.css b/layout/style/res/plaintext.css
new file mode 100644
index 0000000000..968247173d
--- /dev/null
+++ b/layout/style/res/plaintext.css
@@ -0,0 +1,40 @@
+/* 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/. */
+
+pre {
+ white-space: pre-wrap;
+ word-wrap: break-word;
+ -moz-control-character-visibility: visible;
+}
+
+.nowrap pre {
+ white-space: pre;
+}
+
+/* Make text go with the rules of dir=auto, but allow it to be overriden if 'Switch Text Direction' is triggered */
+html:not([dir]) pre { /* Not a UA sheet, so doesn't use :-moz-has-dir-attr */
+ unicode-bidi: plaintext;
+}
+
+@-moz-document unobservable-document() {
+ @media (prefers-color-scheme: dark) {
+ :root {
+ /* in-content-page-{color, background} for dark theme. */
+ background: #2a2a2e;
+ color: rgb(249, 249, 250);
+ }
+ }
+}
+
+/* NOTE(emilio): For some reason some pages, mainly bing.com, load a bunch of
+ * scripts in zero-size <object> elements, see bug 1548449.
+ *
+ * Line-breaking such documents is useless and pretty expensive, so only render
+ * them if there's a viewport. Sigh.
+ */
+@media (width: 0) or (height: 0) {
+ :root {
+ display: none;
+ }
+}
diff --git a/layout/style/res/pluginproblem.css b/layout/style/res/pluginproblem.css
new file mode 100644
index 0000000000..d435f3e622
--- /dev/null
+++ b/layout/style/res/pluginproblem.css
@@ -0,0 +1,12 @@
+/* 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/1999/xhtml); /* set default namespace to HTML */
+
+embed:-moz-handler-noplugins,
+object:-moz-handler-noplugins {
+ display: inline-block;
+ overflow: hidden;
+ opacity: 0 !important;
+}
diff --git a/layout/style/res/quirk.css b/layout/style/res/quirk.css
new file mode 100644
index 0000000000..6e74839ee3
--- /dev/null
+++ b/layout/style/res/quirk.css
@@ -0,0 +1,105 @@
+/* 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/1999/xhtml); /* set default namespace to HTML */
+
+
+/* Quirk: make orphaned LIs have inside bullet (b=1049) */
+
+/* force inside position for orphaned lis */
+li {
+ list-style-position: inside;
+}
+
+/* restore outside position for lists inside LIs */
+li :is(ul, ol, dir, menu) {
+ list-style-position: outside;
+}
+
+/* undo previous two rules for properly nested lists */
+:is(ul, ol, dir, menu) :is(ul, ol, dir, menu, li) {
+ list-style-position: unset;
+}
+
+
+/* Quirk: ensure that we get proper padding if the very first
+ * node in an LI is another UL or OL. This is an ugly way to
+ * fix the problem, because it extends the LI up into what
+ * would otherwise appear to be the ULs space. (b=38832) */
+
+/* Note: this fix will fail once we implement marker box
+ * alignment correctly. */
+li > ul:-moz-first-node,
+li > ol:-moz-first-node {
+ padding-block-start: 1em;
+}
+
+
+table {
+ text-align: start;
+ white-space: normal; /* compatible with IE & spec */
+ line-height: normal;
+
+ /* Quirk: cut off all font inheritance in tables except for family. */
+ font-size: initial;
+ font-weight: initial;
+ font-style: initial;
+ font-variant: initial;
+}
+
+
+/* Quirk: collapse top margin of BODY and TD and bottom margin of TD */
+
+/*
+ * While it may seem simpler to use :-moz-first-node and :-moz-last-node without
+ * tags, it's slower, since we have to do the :-moz-first-node or :-moz-last-node
+ * check on every single element in the document. If we list all the
+ * element names for which the UA stylesheet specifies a margin, the
+ * selectors will be hashed in the selector maps and things will be much more
+ * efficient.
+ */
+:is(body, td, th) > :is(p, dl, multicol, blockquote, h1, h2, h3, h4, h5, h6, listing, plaintext, xmp, pre, ul, menu, dir, ol):-moz-first-node {
+ margin-block-start: 0;
+}
+
+td > p:-moz-last-node, th > p:-moz-last-node {
+ margin-block-end: 0;
+}
+
+/* Similar as above, but for empty elements
+ * collapse the bottom or top margins of empty elements
+ * - see bug 97361
+ */
+:is(body, td, th) > :is(p, dl, multicol, blockquote, h1, h2, h3, h4, h5, h6, listing, plaintext, xmp, pre, ul, menu, dir, ol):-moz-only-whitespace:-moz-first-node {
+ margin-block-end: 0;
+}
+
+:is(td, th) > :is(p, dl, multicol, blockquote, h1, h2, h3, h4, h5, h6, listing, plaintext, xmp, pre, ul, menu, dir, ol):-moz-only-whitespace:-moz-last-node {
+ margin-block-start: 0;
+}
+
+/* Quirk: Make floated images have a margin (b=58899) */
+img[align=left] {
+ margin-right: 3px;
+}
+
+img[align=right] {
+ margin-left: 3px;
+}
+
+/*
+ * Quirk: Use border-box box sizing for text inputs, password inputs, and
+ * textareas. (b=184478 on why we use content-box sizing in standards mode)
+ */
+
+/* Note that all other <input>s already use border-box
+ sizing, so we're ok with this selector */
+input:not([type=image]), textarea {
+ box-sizing: border-box;
+}
+
+/* Quirk: give form margin for compat (b=41806) */
+form {
+ margin-block-end: 1em;
+}
diff --git a/layout/style/res/ua.css b/layout/style/res/ua.css
new file mode 100644
index 0000000000..bb5eaf197f
--- /dev/null
+++ b/layout/style/res/ua.css
@@ -0,0 +1,591 @@
+/* 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 parsererror url(http://www.mozilla.org/newlayout/xml/parsererror.xml);
+@namespace xul url(http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul);
+
+/* magic -- some of these rules are important to keep pages from overriding
+ them
+*/
+
+/* Tables */
+
+*|*::-moz-table {
+ display: table;
+ box-sizing: border-box; /* XXX do we really want this? */
+}
+
+*|*::-moz-inline-table {
+ display: inline-table;
+ box-sizing: border-box; /* XXX do we really want this? */
+}
+
+*|*::-moz-table-wrapper {
+ /* The inherited properties here need to be safe to have on both the
+ * table and the table wrapper, generally because code ignores them
+ * for the table. */
+ display: inherit; /* table or inline-table */
+ -moz-top-layer: inherit;
+ margin: inherit;
+ float: inherit;
+ clear: inherit;
+ position: inherit;
+ top: inherit;
+ right: inherit;
+ bottom: inherit;
+ left: inherit;
+ z-index: inherit;
+ page-break-before: inherit;
+ page-break-after: inherit;
+ page-break-inside: inherit;
+ vertical-align: inherit; /* needed for inline-table */
+ line-height: inherit; /* needed for vertical-align on inline-table */
+ /* Bug 722777 */
+ transform: inherit;
+ transform-origin: inherit;
+ /* Bug 724750 */
+ backface-visibility: inherit;
+ clip: inherit;
+ /* Other transform-related properties */
+ /* transform-style: inherit; Bug 1560704 */
+ rotate: inherit;
+ scale: inherit;
+ translate: inherit;
+ /* When the table wrapper is a Flex/Grid item we need these: */
+ flex-grow: inherit;
+ flex-shrink: inherit;
+ flex-basis: inherit;
+ align-self: inherit;
+ justify-self: inherit;
+ grid-column-start: inherit;
+ grid-column-end: inherit;
+ grid-row-start: inherit;
+ grid-row-end: inherit;
+ order: inherit;
+ outline: inherit;
+ outline-offset: inherit;
+ column-span: inherit; /* needed if <table> has "column-span:all" */
+ contain: inherit; /* needed if table has 'contain:layout' or 'paint' */
+ scroll-margin: inherit; /* Bug 1633192 */
+}
+
+*|*::-moz-table-row {
+ display: table-row;
+}
+
+/* The ::-moz-table-column pseudo-element is for extra columns at the end
+ of a table. */
+*|*::-moz-table-column {
+ display: table-column;
+ /* Make sure anonymous columns don't interfere with hit testing. Basically,
+ * they should pretend as much as possible to not exist (since in the spec
+ * they do not exist).
+ *
+ * Please make sure to not reintroduce
+ * https://bugzilla.mozilla.org/show_bug.cgi?id=1403293 if you change this
+ * bit!
+ */
+ visibility: hidden;
+}
+
+*|*::-moz-table-column-group {
+ display: table-column-group;
+ /* Make sure anonymous colgroups don't interfere with hit testing. Basically,
+ * they should pretend as much as possible to not exist (since in the spec
+ * they do not exist).
+ *
+ * Please make sure to not reintroduce
+ * https://bugzilla.mozilla.org/show_bug.cgi?id=1403293 if you change this
+ * bit!
+ */
+ visibility: hidden;
+}
+
+*|*::-moz-table-row-group {
+ display: table-row-group;
+}
+
+*|*::-moz-table-cell {
+ display: table-cell;
+ white-space: inherit;
+}
+
+/* Ruby */
+*|*::-moz-ruby {
+ display: ruby;
+ unicode-bidi: isolate;
+}
+*|*::-moz-ruby-base {
+ display: ruby-base;
+ unicode-bidi: isolate;
+}
+*|*::-moz-ruby-text {
+ display: ruby-text;
+ unicode-bidi: isolate;
+}
+*|*::-moz-ruby-base-container {
+ display: ruby-base-container;
+ unicode-bidi: isolate;
+}
+*|*::-moz-ruby-text-container {
+ display: ruby-text-container;
+ unicode-bidi: isolate;
+}
+
+/* https://drafts.csswg.org/css-lists-3/#ua-stylesheet */
+*|*::marker {
+ text-align: end;
+ text-transform: none;
+ unicode-bidi: isolate;
+ font-variant-numeric: tabular-nums;
+}
+
+/* SVG documents don't always load this file but they do have links.
+ * If you change the link rules, consider carefully whether to make
+ * the same changes to svg.css.
+ */
+
+/* Links */
+
+*|*:any-link {
+ cursor: pointer;
+}
+
+*|*:any-link:-moz-focusring {
+ /* Don't specify the outline-color, we should always use initial value. */
+ outline: 1px dotted;
+}
+
+/* Inert subtrees */
+*|*:-moz-inert {
+ -moz-inert: inert;
+}
+
+/* Miscellaneous */
+
+*|*::-moz-cell-content {
+ display: block;
+ unicode-bidi: inherit;
+ text-overflow: inherit;
+ overflow-clip-box: inherit;
+}
+
+*|*::-moz-block-inside-inline-wrapper {
+ display: block;
+ /* we currently inherit from the inline that is split */
+ position: inherit; /* static or relative or sticky */
+ outline: inherit;
+ outline-offset: inherit;
+ clip-path: inherit;
+ filter: inherit;
+ mask: inherit;
+ opacity: inherit;
+ text-decoration: inherit;
+ -moz-box-ordinal-group: inherit;
+ overflow-clip-box: inherit;
+ unicode-bidi: inherit;
+ text-overflow: inherit;
+ /* The properties below here don't apply if our position is static,
+ and we do want them to have an effect if it's not, so it's fine
+ to always inherit them. */
+ top: inherit;
+ left: inherit;
+ bottom: inherit;
+ right: inherit;
+ z-index: inherit;
+}
+
+*|*::-moz-xul-anonymous-block {
+ display: block;
+ -moz-box-ordinal-group: inherit;
+ text-overflow: inherit;
+ overflow-clip-box: inherit;
+}
+
+*|*::-moz-scrolled-content, *|*::-moz-scrolled-canvas,
+*|*::-moz-scrolled-page-sequence {
+ /* e.g., text inputs, select boxes */
+ padding: inherit;
+ /* The display doesn't affect the kind of frame constructed here. This just
+ affects auto-width sizing of the block we create. */
+ display: block;
+ /* make unicode-bidi inherit, otherwise it has no effect on text inputs and
+ blocks with overflow: scroll; */
+ unicode-bidi: inherit;
+ text-overflow: inherit;
+ /* Please keep the Multicol/Flex/Grid/Align sections below in sync with
+ ::-moz-fieldset-content/::-moz-button-content in forms.css */
+ /* Multicol container */
+ column-count: inherit;
+ column-width: inherit;
+ column-gap: inherit;
+ column-rule: inherit;
+ column-fill: inherit;
+ /* Flex container */
+ flex-direction: inherit;
+ flex-wrap: inherit;
+ /* -webkit-box container (aliased from -webkit versions to -moz versions) */
+ -moz-box-orient: inherit;
+ -moz-box-direction: inherit;
+ -moz-box-pack: inherit;
+ -moz-box-align: inherit;
+ -webkit-line-clamp: inherit;
+ /* Grid container */
+ grid-auto-columns: inherit;
+ grid-auto-rows: inherit;
+ grid-auto-flow: inherit;
+ grid-column-gap: inherit;
+ grid-row-gap: inherit;
+ grid-template-areas: inherit;
+ grid-template-columns: inherit;
+ grid-template-rows: inherit;
+ /* CSS Align */
+ align-content: inherit;
+ align-items: inherit;
+ justify-content: inherit;
+ justify-items: inherit;
+ /* Do not change these. nsCSSFrameConstructor depends on them to create a good
+ frame tree. */
+ overflow-clip-box: inherit;
+}
+
+*|*::-moz-viewport, *|*::-moz-viewport-scroll, *|*::-moz-canvas, *|*::-moz-scrolled-canvas {
+ display: block;
+ background-color: inherit;
+}
+
+*|*::-moz-viewport-scroll {
+ overflow: auto;
+}
+
+*|*::-moz-column-set,
+*|*::-moz-column-content {
+ /* the column boxes inside a column-flowed block */
+ /* make unicode-bidi inherit, otherwise it has no effect on column boxes */
+ unicode-bidi: inherit;
+ text-overflow: inherit;
+ /* Both -moz-column-set and -moz-column-content need to be blocks. */
+ display: block;
+}
+
+*|*::-moz-column-set {
+ /* Inherit from ColumnSetWrapperFrame so that nsColumnSetFrame is aware of
+ them.*/
+ columns: inherit;
+ column-gap: inherit;
+ column-rule: inherit;
+ column-fill: inherit;
+}
+
+*|*::-moz-column-span-wrapper {
+ /* As a result of the discussion in
+ * https://github.com/w3c/csswg-drafts/issues/1072, most of the styles
+ * currently applied to ::-moz-block-inside-inline-wrapper should not
+ * apply here. */
+ display: block;
+ column-span: all;
+}
+
+*|*::-moz-anonymous-flex-item,
+*|*::-moz-anonymous-grid-item {
+ /* Anonymous blocks that wrap contiguous runs of text
+ * inside of a flex or grid container. */
+ display: block;
+}
+
+*|*::-moz-page-sequence, *|*::-moz-scrolled-page-sequence {
+ /* Collection of pages in print/print preview. Visual styles may only appear
+ * in print preview. */
+ display: block;
+ background: linear-gradient(#606060, #8a8a8a) fixed;
+ height: 100%;
+}
+
+*|*::-moz-printed-sheet {
+ /* Individual sheet of paper in print/print preview. Visual styles may only
+ * appear in print preview. */
+ display: block;
+ background: white;
+ box-shadow: 5px 5px 8px #202020;
+ box-decoration-break: clone;
+ /* TODO: Remove margin if viewport is small or something? */
+ margin: 0.125in 0.25in;
+}
+
+@media (monochrome) and (-moz-print-preview) {
+ *|*::-moz-page {
+ filter: grayscale(1);
+ }
+}
+
+*|*::-moz-pagecontent {
+ display: block;
+ margin: auto;
+}
+
+*|*::-moz-pagebreak {
+ display: block;
+}
+
+/* Printing */
+
+@media print {
+
+ * {
+ cursor: default !important;
+ }
+
+}
+
+*|*:fullscreen:not(:root) {
+ position: fixed !important;
+ top: 0 !important;
+ left: 0 !important;
+ right: 0 !important;
+ bottom: 0 !important;
+ width: 100% !important;
+ height: 100% !important;
+ margin: 0 !important;
+ min-width: 0 !important;
+ max-width: none !important;
+ min-height: 0 !important;
+ max-height: none !important;
+ box-sizing: border-box !important;
+ object-fit: contain;
+ transform: none !important;
+}
+
+xul|*:fullscreen:not(:root, [hidden="true"]) {
+ /* The position: fixed; property above used to force the computed display
+ * value to block. It is no longer the case now, so we manually set it here to
+ * maintain the old behaviour. We should probably not do this, but we don't
+ * fullscreen XUL element that frequently either. */
+ display: block;
+}
+
+/* Selectors here should match the check in
+ * nsViewportFrame.cpp:ShouldInTopLayerForFullscreen() */
+*|*:fullscreen:not(:root, :-moz-browser-frame) {
+ -moz-top-layer: top !important;
+}
+
+*|*::backdrop {
+ -moz-top-layer: top !important;
+ display: block;
+ position: fixed;
+ top: 0; left: 0;
+ right: 0; bottom: 0;
+}
+
+*|*:-moz-full-screen:not(:root)::backdrop {
+ background: black;
+}
+
+/* XML parse error reporting */
+
+parsererror|parsererror {
+ display: block;
+ font-family: sans-serif;
+ font-weight: bold;
+ white-space: pre;
+ margin: 1em;
+ padding: 1em;
+ border-width: thin;
+ border-style: inset;
+ border-color: red;
+ font-size: 14pt;
+ background-color: lightyellow;
+ color: black;
+}
+
+parsererror|sourcetext {
+ display: block;
+ white-space: pre;
+ font-family: -moz-fixed;
+ margin-top: 2em;
+ margin-bottom: 1em;
+ color: red;
+ font-weight: bold;
+ font-size: 12pt;
+}
+
+div:-moz-native-anonymous.moz-accessiblecaret {
+ /* Add transition effect to make caret size changing smoother. */
+ transition-property: width, height, margin-left;
+
+ position: absolute;
+ z-index: 2147483647;
+}
+
+div:-moz-native-anonymous.moz-accessiblecaret > :is(#text-overlay, #image) {
+ width: 100%;
+
+ /* Override this property in moz-custom-content-container to make dummy touch
+ * listener work. */
+ pointer-events: auto;
+}
+
+div:-moz-native-anonymous.moz-accessiblecaret > #image {
+ background-position: center top;
+ background-size: 100%;
+ background-repeat: no-repeat;
+ background-origin: content-box;
+}
+
+div:-moz-native-anonymous.moz-accessiblecaret.normal > #image {
+ background-image: url("resource://gre-resources/accessiblecaret-normal@1x.png");
+}
+
+div:-moz-native-anonymous.moz-accessiblecaret.left > :is(#text-overlay, #image) {
+ margin-left: -39%;
+}
+
+div:-moz-native-anonymous.moz-accessiblecaret.left > #image {
+ background-image: url("resource://gre-resources/accessiblecaret-tilt-left@1x.png");
+}
+
+div:-moz-native-anonymous.moz-accessiblecaret.right > :is(#text-overlay, #image) {
+ margin-left: 41%;
+}
+
+div:-moz-native-anonymous.moz-accessiblecaret.right > #image {
+ background-image: url("resource://gre-resources/accessiblecaret-tilt-right@1x.png");
+}
+
+div:-moz-native-anonymous.moz-accessiblecaret.none {
+ display: none;
+}
+
+div:-moz-native-anonymous.moz-accessiblecaret.hidden {
+ visibility: hidden;
+}
+
+@media (min-resolution: 1.5dppx) {
+ div:-moz-native-anonymous.moz-accessiblecaret.normal > #image {
+ background-image: url("resource://gre-resources/accessiblecaret-normal@1.5x.png");
+ }
+
+ div:-moz-native-anonymous.moz-accessiblecaret.left > #image {
+ background-image: url("resource://gre-resources/accessiblecaret-tilt-left@1.5x.png");
+ }
+
+ div:-moz-native-anonymous.moz-accessiblecaret.right > #image {
+ background-image: url("resource://gre-resources/accessiblecaret-tilt-right@1.5x.png");
+ }
+}
+
+@media (min-resolution: 2dppx) {
+ div:-moz-native-anonymous.moz-accessiblecaret.normal > #image {
+ background-image: url("resource://gre-resources/accessiblecaret-normal@2x.png");
+ }
+
+ div:-moz-native-anonymous.moz-accessiblecaret.left > #image {
+ background-image: url("resource://gre-resources/accessiblecaret-tilt-left@2x.png");
+ }
+
+ div:-moz-native-anonymous.moz-accessiblecaret.right > #image {
+ background-image: url("resource://gre-resources/accessiblecaret-tilt-right@2x.png");
+ }
+}
+
+@media (min-resolution: 2.25dppx) {
+ div:-moz-native-anonymous.moz-accessiblecaret.normal > #image {
+ background-image: url("resource://gre-resources/accessiblecaret-normal@2.25x.png");
+ }
+
+ div:-moz-native-anonymous.moz-accessiblecaret.left > #image {
+ background-image: url("resource://gre-resources/accessiblecaret-tilt-left@2.25x.png");
+ }
+
+ div:-moz-native-anonymous.moz-accessiblecaret.right > #image {
+ background-image: url("resource://gre-resources/accessiblecaret-tilt-right@2.25x.png");
+ }
+}
+
+%ifdef ANDROID
+div:-moz-native-anonymous.moz-accessiblecaret > :is(#text-overlay, #image) {
+ /* border: 0.1px solid red; */ /* Uncomment border to see the touch target. */
+ padding-left: 59%; /* Enlarge the touch area. ((48-22)/2)px / 22px ~= 59% */
+ padding-right: 59%; /* Enlarge the touch area. */
+ margin-left: -59%;
+}
+
+div:-moz-native-anonymous.moz-accessiblecaret > #image {
+ padding-bottom: 59%; /* Enlarge the touch area. */
+}
+
+div:-moz-native-anonymous.moz-accessiblecaret.normal > #image {
+ background-image: url("chrome://geckoview/skin/images/accessiblecaret-normal-hdpi.png");
+}
+
+div:-moz-native-anonymous.moz-accessiblecaret.left > :is(#text-overlay, #image) {
+ margin-left: -109%;
+}
+
+div:-moz-native-anonymous.moz-accessiblecaret.left > #image {
+ background-image: url("chrome://geckoview/skin/images/accessiblecaret-tilt-left-hdpi.png");
+}
+
+div:-moz-native-anonymous.moz-accessiblecaret.right > :is(#text-overlay, #image) {
+ margin-left: -12%;
+}
+
+div:-moz-native-anonymous.moz-accessiblecaret.right > #image {
+ background-image: url("chrome://geckoview/skin/images/accessiblecaret-tilt-right-hdpi.png");
+}
+
+@media (min-resolution: 1.5dppx) {
+ div:-moz-native-anonymous.moz-accessiblecaret.normal > #image {
+ background-image: url("chrome://geckoview/skin/images/accessiblecaret-normal-hdpi.png");
+ }
+
+ div:-moz-native-anonymous.moz-accessiblecaret.left > #image {
+ background-image: url("chrome://geckoview/skin/images/accessiblecaret-tilt-left-hdpi.png");
+ }
+
+ div:-moz-native-anonymous.moz-accessiblecaret.right > #image {
+ background-image: url("chrome://geckoview/skin/images/accessiblecaret-tilt-right-hdpi.png");
+ }
+}
+
+@media (min-resolution: 2dppx) {
+ div:-moz-native-anonymous.moz-accessiblecaret.normal > #image {
+ background-image: url("chrome://geckoview/skin/images/accessiblecaret-normal-xhdpi.png");
+ }
+
+ div:-moz-native-anonymous.moz-accessiblecaret.left > #image {
+ background-image: url("chrome://geckoview/skin/images/accessiblecaret-tilt-left-xhdpi.png");
+ }
+
+ div:-moz-native-anonymous.moz-accessiblecaret.right > #image {
+ background-image: url("chrome://geckoview/skin/images/accessiblecaret-tilt-right-xhdpi.png");
+ }
+}
+
+@media (min-resolution: 2.25dppx) {
+ div:-moz-native-anonymous.moz-accessiblecaret.normal > #image {
+ background-image: url("chrome://geckoview/skin/images/accessiblecaret-normal-xxhdpi.png");
+ }
+
+ div:-moz-native-anonymous.moz-accessiblecaret.left > #image {
+ background-image: url("chrome://geckoview/skin/images/accessiblecaret-tilt-left-xxhdpi.png");
+ }
+
+ div:-moz-native-anonymous.moz-accessiblecaret.right > #image {
+ background-image: url("chrome://geckoview/skin/images/accessiblecaret-tilt-right-xxhdpi.png");
+ }
+}
+%endif
+
+/* Custom content container in the CanvasFrame, positioned on top of everything
+ everything else, not reacting to pointer events. */
+div:-moz-native-anonymous.moz-custom-content-container {
+ pointer-events: none;
+ -moz-top-layer: top;
+ position: absolute;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+}
diff --git a/layout/style/res/viewsource.css b/layout/style/res/viewsource.css
new file mode 100644
index 0000000000..370b59fb94
--- /dev/null
+++ b/layout/style/res/viewsource.css
@@ -0,0 +1,101 @@
+@charset "utf-8";
+/* 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/1999/xhtml); /* set default namespace to HTML */
+
+*|*:root {
+ background-color: white;
+ color: black;
+ direction: ltr;
+ -moz-control-character-visibility: visible;
+ height: 100%;
+}
+#viewsource {
+ font-family: -moz-fixed;
+ font-weight: normal;
+ white-space: pre;
+ counter-reset: line;
+ height: 100%;
+ box-sizing: border-box;
+ margin: 0;
+ padding: 8px;
+}
+#viewsource.wrap {
+ white-space: pre-wrap;
+ word-wrap: break-word;
+}
+pre {
+ font: inherit;
+ color: inherit;
+ white-space: inherit;
+ margin: 0 0 0 5ch;
+}
+pre[id]:before,
+span[id]:before {
+ content: counter(line) " ";
+ counter-increment: line;
+ user-select: none;
+ display: inline-block;
+ width: 5ch;
+ margin: 0 0 0 -5ch;
+ text-align: right;
+ color: #ccc;
+ font-weight: normal;
+ font-style: normal;
+}
+.highlight .start-tag {
+ color: purple;
+ font-weight: bold;
+}
+.highlight .end-tag {
+ color: purple;
+ font-weight: bold;
+}
+.highlight .comment {
+ color: green;
+ font-style: italic;
+}
+.highlight .cdata {
+ color: #CC0066;
+}
+.highlight .doctype {
+ color: steelblue;
+ font-style: italic;
+}
+.highlight .pi {
+ color: orchid;
+ font-style: italic;
+}
+.highlight .entity {
+ color: #FF4500;
+ font-weight: normal;
+}
+.highlight .text {
+ font-weight: normal;
+}
+.highlight .attribute-name {
+ color: black;
+ font-weight: bold;
+}
+.highlight .attribute-value {
+ color: blue;
+ font-weight: normal;
+}
+.highlight .markupdeclaration {
+ color: steelblue;
+ font-style: italic;
+}
+span:not(.error), a:not(.error) {
+ unicode-bidi: embed;
+}
+span[id] {
+ unicode-bidi: isolate;
+}
+.highlight .error,
+.highlight .error > :is(.start-tag, .end-tag, .comment, .cdata, .doctype,
+ .pi, .entity, .attribute-name, .attribute-value) {
+ color: red;
+ font-weight: bold;
+}