summaryrefslogtreecommitdiff
path: root/Base/home/anon/www/welcome.html
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2020-05-05 16:06:22 +0200
committerAndreas Kling <kling@serenityos.org>2020-05-05 16:18:28 +0200
commite73ad78ba6097884003cafd626063551c390cb68 (patch)
tree3887f0a7370118d0e822a9d801ff0f302c0dceac /Base/home/anon/www/welcome.html
parent0a1ecbec48185af09ceca220f0ae4a73385b06cf (diff)
downloadserenity-e73ad78ba6097884003cafd626063551c390cb68.zip
LibWeb: Add support for "display: inline-block"
This display type is implemented using a LayoutBlock that is_inline(). Basically it behaves like a block internally, and its children are laid out in the normal block layout fashion. Externally however, it behaves like an atomic inline-level box. Layout of inline-block boxes happens in three stages: 1. The outer dimensions of the block are computed during the recursive normal layout pass. We skip positioning, but lay out children. 2. Later on, during line layout in the *containing block*, the inline block now contributes a linebox fragment. When linebox fragments are positioned, we learn the final position of the inline block. That's when we set the inline block's position. 3. We re-layout the inline block's children once again. This is done to make sure they end up in the right position. The layout tree doesn't use relative offsets, so after we position the inline block in (2), its children will not have its positions updated. Relayout moves all children of inline blocks to the right place. This is a rather naive approach but it does get the basic behavior into place so we can iterate on it. :^)
Diffstat (limited to 'Base/home/anon/www/welcome.html')
-rw-r--r--Base/home/anon/www/welcome.html1
1 files changed, 1 insertions, 0 deletions
diff --git a/Base/home/anon/www/welcome.html b/Base/home/anon/www/welcome.html
index d9ed0eb87a..2fffcb8f6c 100644
--- a/Base/home/anon/www/welcome.html
+++ b/Base/home/anon/www/welcome.html
@@ -28,6 +28,7 @@ span#ua {
<p>Your user agent is: <b><span id="ua"></span></b></p>
<p>Some small test pages:</p>
<ul>
+ <li><a href="inline-block.html">display: inline-block; test</a></li>
<li><a href="canvas-path-quadratic-curve.html">canvas path quadratic curve test</a></li>
<li><a href="pngsuite_siz_png.html">pngsuite odd sizes test</a></li>
<li><a href="pngsuite_bas_png.html">pngsuite basic formats test</a></li>