Bug 1305957 part 10 - Add block box inside of inline-box so it can be an anchor for 'start-edge-in-block' scroll-anchoring test. r=dholbert
☠☠ backed out by 842b7a62d9ce ☠ ☠
authorRyan Hunt <rhunt@eqrion.net>
Wed, 09 Jan 2019 12:04:37 -0600
changeset 510365 bfca5019a9cca1bf03af412521c223e85f08e647
parent 510364 e76b842c7b7fbdf434de7f099e399a8a53753493
child 510366 b4cb2cbebdb6a099f64e477ec434701d39d4816d
push id10547
push userffxbld-merge
push dateMon, 21 Jan 2019 13:03:58 +0000
treeherdermozilla-beta@24ec1916bffe [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdholbert
bugs1305957
milestone66.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 1305957 part 10 - Add block box inside of inline-box so it can be an anchor for 'start-edge-in-block' scroll-anchoring test. r=dholbert The scroll anchoring test 'start-edge-in-block-direction.html' relies on #anchorbeing selected as an anchor node. However #anchor is 'display: inline-block' and the specification states that only block boxes [0] or text nodes may be selected as anchor nodes [1]. There's a spec issue open here trying to resolve this [2]. In the meantime, adding a block box inside of the inline-block should be spec compliant, and keep the test working. [0] "block boxes" are defined as "A block-level box that is also a block container" https://drafts.csswg.org/css-display-3/#block-box [1] https://drafts.csswg.org/css-scroll-anchoring-1/#anchor-node-selection [2] https://github.com/w3c/csswg-drafts/issues/3478#issuecomment-451038720 Differential Revision: https://phabricator.services.mozilla.com/D16072
testing/web-platform/tests/css/css-scroll-anchoring/start-edge-in-block-layout-direction.html
--- a/testing/web-platform/tests/css/css-scroll-anchoring/start-edge-in-block-layout-direction.html
+++ b/testing/web-platform/tests/css/css-scroll-anchoring/start-edge-in-block-layout-direction.html
@@ -27,35 +27,39 @@ html.vrl { writing-mode: vertical-rl; }
   width: 100px;
   height: 100px;
 }
 #block_pusher { background-color: #e88; }
 #inline_pusher { background-color: #88e; }
 .vpush { height: 80px !important; }
 .hpush { width: 70px !important; }
 
+#anchor-container {
+  display: inline-block;
+}
 #anchor {
   position: relative;
-  display: inline-block;
   background-color: #8e8;
   min-width: 100px;
   min-height: 100px;
 }
 
 #grower { width: 0; height: 0; }
 .grow {
   width: 180px !important;
   height: 160px !important;
 }
 
 </style>
 <div id="container">
   <div id="block_pusher"></div><br>
-  <div id="inline_pusher"></div><div id="anchor">
-    <div id="grower"></div>
+  <div id="inline_pusher"></div><div id="anchor-container">
+    <div id="anchor">
+      <div id="grower"></div>
+    </div>
   </div>
 </div>
 <script>
 
 // Tests that anchoring adjustments are only on the block layout axis and that
 // their magnitude is based on the movement of the block start edge of the
 // anchor node, for all 6 combinations of text direction and writing mode,
 // regardless of which corner of the viewport the anchor node overlaps.