Mosaic: motore di rendering proprio, gusci desktop e Sailfish
Primo commit del progetto: motore Rust con parser HTML, cascata CSS, layout, raster CPU, formulari, bidi, flex, tabelle, JavaScript (Boa) con eventi e costruzione di nodi, rete HTTP/HTTPS con TLS, sotto-risorse, invio dei formulari; guscio grafico per Sailfish (QML/Silica) e per desktop (minifb, distribuito come AppImage), con 11 documenti di specifica e 91 casi di reftest.
This commit is contained in:
commit
577682ae22
173 files changed
+23685
No files matched your search
@@ -0,0 +1,5 @@
|
||||
# Cross-compilazione per Sailfish: serve un linker aarch64 perché alcune
|
||||
# dipendenze (boa_engine) dichiarano una cdylib. Il linker lo fornisce il
|
||||
# pacchetto gcc-aarch64-linux-gnu.
|
||||
[target.aarch64-unknown-linux-gnu]
|
||||
linker = "aarch64-linux-gnu-gcc"
|
||||
@@ -0,0 +1,2 @@
|
||||
/target
|
||||
Cargo.lock.bak
|
||||
Generated
+1686
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,47 @@
|
||||
[package]
|
||||
name = "engine"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
description = "Motore di rendering indipendente - milestone M1"
|
||||
|
||||
[lib]
|
||||
name = "engine"
|
||||
path = "src/lib.rs"
|
||||
crate-type = ["rlib", "staticlib"]
|
||||
|
||||
[[bin]]
|
||||
name = "render"
|
||||
path = "src/bin/render.rs"
|
||||
|
||||
[[bin]]
|
||||
name = "reftest"
|
||||
path = "src/bin/reftest.rs"
|
||||
|
||||
[features]
|
||||
default = ["js"]
|
||||
js = ["dep:boa_engine"]
|
||||
|
||||
[dependencies]
|
||||
# TLS: rustls con ring. Serve perché senza https il browser non carica nulla
|
||||
# del web reale. ring porta codice C e assembly: vedi le note nel README.
|
||||
rustls = { version = "0.23", default-features = false, features = ["std", "tls12", "ring", "logging"] }
|
||||
webpki-roots = { version = "0.26", default-features = false }
|
||||
# motore JavaScript puro Rust (M2.5). Opzionale: la sua cdylib richiede un linker
|
||||
# aarch64 (gcc-aarch64-linux-gnu, dichiarato in .cargo/config.toml). Senza quel
|
||||
# linker: --no-default-features, e i casi 89-90 si saltano (vedi src/script.rs).
|
||||
boa_engine = { version = "0.20", optional = true }
|
||||
ab_glyph = "0.2"
|
||||
# decodifica immagini: solo backend in Rust puro, per restare cross-compilabile
|
||||
image = { version = "0.25.10", default-features = false, features = [
|
||||
"png",
|
||||
"jpeg",
|
||||
"webp",
|
||||
] }
|
||||
png = "0.17"
|
||||
# shaping (kerning, legature): port Rust di HarfBuzz, nessuna dipendenza C
|
||||
rustybuzz = { version = "0.20.1", default-features = false, features = ["std"] }
|
||||
serde_json = "1"
|
||||
|
||||
[profile.release]
|
||||
opt-level = 3
|
||||
lto = "thin"
|
||||
@@ -0,0 +1,149 @@
|
||||
# engine — motore di rendering, milestone M1
|
||||
|
||||
Implementazione della milestone M1 (chiusa il 2026-11-12) descritta in [`../docs/10-roadmap.md`](../docs/10-roadmap.md).
|
||||
Nessun codice di WebKit, Blink, Gecko o Servo: parser, cascata, layout e raster sono qui.
|
||||
|
||||
## Stato
|
||||
|
||||
| Elemento M0 | Stato | Dove |
|
||||
|---|---|---|
|
||||
| Tokenizer HTML (commenti, doctype, attributi, rawtext) | fatto | `src/tokenizer.rs` |
|
||||
| Tree builder (html/head/body impliciti, auto-chiusura `p`/`li`, void, profondità massima 512) | fatto | `src/treebuilder.rs` |
|
||||
| DOM in arena con `NodeId` | fatto | `src/dom.rs` |
|
||||
| Parser CSS (selettori composti, discendenza, specificità) | fatto | `src/css.rs` |
|
||||
| Cascata (origine, specificità, ordine, inline, `!important`) + foglio UA | fatto | `src/style.rs` |
|
||||
| Layout block flow con margini, padding, bordi, impaginazione del testo | fatto | `src/layout.rs` |
|
||||
| Paint su CPU (rettangoli, bordi, glifi) + PNG | fatto | `src/paint.rs`, `src/pngio.rs` |
|
||||
| Harness di reftest (sonde pixel, geometria, righe, ink, larghezza testo, golden) | fatto, 60 casi verdi | `src/bin/reftest.rs`, `cases/` |
|
||||
| API C per il guscio | fatto, verificata da `tests/ffi_smoke.c` | `src/ffi.rs`, `include/engine.h` |
|
||||
| Guscio Sailfish `harbour-mosaic` | compila e produce un RPM aarch64 | `../harbour-mosaic/` |
|
||||
|
||||
### M1 in corso
|
||||
|
||||
| Elemento M1 | Stato | Dove |
|
||||
|---|---|---|
|
||||
| Shaping con kerning/legature (`rustybuzz`) | fatto | `src/font.rs` |
|
||||
| `white-space`: normal, nowrap, pre, pre-wrap, pre-line | fatto | `src/layout.rs` |
|
||||
| Margini collassanti (fratelli e catena genitore-figlio) | fatto | `src/layout.rs` |
|
||||
| `@media` con `min-width`/`max-width` | fatto | `src/css.rs` |
|
||||
| Proprietà personalizzate e `var()` con fallback | fatto | `src/style.rs` |
|
||||
| Immagini PNG/JPEG/WebP, dimensioni intrinseche, data URI | fatto | `src/img.rs` |
|
||||
| `float: left/right` con testo che gli passa accanto | fatto (approssimato) | `src/layout.rs` |
|
||||
| `position: relative/absolute/fixed` | fatto (senza `right`/`bottom` da soli) | `src/layout.rs` |
|
||||
| `@font-face` con file locale e font per famiglia | fatto | `src/font.rs`, `src/css.rs` |
|
||||
| Bidi (RTL, testo misto) | **fatto** (sottinsieme UBA, vedi `src/bidi.rs`) | casi 63–66 |
|
||||
| Flexbox (riga/colonna, grow/shrink, gap, wrap, justify, align) | fatto (M2.2) | `layout_flex_children`, casi 68–73 |
|
||||
| Tabelle (colspan, larghezze auto e dichiarate) | fatto (M2.3) | `layout_table`, casi 74–76 |
|
||||
| Formulari (testo, password, checkbox, radio, select, textarea, fuoco) | fatto (M2.4) | `control_spec`, `FormState`, casi 77–80 |
|
||||
| Cursore e selezione nei campi | fatto (M2.4b) | `FormState::caret`/`selection`, casi 83–84 |
|
||||
| Menu a tendina a comparsa | fatto (M2.4c) | `FormState::open_select`, `Cmd::SelectPopup`, caso 85 |
|
||||
| Testo nei campi: ritaglio, scorrimento orizzontale, textarea multi-riga | fatto (M2.4d) | `draw_shaped_in`, casi 86–88 |
|
||||
| JavaScript (`<script>` inline con `Boa`, `getElementById`, `textContent`) | fatto in parte (M2.5) | `src/script.rs`, `src/script_boa.rs`, casi 89–90 |
|
||||
| Eventi: `addEventListener('click')`, `setAttribute`, `style`, `classList`, ridisegno dopo il clic | fatto (M2.5b, desktop) | `script::Macchina`, `ContenutoPagina`, `tests/eventi.rs` |
|
||||
| Costruzione di nodi: `createElement`, `createTextNode`, `appendChild`, `removeChild` | fatto (M2.5c) | `Op::NuovoElemento`/`Append`, `tests/eventi.rs` |
|
||||
| Eventi `input` e `submit`, `element.value` | fatto (M2.5d) | `Macchina::evento`, `imposta_valori`, desktop `--digita` |
|
||||
| Invio dei formulari: GET con query, POST urlencoded, `preventDefault` | fatto (M2.6) | `src/invio.rs`, `net::post`, 7 prove |
|
||||
| Rete: `GET` http/https con TLS, chunked, reindirizzamenti, limiti | fatto in parte (M2.6) | `src/net.rs`, `render --url`, `desktop --url` |
|
||||
| Sotto-risorse dalla rete: `link[rel=stylesheet]` e `img[src]` | fatto (M2.6) | `src/resource.rs`, `tests/risorse.rs` |
|
||||
| WPT (`html/syntax/parsing` ≥ 90 %) | mancante | — |
|
||||
|
||||
Esito della build del 2026-11-11 (`harbour-mosaic/scripts/build.sh aarch64`):
|
||||
|
||||
```
|
||||
Wrote: harbour-mosaic/RPMS/harbour-mosaic-0.1.0-1.aarch64.rpm
|
||||
/usr/bin/harbour-mosaic ELF 64-bit LSB pie executable, ARM aarch64
|
||||
Requires: Qt5Core/Gui/Qml/Quick, libsailfishapp, sailfishsilica-qt5
|
||||
```
|
||||
|
||||
glibc richiesta dal binario: 2.39; il sysroot del target Sailfish 5.1 porta la 2.41,
|
||||
quindi il requisito è soddisfatto. Dettaglio: `libengine.a` aarch64 (29 MB) viene linkata
|
||||
staticamente, quindi l'RPM non contiene librerie del motore e non ne dichiara dipendenze.
|
||||
|
||||
Non verificato: esecuzione sul telefono. Un tentativo sotto `qemu-aarch64` con il sysroot
|
||||
del target si interrompe con SIGABRT senza messaggi (probabile inizializzazione del
|
||||
backend QPA Sailfish), quindi non è una prova utile: il primo avvio reale va fatto su
|
||||
Jolla C2 e vale come TS-02.
|
||||
|
||||
Fuori ambito, non implementato: grid, rete, pseudo-classi, WPT. Del JavaScript mancano eventi, timer, creazione di nodi e `fetch`: gli script girano una volta, prima del layout.
|
||||
|
||||
Cross-compilazione: `engine/.cargo/config.toml` indica `aarch64-linux-gnu-gcc` come linker (serve alla cdylib di Boa). Senza quel pacchetto installato, buildare con `--no-default-features`.
|
||||
|
||||
## Uso
|
||||
|
||||
```bash
|
||||
# rendering singolo documento
|
||||
cargo run --bin render -- --html pagina.html --out out.png --size 800x600 --tree tree.json
|
||||
|
||||
# test
|
||||
cargo run --bin reftest -- --cases cases # 22 casi
|
||||
cargo run --bin reftest -- --cases cases --only elenco
|
||||
cargo run --bin reftest -- --cases cases --bless # rigenera i golden (solo dopo una modifica voluta)
|
||||
|
||||
# CI completa: fmt + build + unit test + reftest + confine C
|
||||
./scripts/ci.sh
|
||||
|
||||
# casi di test rigenerati dallo script (le attese sono calcolate a mano)
|
||||
python3 scripts/gen_cases.py
|
||||
```
|
||||
|
||||
Il font è un parametro esplicito: `--font`, `ENGINE_FONT` o il default DejaVu Sans.
|
||||
Senza font il motore restituisce un errore, non una pagina muta.
|
||||
|
||||
## API C
|
||||
|
||||
`include/engine.h` è l'unico contratto con il guscio:
|
||||
|
||||
```c
|
||||
EngineImage *engine_render(const char *html, const char *css,
|
||||
uint32_t width, uint32_t height,
|
||||
float scale, const char *font_path);
|
||||
void engine_image_free(EngineImage *img);
|
||||
```
|
||||
|
||||
Nessun panic attraversa il confine: gli errori tornano in `EngineImage.error`.
|
||||
`tests/ffi_smoke.c` verifica colori, testo, errore e viewport nullo.
|
||||
|
||||
## Prestazioni del raster
|
||||
|
||||
Misura sul documento demo (1080x1544 px, zoom 2.85), host x86_64, build **release**:
|
||||
|
||||
| Versione | Raster | Layout | Totale |
|
||||
|---|---|---|---|
|
||||
| prima del 2026-11-11 (pixel per pixel con float) | 98 ms | — | — |
|
||||
| cache dei glifi + sfondo a memcpy per riga | 12 ms | 1 ms | 14 ms |
|
||||
| M1 (shaping + immagini) | 6 ms | 0,7 ms | 8 ms |
|
||||
|
||||
Attenzione: `cargo run` senza `--release` compila in debug ed è 20-30 volte più lento.
|
||||
I numeri di questa tabella vanno presi sempre con `--release`, altrimenti si insegue un
|
||||
problema che non esiste.
|
||||
|
||||
Le due cause erano indipendenti: `fill_rect` su un rettangolo di 1,6 M pixel costava
|
||||
60 ns/pixel, e ogni render ri-rasterizzava i glifi perché la cache viveva dentro
|
||||
`FontHolder` invece che nel processo. Il timing è separato in `display` e `raster`
|
||||
(`--repeat N` nel CLI misura i render successivi, a cache calda).
|
||||
|
||||
## Difetti trovati e corretti (da ricordare)
|
||||
|
||||
- **Avanzamenti non riscalati allo zoom**: lo shaping avviene in px CSS, il raster alla
|
||||
dimensione del dispositivo. Se il passo della penna resta in CSS, a zoom 2–3 i glifi
|
||||
crescono ma le lettere si ammassano e si sovrappongono. Ora `draw_shaped` riceve
|
||||
`size_css` e il fattore `px / size_css`; il test `61-zoom-avanzamenti` misura
|
||||
l'estensione dell'inchiostro e non lascia tornare il difetto.
|
||||
- **Larghezze percentuali in tabella**: la percentuale veniva risolta contro lo
|
||||
spazio finto usato per misurare il contenuto (40 % di 100 000 px), quindi la prima
|
||||
colonna sbordava e le altre collassavano; ora si risolve sulla larghezza della
|
||||
tabella, al netto di padding e bordo (test 81). Difetto visto nella demo mobile.
|
||||
- **Float in cima al contenitore**: il float si impaginava a `content_y`, cioè all'inizio
|
||||
del contenitore, invece che alla posizione corrente del flusso; scavalca i titoli e i
|
||||
paragrafi che lo precedono e il loro testo finisce sopra. Ora usa `cursor_y` (test 62).
|
||||
- **Liste annidate sfondate**: l'auto-chiusura di `<li>` chiudeva anche la voce esterna.
|
||||
- **Sfondo a pixel singoli**: `fill_rect` costava 60 ns/px; ora riga preparata + memcpy.
|
||||
|
||||
## Cosa NON è ancora vero
|
||||
|
||||
- Un solo font per documento, shaping senza kerning né legature: HarfBuzz arriva in M1.
|
||||
- Le righe di testo hanno altezza dal font e da `line-height`, non dai box inline.
|
||||
- Ordine di paint: righe di testo prima dei figli blocco (l'interleaving arriva con
|
||||
l'albero dei box completo).
|
||||
- Il percorso multi-processo di `docs/02-architettura.md` non è attivo: M0 è un solo
|
||||
processo, come su Sailfish (doc 11, TS-09).
|
||||
@@ -0,0 +1,54 @@
|
||||
{
|
||||
"name": "01-div-sfondo",
|
||||
"doc": "body margin 8: il div parte a (8,8), 100x50.",
|
||||
"html": "<div style=\"width:100px;height:50px;background:#ff0000\"></div>",
|
||||
"css": "",
|
||||
"viewport": [
|
||||
200,
|
||||
150
|
||||
],
|
||||
"probes": [
|
||||
{
|
||||
"x": 10,
|
||||
"y": 10,
|
||||
"rgb": [
|
||||
255,
|
||||
0,
|
||||
0
|
||||
]
|
||||
},
|
||||
{
|
||||
"x": 150,
|
||||
"y": 10,
|
||||
"rgb": [
|
||||
255,
|
||||
255,
|
||||
255
|
||||
]
|
||||
},
|
||||
{
|
||||
"x": 50,
|
||||
"y": 60,
|
||||
"rgb": [
|
||||
255,
|
||||
255,
|
||||
255
|
||||
]
|
||||
}
|
||||
],
|
||||
"boxes": [
|
||||
{
|
||||
"path": "html>body>div:0",
|
||||
"rect": [
|
||||
8,
|
||||
8,
|
||||
100,
|
||||
50
|
||||
]
|
||||
}
|
||||
],
|
||||
"absent": [],
|
||||
"ink": [],
|
||||
"lines": [],
|
||||
"golden": "01-div-sfondo.png"
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 1.5 KiB |
@@ -0,0 +1,53 @@
|
||||
{
|
||||
"name": "02-div-margine",
|
||||
"doc": "il margine di 20 collassa con quello del body (8): vince 20, non 28.",
|
||||
"html": "<div style=\"width:60px;height:40px;margin:20px;background:#00aa00\"></div>",
|
||||
"css": "",
|
||||
"viewport": [
|
||||
200,
|
||||
150
|
||||
],
|
||||
"probes": [
|
||||
{
|
||||
"x": 30,
|
||||
"y": 30,
|
||||
"rgb": [
|
||||
0,
|
||||
170,
|
||||
0
|
||||
]
|
||||
},
|
||||
{
|
||||
"x": 20,
|
||||
"y": 20,
|
||||
"rgb": [
|
||||
255,
|
||||
255,
|
||||
255
|
||||
]
|
||||
},
|
||||
{
|
||||
"x": 90,
|
||||
"y": 30,
|
||||
"rgb": [
|
||||
255,
|
||||
255,
|
||||
255
|
||||
]
|
||||
}
|
||||
],
|
||||
"boxes": [
|
||||
{
|
||||
"path": "html>body>div:0",
|
||||
"rect": [
|
||||
28,
|
||||
20,
|
||||
60,
|
||||
40
|
||||
]
|
||||
}
|
||||
],
|
||||
"absent": [],
|
||||
"ink": [],
|
||||
"lines": []
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
{
|
||||
"name": "03-padding",
|
||||
"doc": "content-box: rect = 100+20 x 50+20; il padding è dipinto.",
|
||||
"html": "<div style=\"width:100px;height:50px;padding:10px;background:#0000ff\"></div>",
|
||||
"css": "",
|
||||
"viewport": [
|
||||
200,
|
||||
150
|
||||
],
|
||||
"probes": [
|
||||
{
|
||||
"x": 10,
|
||||
"y": 10,
|
||||
"rgb": [
|
||||
0,
|
||||
0,
|
||||
255
|
||||
]
|
||||
},
|
||||
{
|
||||
"x": 126,
|
||||
"y": 76,
|
||||
"rgb": [
|
||||
0,
|
||||
0,
|
||||
255
|
||||
]
|
||||
},
|
||||
{
|
||||
"x": 130,
|
||||
"y": 10,
|
||||
"rgb": [
|
||||
255,
|
||||
255,
|
||||
255
|
||||
]
|
||||
}
|
||||
],
|
||||
"boxes": [
|
||||
{
|
||||
"path": "html>body>div:0",
|
||||
"rect": [
|
||||
8,
|
||||
8,
|
||||
120,
|
||||
70
|
||||
]
|
||||
}
|
||||
],
|
||||
"absent": [],
|
||||
"ink": [],
|
||||
"lines": []
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
{
|
||||
"name": "04-bordo",
|
||||
"doc": "rect = 80+8 x 40+8; pixel 94 dentro il bordo destro (92..96).",
|
||||
"html": "<div style=\"width:80px;height:40px;border:4px solid #000000\"></div>",
|
||||
"css": "",
|
||||
"viewport": [
|
||||
200,
|
||||
150
|
||||
],
|
||||
"probes": [
|
||||
{
|
||||
"x": 10,
|
||||
"y": 10,
|
||||
"rgb": [
|
||||
0,
|
||||
0,
|
||||
0
|
||||
]
|
||||
},
|
||||
{
|
||||
"x": 17,
|
||||
"y": 17,
|
||||
"rgb": [
|
||||
255,
|
||||
255,
|
||||
255
|
||||
]
|
||||
},
|
||||
{
|
||||
"x": 94,
|
||||
"y": 10,
|
||||
"rgb": [
|
||||
0,
|
||||
0,
|
||||
0
|
||||
]
|
||||
}
|
||||
],
|
||||
"boxes": [
|
||||
{
|
||||
"path": "html>body>div:0",
|
||||
"rect": [
|
||||
8,
|
||||
8,
|
||||
88,
|
||||
48
|
||||
]
|
||||
}
|
||||
],
|
||||
"absent": [],
|
||||
"ink": [],
|
||||
"lines": [],
|
||||
"golden": "04-bordo.png"
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 1.8 KiB |
@@ -0,0 +1,44 @@
|
||||
{
|
||||
"name": "05-annidati",
|
||||
"doc": "il figlio parte dal content box del padre: 8+10.",
|
||||
"html": "<div style=\"width:200px;height:100px;padding:10px\"><div style=\"width:50px;height:20px;background:#ff0000\"></div></div>",
|
||||
"css": "",
|
||||
"viewport": [
|
||||
200,
|
||||
150
|
||||
],
|
||||
"probes": [
|
||||
{
|
||||
"x": 20,
|
||||
"y": 20,
|
||||
"rgb": [
|
||||
255,
|
||||
0,
|
||||
0
|
||||
]
|
||||
}
|
||||
],
|
||||
"boxes": [
|
||||
{
|
||||
"path": "html>body>div:0",
|
||||
"rect": [
|
||||
8,
|
||||
8,
|
||||
220,
|
||||
120
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "html>body>div:0>div:0",
|
||||
"rect": [
|
||||
18,
|
||||
18,
|
||||
50,
|
||||
20
|
||||
]
|
||||
}
|
||||
],
|
||||
"absent": [],
|
||||
"ink": [],
|
||||
"lines": []
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
{
|
||||
"name": "06-impilamento",
|
||||
"doc": "senza margini i blocchi si toccano: 8, 38, 68.",
|
||||
"html": "<div style=\"height:30px;width:100px\"></div><div style=\"height:30px;width:100px\"></div><div style=\"height:30px;width:100px;background:#123456\"></div>",
|
||||
"css": "",
|
||||
"viewport": [
|
||||
200,
|
||||
150
|
||||
],
|
||||
"probes": [
|
||||
{
|
||||
"x": 50,
|
||||
"y": 75,
|
||||
"rgb": [
|
||||
18,
|
||||
52,
|
||||
86
|
||||
]
|
||||
}
|
||||
],
|
||||
"boxes": [
|
||||
{
|
||||
"path": "html>body>div:0",
|
||||
"rect": [
|
||||
8,
|
||||
8,
|
||||
100,
|
||||
30
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "html>body>div:1",
|
||||
"rect": [
|
||||
8,
|
||||
38,
|
||||
100,
|
||||
30
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "html>body>div:2",
|
||||
"rect": [
|
||||
8,
|
||||
68,
|
||||
100,
|
||||
30
|
||||
]
|
||||
}
|
||||
],
|
||||
"absent": [],
|
||||
"ink": [],
|
||||
"lines": []
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
{
|
||||
"name": "07-classe-ordine",
|
||||
"doc": ".b viene dopo .a: stesso peso, vince l'ordine.",
|
||||
"html": "<div class=\"a b\" style=\"width:50px;height:50px\"></div>",
|
||||
"css": ".a{background:#111111} .b{background:#222222}",
|
||||
"viewport": [
|
||||
200,
|
||||
150
|
||||
],
|
||||
"probes": [
|
||||
{
|
||||
"x": 10,
|
||||
"y": 10,
|
||||
"rgb": [
|
||||
34,
|
||||
34,
|
||||
34
|
||||
]
|
||||
}
|
||||
],
|
||||
"boxes": [],
|
||||
"absent": [],
|
||||
"ink": [],
|
||||
"lines": []
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
{
|
||||
"name": "08-id-batte-classe",
|
||||
"doc": "specificità (1,0,0) > (0,1,0).",
|
||||
"html": "<div id=\"x\" class=\"a\" style=\"width:50px;height:50px\"></div>",
|
||||
"css": "#x{background:#ff0000} .a{background:#0000ff}",
|
||||
"viewport": [
|
||||
200,
|
||||
150
|
||||
],
|
||||
"probes": [
|
||||
{
|
||||
"x": 10,
|
||||
"y": 10,
|
||||
"rgb": [
|
||||
255,
|
||||
0,
|
||||
0
|
||||
]
|
||||
}
|
||||
],
|
||||
"boxes": [],
|
||||
"absent": [],
|
||||
"ink": [],
|
||||
"lines": []
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
{
|
||||
"name": "09-inline-batte-id",
|
||||
"doc": "style attribute ha specificità massima fra le dichiarazioni normali.",
|
||||
"html": "<div id=\"x\" class=\"a\" style=\"width:50px;height:50px;background:#00ff00\"></div>",
|
||||
"css": "#x{background:#ff0000} .a{background:#0000ff}",
|
||||
"viewport": [
|
||||
200,
|
||||
150
|
||||
],
|
||||
"probes": [
|
||||
{
|
||||
"x": 10,
|
||||
"y": 10,
|
||||
"rgb": [
|
||||
0,
|
||||
255,
|
||||
0
|
||||
]
|
||||
}
|
||||
],
|
||||
"boxes": [],
|
||||
"absent": [],
|
||||
"ink": [],
|
||||
"lines": []
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
{
|
||||
"name": "10-important",
|
||||
"doc": "ordine di cascata: autore !important > inline normale.",
|
||||
"html": "<div class=\"a\" style=\"width:50px;height:50px;background:#00ff00\"></div>",
|
||||
"css": ".a{background:#0000ff !important}",
|
||||
"viewport": [
|
||||
200,
|
||||
150
|
||||
],
|
||||
"probes": [
|
||||
{
|
||||
"x": 10,
|
||||
"y": 10,
|
||||
"rgb": [
|
||||
0,
|
||||
0,
|
||||
255
|
||||
]
|
||||
}
|
||||
],
|
||||
"boxes": [],
|
||||
"absent": [],
|
||||
"ink": [],
|
||||
"lines": []
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
{
|
||||
"name": "11-display-none",
|
||||
"doc": "il secondo div non esiste nell'albero dei box.",
|
||||
"html": "<div style=\"width:50px;height:20px;background:#ff0000\"></div><div style=\"display:none;width:50px;height:20px;background:#0000ff\"></div>",
|
||||
"css": "",
|
||||
"viewport": [
|
||||
200,
|
||||
150
|
||||
],
|
||||
"probes": [
|
||||
{
|
||||
"x": 10,
|
||||
"y": 10,
|
||||
"rgb": [
|
||||
255,
|
||||
0,
|
||||
0
|
||||
]
|
||||
},
|
||||
{
|
||||
"x": 10,
|
||||
"y": 40,
|
||||
"rgb": [
|
||||
255,
|
||||
255,
|
||||
255
|
||||
]
|
||||
}
|
||||
],
|
||||
"boxes": [],
|
||||
"absent": [
|
||||
"html>body>div:1"
|
||||
],
|
||||
"ink": [],
|
||||
"lines": []
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
{
|
||||
"name": "12-paragrafo-a-capo",
|
||||
"doc": "il conteggio dipende dalle metriche del font (shaping, non stime).",
|
||||
"html": "<div style=\"width:100px;font-size:16px\">alfa beta gamma delta epsilon</div>",
|
||||
"css": "",
|
||||
"viewport": [
|
||||
200,
|
||||
150
|
||||
],
|
||||
"probes": [],
|
||||
"boxes": [],
|
||||
"absent": [],
|
||||
"ink": [
|
||||
{
|
||||
"rect": [
|
||||
8,
|
||||
8,
|
||||
100,
|
||||
80
|
||||
],
|
||||
"rgb": [
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"tol": 90,
|
||||
"min": 40
|
||||
}
|
||||
],
|
||||
"lines": [
|
||||
{
|
||||
"path": "html>body>div:0",
|
||||
"count": 4
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
{
|
||||
"name": "13-h1-grande",
|
||||
"doc": "margine 21 collassa con quello del body: h1 a y=21; riga 38.4px.",
|
||||
"html": "<h1>Titolo</h1>",
|
||||
"css": "",
|
||||
"viewport": [
|
||||
200,
|
||||
150
|
||||
],
|
||||
"probes": [],
|
||||
"boxes": [
|
||||
{
|
||||
"path": "html>body>h1:0",
|
||||
"rect": [
|
||||
8,
|
||||
21,
|
||||
184,
|
||||
38.4
|
||||
],
|
||||
"tol": 0.8
|
||||
}
|
||||
],
|
||||
"absent": [],
|
||||
"ink": [
|
||||
{
|
||||
"rect": [
|
||||
8,
|
||||
21,
|
||||
184,
|
||||
40
|
||||
],
|
||||
"rgb": [
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"tol": 90,
|
||||
"min": 60
|
||||
}
|
||||
],
|
||||
"lines": []
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
{
|
||||
"name": "14-elenco",
|
||||
"doc": "margine 16 del ul collassa con il body; li a x=48 per il padding-left.",
|
||||
"html": "<ul><li>uno</li><li>due</li></ul>",
|
||||
"css": "",
|
||||
"viewport": [
|
||||
200,
|
||||
150
|
||||
],
|
||||
"probes": [],
|
||||
"boxes": [
|
||||
{
|
||||
"path": "html>body>ul:0",
|
||||
"rect": [
|
||||
8,
|
||||
16,
|
||||
184,
|
||||
38.4
|
||||
],
|
||||
"tol": 0.8
|
||||
},
|
||||
{
|
||||
"path": "html>body>ul:0>li:0",
|
||||
"rect": [
|
||||
48,
|
||||
16,
|
||||
144,
|
||||
19.2
|
||||
],
|
||||
"tol": 0.8
|
||||
}
|
||||
],
|
||||
"absent": [],
|
||||
"ink": [
|
||||
{
|
||||
"rect": [
|
||||
48,
|
||||
16,
|
||||
140,
|
||||
40
|
||||
],
|
||||
"rgb": [
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"tol": 90,
|
||||
"min": 30
|
||||
}
|
||||
],
|
||||
"lines": []
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
{
|
||||
"name": "15-br",
|
||||
"doc": "due righe da 19.2px.",
|
||||
"html": "<div style=\"font-size:16px\">prima<br>seconda</div>",
|
||||
"css": "",
|
||||
"viewport": [
|
||||
200,
|
||||
150
|
||||
],
|
||||
"probes": [],
|
||||
"boxes": [
|
||||
{
|
||||
"path": "html>body>div:0",
|
||||
"rect": [
|
||||
8,
|
||||
8,
|
||||
184,
|
||||
38.4
|
||||
],
|
||||
"tol": 0.8
|
||||
}
|
||||
],
|
||||
"absent": [],
|
||||
"ink": [],
|
||||
"lines": [
|
||||
{
|
||||
"path": "html>body>div:0",
|
||||
"count": 2
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
{
|
||||
"name": "16-sfondo-body",
|
||||
"doc": "il body è un box con margine, non il canvas: fuori resta bianco.",
|
||||
"html": "<div style=\"height:10px\"></div>",
|
||||
"css": "body{background:#f0f0f0}",
|
||||
"viewport": [
|
||||
200,
|
||||
150
|
||||
],
|
||||
"probes": [
|
||||
{
|
||||
"x": 4,
|
||||
"y": 4,
|
||||
"rgb": [
|
||||
255,
|
||||
255,
|
||||
255
|
||||
]
|
||||
},
|
||||
{
|
||||
"x": 9,
|
||||
"y": 9,
|
||||
"rgb": [
|
||||
240,
|
||||
240,
|
||||
240
|
||||
]
|
||||
},
|
||||
{
|
||||
"x": 195,
|
||||
"y": 9,
|
||||
"rgb": [
|
||||
255,
|
||||
255,
|
||||
255
|
||||
]
|
||||
}
|
||||
],
|
||||
"boxes": [],
|
||||
"absent": [],
|
||||
"ink": [],
|
||||
"lines": []
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
{
|
||||
"name": "17-larghezza-percento",
|
||||
"doc": "body content 384: 50% = 192.",
|
||||
"html": "<div style=\"width:50%;height:20px;background:#00ffff\"></div>",
|
||||
"css": "",
|
||||
"viewport": [
|
||||
400,
|
||||
150
|
||||
],
|
||||
"probes": [
|
||||
{
|
||||
"x": 198,
|
||||
"y": 12,
|
||||
"rgb": [
|
||||
0,
|
||||
255,
|
||||
255
|
||||
]
|
||||
},
|
||||
{
|
||||
"x": 202,
|
||||
"y": 12,
|
||||
"rgb": [
|
||||
255,
|
||||
255,
|
||||
255
|
||||
]
|
||||
}
|
||||
],
|
||||
"boxes": [
|
||||
{
|
||||
"path": "html>body>div:0",
|
||||
"rect": [
|
||||
8,
|
||||
8,
|
||||
192,
|
||||
20
|
||||
]
|
||||
}
|
||||
],
|
||||
"absent": [],
|
||||
"ink": [],
|
||||
"lines": []
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
{
|
||||
"name": "18-span-colorato",
|
||||
"doc": "due run con colori diversi nella stessa riga.",
|
||||
"html": "<p style=\"font-size:20px\"><span style=\"color:#ff0000\">rosso</span> nero</p>",
|
||||
"css": "",
|
||||
"viewport": [
|
||||
200,
|
||||
150
|
||||
],
|
||||
"probes": [],
|
||||
"boxes": [],
|
||||
"absent": [],
|
||||
"ink": [
|
||||
{
|
||||
"rect": [
|
||||
8,
|
||||
16,
|
||||
60,
|
||||
24
|
||||
],
|
||||
"rgb": [
|
||||
255,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"tol": 100,
|
||||
"min": 10
|
||||
},
|
||||
{
|
||||
"rect": [
|
||||
70,
|
||||
16,
|
||||
110,
|
||||
24
|
||||
],
|
||||
"rgb": [
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"tol": 70,
|
||||
"min": 10
|
||||
}
|
||||
],
|
||||
"lines": []
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
{
|
||||
"name": "19-div-vuoto",
|
||||
"doc": "nessun contenuto, nessuna altezza.",
|
||||
"html": "<div></div>",
|
||||
"css": "",
|
||||
"viewport": [
|
||||
200,
|
||||
150
|
||||
],
|
||||
"probes": [],
|
||||
"boxes": [
|
||||
{
|
||||
"path": "html>body>div:0",
|
||||
"rect": [
|
||||
8,
|
||||
8,
|
||||
184,
|
||||
0
|
||||
]
|
||||
}
|
||||
],
|
||||
"absent": [],
|
||||
"ink": [],
|
||||
"lines": []
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
{
|
||||
"name": "20-ereditarieta-colore",
|
||||
"doc": "il colore scende dal div ai nodi di testo.",
|
||||
"html": "<div class=\"outer\" style=\"font-size:20px\">testo ereditato</div>",
|
||||
"css": ".outer{color:#ff0000}",
|
||||
"viewport": [
|
||||
200,
|
||||
150
|
||||
],
|
||||
"probes": [],
|
||||
"boxes": [],
|
||||
"absent": [],
|
||||
"ink": [
|
||||
{
|
||||
"rect": [
|
||||
8,
|
||||
8,
|
||||
160,
|
||||
24
|
||||
],
|
||||
"rgb": [
|
||||
255,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"tol": 100,
|
||||
"min": 20
|
||||
}
|
||||
],
|
||||
"lines": []
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
{
|
||||
"name": "21-tag-batte-classe",
|
||||
"doc": "(0,1,0) > (0,0,1).",
|
||||
"html": "<div class=\"x\" style=\"width:40px;height:40px\"></div>",
|
||||
"css": "div{background:#0000ff} .x{background:#ff0000}",
|
||||
"viewport": [
|
||||
200,
|
||||
150
|
||||
],
|
||||
"probes": [
|
||||
{
|
||||
"x": 10,
|
||||
"y": 10,
|
||||
"rgb": [
|
||||
255,
|
||||
0,
|
||||
0
|
||||
]
|
||||
}
|
||||
],
|
||||
"boxes": [],
|
||||
"absent": [],
|
||||
"ink": [],
|
||||
"lines": []
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
{
|
||||
"name": "22-margine-padding",
|
||||
"doc": "margine verticale 10 collassa col body, orizzontale 20 resta: 60+30 x 30+10.",
|
||||
"html": "<div style=\"width:60px;height:30px;margin:10px 20px;padding:5px 15px;background:#222222\"></div>",
|
||||
"css": "",
|
||||
"viewport": [
|
||||
200,
|
||||
150
|
||||
],
|
||||
"probes": [
|
||||
{
|
||||
"x": 30,
|
||||
"y": 20,
|
||||
"rgb": [
|
||||
34,
|
||||
34,
|
||||
34
|
||||
]
|
||||
},
|
||||
{
|
||||
"x": 20,
|
||||
"y": 20,
|
||||
"rgb": [
|
||||
255,
|
||||
255,
|
||||
255
|
||||
]
|
||||
}
|
||||
],
|
||||
"boxes": [
|
||||
{
|
||||
"path": "html>body>div:0",
|
||||
"rect": [
|
||||
28,
|
||||
10,
|
||||
90,
|
||||
40
|
||||
]
|
||||
}
|
||||
],
|
||||
"absent": [],
|
||||
"ink": [],
|
||||
"lines": []
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
{
|
||||
"name": "23-scala-due",
|
||||
"doc": "con zoom 2 il viewport CSS è 100: div a (8,8) → pixel (16,16)-(116,56).",
|
||||
"html": "<div style=\"width:50px;height:20px;background:#ff0000\"></div>",
|
||||
"css": "",
|
||||
"viewport": [
|
||||
200,
|
||||
150
|
||||
],
|
||||
"probes": [
|
||||
{
|
||||
"x": 20,
|
||||
"y": 20,
|
||||
"rgb": [
|
||||
255,
|
||||
0,
|
||||
0
|
||||
]
|
||||
},
|
||||
{
|
||||
"x": 112,
|
||||
"y": 20,
|
||||
"rgb": [
|
||||
255,
|
||||
0,
|
||||
0
|
||||
]
|
||||
},
|
||||
{
|
||||
"x": 120,
|
||||
"y": 20,
|
||||
"rgb": [
|
||||
255,
|
||||
255,
|
||||
255
|
||||
]
|
||||
},
|
||||
{
|
||||
"x": 20,
|
||||
"y": 60,
|
||||
"rgb": [
|
||||
255,
|
||||
255,
|
||||
255
|
||||
]
|
||||
}
|
||||
],
|
||||
"boxes": [
|
||||
{
|
||||
"path": "html>body>div:0",
|
||||
"rect": [
|
||||
8,
|
||||
8,
|
||||
50,
|
||||
20
|
||||
]
|
||||
}
|
||||
],
|
||||
"absent": [],
|
||||
"ink": [],
|
||||
"lines": [],
|
||||
"scale": 2
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
{
|
||||
"name": "24-altezza-automatica",
|
||||
"doc": "il contenuto oltre il viewport richiesto viene disegnato: serve allo scroll.",
|
||||
"html": "<div style=\"height:300px;background:#00ff00\"></div>",
|
||||
"css": "",
|
||||
"viewport": [
|
||||
100,
|
||||
40
|
||||
],
|
||||
"probes": [
|
||||
{
|
||||
"x": 50,
|
||||
"y": 150,
|
||||
"rgb": [
|
||||
0,
|
||||
255,
|
||||
0
|
||||
]
|
||||
},
|
||||
{
|
||||
"x": 50,
|
||||
"y": 295,
|
||||
"rgb": [
|
||||
0,
|
||||
255,
|
||||
0
|
||||
]
|
||||
}
|
||||
],
|
||||
"boxes": [],
|
||||
"absent": [],
|
||||
"ink": [],
|
||||
"lines": [],
|
||||
"auto_height": true,
|
||||
"png_min_height": 300
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
{
|
||||
"name": "25-spazi-conservati",
|
||||
"doc": "con pre gli spazi non collassano e la riga non va a capo.",
|
||||
"html": "<div style=\"white-space:pre;font-size:16px\">a b</div>",
|
||||
"css": "",
|
||||
"viewport": [
|
||||
200,
|
||||
150
|
||||
],
|
||||
"probes": [],
|
||||
"boxes": [],
|
||||
"absent": [],
|
||||
"ink": [
|
||||
{
|
||||
"rect": [
|
||||
8,
|
||||
8,
|
||||
90,
|
||||
24
|
||||
],
|
||||
"rgb": [
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"tol": 90,
|
||||
"min": 8
|
||||
}
|
||||
],
|
||||
"lines": [
|
||||
{
|
||||
"path": "html>body>div:0",
|
||||
"count": 1
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"name": "26-nowrap",
|
||||
"doc": "una sola riga anche con una larghezza che non basta.",
|
||||
"html": "<div style=\"width:60px;white-space:nowrap;font-size:16px\">alfa beta gamma</div>",
|
||||
"css": "",
|
||||
"viewport": [
|
||||
200,
|
||||
150
|
||||
],
|
||||
"probes": [],
|
||||
"boxes": [],
|
||||
"absent": [],
|
||||
"ink": [],
|
||||
"lines": [
|
||||
{
|
||||
"path": "html>body>div:0",
|
||||
"count": 1
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
{
|
||||
"name": "27-media-non-corrisponde",
|
||||
"doc": "viewport 400px, condizione min-width 900px: regola scartata.",
|
||||
"html": "<div style=\"height:10px\"></div>",
|
||||
"css": "@media (min-width: 900px) { body { background: #00ff00 } }",
|
||||
"viewport": [
|
||||
400,
|
||||
150
|
||||
],
|
||||
"probes": [
|
||||
{
|
||||
"x": 9,
|
||||
"y": 9,
|
||||
"rgb": [
|
||||
255,
|
||||
255,
|
||||
255
|
||||
]
|
||||
}
|
||||
],
|
||||
"boxes": [],
|
||||
"absent": [],
|
||||
"ink": [],
|
||||
"lines": []
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
{
|
||||
"name": "28-media-corrisponde",
|
||||
"doc": "viewport 400px, condizione min-width 300px: regola applicata.",
|
||||
"html": "<div style=\"height:10px\"></div>",
|
||||
"css": "@media (min-width: 300px) { body { background: #00ff00 } }",
|
||||
"viewport": [
|
||||
400,
|
||||
150
|
||||
],
|
||||
"probes": [
|
||||
{
|
||||
"x": 9,
|
||||
"y": 9,
|
||||
"rgb": [
|
||||
0,
|
||||
255,
|
||||
0
|
||||
]
|
||||
}
|
||||
],
|
||||
"boxes": [],
|
||||
"absent": [],
|
||||
"ink": [],
|
||||
"lines": []
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
{
|
||||
"name": "29-var-su-root",
|
||||
"doc": "var() risolta dal valore definito sull'elemento radice.",
|
||||
"html": "<div class=\"box\"></div>",
|
||||
"css": ":root { --tinta: #0000ff } .box { width: 40px; height: 20px; background: var(--tinta) }",
|
||||
"viewport": [
|
||||
200,
|
||||
150
|
||||
],
|
||||
"probes": [
|
||||
{
|
||||
"x": 10,
|
||||
"y": 10,
|
||||
"rgb": [
|
||||
0,
|
||||
0,
|
||||
255
|
||||
]
|
||||
}
|
||||
],
|
||||
"boxes": [
|
||||
{
|
||||
"path": "html>body>div:0",
|
||||
"rect": [
|
||||
8,
|
||||
8,
|
||||
40,
|
||||
20
|
||||
]
|
||||
}
|
||||
],
|
||||
"absent": [],
|
||||
"ink": [],
|
||||
"lines": []
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
{
|
||||
"name": "30-var-fallback",
|
||||
"doc": "fallback usato se la variabile manca; dichiarazione scartata senza fallback.",
|
||||
"html": "<div class=\"a\"></div><div class=\"b\"></div>",
|
||||
"css": ".a { width: 30px; height: 10px; background: var(--assente, #ff00ff) } .b { width: 30px; height: 10px; background: var(--manca) }",
|
||||
"viewport": [
|
||||
200,
|
||||
150
|
||||
],
|
||||
"probes": [
|
||||
{
|
||||
"x": 10,
|
||||
"y": 10,
|
||||
"rgb": [
|
||||
255,
|
||||
0,
|
||||
255
|
||||
]
|
||||
},
|
||||
{
|
||||
"x": 10,
|
||||
"y": 30,
|
||||
"rgb": [
|
||||
255,
|
||||
255,
|
||||
255
|
||||
]
|
||||
}
|
||||
],
|
||||
"boxes": [],
|
||||
"absent": [],
|
||||
"ink": [],
|
||||
"lines": []
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
{
|
||||
"name": "31-centrato",
|
||||
"doc": "il testo centrato cade nella metà destra del box da 200px.",
|
||||
"html": "<div style=\"width:200px;font-size:16px;text-align:center\">centro</div>",
|
||||
"css": "",
|
||||
"viewport": [
|
||||
200,
|
||||
150
|
||||
],
|
||||
"probes": [],
|
||||
"boxes": [],
|
||||
"absent": [],
|
||||
"ink": [
|
||||
{
|
||||
"rect": [
|
||||
100,
|
||||
8,
|
||||
100,
|
||||
24
|
||||
],
|
||||
"rgb": [
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"tol": 90,
|
||||
"min": 10
|
||||
}
|
||||
],
|
||||
"lines": []
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
{
|
||||
"name": "32-immagine",
|
||||
"doc": "l'immagine è un elemento sostituito: appoggia sulla baseline, 20x20 da (8,8).",
|
||||
"html": "<img src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAADElEQVR4nGP4z8AAAAMBAQDJ/pLvAAAAAElFTkSuQmCC\" width=\"20\" height=\"20\">",
|
||||
"css": "",
|
||||
"viewport": [
|
||||
200,
|
||||
150
|
||||
],
|
||||
"probes": [
|
||||
{
|
||||
"x": 10,
|
||||
"y": 10,
|
||||
"rgb": [
|
||||
255,
|
||||
0,
|
||||
0
|
||||
]
|
||||
},
|
||||
{
|
||||
"x": 40,
|
||||
"y": 10,
|
||||
"rgb": [
|
||||
255,
|
||||
255,
|
||||
255
|
||||
]
|
||||
}
|
||||
],
|
||||
"boxes": [],
|
||||
"absent": [],
|
||||
"ink": [],
|
||||
"lines": []
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
{
|
||||
"name": "33-immagine-proporzione",
|
||||
"doc": "immagine 1x1 con sola larghezza 40: altezza 40 per proporzione.",
|
||||
"html": "<img src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAADElEQVR4nGP4z8AAAAMBAQDJ/pLvAAAAAElFTkSuQmCC\" width=\"40\">",
|
||||
"css": "",
|
||||
"viewport": [
|
||||
200,
|
||||
150
|
||||
],
|
||||
"probes": [
|
||||
{
|
||||
"x": 30,
|
||||
"y": 30,
|
||||
"rgb": [
|
||||
255,
|
||||
0,
|
||||
0
|
||||
]
|
||||
},
|
||||
{
|
||||
"x": 30,
|
||||
"y": 55,
|
||||
"rgb": [
|
||||
255,
|
||||
255,
|
||||
255
|
||||
]
|
||||
}
|
||||
],
|
||||
"boxes": [],
|
||||
"absent": [],
|
||||
"ink": [],
|
||||
"lines": []
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
{
|
||||
"name": "34-immagine-da-file",
|
||||
"doc": "src relativo risolto nella cartella dei casi; il testo segue sulla riga dopo.",
|
||||
"html": "<img src=\"quadrato-blu.png\" width=\"16\" height=\"16\"><p style=\"font-size:16px\">dopo</p>",
|
||||
"css": "",
|
||||
"viewport": [
|
||||
200,
|
||||
150
|
||||
],
|
||||
"probes": [
|
||||
{
|
||||
"x": 12,
|
||||
"y": 12,
|
||||
"rgb": [
|
||||
0,
|
||||
0,
|
||||
255
|
||||
]
|
||||
}
|
||||
],
|
||||
"boxes": [],
|
||||
"absent": [],
|
||||
"ink": [
|
||||
{
|
||||
"rect": [
|
||||
8,
|
||||
40,
|
||||
100,
|
||||
26
|
||||
],
|
||||
"rgb": [
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"tol": 90,
|
||||
"min": 5
|
||||
}
|
||||
],
|
||||
"lines": []
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
{
|
||||
"name": "35-float-sinistra",
|
||||
"doc": "l'immagine occupa la fascia sinistra; il testo parte dopo i 40px.",
|
||||
"html": "<div style=\"font-size:16px\"><img src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAADElEQVR4nGP4z8AAAAMBAQDJ/pLvAAAAAElFTkSuQmCC\" style=\"float:left;width:40px;height:40px\">testo accanto</div>",
|
||||
"css": "",
|
||||
"viewport": [
|
||||
200,
|
||||
150
|
||||
],
|
||||
"probes": [
|
||||
{
|
||||
"x": 20,
|
||||
"y": 20,
|
||||
"rgb": [
|
||||
255,
|
||||
0,
|
||||
0
|
||||
]
|
||||
},
|
||||
{
|
||||
"x": 10,
|
||||
"y": 20,
|
||||
"rgb": [
|
||||
255,
|
||||
0,
|
||||
0
|
||||
]
|
||||
}
|
||||
],
|
||||
"boxes": [],
|
||||
"absent": [],
|
||||
"ink": [
|
||||
{
|
||||
"rect": [
|
||||
52,
|
||||
8,
|
||||
140,
|
||||
40
|
||||
],
|
||||
"rgb": [
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"tol": 90,
|
||||
"min": 10
|
||||
}
|
||||
],
|
||||
"lines": []
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
{
|
||||
"name": "36-float-destra",
|
||||
"doc": "float a destra: l'immagine finisce al bordo destro del content box (168..208).",
|
||||
"html": "<div style=\"width:200px;font-size:16px\"><img src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAADElEQVR4nGP4z8AAAAMBAQDJ/pLvAAAAAElFTkSuQmCC\" style=\"float:right;width:40px;height:40px\">testo a sinistra</div>",
|
||||
"css": "",
|
||||
"viewport": [
|
||||
200,
|
||||
150
|
||||
],
|
||||
"probes": [
|
||||
{
|
||||
"x": 180,
|
||||
"y": 20,
|
||||
"rgb": [
|
||||
255,
|
||||
0,
|
||||
0
|
||||
]
|
||||
},
|
||||
{
|
||||
"x": 100,
|
||||
"y": 30,
|
||||
"rgb": [
|
||||
255,
|
||||
255,
|
||||
255
|
||||
]
|
||||
}
|
||||
],
|
||||
"boxes": [],
|
||||
"absent": [],
|
||||
"ink": [
|
||||
{
|
||||
"rect": [
|
||||
8,
|
||||
8,
|
||||
100,
|
||||
40
|
||||
],
|
||||
"rgb": [
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"tol": 90,
|
||||
"min": 10
|
||||
}
|
||||
],
|
||||
"lines": []
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
{
|
||||
"name": "37-assoluto",
|
||||
"doc": "top/left contano dal viewport, non dal body: (20,10) non (28,18).",
|
||||
"html": "<div style=\"height:20px\"></div><div style=\"position:absolute;top:10px;left:20px;width:30px;height:30px;background:#008000\"></div>",
|
||||
"css": "",
|
||||
"viewport": [
|
||||
200,
|
||||
150
|
||||
],
|
||||
"probes": [
|
||||
{
|
||||
"x": 25,
|
||||
"y": 15,
|
||||
"rgb": [
|
||||
0,
|
||||
128,
|
||||
0
|
||||
]
|
||||
}
|
||||
],
|
||||
"boxes": [
|
||||
{
|
||||
"path": "html>body>div:1",
|
||||
"rect": [
|
||||
20,
|
||||
10,
|
||||
30,
|
||||
30
|
||||
]
|
||||
}
|
||||
],
|
||||
"absent": [],
|
||||
"ink": [],
|
||||
"lines": []
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
{
|
||||
"name": "38-relativo",
|
||||
"doc": "il box relativo si sposta di (4,6) senza spostare i fratelli.",
|
||||
"html": "<div style=\"height:10px\"></div><div style=\"position:relative;top:6px;left:4px;height:20px;background:#000080\"></div><div style=\"height:10px;background:#808080\"></div>",
|
||||
"css": "",
|
||||
"viewport": [
|
||||
200,
|
||||
150
|
||||
],
|
||||
"probes": [
|
||||
{
|
||||
"x": 14,
|
||||
"y": 30,
|
||||
"rgb": [
|
||||
0,
|
||||
0,
|
||||
128
|
||||
]
|
||||
},
|
||||
{
|
||||
"x": 10,
|
||||
"y": 46,
|
||||
"rgb": [
|
||||
128,
|
||||
128,
|
||||
128
|
||||
]
|
||||
}
|
||||
],
|
||||
"boxes": [
|
||||
{
|
||||
"path": "html>body>div:1",
|
||||
"rect": [
|
||||
12,
|
||||
24,
|
||||
184,
|
||||
20
|
||||
]
|
||||
}
|
||||
],
|
||||
"absent": [],
|
||||
"ink": [],
|
||||
"lines": []
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
{
|
||||
"name": "39-fisso",
|
||||
"doc": "fixed: coordinate del viewport, indipendenti dal flusso.",
|
||||
"html": "<div style=\"height:100px\"></div><div style=\"position:fixed;top:0;left:0;width:20px;height:20px;background:#ff00ff\"></div>",
|
||||
"css": "",
|
||||
"viewport": [
|
||||
200,
|
||||
150
|
||||
],
|
||||
"probes": [
|
||||
{
|
||||
"x": 5,
|
||||
"y": 5,
|
||||
"rgb": [
|
||||
255,
|
||||
0,
|
||||
255
|
||||
]
|
||||
}
|
||||
],
|
||||
"boxes": [
|
||||
{
|
||||
"path": "html>body>div:1",
|
||||
"rect": [
|
||||
0,
|
||||
0,
|
||||
20,
|
||||
20
|
||||
]
|
||||
}
|
||||
],
|
||||
"absent": [],
|
||||
"ink": [],
|
||||
"lines": []
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
{
|
||||
"name": "40-blocco-accanto-al-float",
|
||||
"doc": "il paragrafo parte dopo i 40px del float e si restringe (144 = 184-40).",
|
||||
"html": "<div style=\"font-size:16px\"><div style=\"float:left;width:40px;height:40px;background:#ff0000\"></div><p style=\"margin:0;font-size:16px\">testo accanto</p></div>",
|
||||
"css": "",
|
||||
"viewport": [
|
||||
200,
|
||||
150
|
||||
],
|
||||
"probes": [
|
||||
{
|
||||
"x": 60,
|
||||
"y": 12,
|
||||
"rgb": [
|
||||
255,
|
||||
255,
|
||||
255
|
||||
]
|
||||
}
|
||||
],
|
||||
"boxes": [
|
||||
{
|
||||
"path": "html>body>div:0>p:0",
|
||||
"rect": [
|
||||
48,
|
||||
8,
|
||||
144,
|
||||
19.2
|
||||
],
|
||||
"tol": 0.8
|
||||
}
|
||||
],
|
||||
"absent": [],
|
||||
"ink": [
|
||||
{
|
||||
"rect": [
|
||||
48,
|
||||
8,
|
||||
140,
|
||||
22
|
||||
],
|
||||
"rgb": [
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"tol": 90,
|
||||
"min": 10
|
||||
}
|
||||
],
|
||||
"lines": []
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"name": "41-font-face-assente",
|
||||
"doc": "una faccia che non si carica non blocca il rendering: si usa il predefinito.",
|
||||
"html": "<div style=\"width:300px;font-size:16px;font-family:Assente\">iiiiiiiiii</div>",
|
||||
"css": "@font-face { font-family: Assente; src: url(non-esiste.ttf) }",
|
||||
"viewport": [
|
||||
200,
|
||||
150
|
||||
],
|
||||
"probes": [],
|
||||
"boxes": [],
|
||||
"absent": [],
|
||||
"ink": [],
|
||||
"lines": [],
|
||||
"text_width": [
|
||||
{
|
||||
"path": "html>body>div:0",
|
||||
"max": 70
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"name": "42-font-face-mono",
|
||||
"doc": "dieci 'i' in monospazio sono molto più larghe che nel font predefinito.",
|
||||
"html": "<div style=\"width:300px;font-size:16px;font-family:Mono\">iiiiiiiiii</div>",
|
||||
"css": "@font-face { font-family: Mono; src: url(mono.ttf) }",
|
||||
"viewport": [
|
||||
200,
|
||||
150
|
||||
],
|
||||
"probes": [],
|
||||
"boxes": [],
|
||||
"absent": [],
|
||||
"ink": [],
|
||||
"lines": [],
|
||||
"text_width": [
|
||||
{
|
||||
"path": "html>body>div:0",
|
||||
"min": 80
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
{
|
||||
"name": "43-bordo-superiore",
|
||||
"doc": "il bordo entra nel box: altezza 24 = 20 + 4.",
|
||||
"html": "<div style=\"width:40px;height:20px;border-top:4px solid #000000\"></div>",
|
||||
"css": "",
|
||||
"viewport": [
|
||||
200,
|
||||
150
|
||||
],
|
||||
"probes": [
|
||||
{
|
||||
"x": 10,
|
||||
"y": 10,
|
||||
"rgb": [
|
||||
0,
|
||||
0,
|
||||
0
|
||||
]
|
||||
},
|
||||
{
|
||||
"x": 10,
|
||||
"y": 16,
|
||||
"rgb": [
|
||||
255,
|
||||
255,
|
||||
255
|
||||
]
|
||||
}
|
||||
],
|
||||
"boxes": [
|
||||
{
|
||||
"path": "html>body>div:0",
|
||||
"rect": [
|
||||
8,
|
||||
8,
|
||||
40,
|
||||
24
|
||||
]
|
||||
}
|
||||
],
|
||||
"absent": [],
|
||||
"ink": [],
|
||||
"lines": []
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
{
|
||||
"name": "44-padding-due-valori",
|
||||
"doc": "padding 4 verticale, 8 orizzontale: 40+16 x 20+8.",
|
||||
"html": "<div style=\"width:40px;height:20px;padding:4px 8px\"></div>",
|
||||
"css": "",
|
||||
"viewport": [
|
||||
200,
|
||||
150
|
||||
],
|
||||
"probes": [],
|
||||
"boxes": [
|
||||
{
|
||||
"path": "html>body>div:0",
|
||||
"rect": [
|
||||
8,
|
||||
8,
|
||||
56,
|
||||
28
|
||||
]
|
||||
}
|
||||
],
|
||||
"absent": [],
|
||||
"ink": [],
|
||||
"lines": []
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
{
|
||||
"name": "45-allinea-destra",
|
||||
"doc": "il testo finisce al bordo destro del box da 200px.",
|
||||
"html": "<div style=\"width:200px;font-size:16px;text-align:right\">dx</div>",
|
||||
"css": "",
|
||||
"viewport": [
|
||||
200,
|
||||
150
|
||||
],
|
||||
"probes": [],
|
||||
"boxes": [],
|
||||
"absent": [],
|
||||
"ink": [
|
||||
{
|
||||
"rect": [
|
||||
150,
|
||||
8,
|
||||
50,
|
||||
24
|
||||
],
|
||||
"rgb": [
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"tol": 90,
|
||||
"min": 5
|
||||
}
|
||||
],
|
||||
"lines": []
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
{
|
||||
"name": "46-font-size-em",
|
||||
"doc": "0.5em di 20px = 10px; riga alta 12px (1.2 * 10).",
|
||||
"html": "<div style=\"font-size:20px\"><p style=\"font-size:0.5em;margin:0\">x</p></div>",
|
||||
"css": "",
|
||||
"viewport": [
|
||||
200,
|
||||
150
|
||||
],
|
||||
"probes": [],
|
||||
"boxes": [
|
||||
{
|
||||
"path": "html>body>div:0>p:0",
|
||||
"rect": [
|
||||
8,
|
||||
8,
|
||||
184,
|
||||
12
|
||||
],
|
||||
"tol": 0.8
|
||||
}
|
||||
],
|
||||
"absent": [],
|
||||
"ink": [],
|
||||
"lines": []
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
{
|
||||
"name": "47-line-height",
|
||||
"doc": "line-height 2 su 16px: due righe da 32px, altezza 64.",
|
||||
"html": "<div style=\"font-size:16px;line-height:2;width:100px\">alfa beta gamma</div>",
|
||||
"css": "",
|
||||
"viewport": [
|
||||
200,
|
||||
150
|
||||
],
|
||||
"probes": [],
|
||||
"boxes": [
|
||||
{
|
||||
"path": "html>body>div:0",
|
||||
"rect": [
|
||||
8,
|
||||
8,
|
||||
100,
|
||||
64
|
||||
],
|
||||
"tol": 1.2
|
||||
}
|
||||
],
|
||||
"absent": [],
|
||||
"ink": [],
|
||||
"lines": []
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
{
|
||||
"name": "48-hr",
|
||||
"doc": "dal foglio UA: 1px di bordo grigio, nessun contenuto.",
|
||||
"html": "<hr>",
|
||||
"css": "",
|
||||
"viewport": [
|
||||
200,
|
||||
150
|
||||
],
|
||||
"probes": [
|
||||
{
|
||||
"x": 50,
|
||||
"y": 8,
|
||||
"rgb": [
|
||||
128,
|
||||
128,
|
||||
128
|
||||
]
|
||||
},
|
||||
{
|
||||
"x": 50,
|
||||
"y": 12,
|
||||
"rgb": [
|
||||
255,
|
||||
255,
|
||||
255
|
||||
]
|
||||
}
|
||||
],
|
||||
"boxes": [
|
||||
{
|
||||
"path": "html>body>hr:0",
|
||||
"rect": [
|
||||
8,
|
||||
8,
|
||||
184,
|
||||
1
|
||||
],
|
||||
"tol": 0.6
|
||||
}
|
||||
],
|
||||
"absent": [],
|
||||
"ink": [],
|
||||
"lines": []
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
{
|
||||
"name": "49-elenco-annidato",
|
||||
"doc": "la lista interna parte dal content box della voce: x = 8+40.",
|
||||
"html": "<ul><li>a<ul><li>b</li></ul></li></ul>",
|
||||
"css": "",
|
||||
"viewport": [
|
||||
200,
|
||||
150
|
||||
],
|
||||
"probes": [],
|
||||
"boxes": [
|
||||
{
|
||||
"path": "html>body>ul:0",
|
||||
"rect": [
|
||||
8,
|
||||
16,
|
||||
184,
|
||||
54.4
|
||||
],
|
||||
"tol": 1.2
|
||||
},
|
||||
{
|
||||
"path": "html>body>ul:0>li:0>ul:0",
|
||||
"rect": [
|
||||
48,
|
||||
51.2,
|
||||
144,
|
||||
19.2
|
||||
],
|
||||
"tol": 1.2
|
||||
}
|
||||
],
|
||||
"absent": [],
|
||||
"ink": [],
|
||||
"lines": []
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
{
|
||||
"name": "50-due-float",
|
||||
"doc": "il secondo float si accoda al primo: x = 8+30.",
|
||||
"html": "<div style=\"width:200px\"><div style=\"float:left;width:30px;height:20px;background:#ff0000\"></div><div style=\"float:left;width:30px;height:20px;background:#0000ff\"></div></div>",
|
||||
"css": "",
|
||||
"viewport": [
|
||||
200,
|
||||
150
|
||||
],
|
||||
"probes": [
|
||||
{
|
||||
"x": 10,
|
||||
"y": 12,
|
||||
"rgb": [
|
||||
255,
|
||||
0,
|
||||
0
|
||||
]
|
||||
},
|
||||
{
|
||||
"x": 45,
|
||||
"y": 12,
|
||||
"rgb": [
|
||||
0,
|
||||
0,
|
||||
255
|
||||
]
|
||||
}
|
||||
],
|
||||
"boxes": [
|
||||
{
|
||||
"path": "html>body>div:0>div:1",
|
||||
"rect": [
|
||||
38,
|
||||
8,
|
||||
30,
|
||||
20
|
||||
]
|
||||
}
|
||||
],
|
||||
"absent": [],
|
||||
"ink": [],
|
||||
"lines": []
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
{
|
||||
"name": "51-assoluto-in-relativo",
|
||||
"doc": "il contenitore è l'antenato posizionato: 8+5 su entrambi gli assi.",
|
||||
"html": "<div style=\"position:relative;width:100px;height:60px\"><div style=\"position:absolute;top:5px;left:5px;width:10px;height:10px;background:#00ff00\"></div></div>",
|
||||
"css": "",
|
||||
"viewport": [
|
||||
200,
|
||||
150
|
||||
],
|
||||
"probes": [
|
||||
{
|
||||
"x": 15,
|
||||
"y": 15,
|
||||
"rgb": [
|
||||
0,
|
||||
255,
|
||||
0
|
||||
]
|
||||
}
|
||||
],
|
||||
"boxes": [
|
||||
{
|
||||
"path": "html>body>div:0>div:0",
|
||||
"rect": [
|
||||
13,
|
||||
13,
|
||||
10,
|
||||
10
|
||||
]
|
||||
}
|
||||
],
|
||||
"absent": [],
|
||||
"ink": [],
|
||||
"lines": []
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
{
|
||||
"name": "52-relativo-negativo",
|
||||
"doc": "top:-5 sposta il box in alto senza toccare i fratelli.",
|
||||
"html": "<div style=\"height:20px\"></div><div style=\"position:relative;top:-5px;height:10px;background:#000080\"></div>",
|
||||
"css": "",
|
||||
"viewport": [
|
||||
200,
|
||||
150
|
||||
],
|
||||
"probes": [],
|
||||
"boxes": [
|
||||
{
|
||||
"path": "html>body>div:1",
|
||||
"rect": [
|
||||
8,
|
||||
23,
|
||||
184,
|
||||
10
|
||||
]
|
||||
}
|
||||
],
|
||||
"absent": [],
|
||||
"ink": [],
|
||||
"lines": []
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
{
|
||||
"name": "53-figlio-nascosto",
|
||||
"doc": "il figlio nascosto non genera box né altezza.",
|
||||
"html": "<div style=\"font-size:16px\">testo<div style=\"display:none;height:100px\"></div></div>",
|
||||
"css": "",
|
||||
"viewport": [
|
||||
200,
|
||||
150
|
||||
],
|
||||
"probes": [],
|
||||
"boxes": [
|
||||
{
|
||||
"path": "html>body>div:0",
|
||||
"rect": [
|
||||
8,
|
||||
8,
|
||||
184,
|
||||
19.2
|
||||
],
|
||||
"tol": 0.8
|
||||
}
|
||||
],
|
||||
"absent": [
|
||||
"html>body>div:0>div:0"
|
||||
],
|
||||
"ink": [],
|
||||
"lines": []
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
{
|
||||
"name": "54-media-max-width",
|
||||
"doc": "viewport 300px sotto la soglia: la regola si applica.",
|
||||
"html": "<div style=\"height:10px\"></div>",
|
||||
"css": "@media (max-width: 400px) { body { background: #123456 } }",
|
||||
"viewport": [
|
||||
300,
|
||||
150
|
||||
],
|
||||
"probes": [
|
||||
{
|
||||
"x": 9,
|
||||
"y": 9,
|
||||
"rgb": [
|
||||
18,
|
||||
52,
|
||||
86
|
||||
]
|
||||
}
|
||||
],
|
||||
"boxes": [],
|
||||
"absent": [],
|
||||
"ink": [],
|
||||
"lines": []
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
{
|
||||
"name": "55-var-ereditata",
|
||||
"doc": "la variabile definita sul genitore arriva al figlio per ereditarietà.",
|
||||
"html": "<div style=\"--tinta:#00ff00\"><div class=\"b\" style=\"width:20px;height:20px\"></div></div>",
|
||||
"css": ".b { background: var(--tinta) }",
|
||||
"viewport": [
|
||||
200,
|
||||
150
|
||||
],
|
||||
"probes": [
|
||||
{
|
||||
"x": 10,
|
||||
"y": 10,
|
||||
"rgb": [
|
||||
0,
|
||||
255,
|
||||
0
|
||||
]
|
||||
}
|
||||
],
|
||||
"boxes": [],
|
||||
"absent": [],
|
||||
"ink": [],
|
||||
"lines": []
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
{
|
||||
"name": "56-larghezza-auto",
|
||||
"doc": "width:auto prende tutta la larghezza disponibile.",
|
||||
"html": "<div style=\"width:50px;height:10px\"></div><div style=\"height:10px\"></div>",
|
||||
"css": "",
|
||||
"viewport": [
|
||||
200,
|
||||
150
|
||||
],
|
||||
"probes": [],
|
||||
"boxes": [
|
||||
{
|
||||
"path": "html>body>div:0",
|
||||
"rect": [
|
||||
8,
|
||||
8,
|
||||
50,
|
||||
10
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "html>body>div:1",
|
||||
"rect": [
|
||||
8,
|
||||
18,
|
||||
184,
|
||||
10
|
||||
]
|
||||
}
|
||||
],
|
||||
"absent": [],
|
||||
"ink": [],
|
||||
"lines": []
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
{
|
||||
"name": "57-padding-percento",
|
||||
"doc": "10% di 184 = 18.4: il testo parte a x=26.4.",
|
||||
"html": "<div style=\"padding-left:10%;font-size:16px\">x</div>",
|
||||
"css": "",
|
||||
"viewport": [
|
||||
200,
|
||||
150
|
||||
],
|
||||
"probes": [],
|
||||
"boxes": [],
|
||||
"absent": [],
|
||||
"ink": [
|
||||
{
|
||||
"rect": [
|
||||
26,
|
||||
8,
|
||||
40,
|
||||
24
|
||||
],
|
||||
"rgb": [
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"tol": 90,
|
||||
"min": 2
|
||||
}
|
||||
],
|
||||
"lines": []
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
{
|
||||
"name": "58-float-immagine-blocco",
|
||||
"doc": "il paragrafo parte dopo i 20px dell'immagine e si restringe di conseguenza.",
|
||||
"html": "<div style=\"width:200px\"><img src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAADElEQVR4nGP4z8AAAAMBAQDJ/pLvAAAAAElFTkSuQmCC\" style=\"float:left;width:20px;height:20px\"><p style=\"margin:0;font-size:16px\">accanto</p></div>",
|
||||
"css": "",
|
||||
"viewport": [
|
||||
200,
|
||||
150
|
||||
],
|
||||
"probes": [],
|
||||
"boxes": [
|
||||
{
|
||||
"path": "html>body>div:0>p:0",
|
||||
"rect": [
|
||||
28,
|
||||
8,
|
||||
180,
|
||||
19.2
|
||||
],
|
||||
"tol": 0.9
|
||||
}
|
||||
],
|
||||
"absent": [],
|
||||
"ink": [],
|
||||
"lines": []
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
{
|
||||
"name": "59-margini-paragrafi",
|
||||
"doc": "16px di margine fra i due paragrafi, non 32.",
|
||||
"html": "<p style=\"font-size:16px\">uno</p><p style=\"font-size:16px\">due</p>",
|
||||
"css": "",
|
||||
"viewport": [
|
||||
200,
|
||||
150
|
||||
],
|
||||
"probes": [],
|
||||
"boxes": [
|
||||
{
|
||||
"path": "html>body>p:0",
|
||||
"rect": [
|
||||
8,
|
||||
16,
|
||||
184,
|
||||
19.2
|
||||
],
|
||||
"tol": 0.9
|
||||
},
|
||||
{
|
||||
"path": "html>body>p:1",
|
||||
"rect": [
|
||||
8,
|
||||
51.2,
|
||||
184,
|
||||
19.2
|
||||
],
|
||||
"tol": 0.9
|
||||
}
|
||||
],
|
||||
"absent": [],
|
||||
"ink": [],
|
||||
"lines": []
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"name": "60-grassetto",
|
||||
"doc": "il grassetto sintetico allarga i glifi.",
|
||||
"html": "<div style=\"width:300px;font-size:20px;font-weight:bold\">MMMM</div>",
|
||||
"css": "",
|
||||
"viewport": [
|
||||
200,
|
||||
150
|
||||
],
|
||||
"probes": [],
|
||||
"boxes": [],
|
||||
"absent": [],
|
||||
"ink": [],
|
||||
"lines": [],
|
||||
"text_width": [
|
||||
{
|
||||
"path": "html>body>div:0",
|
||||
"min": 60
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
{
|
||||
"name": "61-zoom-avanzamenti",
|
||||
"doc": "a scala 2 'MMMM' deve occupare ~140px: glifi e penna crescono insieme.",
|
||||
"html": "<div style=\"width:300px;font-size:20px\">MMMM</div>",
|
||||
"css": "",
|
||||
"viewport": [
|
||||
400,
|
||||
200
|
||||
],
|
||||
"probes": [],
|
||||
"boxes": [],
|
||||
"absent": [],
|
||||
"ink": [],
|
||||
"lines": [],
|
||||
"scale": 2,
|
||||
"ink_extent": [
|
||||
{
|
||||
"rect": [
|
||||
10,
|
||||
10,
|
||||
380,
|
||||
90
|
||||
],
|
||||
"min_w": 100,
|
||||
"max_w": 170,
|
||||
"min_h": 20
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
{
|
||||
"name": "62-float-dopo-testo",
|
||||
"html": "<!DOCTYPE html><html><body><h1>largo</h1><div style=\"float:left;width:100px\">lato</div><p>testo che affianca</p></body></html>",
|
||||
"css": "",
|
||||
"viewport": [
|
||||
400,
|
||||
300
|
||||
],
|
||||
"scale": 1.0,
|
||||
"boxes": [
|
||||
{
|
||||
"path": "html>body>h1",
|
||||
"rect": [
|
||||
8,
|
||||
21,
|
||||
384,
|
||||
38.4
|
||||
],
|
||||
"tol": 1.0
|
||||
},
|
||||
{
|
||||
"path": "html>body>div:0",
|
||||
"rect": [
|
||||
8,
|
||||
59.4,
|
||||
100,
|
||||
19.2
|
||||
],
|
||||
"tol": 1.0
|
||||
},
|
||||
{
|
||||
"path": "html>body>p",
|
||||
"rect": [
|
||||
108,
|
||||
80.4,
|
||||
284,
|
||||
19.2
|
||||
],
|
||||
"tol": 2.0
|
||||
}
|
||||
],
|
||||
"doc": "un float non deve saltare in cima al contenitore: parte dove siamo nel flusso, sotto l'h1, e il paragrafo gli sta accanto (x=108)."
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
{
|
||||
"name": "63-bidi-paragrafo-rtl",
|
||||
"doc": "con dir=rtl il testo ebraico si allinea a destra, non a sinistra.",
|
||||
"html": "<p dir=\"rtl\" style=\"width:300px;font-size:20px;margin:0\">שלום עולם</p>",
|
||||
"css": "",
|
||||
"viewport": [
|
||||
400,
|
||||
200
|
||||
],
|
||||
"probes": [],
|
||||
"boxes": [],
|
||||
"absent": [],
|
||||
"ink": [],
|
||||
"lines": [],
|
||||
"ink_extent": [
|
||||
{
|
||||
"rect": [
|
||||
0,
|
||||
0,
|
||||
400,
|
||||
60
|
||||
],
|
||||
"min_x": 200,
|
||||
"max_x": 310
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
{
|
||||
"name": "64-bidi-testo-misto",
|
||||
"doc": "paragrafo RTL con parole latine e cifre: resta ancorato a destra.",
|
||||
"html": "<p dir=\"rtl\" style=\"width:300px;font-size:20px;margin:0\">שלום abc 123</p>",
|
||||
"css": "",
|
||||
"viewport": [
|
||||
400,
|
||||
200
|
||||
],
|
||||
"probes": [],
|
||||
"boxes": [],
|
||||
"absent": [],
|
||||
"ink": [],
|
||||
"lines": [],
|
||||
"ink_extent": [
|
||||
{
|
||||
"rect": [
|
||||
0,
|
||||
0,
|
||||
400,
|
||||
60
|
||||
],
|
||||
"min_x": 160,
|
||||
"max_x": 310
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
{
|
||||
"name": "65-bidi-direzione-css",
|
||||
"doc": "direction:rtl in CSS equivale all'attributo dir.",
|
||||
"html": "<div style=\"direction:rtl;width:300px;font-size:20px\">אבג</div>",
|
||||
"css": "",
|
||||
"viewport": [
|
||||
400,
|
||||
200
|
||||
],
|
||||
"probes": [],
|
||||
"boxes": [],
|
||||
"absent": [],
|
||||
"ink": [],
|
||||
"lines": [],
|
||||
"ink_extent": [
|
||||
{
|
||||
"rect": [
|
||||
0,
|
||||
0,
|
||||
400,
|
||||
60
|
||||
],
|
||||
"min_x": 240,
|
||||
"max_x": 310
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
{
|
||||
"name": "66-bidi-ltr-invariato",
|
||||
"doc": "il testo latino senza direzione resta a sinistra: nessuna regressione.",
|
||||
"html": "<p style=\"width:300px;font-size:20px;margin:0\">abc def</p>",
|
||||
"css": "",
|
||||
"viewport": [
|
||||
400,
|
||||
200
|
||||
],
|
||||
"probes": [],
|
||||
"boxes": [],
|
||||
"absent": [],
|
||||
"ink": [],
|
||||
"lines": [],
|
||||
"ink_extent": [
|
||||
{
|
||||
"rect": [
|
||||
0,
|
||||
0,
|
||||
400,
|
||||
60
|
||||
],
|
||||
"min_x": 0,
|
||||
"max_x": 100
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
{
|
||||
"name": "67-fallback-font-glifo-mancante",
|
||||
"doc": "mono.ttf non ha glifi ebraici: senza fallback uscirebbero quadratini (glifo 0), con il fallback la parola si compone col font predefinito e misura come lui.",
|
||||
"html": "<p style=\"width:300px;font-size:20px;margin:0;font-family:Mono\">שלום</p>",
|
||||
"css": "@font-face { font-family: Mono; src: url(mono.ttf) }",
|
||||
"viewport": [
|
||||
400,
|
||||
100
|
||||
],
|
||||
"probes": [],
|
||||
"boxes": [],
|
||||
"absent": [],
|
||||
"ink": [],
|
||||
"lines": [],
|
||||
"ink_extent": [
|
||||
{
|
||||
"rect": [
|
||||
0,
|
||||
0,
|
||||
400,
|
||||
60
|
||||
],
|
||||
"min_x": 8,
|
||||
"max_x": 52,
|
||||
"min_w": 30,
|
||||
"max_w": 45
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
{
|
||||
"name": "68-flex-grow",
|
||||
"doc": "tre voci con grow 1/2/1 in 400px: 100, 200, 100 px, tutte alte come il contenitore.",
|
||||
"html": "<div style=\"display:flex;width:400px;height:100px\"><div style=\"flex-grow:1\"></div><div style=\"flex-grow:2\"></div><div style=\"flex-grow:1\"></div></div>",
|
||||
"css": "",
|
||||
"viewport": [
|
||||
500,
|
||||
300
|
||||
],
|
||||
"probes": [],
|
||||
"boxes": [
|
||||
{
|
||||
"path": "html>body>div:0",
|
||||
"rect": [
|
||||
8,
|
||||
8,
|
||||
400,
|
||||
100
|
||||
],
|
||||
"tol": 0.8
|
||||
},
|
||||
{
|
||||
"path": "html>body>div:0>div:0",
|
||||
"rect": [
|
||||
8,
|
||||
8,
|
||||
100,
|
||||
100
|
||||
],
|
||||
"tol": 0.8
|
||||
},
|
||||
{
|
||||
"path": "html>body>div:0>div:1",
|
||||
"rect": [
|
||||
108,
|
||||
8,
|
||||
200,
|
||||
100
|
||||
],
|
||||
"tol": 0.8
|
||||
},
|
||||
{
|
||||
"path": "html>body>div:0>div:2",
|
||||
"rect": [
|
||||
308,
|
||||
8,
|
||||
100,
|
||||
100
|
||||
],
|
||||
"tol": 0.8
|
||||
}
|
||||
],
|
||||
"absent": [],
|
||||
"ink": [],
|
||||
"lines": []
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
{
|
||||
"name": "69-flex-space-between",
|
||||
"doc": "lo spazio libero si distribuisce fra le voci, non ai bordi.",
|
||||
"html": "<div style=\"display:flex;justify-content:space-between;width:400px\"><div style=\"width:50px;height:10px\"></div><div style=\"width:50px;height:10px\"></div><div style=\"width:50px;height:10px\"></div></div>",
|
||||
"css": "",
|
||||
"viewport": [
|
||||
500,
|
||||
300
|
||||
],
|
||||
"probes": [],
|
||||
"boxes": [
|
||||
{
|
||||
"path": "html>body>div:0>div:0",
|
||||
"rect": [
|
||||
8,
|
||||
8,
|
||||
50,
|
||||
10
|
||||
],
|
||||
"tol": 0.8
|
||||
},
|
||||
{
|
||||
"path": "html>body>div:0>div:1",
|
||||
"rect": [
|
||||
183,
|
||||
8,
|
||||
50,
|
||||
10
|
||||
],
|
||||
"tol": 0.8
|
||||
},
|
||||
{
|
||||
"path": "html>body>div:0>div:2",
|
||||
"rect": [
|
||||
358,
|
||||
8,
|
||||
50,
|
||||
10
|
||||
],
|
||||
"tol": 0.8
|
||||
}
|
||||
],
|
||||
"absent": [],
|
||||
"ink": [],
|
||||
"lines": []
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
{
|
||||
"name": "70-flex-align-center",
|
||||
"doc": "align-items:center centra sull'asse trasversale, voce per voce.",
|
||||
"html": "<div style=\"display:flex;align-items:center;width:400px;height:100px\"><div style=\"width:50px;height:20px\"></div><div style=\"width:50px;height:60px\"></div></div>",
|
||||
"css": "",
|
||||
"viewport": [
|
||||
500,
|
||||
300
|
||||
],
|
||||
"probes": [],
|
||||
"boxes": [
|
||||
{
|
||||
"path": "html>body>div:0>div:0",
|
||||
"rect": [
|
||||
8,
|
||||
48,
|
||||
50,
|
||||
20
|
||||
],
|
||||
"tol": 0.8
|
||||
},
|
||||
{
|
||||
"path": "html>body>div:0>div:1",
|
||||
"rect": [
|
||||
58,
|
||||
28,
|
||||
50,
|
||||
60
|
||||
],
|
||||
"tol": 0.8
|
||||
}
|
||||
],
|
||||
"absent": [],
|
||||
"ink": [],
|
||||
"lines": []
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
{
|
||||
"name": "71-flex-column",
|
||||
"doc": "in colonna le voci si impilano e si allargano alla larghezza del contenitore.",
|
||||
"html": "<div style=\"display:flex;flex-direction:column;width:200px\"><div style=\"height:20px\"></div><div style=\"height:30px\"></div></div>",
|
||||
"css": "",
|
||||
"viewport": [
|
||||
500,
|
||||
300
|
||||
],
|
||||
"probes": [],
|
||||
"boxes": [
|
||||
{
|
||||
"path": "html>body>div:0>div:0",
|
||||
"rect": [
|
||||
8,
|
||||
8,
|
||||
200,
|
||||
20
|
||||
],
|
||||
"tol": 0.8
|
||||
},
|
||||
{
|
||||
"path": "html>body>div:0>div:1",
|
||||
"rect": [
|
||||
8,
|
||||
28,
|
||||
200,
|
||||
30
|
||||
],
|
||||
"tol": 0.8
|
||||
}
|
||||
],
|
||||
"absent": [],
|
||||
"ink": [],
|
||||
"lines": []
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
{
|
||||
"name": "72-flex-gap",
|
||||
"doc": "gap separa le voci senza margini aggiuntivi.",
|
||||
"html": "<div style=\"display:flex;gap:10px;width:400px\"><div style=\"width:50px;height:10px\"></div><div style=\"width:50px;height:10px\"></div><div style=\"width:50px;height:10px\"></div></div>",
|
||||
"css": "",
|
||||
"viewport": [
|
||||
500,
|
||||
300
|
||||
],
|
||||
"probes": [],
|
||||
"boxes": [
|
||||
{
|
||||
"path": "html>body>div:0>div:0",
|
||||
"rect": [
|
||||
8,
|
||||
8,
|
||||
50,
|
||||
10
|
||||
],
|
||||
"tol": 0.8
|
||||
},
|
||||
{
|
||||
"path": "html>body>div:0>div:2",
|
||||
"rect": [
|
||||
128,
|
||||
8,
|
||||
50,
|
||||
10
|
||||
],
|
||||
"tol": 0.8
|
||||
}
|
||||
],
|
||||
"absent": [],
|
||||
"ink": [],
|
||||
"lines": []
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
{
|
||||
"name": "73-flex-wrap",
|
||||
"doc": "due voci da 120px in 200px: la seconda va a capo, non si comprime.",
|
||||
"html": "<div style=\"display:flex;flex-wrap:wrap;width:200px\"><div style=\"width:120px;height:10px\"></div><div style=\"width:120px;height:10px\"></div></div>",
|
||||
"css": "",
|
||||
"viewport": [
|
||||
500,
|
||||
300
|
||||
],
|
||||
"probes": [],
|
||||
"boxes": [
|
||||
{
|
||||
"path": "html>body>div:0>div:0",
|
||||
"rect": [
|
||||
8,
|
||||
8,
|
||||
120,
|
||||
10
|
||||
],
|
||||
"tol": 0.8
|
||||
},
|
||||
{
|
||||
"path": "html>body>div:0>div:1",
|
||||
"rect": [
|
||||
8,
|
||||
18,
|
||||
120,
|
||||
10
|
||||
],
|
||||
"tol": 0.8
|
||||
}
|
||||
],
|
||||
"absent": [],
|
||||
"ink": [],
|
||||
"lines": []
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
{
|
||||
"name": "74-tabella-larghezza-dichiarata",
|
||||
"doc": "la colonna dichiarata resta 100px (+2 di padding), lo spazio residuo va all'altra.",
|
||||
"html": "<table style=\"width:400px;font-size:14px\"><tr><th style=\"width:100px\">nome</th><th>valore</th></tr><tr><td>alfa</td><td>1</td></tr></table>",
|
||||
"css": "",
|
||||
"viewport": [
|
||||
500,
|
||||
300
|
||||
],
|
||||
"probes": [],
|
||||
"boxes": [
|
||||
{
|
||||
"path": "html>body>table:0>tr:0>th:0",
|
||||
"rect": [
|
||||
8,
|
||||
8,
|
||||
102,
|
||||
18.8
|
||||
],
|
||||
"tol": 1.0
|
||||
},
|
||||
{
|
||||
"path": "html>body>table:0>tr:0>th:1",
|
||||
"rect": [
|
||||
110,
|
||||
8,
|
||||
298,
|
||||
18.8
|
||||
],
|
||||
"tol": 1.0
|
||||
}
|
||||
],
|
||||
"absent": [],
|
||||
"ink": [],
|
||||
"lines": []
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
{
|
||||
"name": "75-tabella-colspan",
|
||||
"doc": "una cella con colspan=2 occupa la larghezza delle due colonne.",
|
||||
"html": "<table style=\"width:400px;font-size:14px\"><tr><th style=\"width:100px\">a</th><th>b</th></tr><tr><td colspan=\"2\">unita</td></tr></table>",
|
||||
"css": "",
|
||||
"viewport": [
|
||||
500,
|
||||
300
|
||||
],
|
||||
"probes": [],
|
||||
"boxes": [
|
||||
{
|
||||
"path": "html>body>table:0>tr:1>td:0",
|
||||
"rect": [
|
||||
8,
|
||||
26.8,
|
||||
400,
|
||||
18.8
|
||||
],
|
||||
"tol": 1.0
|
||||
}
|
||||
],
|
||||
"absent": [],
|
||||
"ink": [],
|
||||
"lines": []
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
{
|
||||
"name": "76-tabella-larghezze-automatiche",
|
||||
"doc": "senza larghezze dichiarate le colonne si dividono lo spazio in proporzione al contenuto.",
|
||||
"html": "<table style=\"width:300px;font-size:14px\"><tr><td>a</td><td>bbbbbbbbbbbbbbbbbbbb</td></tr></table>",
|
||||
"css": "",
|
||||
"viewport": [
|
||||
400,
|
||||
200
|
||||
],
|
||||
"probes": [],
|
||||
"boxes": [
|
||||
{
|
||||
"path": "html>body>table:0>tr:0>td:0",
|
||||
"rect": [
|
||||
8,
|
||||
8,
|
||||
16.7,
|
||||
18.8
|
||||
],
|
||||
"tol": 2.0
|
||||
},
|
||||
{
|
||||
"path": "html>body>table:0>tr:0>td:1",
|
||||
"rect": [
|
||||
24.7,
|
||||
8,
|
||||
283.3,
|
||||
18.8
|
||||
],
|
||||
"tol": 2.0
|
||||
}
|
||||
],
|
||||
"absent": [],
|
||||
"ink": [],
|
||||
"lines": []
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
{
|
||||
"name": "77-form-valore-e-fuoco",
|
||||
"doc": "il valore digitato viene dallo stato del guscio (non dall'attributo) e il controllo con il fuoco ha la cornice blu.",
|
||||
"html": "<html><body style=\"margin:0\"><p style=\"margin:0;font-size:15px\"><input type=\"text\" value=\"x\"><input type=\"text\"></p></body></html>",
|
||||
"css": "",
|
||||
"viewport": [
|
||||
400,
|
||||
100
|
||||
],
|
||||
"probes": [],
|
||||
"boxes": [],
|
||||
"absent": [],
|
||||
"ink": [],
|
||||
"lines": [],
|
||||
"ink_extent": [
|
||||
{
|
||||
"rect": [
|
||||
11,
|
||||
11,
|
||||
150,
|
||||
20
|
||||
],
|
||||
"min_w": 25,
|
||||
"max_w": 50
|
||||
}
|
||||
],
|
||||
"form": {
|
||||
"values": {
|
||||
"html>body:0>p:0>input:0": "stato"
|
||||
},
|
||||
"focus": "html>body:0>p:0>input:0"
|
||||
},
|
||||
"pixels": [
|
||||
{
|
||||
"x": 8,
|
||||
"y": 8,
|
||||
"rgb": [
|
||||
26,
|
||||
95,
|
||||
180
|
||||
],
|
||||
"tol": 30
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
{
|
||||
"name": "78-form-campo-vuoto",
|
||||
"doc": "senza fuoco la cornice è grigia e il campo vuoto resta bianco.",
|
||||
"html": "<html><body style=\"margin:0\"><p style=\"margin:0;font-size:15px\"><input type=\"text\" value=\"x\"><input type=\"text\"></p></body></html>",
|
||||
"css": "",
|
||||
"viewport": [
|
||||
400,
|
||||
100
|
||||
],
|
||||
"probes": [],
|
||||
"boxes": [],
|
||||
"absent": [],
|
||||
"ink": [],
|
||||
"lines": [],
|
||||
"pixels": [
|
||||
{
|
||||
"x": 120,
|
||||
"y": 20,
|
||||
"rgb": [
|
||||
255,
|
||||
255,
|
||||
255
|
||||
],
|
||||
"tol": 12
|
||||
},
|
||||
{
|
||||
"x": 8,
|
||||
"y": 8,
|
||||
"rgb": [
|
||||
118,
|
||||
118,
|
||||
118
|
||||
],
|
||||
"tol": 20
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
{
|
||||
"name": "79-form-checkbox-spunta",
|
||||
"doc": "la casella spuntata ha il riempimento interno, quella non spuntata no.",
|
||||
"html": "<html><body style=\"margin:0\"><p style=\"margin:0\"><input type=\"checkbox\" checked></p></body></html>",
|
||||
"css": "",
|
||||
"viewport": [
|
||||
200,
|
||||
60
|
||||
],
|
||||
"probes": [],
|
||||
"boxes": [],
|
||||
"absent": [],
|
||||
"ink": [],
|
||||
"lines": [],
|
||||
"pixels": [
|
||||
{
|
||||
"x": 14,
|
||||
"y": 14,
|
||||
"rgb": [
|
||||
26,
|
||||
95,
|
||||
180
|
||||
],
|
||||
"tol": 30
|
||||
},
|
||||
{
|
||||
"x": 8,
|
||||
"y": 8,
|
||||
"rgb": [
|
||||
118,
|
||||
118,
|
||||
118
|
||||
],
|
||||
"tol": 20
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
{
|
||||
"name": "80-form-checkbox-non-spuntata",
|
||||
"doc": "senza attributo checked né stato, il centro resta bianco.",
|
||||
"html": "<html><body style=\"margin:0\"><p style=\"margin:0\"><input type=\"checkbox\"></p></body></html>",
|
||||
"css": "",
|
||||
"viewport": [
|
||||
200,
|
||||
60
|
||||
],
|
||||
"probes": [],
|
||||
"boxes": [],
|
||||
"absent": [],
|
||||
"ink": [],
|
||||
"lines": [],
|
||||
"pixels": [
|
||||
{
|
||||
"x": 14,
|
||||
"y": 14,
|
||||
"rgb": [
|
||||
255,
|
||||
255,
|
||||
255
|
||||
],
|
||||
"tol": 12
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
{
|
||||
"name": "81-tabella-percentuale",
|
||||
"doc": "la percentuale si risolve sulla larghezza della tabella (40% di 400 = 160), non sullo spazio finto usato per misurare il contenuto.",
|
||||
"html": "<table style=\"width:400px;font-size:14px\"><tr><th style=\"width:40%\">a</th><th>b</th></tr><tr><td>uno</td><td>due</td></tr></table>",
|
||||
"css": "",
|
||||
"viewport": [
|
||||
500,
|
||||
300
|
||||
],
|
||||
"probes": [],
|
||||
"boxes": [
|
||||
{
|
||||
"path": "html>body>table:0>tr:0>th:0",
|
||||
"rect": [
|
||||
8,
|
||||
8,
|
||||
162,
|
||||
18.8
|
||||
],
|
||||
"tol": 1.5
|
||||
},
|
||||
{
|
||||
"path": "html>body>table:0>tr:0>th:1",
|
||||
"rect": [
|
||||
170,
|
||||
8,
|
||||
238,
|
||||
18.8
|
||||
],
|
||||
"tol": 1.5
|
||||
}
|
||||
],
|
||||
"absent": [],
|
||||
"ink": [],
|
||||
"lines": []
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
{
|
||||
"name": "82-controllo-centrato",
|
||||
"doc": "accanto a una textarea di 60px l'etichetta resta al centro: se appoggiasse sulla baseline finirebbe in fondo al riquadro, fuori da questa fascia.",
|
||||
"html": "<html><body style=\"margin:0\"><p style=\"margin:0;font-size:15px\">Note: <textarea style=\"width:100px;height:60px\">x</textarea></p></body></html>",
|
||||
"css": "",
|
||||
"viewport": [
|
||||
300,
|
||||
120
|
||||
],
|
||||
"probes": [],
|
||||
"boxes": [],
|
||||
"absent": [],
|
||||
"ink": [],
|
||||
"lines": [],
|
||||
"ink_extent": [
|
||||
{
|
||||
"rect": [
|
||||
0,
|
||||
30,
|
||||
45,
|
||||
20
|
||||
],
|
||||
"min_w": 20,
|
||||
"max_x": 40
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
{
|
||||
"name": "83-cursore-posizione",
|
||||
"doc": "il cursore cade dove finisce il testo che lo precede: con caret=3 sta a 23px dal bordo sinistro del testo, non a inizio o a fine campo.",
|
||||
"html": "<html><body style=\"margin:0\"><p style=\"margin:0;font-size:15px\"><input type=\"text\" value=\"stato\"></p></body></html>",
|
||||
"css": "",
|
||||
"viewport": [
|
||||
300,
|
||||
80
|
||||
],
|
||||
"probes": [],
|
||||
"boxes": [],
|
||||
"absent": [],
|
||||
"ink": [],
|
||||
"lines": [],
|
||||
"form": {
|
||||
"values": {
|
||||
"html>body:0>p:0>input:0": "stato"
|
||||
},
|
||||
"focus": "html>body:0>p:0>input:0",
|
||||
"caret": 3
|
||||
},
|
||||
"pixels": [
|
||||
{
|
||||
"x": 35,
|
||||
"y": 16,
|
||||
"rgb": [
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"tol": 60
|
||||
},
|
||||
{
|
||||
"x": 50,
|
||||
"y": 16,
|
||||
"rgb": [
|
||||
255,
|
||||
255,
|
||||
255
|
||||
],
|
||||
"tol": 12
|
||||
},
|
||||
{
|
||||
"x": 60,
|
||||
"y": 16,
|
||||
"rgb": [
|
||||
255,
|
||||
255,
|
||||
255
|
||||
],
|
||||
"tol": 12
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
{
|
||||
"name": "84-selezione-evidenziata",
|
||||
"doc": "l'intervallo selezionato ha la fascia azzurra dietro il testo, e solo li'.",
|
||||
"html": "<html><body style=\"margin:0\"><p style=\"margin:0;font-size:15px\"><input type=\"text\" value=\"stato\"></p></body></html>",
|
||||
"css": "",
|
||||
"viewport": [
|
||||
300,
|
||||
80
|
||||
],
|
||||
"probes": [],
|
||||
"boxes": [],
|
||||
"absent": [],
|
||||
"ink": [],
|
||||
"lines": [],
|
||||
"form": {
|
||||
"values": {
|
||||
"html>body:0>p:0>input:0": "stato"
|
||||
},
|
||||
"focus": "html>body:0>p:0>input:0",
|
||||
"caret": 4,
|
||||
"selection": [
|
||||
0,
|
||||
4
|
||||
]
|
||||
},
|
||||
"pixels": [
|
||||
{
|
||||
"x": 20,
|
||||
"y": 15,
|
||||
"rgb": [
|
||||
180,
|
||||
205,
|
||||
240
|
||||
],
|
||||
"tol": 20
|
||||
},
|
||||
{
|
||||
"x": 60,
|
||||
"y": 15,
|
||||
"rgb": [
|
||||
255,
|
||||
255,
|
||||
255
|
||||
],
|
||||
"tol": 12
|
||||
},
|
||||
{
|
||||
"x": 5,
|
||||
"y": 15,
|
||||
"rgb": [
|
||||
255,
|
||||
255,
|
||||
255
|
||||
],
|
||||
"tol": 12
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
{
|
||||
"name": "85-menu-aperto",
|
||||
"doc": "con il select aperto il motore disegna l'elenco delle opzioni sotto il controllo, con la voce evidenziata.",
|
||||
"html": "<html><body style=\"margin:0\"><p style=\"margin:0;font-size:15px\"><select><option>uno</option><option selected>due</option><option>tre</option></select></p></body></html>",
|
||||
"css": "",
|
||||
"viewport": [
|
||||
400,
|
||||
220
|
||||
],
|
||||
"probes": [],
|
||||
"boxes": [],
|
||||
"absent": [],
|
||||
"ink": [],
|
||||
"lines": [],
|
||||
"form": {
|
||||
"open_select": "html>body:0>p:0>select:0",
|
||||
"select_highlight": 1
|
||||
},
|
||||
"pixels": [
|
||||
{
|
||||
"x": 20,
|
||||
"y": 45,
|
||||
"rgb": [
|
||||
255,
|
||||
255,
|
||||
255
|
||||
],
|
||||
"tol": 12
|
||||
},
|
||||
{
|
||||
"x": 20,
|
||||
"y": 75,
|
||||
"rgb": [
|
||||
26,
|
||||
95,
|
||||
180
|
||||
],
|
||||
"tol": 20
|
||||
},
|
||||
{
|
||||
"x": 20,
|
||||
"y": 120,
|
||||
"rgb": [
|
||||
255,
|
||||
255,
|
||||
255
|
||||
],
|
||||
"tol": 12
|
||||
},
|
||||
{
|
||||
"x": 20,
|
||||
"y": 4,
|
||||
"rgb": [
|
||||
255,
|
||||
255,
|
||||
255
|
||||
],
|
||||
"tol": 12
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
{
|
||||
"name": "86-textarea-contenuto",
|
||||
"doc": "il valore iniziale di una textarea è il suo testo: senza questo il campo appare vuoto anche se l'HTML ne contiene uno.",
|
||||
"html": "<html><body style=\"margin:0\"><p style=\"margin:0\"><textarea style=\"width:120px;height:40px\">testo</textarea></p></body></html>",
|
||||
"css": "",
|
||||
"viewport": [
|
||||
200,
|
||||
80
|
||||
],
|
||||
"probes": [],
|
||||
"boxes": [],
|
||||
"absent": [],
|
||||
"ink": [],
|
||||
"lines": [],
|
||||
"ink_extent": [
|
||||
{
|
||||
"rect": [
|
||||
12,
|
||||
10,
|
||||
100,
|
||||
26
|
||||
],
|
||||
"min_w": 20
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
{
|
||||
"name": "87-textarea-multiriga",
|
||||
"doc": "una textarea disegna una riga per ogni a capo: due fasce di inchiostro.",
|
||||
"html": "<html><body style=\"margin:0\"><p style=\"margin:0\"><textarea style=\"width:140px;height:44px\">alfa beta</textarea></p></body></html>",
|
||||
"css": "",
|
||||
"viewport": [
|
||||
220,
|
||||
90
|
||||
],
|
||||
"probes": [],
|
||||
"boxes": [],
|
||||
"absent": [],
|
||||
"ink": [],
|
||||
"lines": [],
|
||||
"ink_extent": [
|
||||
{
|
||||
"rect": [
|
||||
12,
|
||||
13,
|
||||
120,
|
||||
8
|
||||
],
|
||||
"min_w": 10
|
||||
},
|
||||
{
|
||||
"rect": [
|
||||
12,
|
||||
42,
|
||||
120,
|
||||
8
|
||||
],
|
||||
"min_w": 10
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
{
|
||||
"name": "88-input-testo-lungo",
|
||||
"doc": "con il cursore in fondo il testo scorre dentro il campo e viene ritagliato sul bordo: prima usciva dal riquadro.",
|
||||
"html": "<html><body style=\"margin:0\"><p style=\"margin:0\"><input type=\"text\" style=\"width:100px\" value=\"abcdefghijklmnopqrstuvwxyz\"></p></body></html>",
|
||||
"css": "",
|
||||
"viewport": [
|
||||
300,
|
||||
80
|
||||
],
|
||||
"probes": [],
|
||||
"boxes": [],
|
||||
"absent": [],
|
||||
"ink": [],
|
||||
"lines": [],
|
||||
"ink_extent": [
|
||||
{
|
||||
"rect": [
|
||||
10,
|
||||
12,
|
||||
96,
|
||||
18
|
||||
],
|
||||
"min_w": 20
|
||||
}
|
||||
],
|
||||
"form": {
|
||||
"values": {
|
||||
"html>body:0>p:0>input:0": "abcdefghijklmnopqrstuvwxyz"
|
||||
},
|
||||
"focus": "html>body:0>p:0>input:0",
|
||||
"caret": 26
|
||||
},
|
||||
"pixels": [
|
||||
{
|
||||
"x": 115,
|
||||
"y": 20,
|
||||
"rgb": [
|
||||
255,
|
||||
255,
|
||||
255
|
||||
],
|
||||
"tol": 12
|
||||
},
|
||||
{
|
||||
"x": 130,
|
||||
"y": 20,
|
||||
"rgb": [
|
||||
255,
|
||||
255,
|
||||
255
|
||||
],
|
||||
"tol": 12
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
{
|
||||
"name": "89-script-cambia-testo",
|
||||
"doc": "lo script gira prima del layout: senza di lui 'prima' e' largo ~52px, con il testo scritto da JavaScript passa i 150.",
|
||||
"html": "<html><body style=\"margin:0\"><div id=\"t\" style=\"font-size:20px\">prima</div><script>document.getElementById(\"t\").textContent = \"testo scritto dallo script, molto piu lungo\";</script></body></html>",
|
||||
"css": "",
|
||||
"viewport": [
|
||||
400,
|
||||
80
|
||||
],
|
||||
"probes": [],
|
||||
"boxes": [],
|
||||
"absent": [],
|
||||
"ink": [],
|
||||
"lines": [],
|
||||
"ink_extent": [
|
||||
{
|
||||
"rect": [
|
||||
0,
|
||||
0,
|
||||
380,
|
||||
40
|
||||
],
|
||||
"min_w": 150
|
||||
}
|
||||
],
|
||||
"requires": "js"
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
{
|
||||
"name": "90-script-errore-non-blocca",
|
||||
"doc": "uno script rotto non ferma il rendering: resta il testo dell'HTML.",
|
||||
"html": "<html><body style=\"margin:0\"><div id=\"t\" style=\"font-size:20px\">prima</div><script>questo non è javascript;</script></body></html>",
|
||||
"css": "",
|
||||
"viewport": [
|
||||
300,
|
||||
80
|
||||
],
|
||||
"probes": [],
|
||||
"boxes": [],
|
||||
"absent": [],
|
||||
"ink": [],
|
||||
"lines": [],
|
||||
"ink_extent": [
|
||||
{
|
||||
"rect": [
|
||||
0,
|
||||
0,
|
||||
300,
|
||||
40
|
||||
],
|
||||
"min_x": 8,
|
||||
"max_x": 70
|
||||
}
|
||||
],
|
||||
"requires": "js"
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
{
|
||||
"name": "91-select-voce-scelta",
|
||||
"doc": "il menu a tendina mostra la voce scelta dal guscio anche quando le opzioni non hanno l'attributo `value`: vale il testo dell'opzione. Il pixel a x=42 sarebbe inchiostrato se restasse visibile la voce lunga dell'HTML.",
|
||||
"html": "<html><body style=\"margin:0\"><p style=\"margin:0;font-size:15px\"><select><option selected>si-lungo</option><option>si</option></select></p></body></html>",
|
||||
"css": "",
|
||||
"viewport": [
|
||||
300,
|
||||
120
|
||||
],
|
||||
"probes": [],
|
||||
"boxes": [],
|
||||
"absent": [],
|
||||
"ink": [],
|
||||
"lines": [],
|
||||
"form": {
|
||||
"values": {
|
||||
"html>body:0>p:0>select:0": "si"
|
||||
}
|
||||
},
|
||||
"pixels": [
|
||||
{
|
||||
"x": 42,
|
||||
"y": 18,
|
||||
"rgb": [
|
||||
255,
|
||||
255,
|
||||
255
|
||||
],
|
||||
"tol": 16
|
||||
},
|
||||
{
|
||||
"x": 15,
|
||||
"y": 19,
|
||||
"rgb": [
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"tol": 90
|
||||
}
|
||||
]
|
||||
}
|
||||
Binary file not shown.
Binary file not shown.
|
After Width: | Height: | Size: 77 B |
Loaded 100 of 173 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user