Bug 1574179 - Simplify <img align> rules in quirks.css. r=jfkthame
authorEmilio Cobos Álvarez <emilio@crisal.io>
Thu, 15 Aug 2019 19:26:02 +0000
changeset 488470 09ce6041df3bc1451e914a84f9b8e742c2f294de
parent 488469 f96d420517972051aeb08355243e6d7b081c4b94
child 488471 21bd83f9fa50dd22622b5fa1447fb52b4e281eaf
push id92767
push userealvarez@mozilla.com
push dateFri, 16 Aug 2019 09:38:03 +0000
treeherderautoland@09ce6041df3b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjfkthame
bugs1574179
milestone70.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1574179 - Simplify <img align> rules in quirks.css. r=jfkthame It seems to me that it should be equivalent, and we don't need to do directionality-dependent stuff. align=right and align=left map to the physical values anyway: https://searchfox.org/mozilla-central/rev/3366c3d24f1c3818df37ec0818833bf085e41a53/dom/html/nsGenericHTMLElement.cpp#1165 This also matches Chromium: https://cs.chromium.org/chromium/src/third_party/blink/renderer/core/html/resources/quirks.css?l=26&rcl=e019448580f331c4c7c756271843d1bcf27e0071 (Modulo the case-insensitivity) Differential Revision: https://phabricator.services.mozilla.com/D42142
layout/style/res/quirk.css
--- a/layout/style/res/quirk.css
+++ b/layout/style/res/quirk.css
@@ -139,22 +139,22 @@ td > pre:-moz-only-whitespace:-moz-last-
 td > ul:-moz-only-whitespace:-moz-last-node, th > ul:-moz-only-whitespace:-moz-last-node,
 td > menu:-moz-only-whitespace:-moz-last-node, th > menu:-moz-only-whitespace:-moz-last-node,
 td > dir:-moz-only-whitespace:-moz-last-node, th > dir:-moz-only-whitespace:-moz-last-node,
 td > ol:-moz-only-whitespace:-moz-last-node, th > ol:-moz-only-whitespace:-moz-last-node {
   margin-block-start: 0;
 }
 
 /* Quirk: Make floated images have a margin  (b=58899) */
-img[align=left]:dir(ltr), img[align=right]:dir(rtl) {
-  margin-inline-end: 3px;
+img[align=left] {
+  margin-right: 3px;
 }
 
-img[align=right]:dir(ltr), img[align=left]:dir(rtl) {
-  margin-inline-start: 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