summaryrefslogtreecommitdiffstats
path: root/layout/style/res/html.css
diff options
context:
space:
mode:
authorMatt A. Tobin <email@mattatobin.com>2020-04-17 05:50:47 -0400
committerMatt A. Tobin <email@mattatobin.com>2020-04-17 05:50:47 -0400
commit4d1d777e706322cb9aca8ed2d5a6e50b805d3bd1 (patch)
tree1cea0ad854fb25e536caf93f240258eebfb3aea8 /layout/style/res/html.css
parent32e8155127126c187ce32f7368742057bcaf69da (diff)
downloadUXP-4d1d777e706322cb9aca8ed2d5a6e50b805d3bd1.tar
UXP-4d1d777e706322cb9aca8ed2d5a6e50b805d3bd1.tar.gz
UXP-4d1d777e706322cb9aca8ed2d5a6e50b805d3bd1.tar.lz
UXP-4d1d777e706322cb9aca8ed2d5a6e50b805d3bd1.tar.xz
UXP-4d1d777e706322cb9aca8ed2d5a6e50b805d3bd1.zip
Bug 1373798 - Move HTML dir attribute state into event state flags
* Stop calling SetHasDirAuto/ClearHasDirAuto in input element code * Introduce event state flags that track the state of an element's dir attribute * Rewrite our existing checks for the state of the dir attr on top of the new event state flags * Add pseudo-classes for matching on the dir attribute states * Use the new dir attribute pseudoclasses in html.css Tag #1375
Diffstat (limited to 'layout/style/res/html.css')
-rw-r--r--layout/style/res/html.css19
1 files changed, 12 insertions, 7 deletions
diff --git a/layout/style/res/html.css b/layout/style/res/html.css
index 1f572467f..ea8efbe24 100644
--- a/layout/style/res/html.css
+++ b/layout/style/res/html.css
@@ -7,18 +7,18 @@
/* bidi */
-[dir] {
+:-moz-has-dir-attr {
unicode-bidi: isolate;
}
-[dir="rtl"] {
+:-moz-dir-attr-rtl {
direction: rtl;
}
-[dir="ltr"] {
+:-moz-dir-attr-ltr {
direction: ltr;
}
-bdi:dir(ltr), [dir="auto"]:dir(ltr) { direction: ltr; }
-bdi:dir(rtl), [dir="auto"]:dir(rtl) { direction: rtl; }
+:-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:
*
@@ -89,10 +89,15 @@ xmp {
bdi, output {
unicode-bidi: isolate;
}
-bdo, bdo[dir] {
+/* 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[dir="auto"], pre[dir="auto"] { unicode-bidi: plaintext; }
+textarea:-moz-dir-attr-like-auto,
+pre:-moz-dir-attr-like-auto {
+ unicode-bidi: plaintext;
+}
/* blocks */