summaryrefslogtreecommitdiff
path: root/layout.mdwn
blob: ba97b22b6ad5f0e9072895dbcceb015bef811a75 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
[[!meta title="Layout"]]
[[!meta author="Tlsa"]]
[[!meta date="2010-04-17T21:17:08Z"]]


[[!toc]] This page is for planning
the new layout engine [[scheduled for NetSurf 4.0|development_plan]].

### Overview

At the moment NetSurf can only run layout on the whole box tree. This
happens every time the window width is changed, to let NetSurf reflow
the content. There are some optimisations where the layout code knows if
bits of the layout are fixed-width and won't be affected by a reflow.

Currently we don't handle partial layouts of sections of the box tree.
For example, if a scroll:auto; is laid out to available width, and the
contained content exceeds a specified height, a scrollbar needs to be
inserted. This should cause the descendants to the scroll:auto; to be
laid out to available width - scrollbar width.

Things that require the layout engine to be able to run on parts of an
already-laid-out page are:

-   New image fetched and it has width/height not specified in HTML or
    CSS
-   Overflow scrollbar insertion affects available width
-   Frame scrollbar insertion affects available width
-   Dynamic CSS pseudo classes
-   JavaScript changing stuff or adding stuff

Working out which bits of the page are affected by any given change may
not be easy.