<!DOCTYPE html>
<link rel="help" href="https://drafts.csswg.org/css-ruby/#ruby-layout">
<link rel="stylesheet" href="/fonts/ahem.css">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<style>
body {
  font: 20px/1 Ahem;
}
</style>
<body>
<div id=container></div>
<script>
const container = document.querySelector('#container');
test(() => {
  container.innerHTML = '<ruby style="position:relative">base<rt>annotation</ruby>';
  const rtBefore = document.q