dymokomi/luce-browser-engine
Source of release 0.6.1
0.6.1 / src / web / layout / tests_layout_svg_cases.lucb
#==============================================================================================
#
# tests_layout_svg_cases - laid-out SVG documents (SVG layout and the SVG paintables) pinned
# to the reference build
#
# DESCRIPTION:
# Generated (a test vector table) from the output of a local oracle that runs the
# reference Ladybird build's LibWeb on the same documents (luce-browser-tools,
# oracles/luce-browser-engine/layout_geometry: cases_svg.txt, own_svg_cases.py,
# oracle.cpp, gen_luce_cases.py, build.sh). tests_layout_svg runs each case through the
# port and compares the output.
#
#==============================================================================================
## Every oracle case, in cases_svg.txt order (1 more, marked "!" in cases_svg.txt, wait for other regions).
let test_layout_svg_cases: TestLayoutGeometryCase[90] = [
TestLayoutGeometryCase(mode = "layout", html = "<!doctype html><body><svg viewBox=\"0 0 10 10\" xmlns=\"http://www.w3.org/2000/svg\"><rect x=0 y=0 width=10 height=10 fill=green></svg>", css = "\n * { outline: 1px solid black; }\n body {\n display: flex;\n width: max-content;\n height: 100px;\n }\n", expected = " Viewport <#document> at [0,0] [0+0+0 800 0+0+0] [0+0+0 600 0+0+0] [BFC] children: not-inline\n BlockContainer <html> at [0,0] [0+0+0 800 0+0+0] [0+0+0 116 0+0+0] [BFC] children: not-inline\n Box <body> at [8,8] flex-container(row) [8+0+0 100 0+0+692] [8+0+0 100 0+0+8] [FFC] children: not-inline\n SVGSVGBox <svg> at [8,8] flex-item [0+0+0 100 0+0+0] [0+0+0 100 0+0+0] [SVG] children: not-inline\n SVGGeometryBox <rect> at [8,8] [0+0+0 100 0+0+0] [0+0+0 100 0+0+0] children: not-inline\n \n ViewportPaintable (Viewport<#document>) [0,0 800x600]\n PaintableWithLines (BlockContainer<HTML>) [0,0 800x116]\n PaintableBox (Box<BODY>) [8,8 100x100]\n SVGSVGPaintable (SVGSVGBox<svg>) [8,8 100x100]\n SVGPathPaintable (SVGGeometryBox<rect>) [8,8 100x100]\n \n SC for Viewport<#document> [0,0 800x600] [children: 1] (z-index: auto)\n SC for BlockContainer<HTML> [0,0 800x116] [children: 0] (z-index: auto)\n"),
TestLayoutGeometryCase(mode = "layout", html = "<!DOCTYPE html><svg viewBox=\"0 0 10 5\"><rect fill=\"green\" x=\"0\" y=\"0\" width=\"10\" height=\"5\"></svg>", css = "\n * {\n margin: 0;\n padding: 0;\n }\n body {\n display: flex;\n flex-direction: column\n }\n svg {\n align-self: flex-start;\n height: 100px;\n }\n", expected = " Viewport <#document> at [0,0] [0+0+0 800 0+0+0] [0+0+0 600 0+0+0] [BFC] children: not-inline\n BlockContainer <html> at [0,0] [0+0+0 800 0+0+0] [0+0+0 100 0+0+0] [BFC] children: not-inline\n Box <body> at [0,0] flex-container(column) [0+0+0 800 0+0+0] [0+0+0 100 0+0+0] [FFC] children: not-inline\n SVGSVGBox <svg> at [0,0] flex-item [0+0+0 200 0+0+0] [0+0+0 100 0+0+0] [SVG] children: not-inline\n SVGGeometryBox <rect> at [0,0] [0+0+0 200 0+0+0] [0+0+0 100 0+0+0] children: not-inline\n \n ViewportPaintable (Viewport<#document>) [0,0 800x600]\n PaintableWithLines (BlockContainer<HTML>) [0,0 800x100]\n PaintableBox (Box<BODY>) [0,0 800x100]\n SVGSVGPaintable (SVGSVGBox<svg>) [0,0 200x100]\n SVGPathPaintable (SVGGeometryBox<rect>) [0,0 200x100]\n \n SC for Viewport<#document> [0,0 800x600] [children: 1] (z-index: auto)\n SC for BlockContainer<HTML> [0,0 800x100] [children: 0] (z-index: auto)\n"),
TestLayoutGeometryCase(mode = "layout", html = "<!DOCTYPE html><body><svg viewBox=\"0 0 24 24\"><rect x=0 y=0 width=12 height=12></svg>", css = "\n body {\n display: flex;\n flex-direction: column;\n align-items: center;\n }\n svg {\n flex-grow: 1;\n }\n", expected = " Viewport <#document> at [0,0] [0+0+0 800 0+0+0] [0+0+0 600 0+0+0] [BFC] children: not-inline\n BlockContainer <html> at [0,0] [0+0+0 800 0+0+0] [0+0+0 800 0+0+0] [BFC] children: not-inline\n Box <body> at [8,8] flex-container(column) [8+0+0 784 0+0+8] [8+0+0 784 0+0+8] [FFC] children: not-inline\n SVGSVGBox <svg> at [8,8] flex-item [0+0+0 784 0+0+0] [0+0+0 784 0+0+0] [SVG] children: not-inline\n SVGGeometryBox <rect> at [8,8] [0+0+0 392 0+0+0] [0+0+0 392 0+0+0] children: not-inline\n \n ViewportPaintable (Viewport<#document>) [0,0 800x600] overflow: [0,0 800x800]\n PaintableWithLines (BlockContainer<HTML>) [0,0 800x800]\n PaintableBox (Box<BODY>) [8,8 784x784]\n SVGSVGPaintable (SVGSVGBox<svg>) [8,8 784x784]\n SVGPathPaintable (SVGGeometryBox<rect>) [8,8 392x392]\n \n SC for Viewport<#document> [0,0 800x600] [children: 1] (z-index: auto)\n SC for BlockContainer<HTML> [0,0 800x800] [children: 0] (z-index: auto)\n"),
TestLayoutGeometryCase(mode = "layout", html = "<!doctype html><body><svg viewBox=\"0 0 24 24\"><rect x=0 y=0 width=12 height=12></svg><div>\n", css = "\n * { outline: 1px solid black; }\n html {\n background: white;\n }\n body {\n display: flex;\n background: orange;\n width: 200px;\n }\n svg {\n background: cyan;\n height: 20px;\n }\n div {\n background: magenta;\n width: 100px;\n }\n", expected = " Viewport <#document> at [0,0] [0+0+0 800 0+0+0] [0+0+0 600 0+0+0] [BFC] children: not-inline\n BlockContainer <html> at [0,0] [0+0+0 800 0+0+0] [0+0+0 36 0+0+0] [BFC] children: not-inline\n Box <body> at [8,8] flex-container(row) [8+0+0 200 0+0+592] [8+0+0 20 0+0+8] [FFC] children: not-inline\n SVGSVGBox <svg> at [8,8] flex-item [0+0+0 20 0+0+0] [0+0+0 20 0+0+0] [SVG] children: not-inline\n SVGGeometryBox <rect> at [8,8] [0+0+0 10 0+0+0] [0+0+0 10 0+0+0] children: not-inline\n BlockContainer <div> at [28,8] flex-item [0+0+0 100 0+0+0] [0+0+0 20 0+0+0] [BFC] children: inline\n TextNode <#text> (not painted)\n \n ViewportPaintable (Viewport<#document>) [0,0 800x600]\n PaintableWithLines (BlockContainer<HTML>) [0,0 800x36]\n PaintableBox (Box<BODY>) [8,8 200x20]\n SVGSVGPaintable (SVGSVGBox<svg>) [8,8 20x20]\n SVGPathPaintable (SVGGeometryBox<rect>) [8,8 10x10]\n PaintableWithLines (BlockContainer<DIV>) [28,8 100x20]\n \n SC for Viewport<#document> [0,0 800x600] [children: 1] (z-index: auto)\n SC for BlockContainer<HTML> [0,0 800x36] [children: 0] (z-index: auto)\n"),
TestLayoutGeometryCase(mode = "layout", html = "<!DOCTYPE html><body><svg viewBox=\"0 0 24 24\"><rect x=0 y=0 width=12 height=12></svg>\n", css = "\n body {\n display: flex;\n flex-direction: row;\n }\n", expected = " Viewport <#document> at [0,0] [0+0+0 800 0+0+0] [0+0+0 600 0+0+0] [BFC] children: not-inline\n BlockContainer <html> at [0,0] [0+0+0 800 0+0+0] [0+0+0 800 0+0+0] [BFC] children: not-inline\n Box <body> at [8,8] flex-container(row) [8+0+0 784 0+0+8] [8+0+0 784 0+0+8] [FFC] children: not-inline\n SVGSVGBox <svg> at [8,8] flex-item [0+0+0 784 0+0+0] [0+0+0 784 0+0+0] [SVG] children: not-inline\n SVGGeometryBox <rect> at [8,8] [0+0+0 392 0+0+0] [0+0+0 392 0+0+0] children: not-inline\n BlockContainer <(anonymous)> (not painted) [BFC] children: inline\n TextNode <#text> (not painted)\n \n ViewportPaintable (Viewport<#document>) [0,0 800x600] overflow: [0,0 800x800]\n PaintableWithLines (BlockContainer<HTML>) [0,0 800x800]\n PaintableBox (Box<BODY>) [8,8 784x784]\n SVGSVGPaintable (SVGSVGBox<svg>) [8,8 784x784]\n SVGPathPaintable (SVGGeometryBox<rect>) [8,8 392x392]\n \n SC for Viewport<#document> [0,0 800x600] [children: 1] (z-index: auto)\n SC for BlockContainer<HTML> [0,0 800x800] [children: 0] (z-index: auto)\n"),
TestLayoutGeometryCase(mode = "layout", html = "<!doctype html><body><svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" style=\"display: none\"><symbol id=\"icon-cart\" viewBox=\"0 0 10 10\"><rect x=0 y=0 width=10 height=10 fill=green></symbol></svg><div><svg class=\"c-ico\"><use xlink:href=\"#icon-cart\"></use></svg>", css = "\n * {\n outline: 1px solid black !important;\n }\n svg {\n max-height: 100%;\n max-width: 100%;\n height: 100px;\n width: 100px;\n }\n body {\n display: flex;\n }\n div {\n display: flex;\n }\n", expected = " Viewport <#document> at [0,0] [0+0+0 800 0+0+0] [0+0+0 600 0+0+0] [BFC] children: not-inline\n BlockContainer <html> at [0,0] [0+0+0 800 0+0+0] [0+0+0 116 0+0+0] [BFC] children: not-inline\n Box <body> at [8,8] flex-container(row) [8+0+0 784 0+0+8] [8+0+0 100 0+0+8] [FFC] children: not-inline\n Box <div> at [8,8] flex-container(row) flex-item [0+0+0 100 0+0+0] [0+0+0 100 0+0+0] [FFC] children: not-inline\n SVGSVGBox <svg.c-ico> at [8,8] flex-item [0+0+0 100 0+0+0] [0+0+0 100 0+0+0] [SVG] children: not-inline\n SVGGraphicsBox <use> at [8,8] [0+0+0 100 0+0+0] [0+0+0 100 0+0+0] children: not-inline\n SVGGraphicsBox <symbol#icon-cart> at [8,8] [0+0+0 100 0+0+0] [0+0+0 100 0+0+0] [BFC] children: not-inline\n SVGGeometryBox <rect> at [8,8] [0+0+0 100 0+0+0] [0+0+0 100 0+0+0] children: not-inline\n \n ViewportPaintable (Viewport<#document>) [0,0 800x600]\n PaintableWithLines (BlockContainer<HTML>) [0,0 800x116]\n PaintableBox (Box<BODY>) [8,8 784x100]\n PaintableBox (Box<DIV>) [8,8 100x100]\n SVGSVGPaintable (SVGSVGBox<svg>.c-ico) [8,8 100x100]\n SVGGraphicsPaintable (SVGGraphicsBox<use>) [8,8 100x100]\n SVGGraphicsPaintable (SVGGraphicsBox<symbol>#icon-cart) [8,8 100x100]\n SVGPathPaintable (SVGGeometryBox<rect>) [8,8 100x100]\n \n SC for Viewport<#document> [0,0 800x600] [children: 1] (z-index: auto)\n SC for BlockContainer<HTML> [0,0 800x116] [children: 0] (z-index: auto)\n"),
TestLayoutGeometryCase(mode = "layout", html = "<!DOCTYPE html>\n\n\n<div class=\"grid\">\n\t<!--\n\t\tThis SVG has an intrinsic width (from the width attribute), but no intrinsic height and no intrinsic aspect ratio.\n\t\tIn the grid row axis, it should still stretch to fill the 200px track size.\n\t-->\n\t<svg width=\"50\"></svg>\n</div>\n", css = "\n* {\n\tmargin: 0;\n}\n\n.grid {\n\tdisplay: grid;\n\twidth: 50px;\n\tgrid-template-columns: auto;\n\tgrid-template-rows: 200px;\n\tjustify-items: start;\n\talign-items: stretch;\n\tbackground: red;\n}\n\nsvg {\n\tdisplay: block;\n\tbackground: lime;\n}\n", expected = " Viewport <#document> at [0,0] [0+0+0 800 0+0+0] [0+0+0 600 0+0+0] [BFC] children: not-inline\n BlockContainer <html> at [0,0] [0+0+0 800 0+0+0] [0+0+0 200 0+0+0] [BFC] children: not-inline\n BlockContainer <body> at [0,0] [0+0+0 800 0+0+0] [0+0+0 200 0+0+0] children: not-inline\n Box <div.grid> at [0,0] [0+0+0 50 0+0+750] [0+0+0 200 0+0+0] [GFC] children: not-inline\n BlockContainer <(anonymous)> (not painted) [BFC] children: inline\n TextNode <#text> (not painted)\n TextNode <#text> (not painted)\n SVGSVGBox <svg> at [0,0] [0+0+0 50 0+0+0] [0+0+0 200 0+0+0] [SVG] children: not-inline\n BlockContainer <(anonymous)> (not painted) [BFC] children: inline\n TextNode <#text> (not painted)\n BlockContainer <(anonymous)> at [0,200] [0+0+0 800 0+0+0] [0+0+0 0 0+0+0] children: inline\n TextNode <#text> (not painted)\n \n ViewportPaintable (Viewport<#document>) [0,0 800x600]\n PaintableWithLines (BlockContainer<HTML>) [0,0 800x200]\n PaintableWithLines (BlockContainer<BODY>) [0,0 800x200]\n PaintableBox (Box<DIV>.grid) [0,0 50x200]\n SVGSVGPaintable (SVGSVGBox<svg>) [0,0 50x200]\n PaintableWithLines (BlockContainer(anonymous)) [0,200 800x0]\n \n SC for Viewport<#document> [0,0 800x600] [children: 1] (z-index: auto)\n SC for BlockContainer<HTML> [0,0 800x200] [children: 0] (z-index: auto)\n"),
TestLayoutGeometryCase(mode = "layout", html = "<!DOCTYPE html>\n\n<svg width=\"200\" height=\"200\">\n <foreignObject width=\"100\" height=\"100\" x=\"50\" y=\"50\">\n <div>I am offset!</div>\n </foreignObject>\n</svg>\n", css = "\n div {\n position: absolute;\n top: 0;\n left: 0;\n width: 100px;\n height: 100px;\n }\n", expected = " Viewport <#document> at [0,0] [0+0+0 800 0+0+0] [0+0+0 600 0+0+0] [BFC] children: not-inline\n BlockContainer <html> at [0,0] [0+0+0 800 0+0+0] [0+0+0 216 0+0+0] [BFC] children: not-inline\n BlockContainer <body> at [8,8] [8+0+0 784 0+0+8] [8+0+0 200 0+0+8] children: inline\n frag 0 from SVGSVGBox start: 0, length: 0, rect: [8,8 200x200] baseline: 200\n SVGSVGBox <svg> at [8,8] [0+0+0 200 0+0+0] [0+0+0 200 0+0+0] [SVG] children: inline\n TextNode <#text> (not painted)\n SVGForeignObjectBox <foreignObject> at [58,58] [0+0+0 100 0+0+0] [0+0+0 100 0+0+0] [BFC] children: not-inline\n BlockContainer <(anonymous)> at [58,58] [0+0+0 100 0+0+0] [0+0+0 0 0+0+0] children: inline\n TextNode <#text> (not painted)\n BlockContainer <div> at [58,58] positioned [0+0+0 100 0+0+0] [0+0+0 100 0+0+0] [BFC] children: inline\n frag 0 from TextNode start: 0, length: 12, rect: [58,58 94.15625x18] baseline: 13.796875\n \"I am offset!\"\n TextNode <#text> (not painted)\n TextNode <#text> (not painted)\n TextNode <#text> (not painted)\n TextNode <#text> (not painted)\n \n ViewportPaintable (Viewport<#document>) [0,0 800x600]\n PaintableWithLines (BlockContainer<HTML>) [0,0 800x216]\n PaintableWithLines (BlockContainer<BODY>) [8,8 784x200]\n SVGSVGPaintable (SVGSVGBox<svg>) [8,8 200x200]\n SVGForeignObjectPaintable (SVGForeignObjectBox<foreignObject>) [58,58 100x100]\n PaintableWithLines (BlockContainer(anonymous)) [58,58 100x0]\n PaintableWithLines (BlockContainer<DIV>) [58,58 100x100]\n TextPaintable (TextNode<#text>)\n \n SC for Viewport<#document> [0,0 800x600] [children: 1] (z-index: auto)\n SC for BlockContainer<HTML> [0,0 800x216] [children: 1] (z-index: auto)\n SC for SVGForeignObjectBox<foreignObject> [58,58 100x100] [children: 0] (z-index: auto)\n"),
TestLayoutGeometryCase(mode = "layout", html = "<!DOCTYPE html>\n\n<svg\n viewBox=\"0 0 100 100\"\n width=\"100\"\n height=\"50\"\n preserveAspectRatio=\"xMidYMid meet\"\n x=\"0\"\n y=\"0\">\n <circle cx=\"50\" cy=\"50\" r=\"50\" fill=\"red\" />\n</svg>\n<svg\n viewBox=\"0 0 100 100\"\n width=\"100\"\n height=\"50\"\n preserveAspectRatio=\"xMinYMid meet\"\n x=\"25\"\n y=\"0\">\n <circle cx=\"50\" cy=\"50\" r=\"50\" fill=\"red\" />\n</svg>\n<svg\n viewBox=\"0 0 100 100\"\n width=\"100\"\n height=\"50\"\n preserveAspectRatio=\"xMaxYMid meet\"\n x=\"50\"\n y=\"0\">\n <circle cx=\"50\" cy=\"50\" r=\"50\" fill=\"red\" />\n</svg>\n<svg\n viewBox=\"0 0 100 100\"\n width=\"100\"\n height=\"50\"\n preserveAspectRatio=\"xMidYMin slice\"\n x=\"0\"\n y=\"15\">\n <circle cx=\"50\" cy=\"50\" r=\"50\" fill=\"red\" />\n</svg>\n<svg\n viewBox=\"0 0 100 100\"\n width=\"100\"\n height=\"50\"\n preserveAspectRatio=\"xMidYMid slice\"\n x=\"25\"\n y=\"15\">\n <circle cx=\"50\" cy=\"50\" r=\"50\" fill=\"red\" />\n</svg>\n<svg\n viewBox=\"0 0 100 100\"\n width=\"100\"\n height=\"50\"\n preserveAspectRatio=\"xMidYMax slice\"\n x=\"50\"\n y=\"15\">\n <circle cx=\"50\" cy=\"50\" r=\"50\" fill=\"red\" />\n</svg>\n<svg\n viewBox=\"0 0 100 100\"\n width=\"50\"\n height=\"125\"\n preserveAspectRatio=\"xMidYMin meet\"\n x=\"75\"\n y=\"0\">\n <circle cx=\"50\" cy=\"50\" r=\"50\" fill=\"red\" />\n</svg>\n<svg\n viewBox=\"0 0 100 100\"\n width=\"50\"\n height=\"125\"\n preserveAspectRatio=\"xMidYMid meet\"\n x=\"90\"\n y=\"0\">\n <circle cx=\"50\" cy=\"50\" r=\"50\" fill=\"red\" />\n</svg>\n<svg\n viewBox=\"0 0 100 100\"\n width=\"50\"\n height=\"125\"\n preserveAspectRatio=\"xMidYMax meet\"\n x=\"105\"\n y=\"0\">\n <circle cx=\"50\" cy=\"50\" r=\"50\" fill=\"red\" />\n</svg>\n<svg\n viewBox=\"0 0 100 100\"\n width=\"50\"\n height=\"125\"\n preserveAspectRatio=\"xMinYMid slice\"\n x=\"120\"\n y=\"0\">\n <circle cx=\"50\" cy=\"50\" r=\"50\" fill=\"red\" />\n</svg>\n<svg\n viewBox=\"0 0 100 100\"\n width=\"50\"\n height=\"125\"\n preserveAspectRatio=\"xMidYMid slice\"\n x=\"135\"\n y=\"0\">\n <circle cx=\"50\" cy=\"50\" r=\"50\" fill=\"red\" />\n</svg>\n<svg\n viewBox=\"0 0 100 100\"\n width=\"50\"\n height=\"125\"\n preserveAspectRatio=\"xMaxYMid slice\"\n x=\"150\"\n y=\"0\">\n <circle cx=\"50\" cy=\"50\" r=\"50\" fill=\"red\" />\n</svg>\n<svg\n viewBox=\"0 0 100 100\"\n width=\"160\"\n height=\"60\"\n preserveAspectRatio=\"none\"\n x=\"0\"\n y=\"30\">\n <circle cx=\"50\" cy=\"50\" r=\"50\" fill=\"red\" />\n</svg>\n", css = "\n * {\n font-family: 'SerenitySans';\n }\n svg {\n border: 1px solid black;\n }\n", expected = " Viewport <#document> at [0,0] [0+0+0 800 0+0+0] [0+0+0 600 0+0+0] [BFC] children: not-inline\n BlockContainer <html> at [0,0] [0+0+0 800 0+0+0] [0+0+0 274 0+0+0] [BFC] children: not-inline\n BlockContainer <body> at [8,8] [8+0+0 784 0+0+8] [8+0+0 258 0+0+8] children: inline\n frag 0 from SVGSVGBox start: 0, length: 0, rect: [9,84 100x50] baseline: 52\n frag 1 from TextNode start: 0, length: 1, rect: [110,121 8x18] baseline: 13.796875\n \" \"\n frag 2 from SVGSVGBox start: 0, length: 0, rect: [119,84 100x50] baseline: 52\n frag 3 from TextNode start: 0, length: 1, rect: [220,121 8x18] baseline: 13.796875\n \" \"\n frag 4 from SVGSVGBox start: 0, length: 0, rect: [229,84 100x50] baseline: 52\n frag 5 from TextNode start: 0, length: 1, rect: [330,121 8x18] baseline: 13.796875\n \" \"\n frag 6 from SVGSVGBox start: 0, length: 0, rect: [339,84 100x50] baseline: 52\n frag 7 from TextNode start: 0, length: 1, rect: [440,121 8x18] baseline: 13.796875\n \" \"\n frag 8 from SVGSVGBox start: 0, length: 0, rect: [449,84 100x50] baseline: 52\n frag 9 from TextNode start: 0, length: 1, rect: [550,121 8x18] baseline: 13.796875\n \" \"\n frag 10 from SVGSVGBox start: 0, length: 0, rect: [559,84 100x50] baseline: 52\n frag 11 from TextNode start: 0, length: 1, rect: [660,121 8x18] baseline: 13.796875\n \" \"\n frag 12 from SVGSVGBox start: 0, length: 0, rect: [669,9 50x125] baseline: 127\n frag 13 from TextNode start: 0, length: 1, rect: [720,121 8x18] baseline: 13.796875\n \" \"\n frag 14 from SVGSVGBox start: 0, length: 0, rect: [729,9 50x125] baseline: 127\n frag 15 from SVGSVGBox start: 0, length: 0, rect: [9,136 50x125] baseline: 127\n frag 16 from TextNode start: 0, length: 1, rect: [60,248 8x18] baseline: 13.796875\n \" \"\n frag 17 from SVGSVGBox start: 0, length: 0, rect: [69,136 50x125] baseline: 127\n frag 18 from TextNode start: 0, length: 1, rect: [120,248 8x18] baseline: 13.796875\n \" \"\n frag 19 from SVGSVGBox start: 0, length: 0, rect: [129,136 50x125] baseline: 127\n frag 20 from TextNode start: 0, length: 1, rect: [180,248 8x18] baseline: 13.796875\n \" \"\n frag 21 from SVGSVGBox start: 0, length: 0, rect: [189,136 50x125] baseline: 127\n frag 22 from TextNode start: 0, length: 1, rect: [240,248 8x18] baseline: 13.796875\n \" \"\n frag 23 from SVGSVGBox start: 0, length: 0, rect: [249,201 160x60] baseline: 62\n SVGSVGBox <svg> at [9,84] [0+1+0 100 0+1+0] [0+1+0 50 0+1+0] [SVG] children: inline\n TextNode <#text> (not painted)\n SVGGeometryBox <circle> at [34,84] [0+0+0 50 0+0+0] [0+0+0 50 0+0+0] children: not-inline\n TextNode <#text> (not painted)\n TextNode <#text> (not painted)\n SVGSVGBox <svg> at [119,84] [0+1+0 100 0+1+0] [0+1+0 50 0+1+0] [SVG] children: inline\n TextNode <#text> (not painted)\n SVGGeometryBox <circle> at [119,84] [0+0+0 50 0+0+0] [0+0+0 50 0+0+0] children: not-inline\n TextNode <#text> (not painted)\n TextNode <#text> (not painted)\n SVGSVGBox <svg> at [229,84] [0+1+0 100 0+1+0] [0+1+0 50 0+1+0] [SVG] children: inline\n TextNode <#text> (not painted)\n SVGGeometryBox <circle> at [279,84] [0+0+0 50 0+0+0] [0+0+0 50 0+0+0] children: not-inline\n TextNode <#text> (not painted)\n TextNode <#text> (not painted)\n SVGSVGBox <svg> at [339,84] [0+1+0 100 0+1+0] [0+1+0 50 0+1+0] [SVG] children: inline\n TextNode <#text> (not painted)\n SVGGeometryBox <circle> at [339,84] [0+0+0 100 0+0+0] [0+0+0 100 0+0+0] children: not-inline\n TextNode <#text> (not painted)\n TextNode <#text> (not painted)\n SVGSVGBox <svg> at [449,84] [0+1+0 100 0+1+0] [0+1+0 50 0+1+0] [SVG] children: inline\n TextNode <#text> (not painted)\n SVGGeometryBox <circle> at [449,59] [0+0+0 100 0+0+0] [0+0+0 100 0+0+0] children: not-inline\n TextNode <#text> (not painted)\n TextNode <#text> (not painted)\n SVGSVGBox <svg> at [559,84] [0+1+0 100 0+1+0] [0+1+0 50 0+1+0] [SVG] children: inline\n TextNode <#text> (not painted)\n SVGGeometryBox <circle> at [559,34] [0+0+0 100 0+0+0] [0+0+0 100 0+0+0] children: not-inline\n TextNode <#text> (not painted)\n TextNode <#text> (not painted)\n SVGSVGBox <svg> at [669,9] [0+1+0 50 0+1+0] [0+1+0 125 0+1+0] [SVG] children: inline\n TextNode <#text> (not painted)\n SVGGeometryBox <circle> at [669,9] [0+0+0 50 0+0+0] [0+0+0 50 0+0+0] children: not-inline\n TextNode <#text> (not painted)\n TextNode <#text> (not painted)\n SVGSVGBox <svg> at [729,9] [0+1+0 50 0+1+0] [0+1+0 125 0+1+0] [SVG] children: inline\n TextNode <#text> (not painted)\n SVGGeometryBox <circle> at [729,46.5] [0+0+0 50 0+0+0] [0+0+0 50 0+0+0] children: not-inline\n TextNode <#text> (not painted)\n TextNode <#text> (not painted)\n SVGSVGBox <svg> at [9,136] [0+1+0 50 0+1+0] [0+1+0 125 0+1+0] [SVG] children: inline\n TextNode <#text> (not painted)\n SVGGeometryBox <circle> at [9,211] [0+0+0 50 0+0+0] [0+0+0 50 0+0+0] children: not-inline\n TextNode <#text> (not painted)\n TextNode <#text> (not painted)\n SVGSVGBox <svg> at [69,136] [0+1+0 50 0+1+0] [0+1+0 125 0+1+0] [SVG] children: inline\n TextNode <#text> (not painted)\n SVGGeometryBox <circle> at [69,136] [0+0+0 125 0+0+0] [0+0+0 125 0+0+0] children: not-inline\n TextNode <#text> (not painted)\n TextNode <#text> (not painted)\n SVGSVGBox <svg> at [129,136] [0+1+0 50 0+1+0] [0+1+0 125 0+1+0] [SVG] children: inline\n TextNode <#text> (not painted)\n SVGGeometryBox <circle> at [91.5,136] [0+0+0 125 0+0+0] [0+0+0 125 0+0+0] children: not-inline\n TextNode <#text> (not painted)\n TextNode <#text> (not painted)\n SVGSVGBox <svg> at [189,136] [0+1+0 50 0+1+0] [0+1+0 125 0+1+0] [SVG] children: inline\n TextNode <#text> (not painted)\n SVGGeometryBox <circle> at [114,136] [0+0+0 125 0+0+0] [0+0+0 125 0+0+0] children: not-inline\n TextNode <#text> (not painted)\n TextNode <#text> (not painted)\n SVGSVGBox <svg> at [249,201] [0+1+0 160 0+1+0] [0+1+0 60 0+1+0] [SVG] children: inline\n TextNode <#text> (not painted)\n SVGGeometryBox <circle> at [249,201] [0+0+0 160 0+0+0] [0+0+0 60 0+0+0] children: not-inline\n TextNode <#text> (not painted)\n TextNode <#text> (not painted)\n \n ViewportPaintable (Viewport<#document>) [0,0 800x600]\n PaintableWithLines (BlockContainer<HTML>) [0,0 800x274]\n PaintableWithLines (BlockContainer<BODY>) [8,8 784x258]\n SVGSVGPaintable (SVGSVGBox<svg>) [8,83 102x52]\n SVGPathPaintable (SVGGeometryBox<circle>) [34,84 50x50]\n TextPaintable (TextNode<#text>)\n SVGSVGPaintable (SVGSVGBox<svg>) [118,83 102x52]\n SVGPathPaintable (SVGGeometryBox<circle>) [119,84 50x50]\n TextPaintable (TextNode<#text>)\n SVGSVGPaintable (SVGSVGBox<svg>) [228,83 102x52]\n SVGPathPaintable (SVGGeometryBox<circle>) [279,84 50x50]\n TextPaintable (TextNode<#text>)\n SVGSVGPaintable (SVGSVGBox<svg>) [338,83 102x52] overflow: [339,84 100x100]\n SVGPathPaintable (SVGGeometryBox<circle>) [339,84 100x100]\n TextPaintable (TextNode<#text>)\n SVGSVGPaintable (SVGSVGBox<svg>) [448,83 102x52] overflow: [449,84 100x75]\n SVGPathPaintable (SVGGeometryBox<circle>) [449,59 100x100]\n TextPaintable (TextNode<#text>)\n SVGSVGPaintable (SVGSVGBox<svg>) [558,83 102x52]\n SVGPathPaintable (SVGGeometryBox<circle>) [559,34 100x100]\n TextPaintable (TextNode<#text>)\n SVGSVGPaintable (SVGSVGBox<svg>) [668,8 52x127]\n SVGPathPaintable (SVGGeometryBox<circle>) [669,9 50x50]\n TextPaintable (TextNode<#text>)\n SVGSVGPaintable (SVGSVGBox<svg>) [728,8 52x127]\n SVGPathPaintable (SVGGeometryBox<circle>) [729,46.5 50x50]\n SVGSVGPaintable (SVGSVGBox<svg>) [8,135 52x127]\n SVGPathPaintable (SVGGeometryBox<circle>) [9,211 50x50]\n TextPaintable (TextNode<#text>)\n SVGSVGPaintable (SVGSVGBox<svg>) [68,135 52x127] overflow: [69,136 125x125]\n SVGPathPaintable (SVGGeometryBox<circle>) [69,136 125x125]\n TextPaintable (TextNode<#text>)\n SVGSVGPaintable (SVGSVGBox<svg>) [128,135 52x127] overflow: [129,136 87.5x125]\n SVGPathPaintable (SVGGeometryBox<circle>) [91.5,136 125x125]\n TextPaintable (TextNode<#text>)\n SVGSVGPaintable (SVGSVGBox<svg>) [188,135 52x127]\n SVGPathPaintable (SVGGeometryBox<circle>) [114,136 125x125]\n TextPaintable (TextNode<#text>)\n SVGSVGPaintable (SVGSVGBox<svg>) [248,200 162x62]\n SVGPathPaintable (SVGGeometryBox<circle>) [249,201 160x60]\n \n SC for Viewport<#document> [0,0 800x600] [children: 1] (z-index: auto)\n SC for BlockContainer<HTML> [0,0 800x274] [children: 0] (z-index: auto)\n"),
TestLayoutGeometryCase(mode = "layout", html = "<!DOCTYPE html>\n<svg viewBox=\"0 0 400 400\" width=\"400\" height=\"400\" xmlns=\"http://www.w3.org/2000/svg\">\n <line x1=\"0\" y1=\"50\" x2=\"400\" y2=\"50\" stroke=\"gray\" stroke-width=\"0.5\"/>\n <line x1=\"0\" y1=\"100\" x2=\"400\" y2=\"100\" stroke=\"gray\" stroke-width=\"0.5\"/>\n <line x1=\"0\" y1=\"150\" x2=\"400\" y2=\"150\" stroke=\"gray\" stroke-width=\"0.5\"/>\n <line x1=\"0\" y1=\"200\" x2=\"400\" y2=\"200\" stroke=\"gray\" stroke-width=\"0.5\"/>\n <line x1=\"0\" y1=\"250\" x2=\"400\" y2=\"250\" stroke=\"gray\" stroke-width=\"0.5\"/>\n <line x1=\"0\" y1=\"300\" x2=\"400\" y2=\"300\" stroke=\"gray\" stroke-width=\"0.5\"/>\n <line x1=\"0\" y1=\"350\" x2=\"400\" y2=\"350\" stroke=\"gray\" stroke-width=\"0.5\"/>\n <text x=\"10\" y=\"50\" font-size=\"20\" font-family=\"SerenitySans\" dominant-baseline=\"auto\">auto</text>\n <text x=\"10\" y=\"100\" font-size=\"20\" font-family=\"SerenitySans\" dominant-baseline=\"alphabetic\">alphabetic</text>\n <text x=\"10\" y=\"150\" font-size=\"20\" font-family=\"SerenitySans\" dominant-baseline=\"central\">central</text>\n <text x=\"10\" y=\"200\" font-size=\"20\" font-family=\"SerenitySans\" dominant-baseline=\"middle\">middle</text>\n <text x=\"10\" y=\"250\" font-size=\"20\" font-family=\"SerenitySans\" dominant-baseline=\"hanging\">hanging</text>\n <text x=\"10\" y=\"300\" font-size=\"20\" font-family=\"SerenitySans\" dominant-baseline=\"ideographic\">ideographic</text>\n <text x=\"10\" y=\"350\" font-size=\"20\" font-family=\"SerenitySans\" dominant-baseline=\"mathematical\">mathematical</text>\n</svg>\n", css = "", expected = " Viewport <#document> at [0,0] [0+0+0 800 0+0+0] [0+0+0 600 0+0+0] [BFC] children: not-inline\n BlockContainer <html> at [0,0] [0+0+0 800 0+0+0] [0+0+0 416 0+0+0] [BFC] children: not-inline\n BlockContainer <body> at [8,8] [8+0+0 784 0+0+8] [8+0+0 400 0+0+8] children: inline\n frag 0 from SVGSVGBox start: 0, length: 0, rect: [8,8 400x400] baseline: 400\n SVGSVGBox <svg> at [8,8] [0+0+0 400 0+0+0] [0+0+0 400 0+0+0] [SVG] children: inline\n TextNode <#text> (not painted)\n SVGGeometryBox <line> at [7.75,57.75] [0+0+0 400.5 0+0+0] [0+0+0 0.5 0+0+0] children: not-inline\n TextNode <#text> (not painted)\n SVGGeometryBox <line> at [7.75,107.75] [0+0+0 400.5 0+0+0] [0+0+0 0.5 0+0+0] children: not-inline\n TextNode <#text> (not painted)\n SVGGeometryBox <line> at [7.75,157.75] [0+0+0 400.5 0+0+0] [0+0+0 0.5 0+0+0] children: not-inline\n TextNode <#text> (not painted)\n SVGGeometryBox <line> at [7.75,207.75] [0+0+0 400.5 0+0+0] [0+0+0 0.5 0+0+0] children: not-inline\n TextNode <#text> (not painted)\n SVGGeometryBox <line> at [7.75,257.75] [0+0+0 400.5 0+0+0] [0+0+0 0.5 0+0+0] children: not-inline\n TextNode <#text> (not painted)\n SVGGeometryBox <line> at [7.75,307.75] [0+0+0 400.5 0+0+0] [0+0+0 0.5 0+0+0] children: not-inline\n TextNode <#text> (not painted)\n SVGGeometryBox <line> at [7.75,357.75] [0+0+0 400.5 0+0+0] [0+0+0 0.5 0+0+0] children: not-inline\n TextNode <#text> (not painted)\n SVGTextBox <text> at [18.171875,44.90625] [0+0+0 44.4375 0+0+0] [0+0+0 14 0+0+0] children: inline\n TextNode <#text> (not painted)\n TextNode <#text> (not painted)\n SVGTextBox <text> at [18.171875,92.96875] [0+0+0 100.59375 0+0+0] [0+0+0 15.703125 0+0+0] children: inline\n TextNode <#text> (not painted)\n TextNode <#text> (not painted)\n SVGTextBox <text> at [19.015625,150.90625] [0+0+0 68.890625 0+0+0] [0+0+0 14.03125 0+0+0] children: inline\n TextNode <#text> (not painted)\n TextNode <#text> (not painted)\n SVGTextBox <text> at [19.3125,198.328125] [0+0+0 54.46875 0+0+0] [0+0+0 15.46875 0+0+0] children: inline\n TextNode <#text> (not painted)\n TextNode <#text> (not painted)\n SVGTextBox <text> at [18.859375,255.75] [0+0+0 70.625 0+0+0] [0+0+0 17.515625 0+0+0] children: inline\n TextNode <#text> (not painted)\n TextNode <#text> (not painted)\n SVGTextBox <text> at [19.265625,288.953125] [0+0+0 110.5 0+0+0] [0+0+0 17.515625 0+0+0] children: inline\n TextNode <#text> (not painted)\n TextNode <#text> (not painted)\n SVGTextBox <text> at [19.3125,350.953125] [0+0+0 126.59375 0+0+0] [0+0+0 15.46875 0+0+0] children: inline\n TextNode <#text> (not painted)\n TextNode <#text> (not painted)\n TextNode <#text> (not painted)\n \n ViewportPaintable (Viewport<#document>) [0,0 800x600]\n PaintableWithLines (BlockContainer<HTML>) [0,0 800x416]\n PaintableWithLines (BlockContainer<BODY>) [8,8 784x400]\n SVGSVGPaintable (SVGSVGBox<svg>) [8,8 400x400] overflow: [8,8 400.25x400]\n SVGPathPaintable (SVGGeometryBox<line>) [7.75,57.75 400.5x0.5]\n SVGPathPaintable (SVGGeometryBox<line>) [7.75,107.75 400.5x0.5]\n SVGPathPaintable (SVGGeometryBox<line>) [7.75,157.75 400.5x0.5]\n SVGPathPaintable (SVGGeometryBox<line>) [7.75,207.75 400.5x0.5]\n SVGPathPaintable (SVGGeometryBox<line>) [7.75,257.75 400.5x0.5]\n SVGPathPaintable (SVGGeometryBox<line>) [7.75,307.75 400.5x0.5]\n SVGPathPaintable (SVGGeometryBox<line>) [7.75,357.75 400.5x0.5]\n SVGPathPaintable (SVGTextBox<text>) [18.171875,44.90625 44.4375x14]\n SVGPathPaintable (SVGTextBox<text>) [18.171875,92.96875 100.59375x15.703125]\n SVGPathPaintable (SVGTextBox<text>) [19.015625,150.90625 68.890625x14.03125]\n SVGPathPaintable (SVGTextBox<text>) [19.3125,198.328125 54.46875x15.46875]\n SVGPathPaintable (SVGTextBox<text>) [18.859375,255.75 70.625x17.515625]\n SVGPathPaintable (SVGTextBox<text>) [19.265625,288.953125 110.5x17.515625]\n SVGPathPaintable (SVGTextBox<text>) [19.3125,350.953125 126.59375x15.46875]\n \n SC for Viewport<#document> [0,0 800x600] [children: 1] (z-index: auto)\n SC for BlockContainer<HTML> [0,0 800x416] [children: 0] (z-index: auto)\n"),
TestLayoutGeometryCase(mode = "layout", html = "<!DOCTYPE html>\n<svg viewBox=\"0 0 240 80\" xmlns=\"http://www.w3.org/2000/svg\">\n \n\n <text x=\"10%\" y=\"35%\" class=\"small\">My</text>\n <text x=\"17%\" y=\"35%\" class=\"heavy\">cat</text>\n <text x=\"25%\" y=\"55%\" class=\"small\">is</text>\n <text x=\"30%\" y=\"55%\" class=\"Rrrrr\">Grumpy!</text>\n</svg>\n", css = "\n .small {\n font: italic 13px sans-serif;\n }\n .heavy {\n font: bold 30px sans-serif;\n }\n\n .Rrrrr {\n font: italic 40px serif;\n fill: red;\n }\n ", expected = " Viewport <#document> at [0,0] [0+0+0 800 0+0+0] [0+0+0 600 0+0+0] [BFC] children: not-inline\n BlockContainer <html> at [0,0] [0+0+0 800 0+0+0] [0+0+0 277.328125 0+0+0] [BFC] children: not-inline\n BlockContainer <body> at [8,8] [8+0+0 784 0+0+8] [8+0+0 261.328125 0+0+8] children: inline\n frag 0 from SVGSVGBox start: 0, length: 0, rect: [8,8 784x261.328125] baseline: 261.328125\n SVGSVGBox <svg> at [8,8] [0+0+0 784 0+0+0] [0+0+0 261.328125 0+0+0] [SVG] children: inline\n TextNode <#text> (not painted)\n SVGTextBox <text.small> at [89.46875,67.40625] [0+0+0 46.46875 0+0+0] [0+0+0 35.578125 0+0+0] children: inline\n TextNode <#text> (not painted)\n TextNode <#text> (not painted)\n SVGTextBox <text.heavy> at [146.25,35.34375] [0+0+0 145.90625 0+0+0] [0+0+0 65.453125 0+0+0] children: inline\n TextNode <#text> (not painted)\n TextNode <#text> (not painted)\n SVGTextBox <text.small> at [206.6875,119.796875] [0+0+0 32.84375 0+0+0] [0+0+0 32.671875 0+0+0] children: inline\n TextNode <#text> (not painted)\n TextNode <#text> (not painted)\n SVGTextBox <text.Rrrrr> at [249.828125,56.546875] [0+0+0 514.125 0+0+0] [0+0+0 106.03125 0+0+0] children: inline\n TextNode <#text> (not painted)\n TextNode <#text> (not painted)\n TextNode <#text> (not painted)\n \n ViewportPaintable (Viewport<#document>) [0,0 800x600]\n PaintableWithLines (BlockContainer<HTML>) [0,0 800x277.328125]\n PaintableWithLines (BlockContainer<BODY>) [8,8 784x261.328125]\n SVGSVGPaintable (SVGSVGBox<svg>) [8,8 784x261.328125]\n SVGPathPaintable (SVGTextBox<text>.small) [89.46875,67.40625 46.46875x35.578125]\n SVGPathPaintable (SVGTextBox<text>.heavy) [146.25,35.34375 145.90625x65.453125]\n SVGPathPaintable (SVGTextBox<text>.small) [206.6875,119.796875 32.84375x32.671875]\n SVGPathPaintable (SVGTextBox<text>.Rrrrr) [249.828125,56.546875 514.125x106.03125]\n \n SC for Viewport<#document> [0,0 800x600] [children: 1] (z-index: auto)\n SC for BlockContainer<HTML> [0,0 800x277.328125] [children: 0] (z-index: auto)\n"),
TestLayoutGeometryCase(mode = "layout", html = "<!DOCTYPE html>\n<svg viewBox=\"0 0 240 80\" xmlns=\"http://www.w3.org/2000/svg\">\n \n\n <text x=\"20\" y=\"35\" class=\"small\">My</text>\n <text x=\"40\" y=\"35\" class=\"heavy\">cat</text>\n <text x=\"55\" y=\"55\" class=\"small\">is</text>\n <text x=\"65\" y=\"55\" class=\"Rrrrr\">Grumpy!</text>\n</svg>\n", css = "\n .small {\n font: italic 13px sans-serif;\n }\n .heavy {\n font: bold 30px sans-serif;\n }\n\n .Rrrrr {\n font: italic 40px serif;\n fill: red;\n }\n ", expected = " Viewport <#document> at [0,0] [0+0+0 800 0+0+0] [0+0+0 600 0+0+0] [BFC] children: not-inline\n BlockContainer <html> at [0,0] [0+0+0 800 0+0+0] [0+0+0 277.328125 0+0+0] [BFC] children: not-inline\n BlockContainer <body> at [8,8] [8+0+0 784 0+0+8] [8+0+0 261.328125 0+0+8] children: inline\n frag 0 from SVGSVGBox start: 0, length: 0, rect: [8,8 784x261.328125] baseline: 261.328125\n SVGSVGBox <svg> at [8,8] [0+0+0 784 0+0+0] [0+0+0 261.328125 0+0+0] [SVG] children: inline\n TextNode <#text> (not painted)\n SVGTextBox <text.small> at [76.40625,90.28125] [0+0+0 46.46875 0+0+0] [0+0+0 35.578125 0+0+0] children: inline\n TextNode <#text> (not painted)\n TextNode <#text> (not painted)\n SVGTextBox <text.heavy> at [143.640625,58.21875] [0+0+0 145.90625 0+0+0] [0+0+0 65.453125 0+0+0] children: inline\n TextNode <#text> (not painted)\n TextNode <#text> (not painted)\n SVGTextBox <text.small> at [190.359375,155.734375] [0+0+0 32.84375 0+0+0] [0+0+0 32.671875 0+0+0] children: inline\n TextNode <#text> (not painted)\n TextNode <#text> (not painted)\n SVGTextBox <text.Rrrrr> at [226.96875,92.46875] [0+0+0 514.125 0+0+0] [0+0+0 106.03125 0+0+0] children: inline\n TextNode <#text> (not painted)\n TextNode <#text> (not painted)\n TextNode <#text> (not painted)\n \n ViewportPaintable (Viewport<#document>) [0,0 800x600]\n PaintableWithLines (BlockContainer<HTML>) [0,0 800x277.328125]\n PaintableWithLines (BlockContainer<BODY>) [8,8 784x261.328125]\n SVGSVGPaintable (SVGSVGBox<svg>) [8,8 784x261.328125]\n SVGPathPaintable (SVGTextBox<text>.small) [76.40625,90.28125 46.46875x35.578125]\n SVGPathPaintable (SVGTextBox<text>.heavy) [143.640625,58.21875 145.90625x65.453125]\n SVGPathPaintable (SVGTextBox<text>.small) [190.359375,155.734375 32.84375x32.671875]\n SVGPathPaintable (SVGTextBox<text>.Rrrrr) [226.96875,92.46875 514.125x106.03125]\n \n SC for Viewport<#document> [0,0 800x600] [children: 1] (z-index: auto)\n SC for BlockContainer<HTML> [0,0 800x277.328125] [children: 0] (z-index: auto)\n"),
TestLayoutGeometryCase(mode = "layout", html = "<!DOCTYPE html>\n\n<!-- SVG transforms test page, based on MDN examples -->\n<svg\n width=\"200px\" height=\"100px\"\n viewBox=\"0 0 150 100\"\n xmlns=\"http://www.w3.org/2000/svg\"\n xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n <g\n fill=\"grey\"\n transform=\"rotate(-10 50 100)\n translate(-36 45.5)\n skewX(40)\n scale(1 0.5)\">\n <path\n d=\"M 10,30 A 20,20 0,0,1 50,30 A 20,20 0,0,1 90,30 Q 90,60 50,90 Q 10,60 10,30 z\"\n />\n </g>\n <g\n fill=\"none\"\n stroke=\"red\"\n >\n <path\n d=\"M 10,30 A 20,20 0,0,1 50,30 A 20,20 0,0,1 90,30 Q 90,60 50,90 Q 10,60 10,30 z\" />\n </g>\n</svg>\n<svg width=\"200px\" height=\"200px\" viewBox=\"0 0 200 200\" xmlns=\"http://www.w3.org/2000/svg\">\n <rect x=\"10\" y=\"10\" width=\"30\" height=\"20\" fill=\"green\" />\n <rect\n x=\"10\"\n y=\"10\"\n width=\"30\"\n height=\"20\"\n fill=\"red\"\n transform=\"matrix(3 1 -1 3 30 40)\" />\n</svg>\n<svg width=\"200px\" height=\"200px\" viewBox=\"-5 -5 10 10\" xmlns=\"http://www.w3.org/2000/svg\">\n <rect x=\"-3\" y=\"-3\" width=\"6\" height=\"6\" />\n\n <rect x=\"-3\" y=\"-3\" width=\"6\" height=\"6\" fill=\"red\" transform=\"skewX(30)\" />\n</svg>\n<svg width=\"200px\" height=\"200px\" viewBox=\"-12 -2 34 14\" xmlns=\"http://www.w3.org/2000/svg\">\n <rect x=\"0\" y=\"0\" width=\"10\" height=\"10\" />\n\n <!-- rotation is done around the point 0,0 -->\n <rect x=\"0\" y=\"0\" width=\"10\" height=\"10\" fill=\"red\" transform=\"rotate(100)\" />\n\n <!-- rotation is done around the point 10,10 -->\n <rect\n x=\"0\"\n y=\"0\"\n width=\"10\"\n height=\"10\"\n fill=\"green\"\n transform=\"rotate(100 10 10)\" />\n</svg>\n<svg width=\"200px\" height=\"200px\" viewBox=\"-50 -50 100 100\" xmlns=\"http://www.w3.org/2000/svg\">\n <!-- uniform scale -->\n <circle cx=\"0\" cy=\"0\" r=\"10\" fill=\"red\" transform=\"scale(4)\" />\n\n <!-- vertical scale -->\n <circle cx=\"0\" cy=\"0\" r=\"10\" fill=\"yellow\" transform=\"scale(1 4)\" />\n\n <!-- horizontal scale -->\n <circle cx=\"0\" cy=\"0\" r=\"10\" fill=\"pink\" transform=\"scale(4 1)\" />\n\n <!-- No scale -->\n <circle cx=\"0\" cy=\"0\" r=\"10\" fill=\"black\" />\n</svg>\n<svg width=\"200px\" height=\"200px\" viewBox=\"-5 -5 10 10\" xmlns=\"http://www.w3.org/2000/svg\">\n <rect x=\"-3\" y=\"-3\" width=\"6\" height=\"6\" />\n\n <rect x=\"-3\" y=\"-3\" width=\"6\" height=\"6\" fill=\"red\" transform=\"skewY(30)\" />\n</svg>\n<svg width=\"200px\" height=\"200px\" viewBox=\"0 0 100 100\" xmlns=\"http://www.w3.org/2000/svg\">\n <!-- No translation -->\n <rect x=\"5\" y=\"5\" width=\"40\" height=\"40\" fill=\"green\" />\n\n <!-- Horizontal translation -->\n <rect\n x=\"5\"\n y=\"5\"\n width=\"40\"\n height=\"40\"\n fill=\"blue\"\n transform=\"translate(50)\" />\n\n <!-- Vertical translation -->\n <rect\n x=\"5\"\n y=\"5\"\n width=\"40\"\n height=\"40\"\n fill=\"red\"\n transform=\"translate(0 50)\" />\n\n <!-- Both horizontal and vertical translation -->\n <rect\n x=\"5\"\n y=\"5\"\n width=\"40\"\n height=\"40\"\n fill=\"yellow\"\n transform=\"translate(50 50)\" />\n</svg>\n", css = "\n body {\n margin: 50px;\n }\n * {\n font-family: 'SerenitySans';\n }\n", expected = " Viewport <#document> at [0,0] [0+0+0 800 0+0+0] [0+0+0 600 0+0+0] [BFC] children: not-inline\n BlockContainer <html> at [0,0] [0+0+0 800 0+0+0] [0+0+0 700 0+0+0] [BFC] children: not-inline\n BlockContainer <body> at [50,50] [50+0+0 700 0+0+50] [50+0+0 600 0+0+50] children: inline\n frag 0 from SVGSVGBox start: 0, length: 0, rect: [50,150 200x100] baseline: 100\n frag 1 from TextNode start: 0, length: 1, rect: [250,236 8x18] baseline: 13.796875\n \" \"\n frag 2 from SVGSVGBox start: 0, length: 0, rect: [258,50 200x200] baseline: 200\n frag 3 from TextNode start: 0, length: 1, rect: [458,236 8x18] baseline: 13.796875\n \" \"\n frag 4 from SVGSVGBox start: 0, length: 0, rect: [466,50 200x200] baseline: 200\n frag 5 from SVGSVGBox start: 0, length: 0, rect: [50,250 200x200] baseline: 200\n frag 6 from TextNode start: 0, length: 1, rect: [250,436 8x18] baseline: 13.796875\n \" \"\n frag 7 from SVGSVGBox start: 0, length: 0, rect: [258,250 200x200] baseline: 200\n frag 8 from TextNode start: 0, length: 1, rect: [458,436 8x18] baseline: 13.796875\n \" \"\n frag 9 from SVGSVGBox start: 0, length: 0, rect: [466,250 200x200] baseline: 200\n frag 10 from SVGSVGBox start: 0, length: 0, rect: [50,450 200x200] baseline: 200\n SVGSVGBox <svg> at [50,150] [0+0+0 200 0+0+0] [0+0+0 100 0+0+0] [SVG] children: inline\n TextNode <#text> (not painted)\n SVGGraphicsBox <g> at [45.6875,199.828125] [0+0+0 118.78125 0+0+0] [0+0+0 47.453125 0+0+0] children: inline\n TextNode <#text> (not painted)\n SVGGeometryBox <path> at [45.6875,199.828125] [0+0+0 118.78125 0+0+0] [0+0+0 47.453125 0+0+0] children: not-inline\n TextNode <#text> (not painted)\n TextNode <#text> (not painted)\n SVGGraphicsBox <g> at [84.5,159.5] [0+0+0 81 0+0+0] [0+0+0 81 0+0+0] children: inline\n TextNode <#text> (not painted)\n SVGGeometryBox <path> at [84.5,159.5] [0+0+0 81 0+0+0] [0+0+0 81 0+0+0] children: not-inline\n TextNode <#text> (not painted)\n TextNode <#text> (not painted)\n TextNode <#text> (not painted)\n SVGSVGBox <svg> at [258,50] [0+0+0 200 0+0+0] [0+0+0 200 0+0+0] [SVG] children: inline\n TextNode <#text> (not painted)\n SVGGeometryBox <rect> at [268,60] [0+0+0 30 0+0+0] [0+0+0 20 0+0+0] children: not-inline\n TextNode <#text> (not painted)\n SVGGeometryBox <rect> at [288,130] [0+0+0 110 0+0+0] [0+0+0 90 0+0+0] children: not-inline\n TextNode <#text> (not painted)\n TextNode <#text> (not painted)\n SVGSVGBox <svg> at [466,50] [0+0+0 200 0+0+0] [0+0+0 200 0+0+0] [SVG] children: inline\n TextNode <#text> (not painted)\n SVGGeometryBox <rect> at [506,90] [0+0+0 120 0+0+0] [0+0+0 120 0+0+0] children: not-inline\n TextNode <#text> (not painted)\n SVGGeometryBox <rect> at [471.359375,90] [0+0+0 189.28125 0+0+0] [0+0+0 120 0+0+0] children: not-inline\n TextNode <#text> (not painted)\n TextNode <#text> (not painted)\n SVGSVGBox <svg> at [50,250] [0+0+0 200 0+0+0] [0+0+0 200 0+0+0] [SVG] children: inline\n TextNode <#text> (not painted)\n SVGGeometryBox <rect> at [120.59375,320.578125] [0+0+0 58.828125 0+0+0] [0+0+0 58.828125 0+0+0] children: not-inline\n TextNode <#text> (not painted)\n TextNode <#text> (not painted)\n SVGGeometryBox <rect> at [52.4375,310.359375] [0+0+0 68.140625 0+0+0] [0+0+0 68.140625 0+0+0] children: not-inline\n TextNode <#text> (not painted)\n TextNode <#text> (not painted)\n SVGGeometryBox <rect> at [179.40625,321.46875] [0+0+0 68.140625 0+0+0] [0+0+0 68.140625 0+0+0] children: not-inline\n TextNode <#text> (not painted)\n TextNode <#text> (not painted)\n SVGSVGBox <svg> at [258,250] [0+0+0 200 0+0+0] [0+0+0 200 0+0+0] [SVG] children: inline\n TextNode <#text> (not painted)\n TextNode <#text> (not painted)\n SVGGeometryBox <circle> at [278,270] [0+0+0 160 0+0+0] [0+0+0 160 0+0+0] children: not-inline\n TextNode <#text> (not painted)\n TextNode <#text> (not painted)\n SVGGeometryBox <circle> at [338,270] [0+0+0 40 0+0+0] [0+0+0 160 0+0+0] children: not-inline\n TextNode <#text> (not painted)\n TextNode <#text> (not painted)\n SVGGeometryBox <circle> at [278,330] [0+0+0 160 0+0+0] [0+0+0 40 0+0+0] children: not-inline\n TextNode <#text> (not painted)\n TextNode <#text> (not painted)\n SVGGeometryBox <circle> at [338,330] [0+0+0 40 0+0+0] [0+0+0 40 0+0+0] children: not-inline\n TextNode <#text> (not painted)\n TextNode <#text> (not painted)\n SVGSVGBox <svg> at [466,250] [0+0+0 200 0+0+0] [0+0+0 200 0+0+0] [SVG] children: inline\n TextNode <#text> (not painted)\n SVGGeometryBox <rect> at [506,290] [0+0+0 120 0+0+0] [0+0+0 120 0+0+0] children: not-inline\n TextNode <#text> (not painted)\n SVGGeometryBox <rect> at [506,255.359375] [0+0+0 120 0+0+0] [0+0+0 189.28125 0+0+0] children: not-inline\n TextNode <#text> (not painted)\n TextNode <#text> (not painted)\n SVGSVGBox <svg> at [50,450] [0+0+0 200 0+0+0] [0+0+0 200 0+0+0] [SVG] children: inline\n TextNode <#text> (not painted)\n TextNode <#text> (not painted)\n SVGGeometryBox <rect> at [60,460] [0+0+0 80 0+0+0] [0+0+0 80 0+0+0] children: not-inline\n TextNode <#text> (not painted)\n TextNode <#text> (not painted)\n SVGGeometryBox <rect> at [160,460] [0+0+0 80 0+0+0] [0+0+0 80 0+0+0] children: not-inline\n TextNode <#text> (not painted)\n TextNode <#text> (not painted)\n SVGGeometryBox <rect> at [60,560] [0+0+0 80 0+0+0] [0+0+0 80 0+0+0] children: not-inline\n TextNode <#text> (not painted)\n TextNode <#text> (not painted)\n SVGGeometryBox <rect> at [160,560] [0+0+0 80 0+0+0] [0+0+0 80 0+0+0] children: not-inline\n TextNode <#text> (not painted)\n TextNode <#text> (not painted)\n \n ViewportPaintable (Viewport<#document>) [0,0 800x600] overflow: [0,0 800x700]\n PaintableWithLines (BlockContainer<HTML>) [0,0 800x700]\n PaintableWithLines (BlockContainer<BODY>) [50,50 700x600]\n SVGSVGPaintable (SVGSVGBox<svg>) [50,150 200x100]\n SVGGraphicsPaintable (SVGGraphicsBox<g>) [45.6875,199.828125 118.78125x47.453125]\n SVGPathPaintable (SVGGeometryBox<path>) [45.6875,199.828125 118.78125x47.453125]\n SVGGraphicsPaintable (SVGGraphicsBox<g>) [84.5,159.5 81x81]\n SVGPathPaintable (SVGGeometryBox<path>) [84.5,159.5 81x81]\n TextPaintable (TextNode<#text>)\n SVGSVGPaintable (SVGSVGBox<svg>) [258,50 200x200]\n SVGPathPaintable (SVGGeometryBox<rect>) [268,60 30x20]\n SVGPathPaintable (SVGGeometryBox<rect>) [288,130 110x90]\n TextPaintable (TextNode<#text>)\n SVGSVGPaintable (SVGSVGBox<svg>) [466,50 200x200]\n SVGPathPaintable (SVGGeometryBox<rect>) [506,90 120x120]\n SVGPathPaintable (SVGGeometryBox<rect>) [471.359375,90 189.28125x120]\n SVGSVGPaintable (SVGSVGBox<svg>) [50,250 200x200]\n SVGPathPaintable (SVGGeometryBox<rect>) [120.59375,320.578125 58.828125x58.828125]\n SVGPathPaintable (SVGGeometryBox<rect>) [52.4375,310.359375 68.140625x68.140625]\n SVGPathPaintable (SVGGeometryBox<rect>) [179.40625,321.46875 68.140625x68.140625]\n TextPaintable (TextNode<#text>)\n SVGSVGPaintable (SVGSVGBox<svg>) [258,250 200x200]\n SVGPathPaintable (SVGGeometryBox<circle>) [278,270 160x160]\n SVGPathPaintable (SVGGeometryBox<circle>) [338,270 40x160]\n SVGPathPaintable (SVGGeometryBox<circle>) [278,330 160x40]\n SVGPathPaintable (SVGGeometryBox<circle>) [338,330 40x40]\n TextPaintable (TextNode<#text>)\n SVGSVGPaintable (SVGSVGBox<svg>) [466,250 200x200]\n SVGPathPaintable (SVGGeometryBox<rect>) [506,290 120x120]\n SVGPathPaintable (SVGGeometryBox<rect>) [506,255.359375 120x189.28125]\n SVGSVGPaintable (SVGSVGBox<svg>) [50,450 200x200]\n SVGPathPaintable (SVGGeometryBox<rect>) [60,460 80x80]\n SVGPathPaintable (SVGGeometryBox<rect>) [160,460 80x80]\n SVGPathPaintable (SVGGeometryBox<rect>) [60,560 80x80]\n SVGPathPaintable (SVGGeometryBox<rect>) [160,560 80x80]\n \n SC for Viewport<#document> [0,0 800x600] [children: 1] (z-index: auto)\n SC for BlockContainer<HTML> [0,0 800x700] [children: 0] (z-index: auto)\n"),
TestLayoutGeometryCase(mode = "layout", html = "<!DOCTYPE html><div style=\"position: relative\"><svg width=\"200\" height=\"200\"><polygon points=\"100,10 40,180 160,180\" style=\"position:absolute; top: 100px; left: 100px;\" />", css = "", expected = " Viewport <#document> at [0,0] [0+0+0 800 0+0+0] [0+0+0 600 0+0+0] [BFC] children: not-inline\n BlockContainer <html> at [0,0] [0+0+0 800 0+0+0] [0+0+0 216 0+0+0] [BFC] children: not-inline\n BlockContainer <body> at [8,8] [8+0+0 784 0+0+8] [8+0+0 200 0+0+8] children: not-inline\n BlockContainer <div> at [8,8] positioned [0+0+0 784 0+0+0] [0+0+0 200 0+0+0] children: inline\n frag 0 from SVGSVGBox start: 0, length: 0, rect: [8,8 200x200] baseline: 200\n SVGSVGBox <svg> at [8,8] [0+0+0 200 0+0+0] [0+0+0 200 0+0+0] [SVG] children: not-inline\n SVGGeometryBox <polygon> at [48,18] [0+0+0 120 0+0+0] [0+0+0 170 0+0+0] children: not-inline\n \n ViewportPaintable (Viewport<#document>) [0,0 800x600]\n PaintableWithLines (BlockContainer<HTML>) [0,0 800x216]\n PaintableWithLines (BlockContainer<BODY>) [8,8 784x200]\n PaintableWithLines (BlockContainer<DIV>) [8,8 784x200]\n SVGSVGPaintable (SVGSVGBox<svg>) [8,8 200x200]\n SVGPathPaintable (SVGGeometryBox<polygon>) [48,18 120x170]\n \n SC for Viewport<#document> [0,0 800x600] [children: 1] (z-index: auto)\n SC for BlockContainer<HTML> [0,0 800x216] [children: 0] (z-index: auto)\n"),
TestLayoutGeometryCase(mode = "layout", html = "<!doctype html><body><svg viewBox=\"0 0 10 10\"></svg>", css = "\nbody { width: max-content; }\n", expected = " Viewport <#document> at [0,0] [0+0+0 800 0+0+0] [0+0+0 600 0+0+0] [BFC] children: not-inline\n BlockContainer <html> at [0,0] [0+0+0 800 0+0+0] [0+0+0 34 0+0+0] [BFC] children: not-inline\n BlockContainer <body> at [8,8] [8+0+0 0 0+0+792] [8+0+0 18 0+0+8] children: inline\n frag 0 from SVGSVGBox start: 0, length: 0, rect: [8,21 0x0] baseline: 0\n SVGSVGBox <svg> at [8,21] [0+0+0 0 0+0+0] [0+0+0 0 0+0+0] [SVG] children: not-inline\n \n ViewportPaintable (Viewport<#document>) [0,0 800x600]\n PaintableWithLines (BlockContainer<HTML>) [0,0 800x34]\n PaintableWithLines (BlockContainer<BODY>) [8,8 0x18]\n SVGSVGPaintable (SVGSVGBox<svg>) [8,21 0x0]\n \n SC for Viewport<#document> [0,0 800x600] [children: 1] (z-index: auto)\n SC for BlockContainer<HTML> [0,0 800x34] [children: 0] (z-index: auto)\n"),
TestLayoutGeometryCase(mode = "layout", html = "<!doctype html><body><svg viewBox=\"0 0 1 1\" style=\"position:absolute;\"><mask id=\"theMask\" maskContentUnits=\"objectBoundingBox\"><circle fill=\"white\" cx=\"0.5\" cy=\"0.5\" r=\"0.5\"></circle></mask></svg><svg width=\"100\" height=\"100\" viewBox=\"0 0 100 100\"><foreignObject x=\"0\" y=\"0\" width=\"40\" height=\"40\" mask=\"url(#theMask)\"><div id=\"lol\"></div></foreignObject></svg>", css = "\n* { outline: 1px solid black; }\n#lol {\n width: 100px;\n height: 100px;\n background: orange;\n}\n", expected = " Viewport <#document> at [0,0] [0+0+0 800 0+0+0] [0+0+0 600 0+0+0] [BFC] children: not-inline\n BlockContainer <html> at [0,0] [0+0+0 800 0+0+0] [0+0+0 116 0+0+0] [BFC] children: not-inline\n BlockContainer <body> at [8,8] [8+0+0 784 0+0+8] [8+0+0 100 0+0+8] children: inline\n frag 0 from SVGSVGBox start: 0, length: 0, rect: [8,8 100x100] baseline: 100\n SVGSVGBox <svg> at [8,8] positioned [0+0+0 800 0+0+0] [0+0+0 800 0+0+0] [SVG] children: not-inline\n SVGSVGBox <svg> at [8,8] [0+0+0 100 0+0+0] [0+0+0 100 0+0+0] [SVG] children: not-inline\n SVGForeignObjectBox <foreignObject> at [8,8] [0+0+0 40 0+0+0] [0+0+0 40 0+0+0] [BFC] children: not-inline\n BlockContainer <div#lol> at [8,8] [0+0+0 100 0+0+-60] [0+0+0 100 0+0+0] children: not-inline\n SVGMaskBox <mask#theMask> at [8,8] [0+0+0 40 0+0+0] [0+0+0 40 0+0+0] children: not-inline\n SVGGeometryBox <circle> at [8,8] [0+0+0 40 0+0+0] [0+0+0 40 0+0+0] children: not-inline\n \n ViewportPaintable (Viewport<#document>) [0,0 800x600] overflow: [0,0 808x808]\n PaintableWithLines (BlockContainer<HTML>) [0,0 800x116]\n PaintableWithLines (BlockContainer<BODY>) [8,8 784x100]\n SVGSVGPaintable (SVGSVGBox<svg>) [8,8 800x800]\n SVGSVGPaintable (SVGSVGBox<svg>) [8,8 100x100]\n SVGForeignObjectPaintable (SVGForeignObjectBox<foreignObject>) [8,8 40x40] overflow: [8,8 100x100]\n PaintableWithLines (BlockContainer<DIV>#lol) [8,8 100x100]\n \n SC for Viewport<#document> [0,0 800x600] [children: 1] (z-index: auto)\n SC for BlockContainer<HTML> [0,0 800x116] [children: 1] (z-index: auto)\n SC for SVGForeignObjectBox<foreignObject> [8,8 40x40] [children: 0] (z-index: auto)\n"),
TestLayoutGeometryCase(mode = "layout", html = "<!doctype html>\n<svg width=\"48\" height=\"48\" viewBox=\"0 0 48 48\"><foreignObject x=\"0\" y=\"0\" width=\"30\" height=\"30\"><div></div></foreignObject></svg>\n", css = "\n * { outline: 1px solid black; }\n div {\n width: 40px;\n height: 40px;\n background: orange;\n border: 5px solid red;\n }\n svg {\n display: block;\n }\n", expected = " Viewport <#document> at [0,0] [0+0+0 800 0+0+0] [0+0+0 600 0+0+0] [BFC] children: not-inline\n BlockContainer <html> at [0,0] [0+0+0 800 0+0+0] [0+0+0 64 0+0+0] [BFC] children: not-inline\n BlockContainer <body> at [8,8] [8+0+0 784 0+0+8] [8+0+0 48 0+0+8] children: not-inline\n SVGSVGBox <svg> at [8,8] [0+0+0 48 0+0+736] [0+0+0 48 0+0+0] [SVG] children: not-inline\n SVGForeignObjectBox <foreignObject> at [8,8] [0+0+0 30 0+0+0] [0+0+0 30 0+0+0] [BFC] children: not-inline\n BlockContainer <div> at [13,13] [0+5+0 40 0+5+-20] [0+5+0 40 0+5+0] children: not-inline\n BlockContainer <(anonymous)> at [8,56] [0+0+0 784 0+0+0] [0+0+0 0 0+0+0] children: inline\n TextNode <#text> (not painted)\n \n ViewportPaintable (Viewport<#document>) [0,0 800x600]\n PaintableWithLines (BlockContainer<HTML>) [0,0 800x64]\n PaintableWithLines (BlockContainer<BODY>) [8,8 784x48]\n SVGSVGPaintable (SVGSVGBox<svg>) [8,8 48x48]\n SVGForeignObjectPaintable (SVGForeignObjectBox<foreignObject>) [8,8 30x30] overflow: [8,8 50x50]\n PaintableWithLines (BlockContainer<DIV>) [8,8 50x50]\n PaintableWithLines (BlockContainer(anonymous)) [8,56 784x0]\n \n SC for Viewport<#document> [0,0 800x600] [children: 1] (z-index: auto)\n SC for BlockContainer<HTML> [0,0 800x64] [children: 1] (z-index: auto)\n SC for SVGForeignObjectBox<foreignObject> [8,8 30x30] [children: 0] (z-index: auto)\n"),
TestLayoutGeometryCase(mode = "layout", html = "<!doctype HTML>\n\n<svg style=\"display: block\">\n <foreignObject width=100 height=200>\n <div class=\"el\"></div>\n </foreignObject>\n</svg>\n", css = "\n .el {\n width: 50px;\n height: 60px;\n position: absolute;\n }\n\n", expected = " Viewport <#document> at [0,0] [0+0+0 800 0+0+0] [0+0+0 600 0+0+0] [BFC] children: not-inline\n BlockContainer <html> at [0,0] [0+0+0 800 0+0+0] [0+0+0 166 0+0+0] [BFC] children: not-inline\n BlockContainer <body> at [8,8] [8+0+0 784 0+0+8] [8+0+0 150 0+0+8] children: not-inline\n SVGSVGBox <svg> at [8,8] [0+0+0 300 0+0+484] [0+0+0 150 0+0+0] [SVG] children: not-inline\n BlockContainer <(anonymous)> (not painted) children: inline\n TextNode <#text> (not painted)\n SVGForeignObjectBox <foreignObject> at [8,8] [0+0+0 100 0+0+0] [0+0+0 200 0+0+0] [BFC] children: not-inline\n BlockContainer <(anonymous)> at [8,8] [0+0+0 100 0+0+0] [0+0+0 0 0+0+0] children: inline\n TextNode <#text> (not painted)\n BlockContainer <div.el> at [8,8] positioned [0+0+0 50 0+0+0] [0+0+0 60 0+0+0] [BFC] children: not-inline\n TextNode <#text> (not painted)\n BlockContainer <(anonymous)> (not painted) children: inline\n TextNode <#text> (not painted)\n BlockContainer <(anonymous)> at [8,158] [0+0+0 784 0+0+0] [0+0+0 0 0+0+0] children: inline\n TextNode <#text> (not painted)\n \n ViewportPaintable (Viewport<#document>) [0,0 800x600]\n PaintableWithLines (BlockContainer<HTML>) [0,0 800x166]\n PaintableWithLines (BlockContainer<BODY>) [8,8 784x150]\n SVGSVGPaintable (SVGSVGBox<svg>) [8,8 300x150] overflow: [8,8 300x200]\n SVGForeignObjectPaintable (SVGForeignObjectBox<foreignObject>) [8,8 100x200]\n PaintableWithLines (BlockContainer(anonymous)) [8,8 100x0]\n PaintableWithLines (BlockContainer<DIV>.el) [8,8 50x60]\n PaintableWithLines (BlockContainer(anonymous)) [8,158 784x0]\n \n SC for Viewport<#document> [0,0 800x600] [children: 1] (z-index: auto)\n SC for BlockContainer<HTML> [0,0 800x166] [children: 1] (z-index: auto)\n SC for SVGForeignObjectBox<foreignObject> [8,8 100x200] [children: 0] (z-index: auto)\n"),
TestLayoutGeometryCase(mode = "layout", html = "<!doctype html>\n<style>\n * {\n background: #888;\n outline: 1px solid black;\n }\n .lmao {\n width: 40px;\n height: 40px;\n background: orange;\n border: 5px solid red;\n }\n svg {\n display: block;\n }\n </style\n><svg width=\"48\" height=\"48\" viewBox=\"-8 -8 48 48\">\n <defs><rect x=\"0\" y=\"0\" width=\"48\" height=\"48\" id=\"rekt\" /></defs>\n <mask id=\"rektMask\" x=\"0\" y=\"0\" width=\"40\" height=\"40\">\n <use href=\"#rekt\" fill=\"white\"></use>\n </mask>\n <foreignObject mask=\"url(#rektMask)\" x=\"10\" y=\"20\" width=\"40\" height=\"40\"\n ><div class=\"lmao\"></div\n ></foreignObject></svg>\n", css = "", expected = " Viewport <#document> at [0,0] [0+0+0 800 0+0+0] [0+0+0 600 0+0+0] [BFC] children: not-inline\n BlockContainer <html> at [0,0] [0+0+0 800 0+0+0] [0+0+0 64 0+0+0] [BFC] children: not-inline\n BlockContainer <body> at [8,8] [8+0+0 784 0+0+8] [8+0+0 48 0+0+8] children: not-inline\n SVGSVGBox <svg> at [8,8] [0+0+0 48 0+0+736] [0+0+0 48 0+0+0] [SVG] children: not-inline\n BlockContainer <(anonymous)> (not painted) children: inline\n TextNode <#text> (not painted)\n TextNode <#text> (not painted)\n TextNode <#text> (not painted)\n SVGForeignObjectBox <foreignObject> at [26,36] [0+0+0 40 0+0+0] [0+0+0 40 0+0+0] [BFC] children: not-inline\n BlockContainer <div.lmao> at [31,41] [0+5+0 40 0+5+-10] [0+5+0 40 0+5+0] children: not-inline\n SVGMaskBox <mask#rektMask> at [16,16] [0+0+0 48 0+0+0] [0+0+0 48 0+0+0] children: inline\n TextNode <#text> (not painted)\n SVGGraphicsBox <use> at [16,16] [0+0+0 48 0+0+0] [0+0+0 48 0+0+0] children: not-inline\n SVGGeometryBox <rect#rekt> at [16,16] [0+0+0 48 0+0+0] [0+0+0 48 0+0+0] children: not-inline\n TextNode <#text> (not painted)\n BlockContainer <(anonymous)> at [8,56] [0+0+0 784 0+0+0] [0+0+0 0 0+0+0] children: inline\n TextNode <#text> (not painted)\n \n ViewportPaintable (Viewport<#document>) [0,0 800x600]\n PaintableWithLines (BlockContainer<HTML>) [0,0 800x64]\n PaintableWithLines (BlockContainer<BODY>) [8,8 784x48]\n SVGSVGPaintable (SVGSVGBox<svg>) [8,8 48x48] overflow: [8,8 58x68]\n SVGForeignObjectPaintable (SVGForeignObjectBox<foreignObject>) [26,36 40x40] overflow: [26,36 50x50]\n PaintableWithLines (BlockContainer<DIV>.lmao) [26,36 50x50]\n PaintableWithLines (BlockContainer(anonymous)) [8,56 784x0]\n \n SC for Viewport<#document> [0,0 800x600] [children: 1] (z-index: auto)\n SC for BlockContainer<HTML> [0,0 800x64] [children: 1] (z-index: auto)\n SC for SVGForeignObjectBox<foreignObject> [26,36 40x40] [children: 0] (z-index: auto)\n"),
TestLayoutGeometryCase(mode = "layout", html = "<!doctype html><body><svg width=\"64\" height=\"64\" viewBox=\"0 0 10 10\" ><rect x=\"0\" y=\"0\" width=\"10\" height=\"10\" fill=\"green\"></rect></svg>\n", css = "\n * {\n outline: 1px solid black;\n }\n body {\n height: 128px;\n width: 128px;\n }\n svg {\n width: auto;\n height: auto;\n display: block;\n }\n", expected = " Viewport <#document> at [0,0] [0+0+0 800 0+0+0] [0+0+0 600 0+0+0] [BFC] children: not-inline\n BlockContainer <html> at [0,0] [0+0+0 800 0+0+0] [0+0+0 144 0+0+0] [BFC] children: not-inline\n BlockContainer <body> at [8,8] [8+0+0 128 0+0+664] [8+0+0 128 0+0+8] children: not-inline\n SVGSVGBox <svg> at [8,8] [0+0+0 64 0+0+64] [0+0+0 64 0+0+0] [SVG] children: not-inline\n SVGGeometryBox <rect> at [8,8] [0+0+0 64 0+0+0] [0+0+0 64 0+0+0] children: not-inline\n BlockContainer <(anonymous)> at [8,72] [0+0+0 128 0+0+0] [0+0+0 0 0+0+0] children: inline\n TextNode <#text> (not painted)\n \n ViewportPaintable (Viewport<#document>) [0,0 800x600]\n PaintableWithLines (BlockContainer<HTML>) [0,0 800x144]\n PaintableWithLines (BlockContainer<BODY>) [8,8 128x128]\n SVGSVGPaintable (SVGSVGBox<svg>) [8,8 64x64]\n SVGPathPaintable (SVGGeometryBox<rect>) [8,8 64x64]\n PaintableWithLines (BlockContainer(anonymous)) [8,72 128x0]\n \n SC for Viewport<#document> [0,0 800x600] [children: 1] (z-index: auto)\n SC for BlockContainer<HTML> [0,0 800x144] [children: 0] (z-index: auto)\n"),
TestLayoutGeometryCase(mode = "layout", html = "<!DOCTYPE html>\n<svg id=\"a\" viewBox=\"0 0 10 10\" width=\"200\" height=\"200\">\n <svg id=\"b\" viewBox=\"0 0 6 6\">\n <svg id=\"c\" viewBox=\"-1 -1 10 10\" width=\"8\" height=\"8\">\n <rect x=\"0\" y=\"0\" width=\"10\" height=\"10\" fill=\"red\"></rect>\n <rect x=\"0\" y=\"0\" width=\"5\" height=\"5\" fill=\"blue\"></rect>\n </svg>\n </svg>\n</svg>\n", css = "", expected = " Viewport <#document> at [0,0] [0+0+0 800 0+0+0] [0+0+0 600 0+0+0] [BFC] children: not-inline\n BlockContainer <html> at [0,0] [0+0+0 800 0+0+0] [0+0+0 216 0+0+0] [BFC] children: not-inline\n BlockContainer <body> at [8,8] [8+0+0 784 0+0+8] [8+0+0 200 0+0+8] children: inline\n frag 0 from SVGSVGBox start: 0, length: 0, rect: [8,8 200x200] baseline: 200\n SVGSVGBox <svg#a> at [8,8] [0+0+0 200 0+0+0] [0+0+0 200 0+0+0] [SVG] children: inline\n TextNode <#text> (not painted)\n SVGSVGBox <svg#b> at [8,8] [0+0+0 200 0+0+0] [0+0+0 200 0+0+0] [SVG] children: inline\n TextNode <#text> (not painted)\n SVGSVGBox <svg#c> at [8,8] [0+0+0 266.671875 0+0+0] [0+0+0 266.671875 0+0+0] [SVG] children: inline\n TextNode <#text> (not painted)\n SVGGeometryBox <rect> at [34.671875,34.671875] [0+0+0 266.671875 0+0+0] [0+0+0 266.671875 0+0+0] children: not-inline\n TextNode <#text> (not painted)\n SVGGeometryBox <rect> at [34.671875,34.671875] [0+0+0 133.34375 0+0+0] [0+0+0 133.34375 0+0+0] children: not-inline\n TextNode <#text> (not painted)\n TextNode <#text> (not painted)\n TextNode <#text> (not painted)\n TextNode <#text> (not painted)\n \n ViewportPaintable (Viewport<#document>) [0,0 800x600]\n PaintableWithLines (BlockContainer<HTML>) [0,0 800x216]\n PaintableWithLines (BlockContainer<BODY>) [8,8 784x200]\n SVGSVGPaintable (SVGSVGBox<svg>#a) [8,8 200x200]\n SVGSVGPaintable (SVGSVGBox<svg>#b) [8,8 200x200] overflow: [8,8 266.671875x266.671875]\n SVGSVGPaintable (SVGSVGBox<svg>#c) [8,8 266.671875x266.671875] overflow: [8,8 293.34375x293.34375]\n SVGPathPaintable (SVGGeometryBox<rect>) [34.671875,34.671875 266.671875x266.671875]\n SVGPathPaintable (SVGGeometryBox<rect>) [34.671875,34.671875 133.34375x133.34375]\n \n SC for Viewport<#document> [0,0 800x600] [children: 1] (z-index: auto)\n SC for BlockContainer<HTML> [0,0 800x216] [children: 0] (z-index: auto)\n"),
TestLayoutGeometryCase(mode = "layout", html = "<!DOCTYPE html>\n<svg width=\"400\" height=\"400\">\n <mask id=\"myMask\" maskContentUnits=\"objectBoundingBox\">\n <rect x=\"0\" y=\"0\" width=\"1\" height=\"1\" fill=\"white\"/>\n <circle cx=\"0.5\" cy=\"0.5\" r=\"0.4\" fill=\"black\"/>\n </mask>\n <rect x=\"0\" y=\"0\" width=\"200\" height=\"200\" fill=\"green\" mask=\"url(#myMask)\"/>\n <rect x=\"200\" y=\"200\" width=\"200\" height=\"100\" fill=\"red\" mask=\"url(#myMask)\"/>\n</svg>\n", css = "", expected = " Viewport <#document> at [0,0] [0+0+0 800 0+0+0] [0+0+0 600 0+0+0] [BFC] children: not-inline\n BlockContainer <html> at [0,0] [0+0+0 800 0+0+0] [0+0+0 416 0+0+0] [BFC] children: not-inline\n BlockContainer <body> at [8,8] [8+0+0 784 0+0+8] [8+0+0 400 0+0+8] children: inline\n frag 0 from SVGSVGBox start: 0, length: 0, rect: [8,8 400x400] baseline: 400\n SVGSVGBox <svg> at [8,8] [0+0+0 400 0+0+0] [0+0+0 400 0+0+0] [SVG] children: inline\n TextNode <#text> (not painted)\n TextNode <#text> (not painted)\n SVGGeometryBox <rect> at [8,8] [0+0+0 200 0+0+0] [0+0+0 200 0+0+0] children: not-inline\n SVGMaskBox <mask#myMask> at [8,8] [0+0+0 200 0+0+0] [0+0+0 200 0+0+0] children: inline\n TextNode <#text> (not painted)\n SVGGeometryBox <rect> at [8,8] [0+0+0 200 0+0+0] [0+0+0 200 0+0+0] children: not-inline\n TextNode <#text> (not painted)\n SVGGeometryBox <circle> at [26.75,26.75] [0+0+0 162.5 0+0+0] [0+0+0 162.5 0+0+0] children: not-inline\n TextNode <#text> (not painted)\n TextNode <#text> (not painted)\n SVGGeometryBox <rect> at [208,208] [0+0+0 200 0+0+0] [0+0+0 100 0+0+0] children: not-inline\n SVGMaskBox <mask#myMask> at [208,208] [0+0+0 200 0+0+0] [0+0+0 100 0+0+0] children: inline\n TextNode <#text> (not painted)\n SVGGeometryBox <rect> at [208,208] [0+0+0 200 0+0+0] [0+0+0 100 0+0+0] children: not-inline\n TextNode <#text> (not painted)\n SVGGeometryBox <circle> at [226.75,217.375] [0+0+0 162.5 0+0+0] [0+0+0 81.25 0+0+0] children: not-inline\n TextNode <#text> (not painted)\n TextNode <#text> (not painted)\n TextNode <#text> (not painted)\n \n ViewportPaintable (Viewport<#document>) [0,0 800x600]\n PaintableWithLines (BlockContainer<HTML>) [0,0 800x416]\n PaintableWithLines (BlockContainer<BODY>) [8,8 784x400]\n SVGSVGPaintable (SVGSVGBox<svg>) [8,8 400x400]\n SVGPathPaintable (SVGGeometryBox<rect>) [8,8 200x200]\n SVGPathPaintable (SVGGeometryBox<rect>) [208,208 200x100]\n \n SC for Viewport<#document> [0,0 800x600] [children: 1] (z-index: auto)\n SC for BlockContainer<HTML> [0,0 800x416] [children: 0] (z-index: auto)\n"),
TestLayoutGeometryCase(mode = "layout", html = "<!doctype html><svg xmlns=\"http://www.w3.org/2000/svg\" width=\"300\" height=\"200\" viewBox=\"0 0 64 32\" version=\"1.1\"><rect x=\"25%\" y=\"50%\" width=\"33%\" height=\"66%\" rx=\"5%\" ry=\"10%\" fill=\"red\"></rect></svg>\n", css = "", expected = " Viewport <#document> at [0,0] [0+0+0 800 0+0+0] [0+0+0 600 0+0+0] [BFC] children: not-inline\n BlockContainer <html> at [0,0] [0+0+0 800 0+0+0] [0+0+0 216 0+0+0] [BFC] children: not-inline\n BlockContainer <body> at [8,8] [8+0+0 784 0+0+8] [8+0+0 200 0+0+8] children: inline\n frag 0 from SVGSVGBox start: 0, length: 0, rect: [8,8 300x200] baseline: 200\n SVGSVGBox <svg> at [8,8] [0+0+0 300 0+0+0] [0+0+0 200 0+0+0] [SVG] children: not-inline\n SVGGeometryBox <rect> at [83,108] [0+0+0 99 0+0+0] [0+0+0 99 0+0+0] children: not-inline\n TextNode <#text> (not painted)\n \n ViewportPaintable (Viewport<#document>) [0,0 800x600]\n PaintableWithLines (BlockContainer<HTML>) [0,0 800x216]\n PaintableWithLines (BlockContainer<BODY>) [8,8 784x200]\n SVGSVGPaintable (SVGSVGBox<svg>) [8,8 300x200]\n SVGPathPaintable (SVGGeometryBox<rect>) [83,108 99x99]\n \n SC for Viewport<#document> [0,0 800x600] [children: 1] (z-index: auto)\n SC for BlockContainer<HTML> [0,0 800x216] [children: 0] (z-index: auto)\n"),
TestLayoutGeometryCase(mode = "layout", html = "<!DOCTYPE html><svg height=\"350\" width=\"100%\"><circle\n cx=\"50%\"\n cy=\"170\"\n r=\"150\"\n fill=\"black\"\n></circle></svg>\n", css = "", expected = " Viewport <#document> at [0,0] [0+0+0 800 0+0+0] [0+0+0 600 0+0+0] [BFC] children: not-inline\n BlockContainer <html> at [0,0] [0+0+0 800 0+0+0] [0+0+0 366 0+0+0] [BFC] children: not-inline\n BlockContainer <body> at [8,8] [8+0+0 784 0+0+8] [8+0+0 350 0+0+8] children: inline\n frag 0 from SVGSVGBox start: 0, length: 0, rect: [8,8 784x350] baseline: 350\n SVGSVGBox <svg> at [8,8] [0+0+0 784 0+0+0] [0+0+0 350 0+0+0] [SVG] children: not-inline\n SVGGeometryBox <circle> at [250,28] [0+0+0 300 0+0+0] [0+0+0 300 0+0+0] children: not-inline\n TextNode <#text> (not painted)\n \n ViewportPaintable (Viewport<#document>) [0,0 800x600]\n PaintableWithLines (BlockContainer<HTML>) [0,0 800x366]\n PaintableWithLines (BlockContainer<BODY>) [8,8 784x350]\n SVGSVGPaintable (SVGSVGBox<svg>) [8,8 784x350]\n SVGPathPaintable (SVGGeometryBox<circle>) [250,28 300x300]\n \n SC for Viewport<#document> [0,0 800x600] [children: 1] (z-index: auto)\n SC for BlockContainer<HTML> [0,0 800x366] [children: 0] (z-index: auto)\n"),
TestLayoutGeometryCase(mode = "layout", html = "<!DOCTYPE html>\n<svg viewBox=\"0 0 100 100\" xmlns=\"http://www.w3.org/2000/svg\">\n <circle\n cx=\"40\"\n cy=\"40\"\n r=\"25\"\n stroke-opacity=\"50%\"\n fill-opacity=\"20%\"\n stroke=\"green\"\n opacity=\"90%\"\n stroke-width=\"20\" />\n</svg>\n", css = "", expected = " Viewport <#document> at [0,0] [0+0+0 800 0+0+0] [0+0+0 600 0+0+0] [BFC] children: not-inline\n BlockContainer <html> at [0,0] [0+0+0 800 0+0+0] [0+0+0 800 0+0+0] [BFC] children: not-inline\n BlockContainer <body> at [8,8] [8+0+0 784 0+0+8] [8+0+0 784 0+0+8] children: inline\n frag 0 from SVGSVGBox start: 0, length: 0, rect: [8,8 784x784] baseline: 784\n SVGSVGBox <svg> at [8,8] [0+0+0 784 0+0+0] [0+0+0 784 0+0+0] [SVG] children: inline\n TextNode <#text> (not painted)\n SVGGeometryBox <circle> at [47.203125,47.203125] [0+0+0 548.796875 0+0+0] [0+0+0 548.796875 0+0+0] children: not-inline\n TextNode <#text> (not painted)\n TextNode <#text> (not painted)\n \n ViewportPaintable (Viewport<#document>) [0,0 800x600] overflow: [0,0 800x800]\n PaintableWithLines (BlockContainer<HTML>) [0,0 800x800]\n PaintableWithLines (BlockContainer<BODY>) [8,8 784x784]\n SVGSVGPaintable (SVGSVGBox<svg>) [8,8 784x784]\n SVGPathPaintable (SVGGeometryBox<circle>) [47.203125,47.203125 548.796875x548.796875]\n \n SC for Viewport<#document> [0,0 800x600] [children: 1] (z-index: auto)\n SC for BlockContainer<HTML> [0,0 800x800] [children: 0] (z-index: auto)\n"),
TestLayoutGeometryCase(mode = "layout", html = "<!doctype html><svg viewBox=\"0 0 100 100\"><rect x=0 y=0 width=100 height=100 fill=\"url(#bogus)\"></svg>", css = "\n* { font: 20px SerenitySans; }\n", expected = " Viewport <#document> at [0,0] [0+0+0 800 0+0+0] [0+0+0 600 0+0+0] [BFC] children: not-inline\n BlockContainer <html> at [0,0] [0+0+0 800 0+0+0] [0+0+0 800 0+0+0] [BFC] children: not-inline\n BlockContainer <body> at [8,8] [8+0+0 784 0+0+8] [8+0+0 784 0+0+8] children: inline\n frag 0 from SVGSVGBox start: 0, length: 0, rect: [8,8 784x784] baseline: 784\n SVGSVGBox <svg> at [8,8] [0+0+0 784 0+0+0] [0+0+0 784 0+0+0] [SVG] children: not-inline\n SVGGeometryBox <rect> at [8,8] [0+0+0 784 0+0+0] [0+0+0 784 0+0+0] children: not-inline\n \n ViewportPaintable (Viewport<#document>) [0,0 800x600] overflow: [0,0 800x800]\n PaintableWithLines (BlockContainer<HTML>) [0,0 800x800]\n PaintableWithLines (BlockContainer<BODY>) [8,8 784x784]\n SVGSVGPaintable (SVGSVGBox<svg>) [8,8 784x784]\n SVGPathPaintable (SVGGeometryBox<rect>) [8,8 784x784]\n \n SC for Viewport<#document> [0,0 800x600] [children: 1] (z-index: auto)\n SC for BlockContainer<HTML> [0,0 800x800] [children: 0] (z-index: auto)\n"),
TestLayoutGeometryCase(mode = "layout", html = "<!DOCTYPE html>\n<svg width=\"100\" height=\"100\"><foreignObject width=\"100\" height=\"100\"><div>foo\n", css = "", expected = " Viewport <#document> at [0,0] [0+0+0 800 0+0+0] [0+0+0 600 0+0+0] [BFC] children: not-inline\n BlockContainer <html> at [0,0] [0+0+0 800 0+0+0] [0+0+0 116 0+0+0] [BFC] children: not-inline\n BlockContainer <body> at [8,8] [8+0+0 784 0+0+8] [8+0+0 100 0+0+8] children: inline\n frag 0 from SVGSVGBox start: 0, length: 0, rect: [8,8 100x100] baseline: 100\n SVGSVGBox <svg> at [8,8] [0+0+0 100 0+0+0] [0+0+0 100 0+0+0] [SVG] children: not-inline\n SVGForeignObjectBox <foreignObject> at [8,8] [0+0+0 100 0+0+0] [0+0+0 100 0+0+0] [BFC] children: not-inline\n BlockContainer <div> at [8,8] [0+0+0 100 0+0+0] [0+0+0 18 0+0+0] children: inline\n frag 0 from TextNode start: 0, length: 3, rect: [8,8 27.15625x18] baseline: 13.796875\n \"foo\"\n TextNode <#text> (not painted)\n \n ViewportPaintable (Viewport<#document>) [0,0 800x600]\n PaintableWithLines (BlockContainer<HTML>) [0,0 800x116]\n PaintableWithLines (BlockContainer<BODY>) [8,8 784x100]\n SVGSVGPaintable (SVGSVGBox<svg>) [8,8 100x100]\n SVGForeignObjectPaintable (SVGForeignObjectBox<foreignObject>) [8,8 100x100]\n PaintableWithLines (BlockContainer<DIV>) [8,8 100x18]\n TextPaintable (TextNode<#text>)\n \n SC for Viewport<#document> [0,0 800x600] [children: 1] (z-index: auto)\n SC for BlockContainer<HTML> [0,0 800x116] [children: 1] (z-index: auto)\n SC for SVGForeignObjectBox<foreignObject> [8,8 100x100] [children: 0] (z-index: auto)\n"),
TestLayoutGeometryCase(mode = "layout", html = "<!DOCTYPE html>\n<svg width=\"100\" height=\"100\">\n <!-- Both <g> elements should have the same size -->\n <g>\n <g>\n <rect x=\"50\" y=\"50\" height=\"10\" width=\"10\" />\n </g>\n </g>\n</svg>\n", css = "", expected = " Viewport <#document> at [0,0] [0+0+0 800 0+0+0] [0+0+0 600 0+0+0] [BFC] children: not-inline\n BlockContainer <html> at [0,0] [0+0+0 800 0+0+0] [0+0+0 116 0+0+0] [BFC] children: not-inline\n BlockContainer <body> at [8,8] [8+0+0 784 0+0+8] [8+0+0 100 0+0+8] children: inline\n frag 0 from SVGSVGBox start: 0, length: 0, rect: [8,8 100x100] baseline: 100\n SVGSVGBox <svg> at [8,8] [0+0+0 100 0+0+0] [0+0+0 100 0+0+0] [SVG] children: inline\n TextNode <#text> (not painted)\n TextNode <#text> (not painted)\n SVGGraphicsBox <g> at [58,58] [0+0+0 10 0+0+0] [0+0+0 10 0+0+0] children: inline\n TextNode <#text> (not painted)\n SVGGraphicsBox <g> at [58,58] [0+0+0 10 0+0+0] [0+0+0 10 0+0+0] children: inline\n TextNode <#text> (not painted)\n SVGGeometryBox <rect> at [58,58] [0+0+0 10 0+0+0] [0+0+0 10 0+0+0] children: not-inline\n TextNode <#text> (not painted)\n TextNode <#text> (not painted)\n TextNode <#text> (not painted)\n TextNode <#text> (not painted)\n \n ViewportPaintable (Viewport<#document>) [0,0 800x600]\n PaintableWithLines (BlockContainer<HTML>) [0,0 800x116]\n PaintableWithLines (BlockContainer<BODY>) [8,8 784x100]\n SVGSVGPaintable (SVGSVGBox<svg>) [8,8 100x100]\n SVGGraphicsPaintable (SVGGraphicsBox<g>) [58,58 10x10]\n SVGGraphicsPaintable (SVGGraphicsBox<g>) [58,58 10x10]\n SVGPathPaintable (SVGGeometryBox<rect>) [58,58 10x10]\n \n SC for Viewport<#document> [0,0 800x600] [children: 1] (z-index: auto)\n SC for BlockContainer<HTML> [0,0 800x116] [children: 0] (z-index: auto)\n"),
TestLayoutGeometryCase(mode = "layout", html = "<!DOCTYPE html>\n<svg viewBox=\"0 0 100 100\" xmlns=\"http://www.w3.org/2000/svg\">\n <g fill=\"white\" stroke=\"green\" opacity=\"0.6\">\n <circle cx=\"40\" cy=\"40\" r=\"25\" />\n <circle cx=\"60\" cy=\"60\" r=\"25\" />\n </g>\n</svg>\n", css = "", expected = " Viewport <#document> at [0,0] [0+0+0 800 0+0+0] [0+0+0 600 0+0+0] [BFC] children: not-inline\n BlockContainer <html> at [0,0] [0+0+0 800 0+0+0] [0+0+0 800 0+0+0] [BFC] children: not-inline\n BlockContainer <body> at [8,8] [8+0+0 784 0+0+8] [8+0+0 784 0+0+8] children: inline\n frag 0 from SVGSVGBox start: 0, length: 0, rect: [8,8 784x784] baseline: 784\n SVGSVGBox <svg> at [8,8] [0+0+0 784 0+0+0] [0+0+0 784 0+0+0] [SVG] children: inline\n TextNode <#text> (not painted)\n SVGGraphicsBox <g> at [121.671875,121.671875] [0+0+0 556.65625 0+0+0] [0+0+0 556.65625 0+0+0] children: inline\n TextNode <#text> (not painted)\n SVGGeometryBox <circle> at [121.671875,121.671875] [0+0+0 399.84375 0+0+0] [0+0+0 399.84375 0+0+0] children: not-inline\n TextNode <#text> (not painted)\n SVGGeometryBox <circle> at [278.484375,278.484375] [0+0+0 399.84375 0+0+0] [0+0+0 399.84375 0+0+0] children: not-inline\n TextNode <#text> (not painted)\n TextNode <#text> (not painted)\n TextNode <#text> (not painted)\n \n ViewportPaintable (Viewport<#document>) [0,0 800x600] overflow: [0,0 800x800]\n PaintableWithLines (BlockContainer<HTML>) [0,0 800x800]\n PaintableWithLines (BlockContainer<BODY>) [8,8 784x784]\n SVGSVGPaintable (SVGSVGBox<svg>) [8,8 784x784]\n SVGGraphicsPaintable (SVGGraphicsBox<g>) [121.671875,121.671875 556.65625x556.65625]\n SVGPathPaintable (SVGGeometryBox<circle>) [121.671875,121.671875 399.84375x399.84375]\n SVGPathPaintable (SVGGeometryBox<circle>) [278.484375,278.484375 399.84375x399.84375]\n \n SC for Viewport<#document> [0,0 800x600] [children: 1] (z-index: auto)\n SC for BlockContainer<HTML> [0,0 800x800] [children: 0] (z-index: auto)\n"),
TestLayoutGeometryCase(mode = "layout", html = "<!doctype html>\n\n<div id=\"a\">\n <div id=\"b\">\n <svg viewBox=\"0 0 100 50\">\n", css = "\n #a {\n background-color: #f00;\n height: 50px;\n width: 100px;\n }\n #b {\n display: inline-block;\n height: 100%;\n }\n svg {\n background-color: #0f0;\n height: 100%;\n }\n", expected = " Viewport <#document> at [0,0] [0+0+0 800 0+0+0] [0+0+0 600 0+0+0] [BFC] children: not-inline\n BlockContainer <html> at [0,0] [0+0+0 800 0+0+0] [0+0+0 66 0+0+0] [BFC] children: not-inline\n BlockContainer <body> at [8,8] [8+0+0 784 0+0+8] [8+0+0 50 0+0+8] children: not-inline\n BlockContainer <div#a> at [8,8] [0+0+0 100 0+0+684] [0+0+0 50 0+0+0] children: inline\n frag 0 from BlockContainer start: 0, length: 0, rect: [8,8 100x50] baseline: 50\n TextNode <#text> (not painted)\n BlockContainer <div#b> at [8,8] inline-block [0+0+0 100 0+0+0] [0+0+0 50 0+0+0] [BFC] children: inline\n frag 0 from SVGSVGBox start: 0, length: 0, rect: [8,8 100x50] baseline: 50\n TextNode <#text> (not painted)\n SVGSVGBox <svg> at [8,8] [0+0+0 100 0+0+0] [0+0+0 50 0+0+0] [SVG] children: inline\n TextNode <#text> (not painted)\n \n ViewportPaintable (Viewport<#document>) [0,0 800x600]\n PaintableWithLines (BlockContainer<HTML>) [0,0 800x66]\n PaintableWithLines (BlockContainer<BODY>) [8,8 784x50]\n PaintableWithLines (BlockContainer<DIV>#a) [8,8 100x50]\n PaintableWithLines (BlockContainer<DIV>#b) [8,8 100x50]\n SVGSVGPaintable (SVGSVGBox<svg>) [8,8 100x50]\n \n SC for Viewport<#document> [0,0 800x600] [children: 1] (z-index: auto)\n SC for BlockContainer<HTML> [0,0 800x66] [children: 0] (z-index: auto)\n"),
TestLayoutGeometryCase(mode = "layout", html = "<!DOCTYPE html>\n<svg xmlns=\"http://www.w3.org/2000/svg\"\n xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n <svg x=\"10\">\n <rect x=\"10\" y=\"10\" height=\"100\" width=\"100\"\n style=\"stroke:#ff0000; fill: #0000ff\"/>\n </svg>\n <svg x=\"200\" y=\"15\">\n <rect x=\"10\" y=\"10\" height=\"100\" width=\"100\"\n style=\"stroke:#009900; fill: #00cc00\"/>\n </svg>\n</svg>\n", css = "", expected = " Viewport <#document> at [0,0] [0+0+0 800 0+0+0] [0+0+0 600 0+0+0] [BFC] children: not-inline\n BlockContainer <html> at [0,0] [0+0+0 800 0+0+0] [0+0+0 166 0+0+0] [BFC] children: not-inline\n BlockContainer <body> at [8,8] [8+0+0 784 0+0+8] [8+0+0 150 0+0+8] children: inline\n frag 0 from SVGSVGBox start: 0, length: 0, rect: [8,8 300x150] baseline: 150\n SVGSVGBox <svg> at [8,8] [0+0+0 300 0+0+0] [0+0+0 150 0+0+0] [SVG] children: inline\n TextNode <#text> (not painted)\n SVGSVGBox <svg> at [18,8] [0+0+0 300 0+0+0] [0+0+0 150 0+0+0] [SVG] children: inline\n TextNode <#text> (not painted)\n SVGGeometryBox <rect> at [27.5,17.5] [0+0+0 101 0+0+0] [0+0+0 101 0+0+0] children: not-inline\n TextNode <#text> (not painted)\n TextNode <#text> (not painted)\n SVGSVGBox <svg> at [208,23] [0+0+0 300 0+0+0] [0+0+0 150 0+0+0] [SVG] children: inline\n TextNode <#text> (not painted)\n SVGGeometryBox <rect> at [217.5,32.5] [0+0+0 101 0+0+0] [0+0+0 101 0+0+0] children: not-inline\n TextNode <#text> (not painted)\n TextNode <#text> (not painted)\n TextNode <#text> (not painted)\n \n ViewportPaintable (Viewport<#document>) [0,0 800x600]\n PaintableWithLines (BlockContainer<HTML>) [0,0 800x166]\n PaintableWithLines (BlockContainer<BODY>) [8,8 784x150]\n SVGSVGPaintable (SVGSVGBox<svg>) [8,8 300x150] overflow: [8,8 500x165]\n SVGSVGPaintable (SVGSVGBox<svg>) [18,8 300x150]\n SVGPathPaintable (SVGGeometryBox<rect>) [27.5,17.5 101x101]\n SVGSVGPaintable (SVGSVGBox<svg>) [208,23 300x150]\n SVGPathPaintable (SVGGeometryBox<rect>) [217.5,32.5 101x101]\n \n SC for Viewport<#document> [0,0 800x600] [children: 1] (z-index: auto)\n SC for BlockContainer<HTML> [0,0 800x166] [children: 0] (z-index: auto)\n"),
TestLayoutGeometryCase(mode = "layout", html = "<!doctype html><body><svg\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n xmlns=\"http://www.w3.org/2000/svg\"\n ><g><svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n ><rect x=\"0\" y=\"0\" width=\"24\" height=\"24\"></svg></g>\n</svg>", css = "", expected = " Viewport <#document> at [0,0] [0+0+0 800 0+0+0] [0+0+0 600 0+0+0] [BFC] children: not-inline\n BlockContainer <html> at [0,0] [0+0+0 800 0+0+0] [0+0+0 40 0+0+0] [BFC] children: not-inline\n BlockContainer <body> at [8,8] [8+0+0 784 0+0+8] [8+0+0 24 0+0+8] children: inline\n frag 0 from SVGSVGBox start: 0, length: 0, rect: [8,8 24x24] baseline: 24\n SVGSVGBox <svg> at [8,8] [0+0+0 24 0+0+0] [0+0+0 24 0+0+0] [SVG] children: inline\n SVGGraphicsBox <g> at [8,8] [0+0+0 24 0+0+0] [0+0+0 24 0+0+0] children: inline\n SVGSVGBox <svg> at [8,8] [0+0+0 24 0+0+0] [0+0+0 24 0+0+0] [SVG] children: not-inline\n SVGGeometryBox <rect> at [8,8] [0+0+0 24 0+0+0] [0+0+0 24 0+0+0] children: not-inline\n TextNode <#text> (not painted)\n \n ViewportPaintable (Viewport<#document>) [0,0 800x600]\n PaintableWithLines (BlockContainer<HTML>) [0,0 800x40]\n PaintableWithLines (BlockContainer<BODY>) [8,8 784x24]\n SVGSVGPaintable (SVGSVGBox<svg>) [8,8 24x24]\n SVGGraphicsPaintable (SVGGraphicsBox<g>) [8,8 24x24]\n SVGSVGPaintable (SVGSVGBox<svg>) [8,8 24x24]\n SVGPathPaintable (SVGGeometryBox<rect>) [8,8 24x24]\n \n SC for Viewport<#document> [0,0 800x600] [children: 1] (z-index: auto)\n SC for BlockContainer<HTML> [0,0 800x40] [children: 0] (z-index: auto)\n"),
TestLayoutGeometryCase(mode = "layout", html = "<!doctype html><svg viewBox=\"0 0 200 100\" height=\"50\"><rect x=\"25\" y=\"25\" width=\"150\" height=\"50\"></svg><svg viewBox=\"0 0 200 100\" width=\"200\"><rect x=\"25\" y=\"25\" width=\"150\" height=\"50\"></svg>", css = "\nsvg {\n border: 1px solid black;\n display: block;\n}\n", expected = " Viewport <#document> at [0,0] [0+0+0 800 0+0+0] [0+0+0 600 0+0+0] [BFC] children: not-inline\n BlockContainer <html> at [0,0] [0+0+0 800 0+0+0] [0+0+0 170 0+0+0] [BFC] children: not-inline\n BlockContainer <body> at [8,8] [8+0+0 784 0+0+8] [8+0+0 154 0+0+8] children: not-inline\n SVGSVGBox <svg> at [9,9] [0+1+0 100 0+1+682] [0+1+0 50 0+1+0] [SVG] children: not-inline\n SVGGeometryBox <rect> at [21.5,21.5] [0+0+0 75 0+0+0] [0+0+0 25 0+0+0] children: not-inline\n SVGSVGBox <svg> at [9,61] [0+1+0 200 0+1+582] [0+1+0 100 0+1+0] [SVG] children: not-inline\n SVGGeometryBox <rect> at [34,86] [0+0+0 150 0+0+0] [0+0+0 50 0+0+0] children: not-inline\n \n ViewportPaintable (Viewport<#document>) [0,0 800x600]\n PaintableWithLines (BlockContainer<HTML>) [0,0 800x170]\n PaintableWithLines (BlockContainer<BODY>) [8,8 784x154]\n SVGSVGPaintable (SVGSVGBox<svg>) [8,8 102x52]\n SVGPathPaintable (SVGGeometryBox<rect>) [21.5,21.5 75x25]\n SVGSVGPaintable (SVGSVGBox<svg>) [8,60 202x102]\n SVGPathPaintable (SVGGeometryBox<rect>) [34,86 150x50]\n \n SC for Viewport<#document> [0,0 800x600] [children: 1] (z-index: auto)\n SC for BlockContainer<HTML> [0,0 800x170] [children: 0] (z-index: auto)\n"),
TestLayoutGeometryCase(mode = "layout", html = "<!doctype html>\n<svg viewbox=\"0 0 200 100\" xmlns=\"http://www.w3.org/2000/svg\">\n <line x1=\"0\" y1=\"33%\" x2=\"100%\" y2=\"33%\"></line>\n <line x1=\"0\" y1=\"66%\" x2=\"100%\" y2=\"66%\"></line>\n\n <line x1=\"33%\" y1=\"0\" x2=\"33%\" y2=\"100%\"></line>\n <line x1=\"66%\" y1=\"0\" x2=\"66%\" y2=\"100%\"></line>\n</svg>", css = "\nline {\n stroke: red;\n}\n", expected = " Viewport <#document> at [0,0] [0+0+0 800 0+0+0] [0+0+0 600 0+0+0] [BFC] children: not-inline\n BlockContainer <html> at [0,0] [0+0+0 800 0+0+0] [0+0+0 408 0+0+0] [BFC] children: not-inline\n BlockContainer <body> at [8,8] [8+0+0 784 0+0+8] [8+0+0 392 0+0+8] children: inline\n frag 0 from SVGSVGBox start: 0, length: 0, rect: [8,8 784x392] baseline: 392\n SVGSVGBox <svg> at [8,8] [0+0+0 784 0+0+0] [0+0+0 392 0+0+0] [SVG] children: inline\n TextNode <#text> (not painted)\n SVGGeometryBox <line> at [6.046875,135.40625] [0+0+0 787.921875 0+0+0] [0+0+0 3.921875 0+0+0] children: not-inline\n TextNode <#text> (not painted)\n SVGGeometryBox <line> at [6.046875,264.765625] [0+0+0 787.921875 0+0+0] [0+0+0 3.921875 0+0+0] children: not-inline\n TextNode <#text> (not painted)\n SVGGeometryBox <line> at [264.765625,6.046875] [0+0+0 3.921875 0+0+0] [0+0+0 395.921875 0+0+0] children: not-inline\n TextNode <#text> (not painted)\n SVGGeometryBox <line> at [523.484375,6.046875] [0+0+0 3.921875 0+0+0] [0+0+0 395.921875 0+0+0] children: not-inline\n TextNode <#text> (not painted)\n \n ViewportPaintable (Viewport<#document>) [0,0 800x600]\n PaintableWithLines (BlockContainer<HTML>) [0,0 800x408]\n PaintableWithLines (BlockContainer<BODY>) [8,8 784x392]\n SVGSVGPaintable (SVGSVGBox<svg>) [8,8 784x392] overflow: [8,8 785.96875x393.96875]\n SVGPathPaintable (SVGGeometryBox<line>) [6.046875,135.40625 787.921875x3.921875]\n SVGPathPaintable (SVGGeometryBox<line>) [6.046875,264.765625 787.921875x3.921875]\n SVGPathPaintable (SVGGeometryBox<line>) [264.765625,6.046875 3.921875x395.921875]\n SVGPathPaintable (SVGGeometryBox<line>) [523.484375,6.046875 3.921875x395.921875]\n \n SC for Viewport<#document> [0,0 800x600] [children: 1] (z-index: auto)\n SC for BlockContainer<HTML> [0,0 800x408] [children: 0] (z-index: auto)\n"),
TestLayoutGeometryCase(mode = "layout", html = "<!DOCTYPE html>\n<html>\n <svg width=\"48\" height=\"48\" viewBox=\"-4 -4 48 48\">\n <defs>\n <path\n d=\"M0 17.4545C0 11.3449 0 8.29005 1.18902 5.95647C2.23491 3.90379 3.90379 2.23491 5.95647 1.18902C8.29005 0 11.3449 0 17.4545 0H22.5455C28.6551 0 31.71 0 34.0435 1.18902C36.0962 2.23491 37.7651 3.90379 38.811 5.95647C40 8.29005 40 11.3449 40 17.4545V22.5455C40 28.6551 40 31.71 38.811 34.0435C37.7651 36.0962 36.0962 37.7651 34.0435 38.811C31.71 40 28.6551 40 22.5455 40H17.4545C11.3449 40 8.29005 40 5.95647 38.811C3.90379 37.7651 2.23491 36.0962 1.18902 34.0435C0 31.71 0 28.6551 0 22.5455V17.4545Z\"\n id=\"«r1»-blob_mask\"\n ></path>\n </defs>\n <mask id=\"«r1»\" fill=\"black\" x=\"0\" y=\"0\" width=\"40\" height=\"40\"><use href=\"#«r1»-blob_mask\" fill=\"white\" class=\"\"></use></mask>\n <foreignobject mask=\"url(#«r1»)\" x=\"0\" y=\"0\" width=\"40\" height=\"40\">\n <div style=\"width: 100px; height: 100px; background-color: magenta\"></div>\n </foreignobject>\n </svg>\n</html>\n", css = "", expected = " Viewport <#document> at [0,0] [0+0+0 800 0+0+0] [0+0+0 600 0+0+0] [BFC] children: not-inline\n BlockContainer <html> at [0,0] [0+0+0 800 0+0+0] [0+0+0 64 0+0+0] [BFC] children: not-inline\n BlockContainer <body> at [8,8] [8+0+0 784 0+0+8] [8+0+0 48 0+0+8] children: inline\n frag 0 from SVGSVGBox start: 0, length: 0, rect: [8,8 48x48] baseline: 48\n SVGSVGBox <svg> at [8,8] [0+0+0 48 0+0+0] [0+0+0 48 0+0+0] [SVG] children: inline\n TextNode <#text> (not painted)\n TextNode <#text> (not painted)\n TextNode <#text> (not painted)\n SVGForeignObjectBox <foreignObject> at [12,12] [0+0+0 40 0+0+0] [0+0+0 40 0+0+0] [BFC] children: not-inline\n BlockContainer <(anonymous)> at [12,12] [0+0+0 40 0+0+0] [0+0+0 0 0+0+0] children: inline\n TextNode <#text> (not painted)\n BlockContainer <div> at [12,12] [0+0+0 100 0+0+-60] [0+0+0 100 0+0+0] children: not-inline\n BlockContainer <(anonymous)> at [12,112] [0+0+0 40 0+0+0] [0+0+0 0 0+0+0] children: inline\n TextNode <#text> (not painted)\n SVGMaskBox <mask#«r1»> at [12,12] [0+0+0 48 0+0+0] [0+0+0 48 0+0+0] children: not-inline\n SVGGraphicsBox <use> at [12,12] [0+0+0 40 0+0+0] [0+0+0 40 0+0+0] children: not-inline\n SVGGeometryBox <path#«r1»-blob_mask> at [12,12] [0+0+0 40 0+0+0] [0+0+0 40 0+0+0] children: not-inline\n TextNode <#text> (not painted)\n TextNode <#text> (not painted)\n \n ViewportPaintable (Viewport<#document>) [0,0 800x600]\n PaintableWithLines (BlockContainer<HTML>) [0,0 800x64]\n PaintableWithLines (BlockContainer<BODY>) [8,8 784x48]\n SVGSVGPaintable (SVGSVGBox<svg>) [8,8 48x48]\n SVGForeignObjectPaintable (SVGForeignObjectBox<foreignObject>) [12,12 40x40] overflow: [12,12 100x100]\n PaintableWithLines (BlockContainer(anonymous)) [12,12 40x0]\n PaintableWithLines (BlockContainer<DIV>) [12,12 100x100]\n PaintableWithLines (BlockContainer(anonymous)) [12,112 40x0]\n \n SC for Viewport<#document> [0,0 800x600] [children: 1] (z-index: auto)\n SC for BlockContainer<HTML> [0,0 800x64] [children: 1] (z-index: auto)\n SC for SVGForeignObjectBox<foreignObject> [12,12 40x40] [children: 0] (z-index: auto)\n"),
TestLayoutGeometryCase(mode = "layout", html = "<!DOCTYPE html><html><body><svg \n\txmlns=\"http://www.w3.org/2000/svg\"\n\twidth=\"100\"\n\theight=\"100\"\n\tviewBox=\"0 0 10 10\"><path d=\"M0,5 10,5 5.5,.5 a 1,-1 0 0 0 -.5,-.3 1,-1 0 0 0 -.5, .2\">", css = "", expected = " Viewport <#document> at [0,0] [0+0+0 800 0+0+0] [0+0+0 600 0+0+0] [BFC] children: not-inline\n BlockContainer <html> at [0,0] [0+0+0 800 0+0+0] [0+0+0 116 0+0+0] [BFC] children: not-inline\n BlockContainer <body> at [8,8] [8+0+0 784 0+0+8] [8+0+0 100 0+0+8] children: inline\n frag 0 from SVGSVGBox start: 0, length: 0, rect: [8,8 100x100] baseline: 100\n SVGSVGBox <svg> at [8,8] [0+0+0 100 0+0+0] [0+0+0 100 0+0+0] [SVG] children: not-inline\n SVGGeometryBox <path> at [8,10] [0+0+0 100 0+0+0] [0+0+0 48 0+0+0] children: not-inline\n \n ViewportPaintable (Viewport<#document>) [0,0 800x600]\n PaintableWithLines (BlockContainer<HTML>) [0,0 800x116]\n PaintableWithLines (BlockContainer<BODY>) [8,8 784x100]\n SVGSVGPaintable (SVGSVGBox<svg>) [8,8 100x100]\n SVGPathPaintable (SVGGeometryBox<path>) [8,10 100x48]\n \n SC for Viewport<#document> [0,0 800x600] [children: 1] (z-index: auto)\n SC for BlockContainer<HTML> [0,0 800x116] [children: 0] (z-index: auto)\n"),
TestLayoutGeometryCase(mode = "layout", html = "<!DOCTYPE html>\n<svg id=\"outer\" width=\"50\" height=\"50\" viewBox=\"0 0 50 50\"><g><svg id=\"inner\" width=\"25\" height=\"25\" viewBox=\"0 0 25 15\"><rect fill=\"green\" width=\"25\" height=\"15\" /></svg></g></svg>", css = "\n* { outline: 1px solid black; }\nsvg { display: block; }\n", expected = " Viewport <#document> at [0,0] [0+0+0 800 0+0+0] [0+0+0 600 0+0+0] [BFC] children: not-inline\n BlockContainer <html> at [0,0] [0+0+0 800 0+0+0] [0+0+0 66 0+0+0] [BFC] children: not-inline\n BlockContainer <body> at [8,8] [8+0+0 784 0+0+8] [8+0+0 50 0+0+8] children: not-inline\n SVGSVGBox <svg#outer> at [8,8] [0+0+0 50 0+0+734] [0+0+0 50 0+0+0] [SVG] children: not-inline\n SVGGraphicsBox <g> at [8,8] [0+0+0 25 0+0+0] [0+0+0 25 0+0+0] children: not-inline\n SVGSVGBox <svg#inner> at [8,8] [0+0+0 25 0+0+0] [0+0+0 25 0+0+0] [SVG] children: not-inline\n SVGGeometryBox <rect> at [8,13] [0+0+0 25 0+0+0] [0+0+0 15 0+0+0] children: not-inline\n \n ViewportPaintable (Viewport<#document>) [0,0 800x600]\n PaintableWithLines (BlockContainer<HTML>) [0,0 800x66]\n PaintableWithLines (BlockContainer<BODY>) [8,8 784x50]\n SVGSVGPaintable (SVGSVGBox<svg>#outer) [8,8 50x50]\n SVGGraphicsPaintable (SVGGraphicsBox<g>) [8,8 25x25]\n SVGSVGPaintable (SVGSVGBox<svg>#inner) [8,8 25x25]\n SVGPathPaintable (SVGGeometryBox<rect>) [8,13 25x15]\n \n SC for Viewport<#document> [0,0 800x600] [children: 1] (z-index: auto)\n SC for BlockContainer<HTML> [0,0 800x66] [children: 0] (z-index: auto)\n"),
TestLayoutGeometryCase(mode = "layout", html = "<!DOCTYPE html><html><body><svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"100\"\n height=\"100\"\n viewBox=\"0 0 10 10\"\n ><path d=\"M 2 2 5 8 8 2 z\"></path></svg>", css = "", expected = " Viewport <#document> at [0,0] [0+0+0 800 0+0+0] [0+0+0 600 0+0+0] [BFC] children: not-inline\n BlockContainer <html> at [0,0] [0+0+0 800 0+0+0] [0+0+0 116 0+0+0] [BFC] children: not-inline\n BlockContainer <body> at [8,8] [8+0+0 784 0+0+8] [8+0+0 100 0+0+8] children: inline\n frag 0 from SVGSVGBox start: 0, length: 0, rect: [8,8 100x100] baseline: 100\n SVGSVGBox <svg> at [8,8] [0+0+0 100 0+0+0] [0+0+0 100 0+0+0] [SVG] children: not-inline\n SVGGeometryBox <path> at [28,28] [0+0+0 60 0+0+0] [0+0+0 60 0+0+0] children: not-inline\n \n ViewportPaintable (Viewport<#document>) [0,0 800x600]\n PaintableWithLines (BlockContainer<HTML>) [0,0 800x116]\n PaintableWithLines (BlockContainer<BODY>) [8,8 784x100]\n SVGSVGPaintable (SVGSVGBox<svg>) [8,8 100x100]\n SVGPathPaintable (SVGGeometryBox<path>) [28,28 60x60]\n \n SC for Viewport<#document> [0,0 800x600] [children: 1] (z-index: auto)\n SC for BlockContainer<HTML> [0,0 800x116] [children: 0] (z-index: auto)\n"),
TestLayoutGeometryCase(mode = "layout", html = "<!DOCTYPE html>\n<body>\n <svg xmlns=\"http://www.w3.org/2000/svg\" style=\"display: none;\">\n <symbol id=\"braces\" viewBox=\"0 0 16 16\">\n <path\n d=\"M2.114 8.063V7.9c1.005-.102 1.497-.615 1.497-1.6V4.503c0-1.094.39-1.538 1.354-1.538h.273V2h-.376C3.25 2 2.49 2.759 2.49 4.352v1.524c0 1.094-.376 1.456-1.49 1.456v1.299c1.114 0 1.49.362 1.49 1.456v1.524c0 1.593.759 2.352 2.372 2.352h.376v-.964h-.273c-.964 0-1.354-.444-1.354-1.538V9.663c0-.984-.492-1.497-1.497-1.6zM13.886 7.9v.163c-1.005.103-1.497.616-1.497 1.6v1.798c0 1.094-.39 1.538-1.354 1.538h-.273v.964h.376c1.613 0 2.372-.759 2.372-2.352v-1.524c0-1.094.376-1.456 1.49-1.456V7.332c-1.114 0-1.49-.362-1.49-1.456V4.352C13.51 2.759 12.75 2 11.138 2h-.376v.964h.273c.964 0 1.354.444 1.354 1.538V6.3c0 .984.492 1.497 1.497 1.6z\">\n </path>\n </symbol>\n </svg>\n\n <div>\n <svg>\n <use xlink:href=\"#braces\"></use>\n </svg>\n", css = "", expected = " Viewport <#document> at [0,0] [0+0+0 800 0+0+0] [0+0+0 600 0+0+0] [BFC] children: not-inline\n BlockContainer <html> at [0,0] [0+0+0 800 0+0+0] [0+0+0 166 0+0+0] [BFC] children: not-inline\n BlockContainer <body> at [8,8] [8+0+0 784 0+0+8] [8+0+0 150 0+0+8] children: not-inline\n BlockContainer <(anonymous)> at [8,8] [0+0+0 784 0+0+0] [0+0+0 0 0+0+0] children: inline\n TextNode <#text> (not painted)\n TextNode <#text> (not painted)\n BlockContainer <div> at [8,8] [0+0+0 784 0+0+0] [0+0+0 150 0+0+0] children: inline\n frag 0 from SVGSVGBox start: 0, length: 0, rect: [8,8 300x150] baseline: 150\n TextNode <#text> (not painted)\n SVGSVGBox <svg> at [8,8] [0+0+0 300 0+0+0] [0+0+0 150 0+0+0] [SVG] children: inline\n TextNode <#text> (not painted)\n SVGGraphicsBox <use> at [8,8] [0+0+0 300 0+0+0] [0+0+0 150 0+0+0] children: not-inline\n SVGGraphicsBox <symbol#braces> at [8,8] [0+0+0 300 0+0+0] [0+0+0 150 0+0+0] [BFC] children: inline\n TextNode <#text> (not painted)\n SVGGeometryBox <path> at [92.375,26.75] [0+0+0 131.25 0+0+0] [0+0+0 112.15625 0+0+0] children: inline\n TextNode <#text> (not painted)\n TextNode <#text> (not painted)\n TextNode <#text> (not painted)\n TextNode <#text> (not painted)\n \n ViewportPaintable (Viewport<#document>) [0,0 800x600]\n PaintableWithLines (BlockContainer<HTML>) [0,0 800x166]\n PaintableWithLines (BlockContainer<BODY>) [8,8 784x150]\n PaintableWithLines (BlockContainer(anonymous)) [8,8 784x0]\n PaintableWithLines (BlockContainer<DIV>) [8,8 784x150]\n SVGSVGPaintable (SVGSVGBox<svg>) [8,8 300x150]\n SVGGraphicsPaintable (SVGGraphicsBox<use>) [8,8 300x150]\n SVGGraphicsPaintable (SVGGraphicsBox<symbol>#braces) [8,8 300x150]\n SVGPathPaintable (SVGGeometryBox<path>) [92.375,26.75 131.25x112.15625]\n \n SC for Viewport<#document> [0,0 800x600] [children: 1] (z-index: auto)\n SC for BlockContainer<HTML> [0,0 800x166] [children: 0] (z-index: auto)\n"),
TestLayoutGeometryCase(mode = "layout", html = "<!DOCTYPE html>\n<svg xmlns=\"http://www.w3.org/2000/svg\">\n <symbol viewBox=\"0 0 16 16\">\n <rect x=\"1\" y=\"1\" width=\"14\" height=\"14\" fill=\"red\" />\n </symbol>\n</svg>\n", css = "", expected = " Viewport <#document> at [0,0] [0+0+0 800 0+0+0] [0+0+0 600 0+0+0] [BFC] children: not-inline\n BlockContainer <html> at [0,0] [0+0+0 800 0+0+0] [0+0+0 166 0+0+0] [BFC] children: not-inline\n BlockContainer <body> at [8,8] [8+0+0 784 0+0+8] [8+0+0 150 0+0+8] children: inline\n frag 0 from SVGSVGBox start: 0, length: 0, rect: [8,8 300x150] baseline: 150\n SVGSVGBox <svg> at [8,8] [0+0+0 300 0+0+0] [0+0+0 150 0+0+0] [SVG] children: inline\n TextNode <#text> (not painted)\n TextNode <#text> (not painted)\n TextNode <#text> (not painted)\n \n ViewportPaintable (Viewport<#document>) [0,0 800x600]\n PaintableWithLines (BlockContainer<HTML>) [0,0 800x166]\n PaintableWithLines (BlockContainer<BODY>) [8,8 784x150]\n SVGSVGPaintable (SVGSVGBox<svg>) [8,8 300x150]\n \n SC for Viewport<#document> [0,0 800x600] [children: 1] (z-index: auto)\n SC for BlockContainer<HTML> [0,0 800x166] [children: 0] (z-index: auto)\n"),
TestLayoutGeometryCase(mode = "layout", html = "<!DOCTYPE html>\n<svg width=\"300\" height=\"120\" viewBox=\"0 0 300 120\" xmlns=\"http://www.w3.org/2000/svg\">\n <rect width=\"100%\" height=\"100%\" fill=\"black\" />\n <text x=\"20\" y=\"30%\" fill=\"white\" font-family=\"sans-serif\" font-size=\"28\">\n <tspan dx=\"20\" dy=\"0\">foo</tspan>\n <tspan dx=\"20\" dy=\"20%\">bar</tspan>\n <tspan dx=\"10%\" dy=\"35\">baz</tspan>\n </text>\n</svg>\n", css = "", expected = " Viewport <#document> at [0,0] [0+0+0 800 0+0+0] [0+0+0 600 0+0+0] [BFC] children: not-inline\n BlockContainer <html> at [0,0] [0+0+0 800 0+0+0] [0+0+0 136 0+0+0] [BFC] children: not-inline\n BlockContainer <body> at [8,8] [8+0+0 784 0+0+8] [8+0+0 120 0+0+8] children: inline\n frag 0 from SVGSVGBox start: 0, length: 0, rect: [8,8 300x120] baseline: 120\n SVGSVGBox <svg> at [8,8] [0+0+0 300 0+0+0] [0+0+0 120 0+0+0] [SVG] children: inline\n TextNode <#text> (not painted)\n SVGGeometryBox <rect> at [8,8] [0+0+0 300 0+0+0] [0+0+0 120 0+0+0] children: not-inline\n TextNode <#text> (not painted)\n SVGTextBox <text> at [8,8] [0+0+0 0 0+0+0] [0+0+0 0 0+0+0] children: inline\n TextNode <#text> (not painted)\n SVGTextBox <tspan> at [48.796875,23.140625] [0+0+0 44.46875 0+0+0] [0+0+0 22.125 0+0+0] children: inline\n TextNode <#text> (not painted)\n TextNode <#text> (not painted)\n SVGTextBox <tspan> at [114.390625,48.9375] [0+0+0 45.765625 0+0+0] [0+0+0 20.53125 0+0+0] children: inline\n TextNode <#text> (not painted)\n TextNode <#text> (not painted)\n SVGTextBox <tspan> at [191.28125,84.15625] [0+0+0 45.09375 0+0+0] [0+0+0 20.53125 0+0+0] children: inline\n TextNode <#text> (not painted)\n TextNode <#text> (not painted)\n TextNode <#text> (not painted)\n TextNode <#text> (not painted)\n \n ViewportPaintable (Viewport<#document>) [0,0 800x600]\n PaintableWithLines (BlockContainer<HTML>) [0,0 800x136]\n PaintableWithLines (BlockContainer<BODY>) [8,8 784x120]\n SVGSVGPaintable (SVGSVGBox<svg>) [8,8 300x120]\n SVGPathPaintable (SVGGeometryBox<rect>) [8,8 300x120]\n SVGPathPaintable (SVGTextBox<text>) [8,8 0x0]\n SVGPathPaintable (SVGTextBox<tspan>) [48.796875,23.140625 44.46875x22.125]\n SVGPathPaintable (SVGTextBox<tspan>) [114.390625,48.9375 45.765625x20.53125]\n SVGPathPaintable (SVGTextBox<tspan>) [191.28125,84.15625 45.09375x20.53125]\n \n SC for Viewport<#document> [0,0 800x600] [children: 1] (z-index: auto)\n SC for BlockContainer<HTML> [0,0 800x136] [children: 0] (z-index: auto)\n"),
TestLayoutGeometryCase(mode = "layout", html = "<!DOCTYPE html><html><body><svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 0 10\"></svg>", css = "", expected = " Viewport <#document> at [0,0] [0+0+0 800 0+0+0] [0+0+0 600 0+0+0] [BFC] children: not-inline\n BlockContainer <html> at [0,0] [0+0+0 800 0+0+0] [0+0+0 166 0+0+0] [BFC] children: not-inline\n BlockContainer <body> at [8,8] [8+0+0 784 0+0+8] [8+0+0 150 0+0+8] children: inline\n frag 0 from SVGSVGBox start: 0, length: 0, rect: [8,8 300x150] baseline: 150\n SVGSVGBox <svg> at [8,8] [0+0+0 300 0+0+0] [0+0+0 150 0+0+0] [SVG] children: not-inline\n \n ViewportPaintable (Viewport<#document>) [0,0 800x600]\n PaintableWithLines (BlockContainer<HTML>) [0,0 800x166]\n PaintableWithLines (BlockContainer<BODY>) [8,8 784x150]\n SVGSVGPaintable (SVGSVGBox<svg>) [8,8 300x150]\n \n SC for Viewport<#document> [0,0 800x600] [children: 1] (z-index: auto)\n SC for BlockContainer<HTML> [0,0 800x166] [children: 0] (z-index: auto)\n"),
TestLayoutGeometryCase(mode = "layout", html = "<!doctype html><svg viewBox=\"0 0 10 10\"><rect x=4.5 y=4.5 width=1 height=1 stroke=\"green\" stroke-width=\"var(--huge)\" />", css = "\n :root {\n --huge: 5px;\n }\n svg {\n width: 100px;\n height: 100px;\n border: 1px solid black;\n }\n", expected = " Viewport <#document> at [0,0] [0+0+0 800 0+0+0] [0+0+0 600 0+0+0] [BFC] children: not-inline\n BlockContainer <html> at [0,0] [0+0+0 800 0+0+0] [0+0+0 118 0+0+0] [BFC] children: not-inline\n BlockContainer <body> at [8,8] [8+0+0 784 0+0+8] [8+0+0 102 0+0+8] children: inline\n frag 0 from SVGSVGBox start: 0, length: 0, rect: [9,9 100x100] baseline: 102\n SVGSVGBox <svg> at [9,9] [0+1+0 100 0+1+0] [0+1+0 100 0+1+0] [SVG] children: not-inline\n SVGGeometryBox <rect> at [29,29] [0+0+0 60 0+0+0] [0+0+0 60 0+0+0] children: not-inline\n \n ViewportPaintable (Viewport<#document>) [0,0 800x600]\n PaintableWithLines (BlockContainer<HTML>) [0,0 800x118]\n PaintableWithLines (BlockContainer<BODY>) [8,8 784x102]\n SVGSVGPaintable (SVGSVGBox<svg>) [8,8 102x102]\n SVGPathPaintable (SVGGeometryBox<rect>) [29,29 60x60]\n \n SC for Viewport<#document> [0,0 800x600] [children: 1] (z-index: auto)\n SC for BlockContainer<HTML> [0,0 800x118] [children: 0] (z-index: auto)\n"),
TestLayoutGeometryCase(mode = "layout", html = "<!doctype html><svg viewBox=\"0 0 10 10\"><rect x=0 y=0 width=10 height=10></svg>", css = "\nsvg { display: block; }\n", expected = " Viewport <#document> at [0,0] [0+0+0 800 0+0+0] [0+0+0 600 0+0+0] [BFC] children: not-inline\n BlockContainer <html> at [0,0] [0+0+0 800 0+0+0] [0+0+0 800 0+0+0] [BFC] children: not-inline\n BlockContainer <body> at [8,8] [8+0+0 784 0+0+8] [8+0+0 784 0+0+8] children: not-inline\n SVGSVGBox <svg> at [8,8] [0+0+0 784 0+0+0] [0+0+0 784 0+0+0] [SVG] children: not-inline\n SVGGeometryBox <rect> at [8,8] [0+0+0 784 0+0+0] [0+0+0 784 0+0+0] children: not-inline\n \n ViewportPaintable (Viewport<#document>) [0,0 800x600] overflow: [0,0 800x800]\n PaintableWithLines (BlockContainer<HTML>) [0,0 800x800]\n PaintableWithLines (BlockContainer<BODY>) [8,8 784x784]\n SVGSVGPaintable (SVGSVGBox<svg>) [8,8 784x784]\n SVGPathPaintable (SVGGeometryBox<rect>) [8,8 784x784]\n \n SC for Viewport<#document> [0,0 800x600] [children: 1] (z-index: auto)\n SC for BlockContainer<HTML> [0,0 800x800] [children: 0] (z-index: auto)\n"),
TestLayoutGeometryCase(mode = "layout", html = "<!DOCTYPE html>\n<svg width=\"100\" height=\"100\" viewBox=\"0 0 0 0\">\n <text>Hello!</text>\n</svg>\n", css = "", expected = " Viewport <#document> at [0,0] [0+0+0 800 0+0+0] [0+0+0 600 0+0+0] [BFC] children: not-inline\n BlockContainer <html> at [0,0] [0+0+0 800 0+0+0] [0+0+0 116 0+0+0] [BFC] children: not-inline\n BlockContainer <body> at [8,8] [8+0+0 784 0+0+8] [8+0+0 100 0+0+8] children: inline\n frag 0 from SVGSVGBox start: 0, length: 0, rect: [8,8 100x100] baseline: 100\n SVGSVGBox <svg> at [8,8] [0+0+0 100 0+0+0] [0+0+0 100 0+0+0] [SVG] children: inline\n TextNode <#text> (not painted)\n SVGTextBox <text> (not painted) children: inline\n TextNode <#text> (not painted)\n TextNode <#text> (not painted)\n TextNode <#text> (not painted)\n \n ViewportPaintable (Viewport<#document>) [0,0 800x600]\n PaintableWithLines (BlockContainer<HTML>) [0,0 800x116]\n PaintableWithLines (BlockContainer<BODY>) [8,8 784x100]\n SVGSVGPaintable (SVGSVGBox<svg>) [8,8 100x100]\n \n SC for Viewport<#document> [0,0 800x600] [children: 1] (z-index: auto)\n SC for BlockContainer<HTML> [0,0 800x116] [children: 0] (z-index: auto)\n"),
TestLayoutGeometryCase(mode = "layout", html = "<!DOCTYPE html>\n<svg><text fill=\"none\"></text></svg>\n", css = "", expected = " Viewport <#document> at [0,0] [0+0+0 800 0+0+0] [0+0+0 600 0+0+0] [BFC] children: not-inline\n BlockContainer <html> at [0,0] [0+0+0 800 0+0+0] [0+0+0 166 0+0+0] [BFC] children: not-inline\n BlockContainer <body> at [8,8] [8+0+0 784 0+0+8] [8+0+0 150 0+0+8] children: inline\n frag 0 from SVGSVGBox start: 0, length: 0, rect: [8,8 300x150] baseline: 150\n SVGSVGBox <svg> at [8,8] [0+0+0 300 0+0+0] [0+0+0 150 0+0+0] [SVG] children: not-inline\n SVGTextBox <text> at [8,8] [0+0+0 0 0+0+0] [0+0+0 0 0+0+0] children: not-inline\n TextNode <#text> (not painted)\n \n ViewportPaintable (Viewport<#document>) [0,0 800x600]\n PaintableWithLines (BlockContainer<HTML>) [0,0 800x166]\n PaintableWithLines (BlockContainer<BODY>) [8,8 784x150]\n SVGSVGPaintable (SVGSVGBox<svg>) [8,8 300x150]\n SVGPathPaintable (SVGTextBox<text>) [8,8 0x0]\n \n SC for Viewport<#document> [0,0 800x600] [children: 1] (z-index: auto)\n SC for BlockContainer<HTML> [0,0 800x166] [children: 0] (z-index: auto)\n"),
TestLayoutGeometryCase(mode = "layout", html = "<!DOCTYPE html>\n<svg id=\"outer\" viewBox=\"0 0 10 10\">\n <use href=\"#whee\"></use>\n</svg>\n\n<div style=\"display: none\">\n <svg width=\"10\" height=\"10\" id=\"whee\">\n <rect x=\"0\" y=\"0\" width=\"5\" height=\"5\" fill=\"#0062FF\">\n </svg>\n", css = "\n #outer { width: 100px; }\n svg { border: 1px solid black; }\n", expected = " Viewport <#document> at [0,0] [0+0+0 800 0+0+0] [0+0+0 600 0+0+0] [BFC] children: not-inline\n BlockContainer <html> at [0,0] [0+0+0 800 0+0+0] [0+0+0 118 0+0+0] [BFC] children: not-inline\n BlockContainer <body> at [8,8] [8+0+0 784 0+0+8] [8+0+0 102 0+0+8] children: inline\n frag 0 from SVGSVGBox start: 0, length: 0, rect: [9,9 100x100] baseline: 102\n SVGSVGBox <svg#outer> at [9,9] [0+1+0 100 0+1+0] [0+1+0 100 0+1+0] [SVG] children: inline\n TextNode <#text> (not painted)\n SVGGraphicsBox <use> at [9,9] [0+0+0 0 0+0+0] [0+0+0 0 0+0+0] children: not-inline\n TextNode <#text> (not painted)\n TextNode <#text> (not painted)\n \n ViewportPaintable (Viewport<#document>) [0,0 800x600]\n PaintableWithLines (BlockContainer<HTML>) [0,0 800x118]\n PaintableWithLines (BlockContainer<BODY>) [8,8 784x102]\n SVGSVGPaintable (SVGSVGBox<svg>#outer) [8,8 102x102]\n SVGGraphicsPaintable (SVGGraphicsBox<use>) [9,9 0x0]\n \n SC for Viewport<#document> [0,0 800x600] [children: 1] (z-index: auto)\n SC for BlockContainer<HTML> [0,0 800x118] [children: 0] (z-index: auto)\n"),
TestLayoutGeometryCase(mode = "layout", html = "<!DOCTYPE html><body><svg viewBox=\"0 0 24 24\"><rect x=0 y=0 width=12 height=12></svg>", css = "\n svg { width: max-content; }\n", expected = " Viewport <#document> at [0,0] [0+0+0 800 0+0+0] [0+0+0 600 0+0+0] [BFC] children: not-inline\n BlockContainer <html> at [0,0] [0+0+0 800 0+0+0] [0+0+0 800 0+0+0] [BFC] children: not-inline\n BlockContainer <body> at [8,8] [8+0+0 784 0+0+8] [8+0+0 784 0+0+8] children: inline\n frag 0 from SVGSVGBox start: 0, length: 0, rect: [8,8 784x784] baseline: 784\n SVGSVGBox <svg> at [8,8] [0+0+0 784 0+0+0] [0+0+0 784 0+0+0] [SVG] children: not-inline\n SVGGeometryBox <rect> at [8,8] [0+0+0 392 0+0+0] [0+0+0 392 0+0+0] children: not-inline\n \n ViewportPaintable (Viewport<#document>) [0,0 800x600] overflow: [0,0 800x800]\n PaintableWithLines (BlockContainer<HTML>) [0,0 800x800]\n PaintableWithLines (BlockContainer<BODY>) [8,8 784x784]\n SVGSVGPaintable (SVGSVGBox<svg>) [8,8 784x784]\n SVGPathPaintable (SVGGeometryBox<rect>) [8,8 392x392]\n \n SC for Viewport<#document> [0,0 800x600] [children: 1] (z-index: auto)\n SC for BlockContainer<HTML> [0,0 800x800] [children: 0] (z-index: auto)\n"),
TestLayoutGeometryCase(mode = "layout", html = "<!DOCTYPE html><div style=\"width: 10px; height: 0px\"><svg xmlns=\"http://www.w3.org/2000/svg\"></svg>", css = "\nsvg {\n aspect-ratio: 1 / 1;\n min-width: 100px;\n min-height: 100px;\n}\n", expected = " Viewport <#document> at [0,0] [0+0+0 800 0+0+0] [0+0+0 600 0+0+0] [BFC] children: not-inline\n BlockContainer <html> at [0,0] [0+0+0 800 0+0+0] [0+0+0 16 0+0+0] [BFC] children: not-inline\n BlockContainer <body> at [8,8] [8+0+0 784 0+0+8] [8+0+0 0 0+0+8] children: not-inline\n BlockContainer <div> at [8,8] [0+0+0 10 0+0+774] [0+0+0 0 0+0+0] children: inline\n frag 0 from SVGSVGBox start: 0, length: 0, rect: [8,8 100x100] baseline: 100\n SVGSVGBox <svg> at [8,8] [0+0+0 100 0+0+0] [0+0+0 100 0+0+0] [SVG] children: not-inline\n \n ViewportPaintable (Viewport<#document>) [0,0 800x600]\n PaintableWithLines (BlockContainer<HTML>) [0,0 800x16]\n PaintableWithLines (BlockContainer<BODY>) [8,8 784x0]\n PaintableWithLines (BlockContainer<DIV>) [8,8 10x0]\n SVGSVGPaintable (SVGSVGBox<svg>) [8,8 100x100]\n \n SC for Viewport<#document> [0,0 800x600] [children: 1] (z-index: auto)\n SC for BlockContainer<HTML> [0,0 800x16] [children: 0] (z-index: auto)\n"),
TestLayoutGeometryCase(mode = "layout", html = "<!DOCTYPE html>\n<div style=\"width: 0px; height: 0px\"><svg xmlns=\"http://www.w3.org/2000/svg\"></svg>\n", css = "\nsvg {\n aspect-ratio: 1 / 1;\n min-width: 100px;\n min-height: 100px;\n}\n", expected = " Viewport <#document> at [0,0] [0+0+0 800 0+0+0] [0+0+0 600 0+0+0] [BFC] children: not-inline\n BlockContainer <html> at [0,0] [0+0+0 800 0+0+0] [0+0+0 16 0+0+0] [BFC] children: not-inline\n BlockContainer <body> at [8,8] [8+0+0 784 0+0+8] [8+0+0 0 0+0+8] children: not-inline\n BlockContainer <div> at [8,8] [0+0+0 0 0+0+784] [0+0+0 0 0+0+0] children: inline\n frag 0 from SVGSVGBox start: 0, length: 0, rect: [8,8 100x100] baseline: 100\n SVGSVGBox <svg> at [8,8] [0+0+0 100 0+0+0] [0+0+0 100 0+0+0] [SVG] children: not-inline\n TextNode <#text> (not painted)\n \n ViewportPaintable (Viewport<#document>) [0,0 800x600]\n PaintableWithLines (BlockContainer<HTML>) [0,0 800x16]\n PaintableWithLines (BlockContainer<BODY>) [8,8 784x0]\n PaintableWithLines (BlockContainer<DIV>) [8,8 0x0]\n SVGSVGPaintable (SVGSVGBox<svg>) [8,8 100x100]\n \n SC for Viewport<#document> [0,0 800x600] [children: 1] (z-index: auto)\n SC for BlockContainer<HTML> [0,0 800x16] [children: 0] (z-index: auto)\n"),
TestLayoutGeometryCase(mode = "layout", html = "<!DOCTYPE html><svg width=\"160\" height=\"70\" viewBox=\"5 10 50 40\" preserveAspectRatio=\"none meet\"><rect x=\"10\" y=\"15\" width=\"30\" height=\"20\"/></svg><svg width=\"160\" height=\"70\" viewBox=\"5 10 50 40\" preserveAspectRatio=\"xMinYMin meet\"><rect x=\"10\" y=\"15\" width=\"30\" height=\"20\"/></svg><svg width=\"160\" height=\"70\" viewBox=\"5 10 50 40\" preserveAspectRatio=\"xMidYMin meet\"><rect x=\"10\" y=\"15\" width=\"30\" height=\"20\"/></svg><svg width=\"160\" height=\"70\" viewBox=\"5 10 50 40\" preserveAspectRatio=\"xMaxYMin meet\"><rect x=\"10\" y=\"15\" width=\"30\" height=\"20\"/></svg><svg width=\"160\" height=\"70\" viewBox=\"5 10 50 40\" preserveAspectRatio=\"xMinYMid meet\"><rect x=\"10\" y=\"15\" width=\"30\" height=\"20\"/></svg><svg width=\"160\" height=\"70\" viewBox=\"5 10 50 40\" preserveAspectRatio=\"xMidYMid meet\"><rect x=\"10\" y=\"15\" width=\"30\" height=\"20\"/></svg><svg width=\"160\" height=\"70\" viewBox=\"5 10 50 40\" preserveAspectRatio=\"xMaxYMid meet\"><rect x=\"10\" y=\"15\" width=\"30\" height=\"20\"/></svg><svg width=\"160\" height=\"70\" viewBox=\"5 10 50 40\" preserveAspectRatio=\"xMinYMax meet\"><rect x=\"10\" y=\"15\" width=\"30\" height=\"20\"/></svg><svg width=\"160\" height=\"70\" viewBox=\"5 10 50 40\" preserveAspectRatio=\"xMidYMax meet\"><rect x=\"10\" y=\"15\" width=\"30\" height=\"20\"/></svg><svg width=\"160\" height=\"70\" viewBox=\"5 10 50 40\" preserveAspectRatio=\"xMaxYMax meet\"><rect x=\"10\" y=\"15\" width=\"30\" height=\"20\"/></svg>", css = "svg { display: block; border: 1px solid black; margin: 2px; }", expected = " Viewport <#document> at [0,0] [0+0+0 800 0+0+0] [0+0+0 600 0+0+0] [BFC] children: not-inline\n BlockContainer <html> at [0,0] [0+0+0 800 0+0+0] [0+0+0 754 0+0+0] [BFC] children: not-inline\n BlockContainer <body> at [8,8] [8+0+0 784 0+0+8] [8+0+0 738 0+0+8] children: not-inline\n SVGSVGBox <svg> at [11,9] [2+1+0 160 0+1+620] [2+1+0 70 0+1+2] [SVG] children: not-inline\n SVGGeometryBox <rect> at [27,17.75] [0+0+0 96 0+0+0] [0+0+0 35 0+0+0] children: not-inline\n SVGSVGBox <svg> at [11,83] [2+1+0 160 0+1+620] [2+1+0 70 0+1+2] [SVG] children: not-inline\n SVGGeometryBox <rect> at [19.75,91.75] [0+0+0 52.5 0+0+0] [0+0+0 35 0+0+0] children: not-inline\n SVGSVGBox <svg> at [11,157] [2+1+0 160 0+1+620] [2+1+0 70 0+1+2] [SVG] children: not-inline\n SVGGeometryBox <rect> at [56,165.75] [0+0+0 52.5 0+0+0] [0+0+0 35 0+0+0] children: not-inline\n SVGSVGBox <svg> at [11,231] [2+1+0 160 0+1+620] [2+1+0 70 0+1+2] [SVG] children: not-inline\n SVGGeometryBox <rect> at [92.25,239.75] [0+0+0 52.5 0+0+0] [0+0+0 35 0+0+0] children: not-inline\n SVGSVGBox <svg> at [11,305] [2+1+0 160 0+1+620] [2+1+0 70 0+1+2] [SVG] children: not-inline\n SVGGeometryBox <rect> at [19.75,313.75] [0+0+0 52.5 0+0+0] [0+0+0 35 0+0+0] children: not-inline\n SVGSVGBox <svg> at [11,379] [2+1+0 160 0+1+620] [2+1+0 70 0+1+2] [SVG] children: not-inline\n SVGGeometryBox <rect> at [56,387.75] [0+0+0 52.5 0+0+0] [0+0+0 35 0+0+0] children: not-inline\n SVGSVGBox <svg> at [11,453] [2+1+0 160 0+1+620] [2+1+0 70 0+1+2] [SVG] children: not-inline\n SVGGeometryBox <rect> at [92.25,461.75] [0+0+0 52.5 0+0+0] [0+0+0 35 0+0+0] children: not-inline\n SVGSVGBox <svg> at [11,527] [2+1+0 160 0+1+620] [2+1+0 70 0+1+2] [SVG] children: not-inline\n SVGGeometryBox <rect> at [19.75,535.75] [0+0+0 52.5 0+0+0] [0+0+0 35 0+0+0] children: not-inline\n SVGSVGBox <svg> at [11,601] [2+1+0 160 0+1+620] [2+1+0 70 0+1+2] [SVG] children: not-inline\n SVGGeometryBox <rect> at [56,609.75] [0+0+0 52.5 0+0+0] [0+0+0 35 0+0+0] children: not-inline\n SVGSVGBox <svg> at [11,675] [2+1+0 160 0+1+620] [2+1+0 70 0+1+2] [SVG] children: not-inline\n SVGGeometryBox <rect> at [92.25,683.75] [0+0+0 52.5 0+0+0] [0+0+0 35 0+0+0] children: not-inline\n \n ViewportPaintable (Viewport<#document>) [0,0 800x600] overflow: [0,0 800x754]\n PaintableWithLines (BlockContainer<HTML>) [0,0 800x754]\n PaintableWithLines (BlockContainer<BODY>) [8,8 784x738]\n SVGSVGPaintable (SVGSVGBox<svg>) [10,8 162x72]\n SVGPathPaintable (SVGGeometryBox<rect>) [27,17.75 96x35]\n SVGSVGPaintable (SVGSVGBox<svg>) [10,82 162x72]\n SVGPathPaintable (SVGGeometryBox<rect>) [19.75,91.75 52.5x35]\n SVGSVGPaintable (SVGSVGBox<svg>) [10,156 162x72]\n SVGPathPaintable (SVGGeometryBox<rect>) [56,165.75 52.5x35]\n SVGSVGPaintable (SVGSVGBox<svg>) [10,230 162x72]\n SVGPathPaintable (SVGGeometryBox<rect>) [92.25,239.75 52.5x35]\n SVGSVGPaintable (SVGSVGBox<svg>) [10,304 162x72]\n SVGPathPaintable (SVGGeometryBox<rect>) [19.75,313.75 52.5x35]\n SVGSVGPaintable (SVGSVGBox<svg>) [10,378 162x72]\n SVGPathPaintable (SVGGeometryBox<rect>) [56,387.75 52.5x35]\n SVGSVGPaintable (SVGSVGBox<svg>) [10,452 162x72]\n SVGPathPaintable (SVGGeometryBox<rect>) [92.25,461.75 52.5x35]\n SVGSVGPaintable (SVGSVGBox<svg>) [10,526 162x72]\n SVGPathPaintable (SVGGeometryBox<rect>) [19.75,535.75 52.5x35]\n SVGSVGPaintable (SVGSVGBox<svg>) [10,600 162x72]\n SVGPathPaintable (SVGGeometryBox<rect>) [56,609.75 52.5x35]\n SVGSVGPaintable (SVGSVGBox<svg>) [10,674 162x72]\n SVGPathPaintable (SVGGeometryBox<rect>) [92.25,683.75 52.5x35]\n \n SC for Viewport<#document> [0,0 800x600] [children: 1] (z-index: auto)\n SC for BlockContainer<HTML> [0,0 800x754] [children: 0] (z-index: auto)\n"),
TestLayoutGeometryCase(mode = "layout", html = "<!DOCTYPE html><svg width=\"160\" height=\"70\" viewBox=\"5 10 50 40\" preserveAspectRatio=\"none slice\"><rect x=\"10\" y=\"15\" width=\"30\" height=\"20\"/></svg><svg width=\"160\" height=\"70\" viewBox=\"5 10 50 40\" preserveAspectRatio=\"xMinYMin slice\"><rect x=\"10\" y=\"15\" width=\"30\" height=\"20\"/></svg><svg width=\"160\" height=\"70\" viewBox=\"5 10 50 40\" preserveAspectRatio=\"xMidYMin slice\"><rect x=\"10\" y=\"15\" width=\"30\" height=\"20\"/></svg><svg width=\"160\" height=\"70\" viewBox=\"5 10 50 40\" preserveAspectRatio=\"xMaxYMin slice\"><rect x=\"10\" y=\"15\" width=\"30\" height=\"20\"/></svg><svg width=\"160\" height=\"70\" viewBox=\"5 10 50 40\" preserveAspectRatio=\"xMinYMid slice\"><rect x=\"10\" y=\"15\" width=\"30\" height=\"20\"/></svg><svg width=\"160\" height=\"70\" viewBox=\"5 10 50 40\" preserveAspectRatio=\"xMidYMid slice\"><rect x=\"10\" y=\"15\" width=\"30\" height=\"20\"/></svg><svg width=\"160\" height=\"70\" viewBox=\"5 10 50 40\" preserveAspectRatio=\"xMaxYMid slice\"><rect x=\"10\" y=\"15\" width=\"30\" height=\"20\"/></svg><svg width=\"160\" height=\"70\" viewBox=\"5 10 50 40\" preserveAspectRatio=\"xMinYMax slice\"><rect x=\"10\" y=\"15\" width=\"30\" height=\"20\"/></svg><svg width=\"160\" height=\"70\" viewBox=\"5 10 50 40\" preserveAspectRatio=\"xMidYMax slice\"><rect x=\"10\" y=\"15\" width=\"30\" height=\"20\"/></svg><svg width=\"160\" height=\"70\" viewBox=\"5 10 50 40\" preserveAspectRatio=\"xMaxYMax slice\"><rect x=\"10\" y=\"15\" width=\"30\" height=\"20\"/></svg>", css = "svg { display: block; border: 1px solid black; margin: 2px; }", expected = " Viewport <#document> at [0,0] [0+0+0 800 0+0+0] [0+0+0 600 0+0+0] [BFC] children: not-inline\n BlockContainer <html> at [0,0] [0+0+0 800 0+0+0] [0+0+0 754 0+0+0] [BFC] children: not-inline\n BlockContainer <body> at [8,8] [8+0+0 784 0+0+8] [8+0+0 738 0+0+8] children: not-inline\n SVGSVGBox <svg> at [11,9] [2+1+0 160 0+1+620] [2+1+0 70 0+1+2] [SVG] children: not-inline\n SVGGeometryBox <rect> at [27,17.75] [0+0+0 96 0+0+0] [0+0+0 35 0+0+0] children: not-inline\n SVGSVGBox <svg> at [11,83] [2+1+0 160 0+1+620] [2+1+0 70 0+1+2] [SVG] children: not-inline\n SVGGeometryBox <rect> at [27,99] [0+0+0 96 0+0+0] [0+0+0 64 0+0+0] children: not-inline\n SVGSVGBox <svg> at [11,157] [2+1+0 160 0+1+620] [2+1+0 70 0+1+2] [SVG] children: not-inline\n SVGGeometryBox <rect> at [27,173] [0+0+0 96 0+0+0] [0+0+0 64 0+0+0] children: not-inline\n SVGSVGBox <svg> at [11,231] [2+1+0 160 0+1+620] [2+1+0 70 0+1+2] [SVG] children: not-inline\n SVGGeometryBox <rect> at [27,247] [0+0+0 96 0+0+0] [0+0+0 64 0+0+0] children: not-inline\n SVGSVGBox <svg> at [11,305] [2+1+0 160 0+1+620] [2+1+0 70 0+1+2] [SVG] children: not-inline\n SVGGeometryBox <rect> at [27,292] [0+0+0 96 0+0+0] [0+0+0 64 0+0+0] children: not-inline\n SVGSVGBox <svg> at [11,379] [2+1+0 160 0+1+620] [2+1+0 70 0+1+2] [SVG] children: not-inline\n SVGGeometryBox <rect> at [27,366] [0+0+0 96 0+0+0] [0+0+0 64 0+0+0] children: not-inline\n SVGSVGBox <svg> at [11,453] [2+1+0 160 0+1+620] [2+1+0 70 0+1+2] [SVG] children: not-inline\n SVGGeometryBox <rect> at [27,440] [0+0+0 96 0+0+0] [0+0+0 64 0+0+0] children: not-inline\n SVGSVGBox <svg> at [11,527] [2+1+0 160 0+1+620] [2+1+0 70 0+1+2] [SVG] children: not-inline\n SVGGeometryBox <rect> at [27,485] [0+0+0 96 0+0+0] [0+0+0 64 0+0+0] children: not-inline\n SVGSVGBox <svg> at [11,601] [2+1+0 160 0+1+620] [2+1+0 70 0+1+2] [SVG] children: not-inline\n SVGGeometryBox <rect> at [27,559] [0+0+0 96 0+0+0] [0+0+0 64 0+0+0] children: not-inline\n SVGSVGBox <svg> at [11,675] [2+1+0 160 0+1+620] [2+1+0 70 0+1+2] [SVG] children: not-inline\n SVGGeometryBox <rect> at [27,633] [0+0+0 96 0+0+0] [0+0+0 64 0+0+0] children: not-inline\n \n ViewportPaintable (Viewport<#document>) [0,0 800x600] overflow: [0,0 800x754]\n PaintableWithLines (BlockContainer<HTML>) [0,0 800x754]\n PaintableWithLines (BlockContainer<BODY>) [8,8 784x738]\n SVGSVGPaintable (SVGSVGBox<svg>) [10,8 162x72]\n SVGPathPaintable (SVGGeometryBox<rect>) [27,17.75 96x35]\n SVGSVGPaintable (SVGSVGBox<svg>) [10,82 162x72] overflow: [11,83 160x80]\n SVGPathPaintable (SVGGeometryBox<rect>) [27,99 96x64]\n SVGSVGPaintable (SVGSVGBox<svg>) [10,156 162x72] overflow: [11,157 160x80]\n SVGPathPaintable (SVGGeometryBox<rect>) [27,173 96x64]\n SVGSVGPaintable (SVGSVGBox<svg>) [10,230 162x72] overflow: [11,231 160x80]\n SVGPathPaintable (SVGGeometryBox<rect>) [27,247 96x64]\n SVGSVGPaintable (SVGSVGBox<svg>) [10,304 162x72]\n SVGPathPaintable (SVGGeometryBox<rect>) [27,292 96x64]\n SVGSVGPaintable (SVGSVGBox<svg>) [10,378 162x72]\n SVGPathPaintable (SVGGeometryBox<rect>) [27,366 96x64]\n SVGSVGPaintable (SVGSVGBox<svg>) [10,452 162x72]\n SVGPathPaintable (SVGGeometryBox<rect>) [27,440 96x64]\n SVGSVGPaintable (SVGSVGBox<svg>) [10,526 162x72]\n SVGPathPaintable (SVGGeometryBox<rect>) [27,485 96x64]\n SVGSVGPaintable (SVGSVGBox<svg>) [10,600 162x72]\n SVGPathPaintable (SVGGeometryBox<rect>) [27,559 96x64]\n SVGSVGPaintable (SVGSVGBox<svg>) [10,674 162x72]\n SVGPathPaintable (SVGGeometryBox<rect>) [27,633 96x64]\n \n SC for Viewport<#document> [0,0 800x600] [children: 1] (z-index: auto)\n SC for BlockContainer<HTML> [0,0 800x754] [children: 0] (z-index: auto)\n"),
TestLayoutGeometryCase(mode = "layout", html = "<!DOCTYPE html><svg width=\"70\" height=\"160\" viewBox=\"0 0 30 40\" preserveAspectRatio=\"none meet\"><circle cx=\"15\" cy=\"20\" r=\"10\"/></svg><svg width=\"70\" height=\"160\" viewBox=\"0 0 30 40\" preserveAspectRatio=\"xMinYMin meet\"><circle cx=\"15\" cy=\"20\" r=\"10\"/></svg><svg width=\"70\" height=\"160\" viewBox=\"0 0 30 40\" preserveAspectRatio=\"xMidYMin meet\"><circle cx=\"15\" cy=\"20\" r=\"10\"/></svg><svg width=\"70\" height=\"160\" viewBox=\"0 0 30 40\" preserveAspectRatio=\"xMaxYMin meet\"><circle cx=\"15\" cy=\"20\" r=\"10\"/></svg><svg width=\"70\" height=\"160\" viewBox=\"0 0 30 40\" preserveAspectRatio=\"xMinYMid meet\"><circle cx=\"15\" cy=\"20\" r=\"10\"/></svg><svg width=\"70\" height=\"160\" viewBox=\"0 0 30 40\" preserveAspectRatio=\"xMidYMid meet\"><circle cx=\"15\" cy=\"20\" r=\"10\"/></svg><svg width=\"70\" height=\"160\" viewBox=\"0 0 30 40\" preserveAspectRatio=\"xMaxYMid meet\"><circle cx=\"15\" cy=\"20\" r=\"10\"/></svg><svg width=\"70\" height=\"160\" viewBox=\"0 0 30 40\" preserveAspectRatio=\"xMinYMax meet\"><circle cx=\"15\" cy=\"20\" r=\"10\"/></svg><svg width=\"70\" height=\"160\" viewBox=\"0 0 30 40\" preserveAspectRatio=\"xMidYMax meet\"><circle cx=\"15\" cy=\"20\" r=\"10\"/></svg><svg width=\"70\" height=\"160\" viewBox=\"0 0 30 40\" preserveAspectRatio=\"xMaxYMax meet\"><circle cx=\"15\" cy=\"20\" r=\"10\"/></svg>", css = "svg { margin: 1px; }", expected = " Viewport <#document> at [0,0] [0+0+0 800 0+0+0] [0+0+0 600 0+0+0] [BFC] children: not-inline\n BlockContainer <html> at [0,0] [0+0+0 800 0+0+0] [0+0+0 178 0+0+0] [BFC] children: not-inline\n BlockContainer <body> at [8,8] [8+0+0 784 0+0+8] [8+0+0 162 0+0+8] children: inline\n frag 0 from SVGSVGBox start: 0, length: 0, rect: [9,9 70x160] baseline: 162\n frag 1 from SVGSVGBox start: 0, length: 0, rect: [81,9 70x160] baseline: 162\n frag 2 from SVGSVGBox start: 0, length: 0, rect: [153,9 70x160] baseline: 162\n frag 3 from SVGSVGBox start: 0, length: 0, rect: [225,9 70x160] baseline: 162\n frag 4 from SVGSVGBox start: 0, length: 0, rect: [297,9 70x160] baseline: 162\n frag 5 from SVGSVGBox start: 0, length: 0, rect: [369,9 70x160] baseline: 162\n frag 6 from SVGSVGBox start: 0, length: 0, rect: [441,9 70x160] baseline: 162\n frag 7 from SVGSVGBox start: 0, length: 0, rect: [513,9 70x160] baseline: 162\n frag 8 from SVGSVGBox start: 0, length: 0, rect: [585,9 70x160] baseline: 162\n frag 9 from SVGSVGBox start: 0, length: 0, rect: [657,9 70x160] baseline: 162\n SVGSVGBox <svg> at [9,9] [1+0+0 70 0+0+1] [1+0+0 160 0+0+1] [SVG] children: not-inline\n SVGGeometryBox <circle> at [20.671875,49] [0+0+0 46.671875 0+0+0] [0+0+0 80 0+0+0] children: not-inline\n SVGSVGBox <svg> at [81,9] [1+0+0 70 0+0+1] [1+0+0 160 0+0+1] [SVG] children: not-inline\n SVGGeometryBox <circle> at [92.671875,32.328125] [0+0+0 46.671875 0+0+0] [0+0+0 46.671875 0+0+0] children: not-inline\n SVGSVGBox <svg> at [153,9] [1+0+0 70 0+0+1] [1+0+0 160 0+0+1] [SVG] children: not-inline\n SVGGeometryBox <circle> at [164.671875,32.328125] [0+0+0 46.671875 0+0+0] [0+0+0 46.671875 0+0+0] children: not-inline\n SVGSVGBox <svg> at [225,9] [1+0+0 70 0+0+1] [1+0+0 160 0+0+1] [SVG] children: not-inline\n SVGGeometryBox <circle> at [236.671875,32.328125] [0+0+0 46.671875 0+0+0] [0+0+0 46.671875 0+0+0] children: not-inline\n SVGSVGBox <svg> at [297,9] [1+0+0 70 0+0+1] [1+0+0 160 0+0+1] [SVG] children: not-inline\n SVGGeometryBox <circle> at [308.671875,65.65625] [0+0+0 46.671875 0+0+0] [0+0+0 46.671875 0+0+0] children: not-inline\n SVGSVGBox <svg> at [369,9] [1+0+0 70 0+0+1] [1+0+0 160 0+0+1] [SVG] children: not-inline\n SVGGeometryBox <circle> at [380.671875,65.65625] [0+0+0 46.671875 0+0+0] [0+0+0 46.671875 0+0+0] children: not-inline\n SVGSVGBox <svg> at [441,9] [1+0+0 70 0+0+1] [1+0+0 160 0+0+1] [SVG] children: not-inline\n SVGGeometryBox <circle> at [452.671875,65.65625] [0+0+0 46.671875 0+0+0] [0+0+0 46.671875 0+0+0] children: not-inline\n SVGSVGBox <svg> at [513,9] [1+0+0 70 0+0+1] [1+0+0 160 0+0+1] [SVG] children: not-inline\n SVGGeometryBox <circle> at [524.671875,99] [0+0+0 46.671875 0+0+0] [0+0+0 46.671875 0+0+0] children: not-inline\n SVGSVGBox <svg> at [585,9] [1+0+0 70 0+0+1] [1+0+0 160 0+0+1] [SVG] children: not-inline\n SVGGeometryBox <circle> at [596.671875,99] [0+0+0 46.671875 0+0+0] [0+0+0 46.671875 0+0+0] children: not-inline\n SVGSVGBox <svg> at [657,9] [1+0+0 70 0+0+1] [1+0+0 160 0+0+1] [SVG] children: not-inline\n SVGGeometryBox <circle> at [668.671875,99] [0+0+0 46.671875 0+0+0] [0+0+0 46.671875 0+0+0] children: not-inline\n \n ViewportPaintable (Viewport<#document>) [0,0 800x600]\n PaintableWithLines (BlockContainer<HTML>) [0,0 800x178]\n PaintableWithLines (BlockContainer<BODY>) [8,8 784x162]\n SVGSVGPaintable (SVGSVGBox<svg>) [9,9 70x160]\n SVGPathPaintable (SVGGeometryBox<circle>) [20.671875,49 46.671875x80]\n SVGSVGPaintable (SVGSVGBox<svg>) [81,9 70x160]\n SVGPathPaintable (SVGGeometryBox<circle>) [92.671875,32.328125 46.671875x46.671875]\n SVGSVGPaintable (SVGSVGBox<svg>) [153,9 70x160]\n SVGPathPaintable (SVGGeometryBox<circle>) [164.671875,32.328125 46.671875x46.671875]\n SVGSVGPaintable (SVGSVGBox<svg>) [225,9 70x160]\n SVGPathPaintable (SVGGeometryBox<circle>) [236.671875,32.328125 46.671875x46.671875]\n SVGSVGPaintable (SVGSVGBox<svg>) [297,9 70x160]\n SVGPathPaintable (SVGGeometryBox<circle>) [308.671875,65.65625 46.671875x46.671875]\n SVGSVGPaintable (SVGSVGBox<svg>) [369,9 70x160]\n SVGPathPaintable (SVGGeometryBox<circle>) [380.671875,65.65625 46.671875x46.671875]\n SVGSVGPaintable (SVGSVGBox<svg>) [441,9 70x160]\n SVGPathPaintable (SVGGeometryBox<circle>) [452.671875,65.65625 46.671875x46.671875]\n SVGSVGPaintable (SVGSVGBox<svg>) [513,9 70x160]\n SVGPathPaintable (SVGGeometryBox<circle>) [524.671875,99 46.671875x46.671875]\n SVGSVGPaintable (SVGSVGBox<svg>) [585,9 70x160]\n SVGPathPaintable (SVGGeometryBox<circle>) [596.671875,99 46.671875x46.671875]\n SVGSVGPaintable (SVGSVGBox<svg>) [657,9 70x160]\n SVGPathPaintable (SVGGeometryBox<circle>) [668.671875,99 46.671875x46.671875]\n \n SC for Viewport<#document> [0,0 800x600] [children: 1] (z-index: auto)\n SC for BlockContainer<HTML> [0,0 800x178] [children: 0] (z-index: auto)\n"),
TestLayoutGeometryCase(mode = "layout", html = "<!DOCTYPE html><svg width=\"70\" height=\"160\" viewBox=\"0 0 30 40\" preserveAspectRatio=\"none slice\"><circle cx=\"15\" cy=\"20\" r=\"10\"/></svg><svg width=\"70\" height=\"160\" viewBox=\"0 0 30 40\" preserveAspectRatio=\"xMinYMin slice\"><circle cx=\"15\" cy=\"20\" r=\"10\"/></svg><svg width=\"70\" height=\"160\" viewBox=\"0 0 30 40\" preserveAspectRatio=\"xMidYMin slice\"><circle cx=\"15\" cy=\"20\" r=\"10\"/></svg><svg width=\"70\" height=\"160\" viewBox=\"0 0 30 40\" preserveAspectRatio=\"xMaxYMin slice\"><circle cx=\"15\" cy=\"20\" r=\"10\"/></svg><svg width=\"70\" height=\"160\" viewBox=\"0 0 30 40\" preserveAspectRatio=\"xMinYMid slice\"><circle cx=\"15\" cy=\"20\" r=\"10\"/></svg><svg width=\"70\" height=\"160\" viewBox=\"0 0 30 40\" preserveAspectRatio=\"xMidYMid slice\"><circle cx=\"15\" cy=\"20\" r=\"10\"/></svg><svg width=\"70\" height=\"160\" viewBox=\"0 0 30 40\" preserveAspectRatio=\"xMaxYMid slice\"><circle cx=\"15\" cy=\"20\" r=\"10\"/></svg><svg width=\"70\" height=\"160\" viewBox=\"0 0 30 40\" preserveAspectRatio=\"xMinYMax slice\"><circle cx=\"15\" cy=\"20\" r=\"10\"/></svg><svg width=\"70\" height=\"160\" viewBox=\"0 0 30 40\" preserveAspectRatio=\"xMidYMax slice\"><circle cx=\"15\" cy=\"20\" r=\"10\"/></svg><svg width=\"70\" height=\"160\" viewBox=\"0 0 30 40\" preserveAspectRatio=\"xMaxYMax slice\"><circle cx=\"15\" cy=\"20\" r=\"10\"/></svg>", css = "svg { margin: 1px; }", expected = " Viewport <#document> at [0,0] [0+0+0 800 0+0+0] [0+0+0 600 0+0+0] [BFC] children: not-inline\n BlockContainer <html> at [0,0] [0+0+0 800 0+0+0] [0+0+0 178 0+0+0] [BFC] children: not-inline\n BlockContainer <body> at [8,8] [8+0+0 784 0+0+8] [8+0+0 162 0+0+8] children: inline\n frag 0 from SVGSVGBox start: 0, length: 0, rect: [9,9 70x160] baseline: 162\n frag 1 from SVGSVGBox start: 0, length: 0, rect: [81,9 70x160] baseline: 162\n frag 2 from SVGSVGBox start: 0, length: 0, rect: [153,9 70x160] baseline: 162\n frag 3 from SVGSVGBox start: 0, length: 0, rect: [225,9 70x160] baseline: 162\n frag 4 from SVGSVGBox start: 0, length: 0, rect: [297,9 70x160] baseline: 162\n frag 5 from SVGSVGBox start: 0, length: 0, rect: [369,9 70x160] baseline: 162\n frag 6 from SVGSVGBox start: 0, length: 0, rect: [441,9 70x160] baseline: 162\n frag 7 from SVGSVGBox start: 0, length: 0, rect: [513,9 70x160] baseline: 162\n frag 8 from SVGSVGBox start: 0, length: 0, rect: [585,9 70x160] baseline: 162\n frag 9 from SVGSVGBox start: 0, length: 0, rect: [657,9 70x160] baseline: 162\n SVGSVGBox <svg> at [9,9] [1+0+0 70 0+0+1] [1+0+0 160 0+0+1] [SVG] children: not-inline\n SVGGeometryBox <circle> at [20.671875,49] [0+0+0 46.671875 0+0+0] [0+0+0 80 0+0+0] children: not-inline\n SVGSVGBox <svg> at [81,9] [1+0+0 70 0+0+1] [1+0+0 160 0+0+1] [SVG] children: not-inline\n SVGGeometryBox <circle> at [101,49] [0+0+0 80 0+0+0] [0+0+0 80 0+0+0] children: not-inline\n SVGSVGBox <svg> at [153,9] [1+0+0 70 0+0+1] [1+0+0 160 0+0+1] [SVG] children: not-inline\n SVGGeometryBox <circle> at [148,49] [0+0+0 80 0+0+0] [0+0+0 80 0+0+0] children: not-inline\n SVGSVGBox <svg> at [225,9] [1+0+0 70 0+0+1] [1+0+0 160 0+0+1] [SVG] children: not-inline\n SVGGeometryBox <circle> at [195,49] [0+0+0 80 0+0+0] [0+0+0 80 0+0+0] children: not-inline\n SVGSVGBox <svg> at [297,9] [1+0+0 70 0+0+1] [1+0+0 160 0+0+1] [SVG] children: not-inline\n SVGGeometryBox <circle> at [317,49] [0+0+0 80 0+0+0] [0+0+0 80 0+0+0] children: not-inline\n SVGSVGBox <svg> at [369,9] [1+0+0 70 0+0+1] [1+0+0 160 0+0+1] [SVG] children: not-inline\n SVGGeometryBox <circle> at [364,49] [0+0+0 80 0+0+0] [0+0+0 80 0+0+0] children: not-inline\n SVGSVGBox <svg> at [441,9] [1+0+0 70 0+0+1] [1+0+0 160 0+0+1] [SVG] children: not-inline\n SVGGeometryBox <circle> at [411,49] [0+0+0 80 0+0+0] [0+0+0 80 0+0+0] children: not-inline\n SVGSVGBox <svg> at [513,9] [1+0+0 70 0+0+1] [1+0+0 160 0+0+1] [SVG] children: not-inline\n SVGGeometryBox <circle> at [533,49] [0+0+0 80 0+0+0] [0+0+0 80 0+0+0] children: not-inline\n SVGSVGBox <svg> at [585,9] [1+0+0 70 0+0+1] [1+0+0 160 0+0+1] [SVG] children: not-inline\n SVGGeometryBox <circle> at [580,49] [0+0+0 80 0+0+0] [0+0+0 80 0+0+0] children: not-inline\n SVGSVGBox <svg> at [657,9] [1+0+0 70 0+0+1] [1+0+0 160 0+0+1] [SVG] children: not-inline\n SVGGeometryBox <circle> at [627,49] [0+0+0 80 0+0+0] [0+0+0 80 0+0+0] children: not-inline\n \n ViewportPaintable (Viewport<#document>) [0,0 800x600]\n PaintableWithLines (BlockContainer<HTML>) [0,0 800x178]\n PaintableWithLines (BlockContainer<BODY>) [8,8 784x162]\n SVGSVGPaintable (SVGSVGBox<svg>) [9,9 70x160]\n SVGPathPaintable (SVGGeometryBox<circle>) [20.671875,49 46.671875x80]\n SVGSVGPaintable (SVGSVGBox<svg>) [81,9 70x160] overflow: [81,9 100x160]\n SVGPathPaintable (SVGGeometryBox<circle>) [101,49 80x80]\n SVGSVGPaintable (SVGSVGBox<svg>) [153,9 70x160] overflow: [153,9 75x160]\n SVGPathPaintable (SVGGeometryBox<circle>) [148,49 80x80]\n SVGSVGPaintable (SVGSVGBox<svg>) [225,9 70x160]\n SVGPathPaintable (SVGGeometryBox<circle>) [195,49 80x80]\n SVGSVGPaintable (SVGSVGBox<svg>) [297,9 70x160] overflow: [297,9 100x160]\n SVGPathPaintable (SVGGeometryBox<circle>) [317,49 80x80]\n SVGSVGPaintable (SVGSVGBox<svg>) [369,9 70x160] overflow: [369,9 75x160]\n SVGPathPaintable (SVGGeometryBox<circle>) [364,49 80x80]\n SVGSVGPaintable (SVGSVGBox<svg>) [441,9 70x160]\n SVGPathPaintable (SVGGeometryBox<circle>) [411,49 80x80]\n SVGSVGPaintable (SVGSVGBox<svg>) [513,9 70x160] overflow: [513,9 100x160]\n SVGPathPaintable (SVGGeometryBox<circle>) [533,49 80x80]\n SVGSVGPaintable (SVGSVGBox<svg>) [585,9 70x160] overflow: [585,9 75x160]\n SVGPathPaintable (SVGGeometryBox<circle>) [580,49 80x80]\n SVGSVGPaintable (SVGSVGBox<svg>) [657,9 70x160]\n SVGPathPaintable (SVGGeometryBox<circle>) [627,49 80x80]\n \n SC for Viewport<#document> [0,0 800x600] [children: 1] (z-index: auto)\n SC for BlockContainer<HTML> [0,0 800x178] [children: 0] (z-index: auto)\n"),
TestLayoutGeometryCase(mode = "layout", html = "<!DOCTYPE html><svg width=\"100\" height=\"100\" viewBox=\"0 0 -10 50\"><rect width=\"40\" height=\"40\"/></svg><svg width=\"100\" height=\"100\" viewBox=\"0 0 50 0\"><rect width=\"40\" height=\"40\"/></svg><svg width=\"100\" height=\"100\" viewBox=\"-20 -30 70 90\"><rect x=\"-10\" y=\"-20\" width=\"40\" height=\"40\"/></svg><svg width=\"99\" height=\"77\" viewBox=\"0 0 7 3\"><rect x=\"1\" y=\"1\" width=\"3\" height=\"1\"/></svg>", css = "", expected = " Viewport <#document> at [0,0] [0+0+0 800 0+0+0] [0+0+0 600 0+0+0] [BFC] children: not-inline\n BlockContainer <html> at [0,0] [0+0+0 800 0+0+0] [0+0+0 116 0+0+0] [BFC] children: not-inline\n BlockContainer <body> at [8,8] [8+0+0 784 0+0+8] [8+0+0 100 0+0+8] children: inline\n frag 0 from SVGSVGBox start: 0, length: 0, rect: [8,8 100x100] baseline: 100\n frag 1 from SVGSVGBox start: 0, length: 0, rect: [108,8 100x100] baseline: 100\n frag 2 from SVGSVGBox start: 0, length: 0, rect: [208,8 100x100] baseline: 100\n frag 3 from SVGSVGBox start: 0, length: 0, rect: [308,31 99x77] baseline: 77\n SVGSVGBox <svg> at [8,8] [0+0+0 100 0+0+0] [0+0+0 100 0+0+0] [SVG] children: not-inline\n SVGGeometryBox <rect> at [8,8] [0+0+0 40 0+0+0] [0+0+0 40 0+0+0] children: not-inline\n SVGSVGBox <svg> at [108,8] [0+0+0 100 0+0+0] [0+0+0 100 0+0+0] [SVG] children: not-inline\n SVGGeometryBox <rect> at [108,8] [0+0+0 40 0+0+0] [0+0+0 40 0+0+0] children: not-inline\n SVGSVGBox <svg> at [208,8] [0+0+0 100 0+0+0] [0+0+0 100 0+0+0] [SVG] children: not-inline\n SVGGeometryBox <rect> at [230.21875,19.109375] [0+0+0 44.4375 0+0+0] [0+0+0 44.4375 0+0+0] children: not-inline\n SVGSVGBox <svg> at [308,31] [0+0+0 99 0+0+0] [0+0+0 77 0+0+0] [SVG] children: not-inline\n SVGGeometryBox <rect> at [322.140625,62.421875] [0+0+0 42.421875 0+0+0] [0+0+0 14.140625 0+0+0] children: not-inline\n \n ViewportPaintable (Viewport<#document>) [0,0 800x600]\n PaintableWithLines (BlockContainer<HTML>) [0,0 800x116]\n PaintableWithLines (BlockContainer<BODY>) [8,8 784x100]\n SVGSVGPaintable (SVGSVGBox<svg>) [8,8 100x100]\n SVGPathPaintable (SVGGeometryBox<rect>) [8,8 40x40]\n SVGSVGPaintable (SVGSVGBox<svg>) [108,8 100x100]\n SVGPathPaintable (SVGGeometryBox<rect>) [108,8 40x40]\n SVGSVGPaintable (SVGSVGBox<svg>) [208,8 100x100]\n SVGPathPaintable (SVGGeometryBox<rect>) [230.21875,19.109375 44.4375x44.4375]\n SVGSVGPaintable (SVGSVGBox<svg>) [308,31 99x77]\n SVGPathPaintable (SVGGeometryBox<rect>) [322.140625,62.421875 42.421875x14.140625]\n \n SC for Viewport<#document> [0,0 800x600] [children: 1] (z-index: auto)\n SC for BlockContainer<HTML> [0,0 800x116] [children: 0] (z-index: auto)\n"),
TestLayoutGeometryCase(mode = "layout", html = "<!DOCTYPE html><svg width=\"300\" height=\"200\"><svg x=\"10\" y=\"20\" width=\"100\" height=\"50\" viewBox=\"0 0 10 10\"><rect width=\"5\" height=\"5\"/></svg><svg x=\"25%\" y=\"10%\" width=\"50%\" height=\"40%\"><rect width=\"20\" height=\"30\"/></svg><svg x=\"150\" y=\"100\"><rect width=\"10\" height=\"10\"/></svg></svg>", css = "", expected = " Viewport <#document> at [0,0] [0+0+0 800 0+0+0] [0+0+0 600 0+0+0] [BFC] children: not-inline\n BlockContainer <html> at [0,0] [0+0+0 800 0+0+0] [0+0+0 216 0+0+0] [BFC] children: not-inline\n BlockContainer <body> at [8,8] [8+0+0 784 0+0+8] [8+0+0 200 0+0+8] children: inline\n frag 0 from SVGSVGBox start: 0, length: 0, rect: [8,8 300x200] baseline: 200\n SVGSVGBox <svg> at [8,8] [0+0+0 300 0+0+0] [0+0+0 200 0+0+0] [SVG] children: inline\n SVGSVGBox <svg> at [18,28] [0+0+0 100 0+0+0] [0+0+0 50 0+0+0] [SVG] children: not-inline\n SVGGeometryBox <rect> at [43,28] [0+0+0 25 0+0+0] [0+0+0 25 0+0+0] children: not-inline\n SVGSVGBox <svg> at [83,28] [0+0+0 150 0+0+0] [0+0+0 80 0+0+0] [SVG] children: not-inline\n SVGGeometryBox <rect> at [83,28] [0+0+0 20 0+0+0] [0+0+0 30 0+0+0] children: not-inline\n SVGSVGBox <svg> at [158,108] [0+0+0 300 0+0+0] [0+0+0 200 0+0+0] [SVG] children: not-inline\n SVGGeometryBox <rect> at [158,108] [0+0+0 10 0+0+0] [0+0+0 10 0+0+0] children: not-inline\n \n ViewportPaintable (Viewport<#document>) [0,0 800x600]\n PaintableWithLines (BlockContainer<HTML>) [0,0 800x216]\n PaintableWithLines (BlockContainer<BODY>) [8,8 784x200]\n SVGSVGPaintable (SVGSVGBox<svg>) [8,8 300x200] overflow: [8,8 450x300]\n SVGSVGPaintable (SVGSVGBox<svg>) [18,28 100x50]\n SVGPathPaintable (SVGGeometryBox<rect>) [43,28 25x25]\n SVGSVGPaintable (SVGSVGBox<svg>) [83,28 150x80]\n SVGPathPaintable (SVGGeometryBox<rect>) [83,28 20x30]\n SVGSVGPaintable (SVGSVGBox<svg>) [158,108 300x200]\n SVGPathPaintable (SVGGeometryBox<rect>) [158,108 10x10]\n \n SC for Viewport<#document> [0,0 800x600] [children: 1] (z-index: auto)\n SC for BlockContainer<HTML> [0,0 800x216] [children: 0] (z-index: auto)\n"),
TestLayoutGeometryCase(mode = "layout", html = "<!DOCTYPE html><svg width=\"400\" height=\"300\" viewBox=\"0 0 200 150\"><svg x=\"10\" y=\"10\" width=\"100\" height=\"100\" viewBox=\"0 0 50 50\" preserveAspectRatio=\"xMinYMax slice\"><rect width=\"80\" height=\"20\"/><svg x=\"5\" y=\"5\" width=\"20\" height=\"20\" viewBox=\"0 0 2 4\"><rect width=\"1\" height=\"1\"/></svg></svg></svg>", css = "", expected = " Viewport <#document> at [0,0] [0+0+0 800 0+0+0] [0+0+0 600 0+0+0] [BFC] children: not-inline\n BlockContainer <html> at [0,0] [0+0+0 800 0+0+0] [0+0+0 316 0+0+0] [BFC] children: not-inline\n BlockContainer <body> at [8,8] [8+0+0 784 0+0+8] [8+0+0 300 0+0+8] children: inline\n frag 0 from SVGSVGBox start: 0, length: 0, rect: [8,8 400x300] baseline: 300\n SVGSVGBox <svg> at [8,8] [0+0+0 400 0+0+0] [0+0+0 300 0+0+0] [SVG] children: inline\n SVGSVGBox <svg> at [28,28] [0+0+0 200 0+0+0] [0+0+0 200 0+0+0] [SVG] children: inline\n SVGGeometryBox <rect> at [28,28] [0+0+0 320 0+0+0] [0+0+0 80 0+0+0] children: not-inline\n SVGSVGBox <svg> at [48,48] [0+0+0 80 0+0+0] [0+0+0 80 0+0+0] [SVG] children: not-inline\n SVGGeometryBox <rect> at [68,48] [0+0+0 20 0+0+0] [0+0+0 20 0+0+0] children: not-inline\n \n ViewportPaintable (Viewport<#document>) [0,0 800x600]\n PaintableWithLines (BlockContainer<HTML>) [0,0 800x316]\n PaintableWithLines (BlockContainer<BODY>) [8,8 784x300]\n SVGSVGPaintable (SVGSVGBox<svg>) [8,8 400x300]\n SVGSVGPaintable (SVGSVGBox<svg>) [28,28 200x200] overflow: [28,28 320x200]\n SVGPathPaintable (SVGGeometryBox<rect>) [28,28 320x80]\n SVGSVGPaintable (SVGSVGBox<svg>) [48,48 80x80]\n SVGPathPaintable (SVGGeometryBox<rect>) [68,48 20x20]\n \n SC for Viewport<#document> [0,0 800x600] [children: 1] (z-index: auto)\n SC for BlockContainer<HTML> [0,0 800x316] [children: 0] (z-index: auto)\n"),
TestLayoutGeometryCase(mode = "layout", html = "<!DOCTYPE html><svg width=\"300\" height=\"300\"><g transform=\"translate(10 20)\"><rect width=\"30\" height=\"40\"/><g transform=\"scale(2)\"><circle cx=\"20\" cy=\"20\" r=\"5\"/><g></g></g></g><g transform=\"matrix(1 0 0 1 100 100)\"><ellipse cx=\"10\" cy=\"10\" rx=\"20\" ry=\"5\"/></g></svg>", css = "", expected = " Viewport <#document> at [0,0] [0+0+0 800 0+0+0] [0+0+0 600 0+0+0] [BFC] children: not-inline\n BlockContainer <html> at [0,0] [0+0+0 800 0+0+0] [0+0+0 316 0+0+0] [BFC] children: not-inline\n BlockContainer <body> at [8,8] [8+0+0 784 0+0+8] [8+0+0 300 0+0+8] children: inline\n frag 0 from SVGSVGBox start: 0, length: 0, rect: [8,8 300x300] baseline: 300\n SVGSVGBox <svg> at [8,8] [0+0+0 300 0+0+0] [0+0+0 300 0+0+0] [SVG] children: not-inline\n SVGGraphicsBox <g> at [8,8] [0+0+0 60 0+0+0] [0+0+0 70 0+0+0] children: not-inline\n SVGGeometryBox <rect> at [18,28] [0+0+0 30 0+0+0] [0+0+0 40 0+0+0] children: not-inline\n SVGGraphicsBox <g> at [8,8] [0+0+0 60 0+0+0] [0+0+0 70 0+0+0] children: not-inline\n SVGGeometryBox <circle> at [48,58] [0+0+0 20 0+0+0] [0+0+0 20 0+0+0] children: not-inline\n SVGGraphicsBox <g> at [8,8] [0+0+0 0 0+0+0] [0+0+0 0 0+0+0] children: not-inline\n SVGGraphicsBox <g> at [98,113] [0+0+0 40 0+0+0] [0+0+0 10 0+0+0] children: not-inline\n SVGGeometryBox <ellipse> at [98,113] [0+0+0 40 0+0+0] [0+0+0 10 0+0+0] children: not-inline\n \n ViewportPaintable (Viewport<#document>) [0,0 800x600]\n PaintableWithLines (BlockContainer<HTML>) [0,0 800x316]\n PaintableWithLines (BlockContainer<BODY>) [8,8 784x300]\n SVGSVGPaintable (SVGSVGBox<svg>) [8,8 300x300]\n SVGGraphicsPaintable (SVGGraphicsBox<g>) [8,8 60x70]\n SVGPathPaintable (SVGGeometryBox<rect>) [18,28 30x40]\n SVGGraphicsPaintable (SVGGraphicsBox<g>) [8,8 60x70]\n SVGPathPaintable (SVGGeometryBox<circle>) [48,58 20x20]\n SVGGraphicsPaintable (SVGGraphicsBox<g>) [8,8 0x0]\n SVGGraphicsPaintable (SVGGraphicsBox<g>) [98,113 40x10]\n SVGPathPaintable (SVGGeometryBox<ellipse>) [98,113 40x10]\n \n SC for Viewport<#document> [0,0 800x600] [children: 1] (z-index: auto)\n SC for BlockContainer<HTML> [0,0 800x316] [children: 0] (z-index: auto)\n"),
TestLayoutGeometryCase(mode = "layout", html = "<!DOCTYPE html><svg width=\"300\" height=\"300\"><rect x=\"50\" y=\"50\" width=\"60\" height=\"30\" transform=\"rotate(30)\"/><rect x=\"50\" y=\"150\" width=\"60\" height=\"30\" transform=\"skewX(20) translate(5 5)\"/><line x1=\"200\" y1=\"10\" x2=\"250\" y2=\"90\" transform=\"rotate(-45 225 50)\" stroke=\"black\" stroke-width=\"3\"/></svg>", css = "", expected = " Viewport <#document> at [0,0] [0+0+0 800 0+0+0] [0+0+0 600 0+0+0] [BFC] children: not-inline\n BlockContainer <html> at [0,0] [0+0+0 800 0+0+0] [0+0+0 316 0+0+0] [BFC] children: not-inline\n BlockContainer <body> at [8,8] [8+0+0 784 0+0+8] [8+0+0 300 0+0+8] children: inline\n frag 0 from SVGSVGBox start: 0, length: 0, rect: [8,8 300x300] baseline: 300\n SVGSVGBox <svg> at [8,8] [0+0+0 300 0+0+0] [0+0+0 300 0+0+0] [SVG] children: not-inline\n SVGGeometryBox <rect> at [11.296875,76.296875] [0+0+0 66.96875 0+0+0] [0+0+0 55.984375 0+0+0] children: not-inline\n SVGGeometryBox <rect> at [119.421875,163] [0+0+0 70.921875 0+0+0] [0+0+0 30 0+0+0] children: not-inline\n SVGGeometryBox <line> at [185.53125,10.53125] [0+0+0 94.921875 0+0+0] [0+0+0 94.921875 0+0+0] children: not-inline\n \n ViewportPaintable (Viewport<#document>) [0,0 800x600]\n PaintableWithLines (BlockContainer<HTML>) [0,0 800x316]\n PaintableWithLines (BlockContainer<BODY>) [8,8 784x300]\n SVGSVGPaintable (SVGSVGBox<svg>) [8,8 300x300]\n SVGPathPaintable (SVGGeometryBox<rect>) [11.296875,76.296875 66.96875x55.984375]\n SVGPathPaintable (SVGGeometryBox<rect>) [119.421875,163 70.921875x30]\n SVGPathPaintable (SVGGeometryBox<line>) [185.53125,10.53125 94.921875x94.921875]\n \n SC for Viewport<#document> [0,0 800x600] [children: 1] (z-index: auto)\n SC for BlockContainer<HTML> [0,0 800x316] [children: 0] (z-index: auto)\n"),
TestLayoutGeometryCase(mode = "layout", html = "<!DOCTYPE html><svg width=\"200\" height=\"200\"><g><rect x=\"10\" y=\"10\" width=\"20\" height=\"20\" style=\"display: none\"/><rect x=\"40\" y=\"40\" width=\"20\" height=\"20\" visibility=\"hidden\"/><g style=\"display: none\"><rect width=\"5\" height=\"5\"/></g></g></svg>", css = "", expected = " Viewport <#document> at [0,0] [0+0+0 800 0+0+0] [0+0+0 600 0+0+0] [BFC] children: not-inline\n BlockContainer <html> at [0,0] [0+0+0 800 0+0+0] [0+0+0 216 0+0+0] [BFC] children: not-inline\n BlockContainer <body> at [8,8] [8+0+0 784 0+0+8] [8+0+0 200 0+0+8] children: inline\n frag 0 from SVGSVGBox start: 0, length: 0, rect: [8,8 200x200] baseline: 200\n SVGSVGBox <svg> at [8,8] [0+0+0 200 0+0+0] [0+0+0 200 0+0+0] [SVG] children: not-inline\n SVGGraphicsBox <g> at [48,48] [0+0+0 20 0+0+0] [0+0+0 20 0+0+0] children: not-inline\n SVGGeometryBox <rect> at [48,48] [0+0+0 20 0+0+0] [0+0+0 20 0+0+0] children: not-inline\n \n ViewportPaintable (Viewport<#document>) [0,0 800x600]\n PaintableWithLines (BlockContainer<HTML>) [0,0 800x216]\n PaintableWithLines (BlockContainer<BODY>) [8,8 784x200]\n SVGSVGPaintable (SVGSVGBox<svg>) [8,8 200x200]\n SVGGraphicsPaintable (SVGGraphicsBox<g>) [48,48 20x20]\n SVGPathPaintable (SVGGeometryBox<rect>) [48,48 20x20]\n \n SC for Viewport<#document> [0,0 800x600] [children: 1] (z-index: auto)\n SC for BlockContainer<HTML> [0,0 800x216] [children: 0] (z-index: auto)\n"),
TestLayoutGeometryCase(mode = "layout", html = "<!DOCTYPE html><svg width=\"400\" height=\"300\" viewBox=\"0 0 200 150\"><rect x=\"5\" y=\"5\" width=\"40\" height=\"30\" rx=\"5\" stroke=\"red\" stroke-width=\"4\"/><circle cx=\"80\" cy=\"30\" r=\"20\" stroke=\"blue\" stroke-width=\"1.5\" fill=\"none\"/><ellipse cx=\"140\" cy=\"30\" rx=\"30\" ry=\"15\" stroke=\"green\"/><line x1=\"10\" y1=\"80\" x2=\"60\" y2=\"140\" stroke=\"black\" stroke-width=\"7\"/><polyline points=\"80,80 100,140 120,90\" stroke=\"black\" stroke-width=\"2\" fill=\"none\"/><polygon points=\"140,80 190,90 170,140\" stroke=\"none\"/></svg>", css = "", expected = " Viewport <#document> at [0,0] [0+0+0 800 0+0+0] [0+0+0 600 0+0+0] [BFC] children: not-inline\n BlockContainer <html> at [0,0] [0+0+0 800 0+0+0] [0+0+0 316 0+0+0] [BFC] children: not-inline\n BlockContainer <body> at [8,8] [8+0+0 784 0+0+8] [8+0+0 300 0+0+8] children: inline\n frag 0 from SVGSVGBox start: 0, length: 0, rect: [8,8 400x300] baseline: 300\n SVGSVGBox <svg> at [8,8] [0+0+0 400 0+0+0] [0+0+0 300 0+0+0] [SVG] children: not-inline\n SVGGeometryBox <rect> at [14,14] [0+0+0 88 0+0+0] [0+0+0 68 0+0+0] children: not-inline\n SVGGeometryBox <circle> at [126.5,26.5] [0+0+0 83 0+0+0] [0+0+0 83 0+0+0] children: not-inline\n SVGGeometryBox <ellipse> at [227,37] [0+0+0 122 0+0+0] [0+0+0 62 0+0+0] children: not-inline\n SVGGeometryBox <line> at [21,161] [0+0+0 114 0+0+0] [0+0+0 134 0+0+0] children: not-inline\n SVGGeometryBox <polyline> at [166,166] [0+0+0 84 0+0+0] [0+0+0 124 0+0+0] children: not-inline\n SVGGeometryBox <polygon> at [288,168] [0+0+0 100 0+0+0] [0+0+0 120 0+0+0] children: not-inline\n \n ViewportPaintable (Viewport<#document>) [0,0 800x600]\n PaintableWithLines (BlockContainer<HTML>) [0,0 800x316]\n PaintableWithLines (BlockContainer<BODY>) [8,8 784x300]\n SVGSVGPaintable (SVGSVGBox<svg>) [8,8 400x300]\n SVGPathPaintable (SVGGeometryBox<rect>) [14,14 88x68]\n SVGPathPaintable (SVGGeometryBox<circle>) [126.5,26.5 83x83]\n SVGPathPaintable (SVGGeometryBox<ellipse>) [227,37 122x62]\n SVGPathPaintable (SVGGeometryBox<line>) [21,161 114x134]\n SVGPathPaintable (SVGGeometryBox<polyline>) [166,166 84x124]\n SVGPathPaintable (SVGGeometryBox<polygon>) [288,168 100x120]\n \n SC for Viewport<#document> [0,0 800x600] [children: 1] (z-index: auto)\n SC for BlockContainer<HTML> [0,0 800x316] [children: 0] (z-index: auto)\n"),
TestLayoutGeometryCase(mode = "layout", html = "<!DOCTYPE html><svg width=\"300\" height=\"200\"><path d=\"M 10 10 L 90 10 L 90 90 Z\" stroke=\"black\" stroke-width=\"10\"/><path d=\"M 120 50 A 40 20 30 1 1 200 60 Q 220 120 250 50 C 260 10 280 190 290 100\" fill=\"none\" stroke=\"black\"/><rect x=\"10%\" y=\"50%\" width=\"20%\" height=\"25%\" stroke=\"black\" stroke-width=\"2%\"/></svg>", css = "", expected = " Viewport <#document> at [0,0] [0+0+0 800 0+0+0] [0+0+0 600 0+0+0] [BFC] children: not-inline\n BlockContainer <html> at [0,0] [0+0+0 800 0+0+0] [0+0+0 216 0+0+0] [BFC] children: not-inline\n BlockContainer <body> at [8,8] [8+0+0 784 0+0+8] [8+0+0 200 0+0+8] children: inline\n frag 0 from SVGSVGBox start: 0, length: 0, rect: [8,8 300x200] baseline: 200\n SVGSVGBox <svg> at [8,8] [0+0+0 300 0+0+0] [0+0+0 200 0+0+0] [SVG] children: not-inline\n SVGGeometryBox <path> at [13,13] [0+0+0 90 0+0+0] [0+0+0 90 0+0+0] children: not-inline\n SVGGeometryBox <path> at [109.640625,17.5] [0+0+0 188.859375 0+0+0] [0+0+0 181 0+0+0] children: not-inline\n SVGGeometryBox <rect> at [35.5,105.5] [0+0+0 65 0+0+0] [0+0+0 55 0+0+0] children: not-inline\n \n ViewportPaintable (Viewport<#document>) [0,0 800x600]\n PaintableWithLines (BlockContainer<HTML>) [0,0 800x216]\n PaintableWithLines (BlockContainer<BODY>) [8,8 784x200]\n SVGSVGPaintable (SVGSVGBox<svg>) [8,8 300x200]\n SVGPathPaintable (SVGGeometryBox<path>) [13,13 90x90]\n SVGPathPaintable (SVGGeometryBox<path>) [109.640625,17.5 188.859375x181]\n SVGPathPaintable (SVGGeometryBox<rect>) [35.5,105.5 65x55]\n \n SC for Viewport<#document> [0,0 800x600] [children: 1] (z-index: auto)\n SC for BlockContainer<HTML> [0,0 800x216] [children: 0] (z-index: auto)\n"),
TestLayoutGeometryCase(mode = "layout", html = "<!DOCTYPE html><svg width=\"200\" height=\"100\"><rect width=\"50\" height=\"50\" stroke=\"black\" stroke-width=\"0\"/><rect x=\"60\" width=\"30\" height=\"30\" style=\"stroke: red; stroke-width: 6px\"/><rect x=\"100\" width=\"30\" height=\"30\" stroke=\"red\" stroke-width=\"6\" stroke-opacity=\"0\"/></svg>", css = "", expected = " Viewport <#document> at [0,0] [0+0+0 800 0+0+0] [0+0+0 600 0+0+0] [BFC] children: not-inline\n BlockContainer <html> at [0,0] [0+0+0 800 0+0+0] [0+0+0 116 0+0+0] [BFC] children: not-inline\n BlockContainer <body> at [8,8] [8+0+0 784 0+0+8] [8+0+0 100 0+0+8] children: inline\n frag 0 from SVGSVGBox start: 0, length: 0, rect: [8,8 200x100] baseline: 100\n SVGSVGBox <svg> at [8,8] [0+0+0 200 0+0+0] [0+0+0 100 0+0+0] [SVG] children: not-inline\n SVGGeometryBox <rect> at [8,8] [0+0+0 50 0+0+0] [0+0+0 50 0+0+0] children: not-inline\n SVGGeometryBox <rect> at [65,5] [0+0+0 36 0+0+0] [0+0+0 36 0+0+0] children: not-inline\n SVGGeometryBox <rect> at [105,5] [0+0+0 36 0+0+0] [0+0+0 36 0+0+0] children: not-inline\n \n ViewportPaintable (Viewport<#document>) [0,0 800x600]\n PaintableWithLines (BlockContainer<HTML>) [0,0 800x116]\n PaintableWithLines (BlockContainer<BODY>) [8,8 784x100]\n SVGSVGPaintable (SVGSVGBox<svg>) [8,8 200x100]\n SVGPathPaintable (SVGGeometryBox<rect>) [8,8 50x50]\n SVGPathPaintable (SVGGeometryBox<rect>) [65,5 36x36]\n SVGPathPaintable (SVGGeometryBox<rect>) [105,5 36x36]\n \n SC for Viewport<#document> [0,0 800x600] [children: 1] (z-index: auto)\n SC for BlockContainer<HTML> [0,0 800x116] [children: 0] (z-index: auto)\n"),
TestLayoutGeometryCase(mode = "layout", html = "<!DOCTYPE html><div class=a><svg width=\"100\" viewBox=\"0 0 40 20\"><rect width=\"40\" height=\"20\"/></svg></div><div class=b><svg viewBox=\"0 0 30 60\"><rect width=\"30\" height=\"60\"/></svg></div><span>text <svg width=\"20\" height=\"10\"><rect width=\"20\" height=\"10\"/></svg> text</span>", css = ".a { width: 300px; } .b { width: 120px; }", expected = " Viewport <#document> at [0,0] [0+0+0 800 0+0+0] [0+0+0 600 0+0+0] [BFC] children: not-inline\n BlockContainer <html> at [0,0] [0+0+0 800 0+0+0] [0+0+0 324 0+0+0] [BFC] children: not-inline\n BlockContainer <body> at [8,8] [8+0+0 784 0+0+8] [8+0+0 308 0+0+8] children: not-inline\n BlockContainer <div.a> at [8,8] [0+0+0 300 0+0+484] [0+0+0 50 0+0+0] children: inline\n frag 0 from SVGSVGBox start: 0, length: 0, rect: [8,8 100x50] baseline: 50\n SVGSVGBox <svg> at [8,8] [0+0+0 100 0+0+0] [0+0+0 50 0+0+0] [SVG] children: not-inline\n SVGGeometryBox <rect> at [8,8] [0+0+0 100 0+0+0] [0+0+0 50 0+0+0] children: not-inline\n BlockContainer <div.b> at [8,58] [0+0+0 120 0+0+664] [0+0+0 240 0+0+0] children: inline\n frag 0 from SVGSVGBox start: 0, length: 0, rect: [8,58 120x240] baseline: 240\n SVGSVGBox <svg> at [8,58] [0+0+0 120 0+0+0] [0+0+0 240 0+0+0] [SVG] children: not-inline\n SVGGeometryBox <rect> at [8,58] [0+0+0 120 0+0+0] [0+0+0 240 0+0+0] children: not-inline\n BlockContainer <(anonymous)> at [8,298] [0+0+0 784 0+0+0] [0+0+0 18 0+0+0] children: inline\n InlineNode <span> at [8,298] [0+0+0 100.28125 0+0+0] [0+0+0 18 0+0+0]\n frag 0 from TextNode start: 0, length: 5, rect: [8,298 40.140625x18] baseline: 13.796875\n \"text \"\n frag 1 from SVGSVGBox start: 0, length: 0, rect: [48.140625,301 20x10] baseline: 10\n frag 2 from TextNode start: 0, length: 5, rect: [68.140625,298 40.140625x18] baseline: 13.796875\n \" text\"\n TextNode <#text> (not painted)\n SVGSVGBox <svg> at [48.140625,301] [0+0+0 20 0+0+0] [0+0+0 10 0+0+0] [SVG] children: not-inline\n SVGGeometryBox <rect> at [48.140625,301] [0+0+0 20 0+0+0] [0+0+0 10 0+0+0] children: not-inline\n TextNode <#text> (not painted)\n \n ViewportPaintable (Viewport<#document>) [0,0 800x600]\n PaintableWithLines (BlockContainer<HTML>) [0,0 800x324]\n PaintableWithLines (BlockContainer<BODY>) [8,8 784x308]\n PaintableWithLines (BlockContainer<DIV>.a) [8,8 300x50]\n SVGSVGPaintable (SVGSVGBox<svg>) [8,8 100x50]\n SVGPathPaintable (SVGGeometryBox<rect>) [8,8 100x50]\n PaintableWithLines (BlockContainer<DIV>.b) [8,58 120x240]\n SVGSVGPaintable (SVGSVGBox<svg>) [8,58 120x240]\n SVGPathPaintable (SVGGeometryBox<rect>) [8,58 120x240]\n PaintableWithLines (BlockContainer(anonymous)) [8,298 784x18]\n PaintableWithLines (InlineNode<SPAN>) [8,298 100.28125x18]\n TextPaintable (TextNode<#text>)\n SVGSVGPaintable (SVGSVGBox<svg>) [48.140625,301 20x10]\n SVGPathPaintable (SVGGeometryBox<rect>) [48.140625,301 20x10]\n TextPaintable (TextNode<#text>)\n \n SC for Viewport<#document> [0,0 800x600] [children: 1] (z-index: auto)\n SC for BlockContainer<HTML> [0,0 800x324] [children: 0] (z-index: auto)\n"),
TestLayoutGeometryCase(mode = "layout", html = "<!DOCTYPE html><div class=flex><svg width=\"50\" height=\"40\"><rect width=\"10\" height=\"10\"/></svg><svg viewBox=\"0 0 10 20\"><rect width=\"10\" height=\"10\"/></svg></div><div class=grid><svg height=\"30\" viewBox=\"0 0 20 10\"><rect width=\"20\" height=\"10\"/></svg><svg style=\"width: 50%\"><circle cx=\"10\" cy=\"10\" r=\"10\"/></svg></div>", css = ".flex { display: flex; width: 200px; } .grid { display: grid; grid-template-columns: 100px 80px; }", expected = " Viewport <#document> at [0,0] [0+0+0 800 0+0+0] [0+0+0 600 0+0+0] [BFC] children: not-inline\n BlockContainer <html> at [0,0] [0+0+0 800 0+0+0] [0+0+0 366 0+0+0] [BFC] children: not-inline\n BlockContainer <body> at [8,8] [8+0+0 784 0+0+8] [8+0+0 350 0+0+8] children: not-inline\n Box <div.flex> at [8,8] flex-container(row) [0+0+0 200 0+0+584] [0+0+0 320 0+0+0] [FFC] children: not-inline\n SVGSVGBox <svg> at [8,8] flex-item [0+0+0 40 0+0+0] [0+0+0 40 0+0+0] [SVG] children: not-inline\n SVGGeometryBox <rect> at [8,8] [0+0+0 10 0+0+0] [0+0+0 10 0+0+0] children: not-inline\n SVGSVGBox <svg> at [48,8] flex-item [0+0+0 160 0+0+0] [0+0+0 320 0+0+0] [SVG] children: not-inline\n SVGGeometryBox <rect> at [48,8] [0+0+0 160 0+0+0] [0+0+0 160 0+0+0] children: not-inline\n Box <div.grid> at [8,328] [0+0+0 784 0+0+0] [0+0+0 30 0+0+0] [GFC] children: not-inline\n SVGSVGBox <svg> at [8,328] [0+0+0 60 0+0+0] [0+0+0 30 0+0+0] [SVG] children: not-inline\n SVGGeometryBox <rect> at [8,328] [0+0+0 60 0+0+0] [0+0+0 30 0+0+0] children: not-inline\n SVGSVGBox <svg> at [108,328] [0+0+0 40 0+0+0] [0+0+0 30 0+0+0] [SVG] children: not-inline\n SVGGeometryBox <circle> at [108,328] [0+0+0 20 0+0+0] [0+0+0 20 0+0+0] children: not-inline\n \n ViewportPaintable (Viewport<#document>) [0,0 800x600]\n PaintableWithLines (BlockContainer<HTML>) [0,0 800x366]\n PaintableWithLines (BlockContainer<BODY>) [8,8 784x350]\n PaintableBox (Box<DIV>.flex) [8,8 200x320]\n SVGSVGPaintable (SVGSVGBox<svg>) [8,8 40x40]\n SVGPathPaintable (SVGGeometryBox<rect>) [8,8 10x10]\n SVGSVGPaintable (SVGSVGBox<svg>) [48,8 160x320]\n SVGPathPaintable (SVGGeometryBox<rect>) [48,8 160x160]\n PaintableBox (Box<DIV>.grid) [8,328 784x30]\n SVGSVGPaintable (SVGSVGBox<svg>) [8,328 60x30]\n SVGPathPaintable (SVGGeometryBox<rect>) [8,328 60x30]\n SVGSVGPaintable (SVGSVGBox<svg>) [108,328 40x30]\n SVGPathPaintable (SVGGeometryBox<circle>) [108,328 20x20]\n \n SC for Viewport<#document> [0,0 800x600] [children: 1] (z-index: auto)\n SC for BlockContainer<HTML> [0,0 800x366] [children: 0] (z-index: auto)\n"),
TestLayoutGeometryCase(mode = "layout", html = "<!DOCTYPE html><svg style=\"width: 120px; height: 60px\" width=\"10\" height=\"10\" viewBox=\"0 0 10 10\"><rect width=\"10\" height=\"10\"/></svg><svg width=\"0\" height=\"50\"><rect width=\"10\" height=\"10\"/></svg><svg style=\"display: block; width: 100%; height: auto\" viewBox=\"0 0 40 10\"><rect width=\"40\" height=\"10\"/></svg>", css = "", expected = " Viewport <#document> at [0,0] [0+0+0 800 0+0+0] [0+0+0 600 0+0+0] [BFC] children: not-inline\n BlockContainer <html> at [0,0] [0+0+0 800 0+0+0] [0+0+0 272 0+0+0] [BFC] children: not-inline\n BlockContainer <body> at [8,8] [8+0+0 784 0+0+8] [8+0+0 256 0+0+8] children: not-inline\n BlockContainer <(anonymous)> at [8,8] [0+0+0 784 0+0+0] [0+0+0 60 0+0+0] children: inline\n frag 0 from SVGSVGBox start: 0, length: 0, rect: [8,8 120x60] baseline: 60\n frag 1 from SVGSVGBox start: 0, length: 0, rect: [128,18 0x50] baseline: 50\n SVGSVGBox <svg> at [8,8] [0+0+0 120 0+0+0] [0+0+0 60 0+0+0] [SVG] children: not-inline\n SVGGeometryBox <rect> at [38,8] [0+0+0 60 0+0+0] [0+0+0 60 0+0+0] children: not-inline\n SVGSVGBox <svg> at [128,18] [0+0+0 0 0+0+0] [0+0+0 50 0+0+0] [SVG] children: not-inline\n SVGGeometryBox <rect> at [128,18] [0+0+0 10 0+0+0] [0+0+0 10 0+0+0] children: not-inline\n SVGSVGBox <svg> at [8,68] [0+0+0 784 0+0+0] [0+0+0 196 0+0+0] [SVG] children: not-inline\n SVGGeometryBox <rect> at [8,68] [0+0+0 784 0+0+0] [0+0+0 196 0+0+0] children: not-inline\n \n ViewportPaintable (Viewport<#document>) [0,0 800x600]\n PaintableWithLines (BlockContainer<HTML>) [0,0 800x272]\n PaintableWithLines (BlockContainer<BODY>) [8,8 784x256]\n PaintableWithLines (BlockContainer(anonymous)) [8,8 784x60]\n SVGSVGPaintable (SVGSVGBox<svg>) [8,8 120x60]\n SVGPathPaintable (SVGGeometryBox<rect>) [38,8 60x60]\n SVGSVGPaintable (SVGSVGBox<svg>) [128,18 0x50] overflow: [128,18 10x10]\n SVGPathPaintable (SVGGeometryBox<rect>) [128,18 10x10]\n SVGSVGPaintable (SVGSVGBox<svg>) [8,68 784x196]\n SVGPathPaintable (SVGGeometryBox<rect>) [8,68 784x196]\n \n SC for Viewport<#document> [0,0 800x600] [children: 1] (z-index: auto)\n SC for BlockContainer<HTML> [0,0 800x272] [children: 0] (z-index: auto)\n"),
TestLayoutGeometryCase(mode = "layout", html = "<!DOCTYPE html><svg width=\"100\" height=\"100\" style=\"position: absolute; left: 20px; top: 30px\"><rect x=\"10\" y=\"10\" width=\"30\" height=\"30\"/></svg><div style=\"transform: translate(5px, 5px)\"><svg width=\"50\" height=\"50\"><circle cx=\"25\" cy=\"25\" r=\"20\" stroke=\"black\"/></svg></div>", css = "", expected = " Viewport <#document> at [0,0] [0+0+0 800 0+0+0] [0+0+0 600 0+0+0] [BFC] children: not-inline\n BlockContainer <html> at [0,0] [0+0+0 800 0+0+0] [0+0+0 66 0+0+0] [BFC] children: not-inline\n BlockContainer <body> at [8,8] [8+0+0 784 0+0+8] [8+0+0 50 0+0+8] children: not-inline\n SVGSVGBox <svg> at [20,30] positioned [0+0+0 100 0+0+0] [0+0+0 100 0+0+0] [SVG] children: not-inline\n SVGGeometryBox <rect> at [30,40] [0+0+0 30 0+0+0] [0+0+0 30 0+0+0] children: not-inline\n BlockContainer <div> at [8,8] [0+0+0 784 0+0+0] [0+0+0 50 0+0+0] children: inline\n frag 0 from SVGSVGBox start: 0, length: 0, rect: [8,8 50x50] baseline: 50\n SVGSVGBox <svg> at [8,8] [0+0+0 50 0+0+0] [0+0+0 50 0+0+0] [SVG] children: not-inline\n SVGGeometryBox <circle> at [12.5,12.5] [0+0+0 41 0+0+0] [0+0+0 41 0+0+0] children: not-inline\n \n ViewportPaintable (Viewport<#document>) [0,0 800x600]\n PaintableWithLines (BlockContainer<HTML>) [0,0 800x66]\n PaintableWithLines (BlockContainer<BODY>) [8,8 784x50]\n SVGSVGPaintable (SVGSVGBox<svg>) [20,30 100x100]\n SVGPathPaintable (SVGGeometryBox<rect>) [30,40 30x30]\n PaintableWithLines (BlockContainer<DIV>) [8,8 784x50]\n SVGSVGPaintable (SVGSVGBox<svg>) [8,8 50x50]\n SVGPathPaintable (SVGGeometryBox<circle>) [12.5,12.5 41x41]\n \n SC for Viewport<#document> [0,0 800x600] [children: 1] (z-index: auto)\n SC for BlockContainer<HTML> [0,0 800x66] [children: 1] (z-index: auto)\n SC for BlockContainer<DIV> [8,8 784x50] [children: 0] (z-index: auto), has_transform\n"),
TestLayoutGeometryCase(mode = "layout", html = "<!DOCTYPE html><input type=number value=5 style=\"width: 120px\"><input type=number style=\"width: 60px; font-size: 20px\"><select><option>one</option><option selected>two</option></select><select style=\"height: 40px\"></select>", css = "", expected = " Viewport <#document> at [0,0] [0+0+0 800 0+0+0] [0+0+0 600 0+0+0] [BFC] children: not-inline\n BlockContainer <html> at [0,0] [0+0+0 800 0+0+0] [0+0+0 56 0+0+0] [BFC] children: not-inline\n BlockContainer <body> at [8,8] [8+0+0 784 0+0+8] [8+0+0 40 0+0+8] children: inline\n frag 0 from TextInputBox start: 0, length: 0, rect: [9,18 120x20] baseline: 19\n frag 1 from TextInputBox start: 0, length: 0, rect: [131,14 60x25] baseline: 23\n frag 2 from BlockContainer start: 0, length: 0, rect: [197,19 48.4375x18] baseline: 19\n frag 3 from BlockContainer start: 0, length: 0, rect: [255.4375,10 20x36] baseline: 28\n TextInputBox <input> at [9,18] inline-block [0+1+0 120 0+1+0] [0+1+0 20 0+1+0] [BFC] children: not-inline\n Box <div> at [11,19] flex-container(row) [0+0+2 116 2+0+0] [0+0+1 20 1+0+0] [FFC] children: not-inline\n BlockContainer <div> at [11,20] flex-item [0+0+0 80 0+0+0] [0+0+0 18 0+0+0] [BFC] children: inline\n frag 0 from TextNode start: 0, length: 1, rect: [11,20 8.453125x18] baseline: 13.796875\n \"5\"\n TextNode <#text> (not painted)\n BlockContainer <button> at [92,20] flex-item [0+1+0 16 0+1+0] [0+1+0 18 0+1+0] [BFC] children: not-inline\n BlockContainer <(anonymous)> at [92,20] flex-container(column) [0+0+0 16 0+0+0] [0+0+0 18 0+0+0] [FFC] children: not-inline\n BlockContainer <(anonymous)> at [92,20] flex-item [0+0+0 16 0+0+0] [0+0+0 18 0+0+0] [BFC] children: inline\n frag 0 from SVGSVGBox start: 0, length: 0, rect: [92,20 16x16] baseline: 16\n SVGSVGBox <svg> at [92,20] [0+0+0 16 0+0+0] [0+0+0 16 0+0+0] [SVG] children: not-inline\n SVGGeometryBox <path> at [96,25.328125] [0+0+0 8 0+0+0] [0+0+0 4.9375 0+0+0] children: not-inline\n BlockContainer <button> at [110,20] flex-item [0+1+0 16 0+1+0] [0+1+0 18 0+1+0] [BFC] children: not-inline\n BlockContainer <(anonymous)> at [110,20] flex-container(column) [0+0+0 16 0+0+0] [0+0+0 18 0+0+0] [FFC] children: not-inline\n BlockContainer <(anonymous)> at [110,20] flex-item [0+0+0 16 0+0+0] [0+0+0 18 0+0+0] [BFC] children: inline\n frag 0 from SVGSVGBox start: 0, length: 0, rect: [110,20 16x16] baseline: 16\n SVGSVGBox <svg> at [110,20] [0+0+0 16 0+0+0] [0+0+0 16 0+0+0] [SVG] children: not-inline\n SVGGeometryBox <path> at [114,25.71875] [0+0+0 8 0+0+0] [0+0+0 4.953125 0+0+0] children: not-inline\n TextInputBox <input> at [131,14] inline-block [0+1+0 60 0+1+0] [0+1+0 25 0+1+0] [BFC] children: not-inline\n Box <div> at [133,15] flex-container(row) [0+0+2 56 2+0+0] [0+0+1 25 1+0+0] [FFC] children: not-inline\n BlockContainer <div> at [133,16] flex-item [0+0+0 12 0+0+0] [0+0+0 23 0+0+0] [BFC] children: inline\n frag 0 from TextNode start: 0, length: 0, rect: [133,16 0x23] baseline: 17.5\n TextNode <#text> (not painted)\n BlockContainer <button> at [146,16] flex-item [0+1+0 20 0+1+0] [0+1+0 23 0+1+0] [BFC] children: not-inline\n BlockContainer <(anonymous)> at [146,16] flex-container(column) [0+0+0 20 0+0+0] [0+0+0 23 0+0+0] [FFC] children: not-inline\n BlockContainer <(anonymous)> at [146,16] flex-item [0+0+0 20 0+0+0] [0+0+0 23 0+0+0] [BFC] children: inline\n frag 0 from SVGSVGBox start: 0, length: 0, rect: [146,16 20x20] baseline: 20\n SVGSVGBox <svg> at [146,16] [0+0+0 20 0+0+0] [0+0+0 20 0+0+0] [SVG] children: not-inline\n SVGGeometryBox <path> at [151,22.671875] [0+0+0 10 0+0+0] [0+0+0 6.171875 0+0+0] children: not-inline\n BlockContainer <button> at [168,16] flex-item [0+1+0 20 0+1+0] [0+1+0 23 0+1+0] [BFC] children: not-inline\n BlockContainer <(anonymous)> at [168,16] flex-container(column) [0+0+0 20 0+0+0] [0+0+0 23 0+0+0] [FFC] children: not-inline\n BlockContainer <(anonymous)> at [168,16] flex-item [0+0+0 20 0+0+0] [0+0+0 23 0+0+0] [BFC] children: inline\n frag 0 from SVGSVGBox start: 0, length: 0, rect: [168,16 20x20] baseline: 20\n SVGSVGBox <svg> at [168,16] [0+0+0 20 0+0+0] [0+0+0 20 0+0+0] [SVG] children: not-inline\n SVGGeometryBox <path> at [173,23.15625] [0+0+0 10 0+0+0] [0+0+0 6.1875 0+0+0] children: not-inline\n BlockContainer <select> at [197,19] inline-block [0+1+4 48.4375 4+1+0] [0+1+1 18 1+1+0] [BFC] children: not-inline\n Box <div> at [197,19] flex-container(row) [0+0+0 48.4375 0+0+0] [0+0+0 18 0+0+0] [FFC] children: not-inline\n BlockContainer <div> at [197,19] flex-item [0+0+0 28.4375 0+0+0] [0+0+0 18 0+0+0] [BFC] children: inline\n frag 0 from TextNode start: 0, length: 3, rect: [197,19 28.4375x18] baseline: 13.796875\n \"two\"\n TextNode <#text> (not painted)\n BlockContainer <div> at [229.4375,20] flex-item [4+0+0 16 0+0+0] [0+0+0 16 0+0+0] [BFC] children: inline\n frag 0 from SVGSVGBox start: 0, length: 0, rect: [229.4375,20 16x16] baseline: 16\n SVGSVGBox <svg> at [229.4375,20] [0+0+0 16 0+0+0] [0+0+0 16 0+0+0] [SVG] children: not-inline\n SVGGeometryBox <path> at [233.4375,25.71875] [0+0+0 8 0+0+0] [0+0+0 4.953125 0+0+0] children: not-inline\n BlockContainer <select> at [255.4375,10] inline-block [0+1+4 20 4+1+0] [0+1+1 36 1+1+0] [BFC] children: not-inline\n Box <div> at [255.4375,10] flex-container(row) [0+0+0 20 0+0+0] [0+0+0 36 0+0+0] [FFC] children: not-inline\n BlockContainer <div> at [255.4375,28] flex-item [0+0+0 0 0+0+0] [0+0+0 0 0+0+0] [BFC] children: not-inline\n BlockContainer <div> at [259.4375,20] flex-item [4+0+0 16 0+0+0] [0+0+0 16 0+0+0] [BFC] children: inline\n frag 0 from SVGSVGBox start: 0, length: 0, rect: [259.4375,20 16x16] baseline: 16\n SVGSVGBox <svg> at [259.4375,20] [0+0+0 16 0+0+0] [0+0+0 16 0+0+0] [SVG] children: not-inline\n SVGGeometryBox <path> at [263.4375,25.71875] [0+0+0 8 0+0+0] [0+0+0 4.953125 0+0+0] children: not-inline\n \n ViewportPaintable (Viewport<#document>) [0,0 800x600]\n PaintableWithLines (BlockContainer<HTML>) [0,0 800x56]\n PaintableWithLines (BlockContainer<BODY>) [8,8 784x40]\n PaintableWithLines (TextInputBox<INPUT>) [8,17 122x22]\n PaintableBox (Box<DIV>) [9,18 120x22]\n PaintableWithLines (BlockContainer<DIV>) [11,20 80x18]\n TextPaintable (TextNode<#text>)\n PaintableWithLines (BlockContainer<BUTTON>) [91,19 18x20]\n PaintableWithLines (BlockContainer(anonymous)) [92,20 16x18]\n PaintableWithLines (BlockContainer(anonymous)) [92,20 16x18]\n SVGSVGPaintable (SVGSVGBox<svg>) [92,20 16x16]\n SVGPathPaintable (SVGGeometryBox<path>) [96,25.328125 8x4.9375]\n PaintableWithLines (BlockContainer<BUTTON>) [109,19 18x20]\n PaintableWithLines (BlockContainer(anonymous)) [110,20 16x18]\n PaintableWithLines (BlockContainer(anonymous)) [110,20 16x18]\n SVGSVGPaintable (SVGSVGBox<svg>) [110,20 16x16]\n SVGPathPaintable (SVGGeometryBox<path>) [114,25.71875 8x4.953125]\n PaintableWithLines (TextInputBox<INPUT>) [130,13 62x27]\n PaintableBox (Box<DIV>) [131,14 60x27]\n PaintableWithLines (BlockContainer<DIV>) [133,16 12x23]\n TextPaintable (TextNode<#text>)\n PaintableWithLines (BlockContainer<BUTTON>) [145,15 22x25]\n PaintableWithLines (BlockContainer(anonymous)) [146,16 20x23]\n PaintableWithLines (BlockContainer(anonymous)) [146,16 20x23]\n SVGSVGPaintable (SVGSVGBox<svg>) [146,16 20x20]\n SVGPathPaintable (SVGGeometryBox<path>) [151,22.671875 10x6.171875]\n PaintableWithLines (BlockContainer<BUTTON>) [167,15 22x25]\n PaintableWithLines (BlockContainer(anonymous)) [168,16 20x23]\n PaintableWithLines (BlockContainer(anonymous)) [168,16 20x23]\n SVGSVGPaintable (SVGSVGBox<svg>) [168,16 20x20]\n SVGPathPaintable (SVGGeometryBox<path>) [173,23.15625 10x6.1875]\n PaintableWithLines (BlockContainer<SELECT>) [192,17 58.4375x22]\n PaintableBox (Box<DIV>) [197,19 48.4375x18]\n PaintableWithLines (BlockContainer<DIV>) [197,19 28.4375x18]\n TextPaintable (TextNode<#text>)\n PaintableWithLines (BlockContainer<DIV>) [229.4375,20 16x16]\n SVGSVGPaintable (SVGSVGBox<svg>) [229.4375,20 16x16]\n SVGPathPaintable (SVGGeometryBox<path>) [233.4375,25.71875 8x4.953125]\n PaintableWithLines (BlockContainer<SELECT>) [250.4375,8 30x40]\n PaintableBox (Box<DIV>) [255.4375,10 20x36]\n PaintableWithLines (BlockContainer<DIV>) [255.4375,28 0x0]\n PaintableWithLines (BlockContainer<DIV>) [259.4375,20 16x16]\n SVGSVGPaintable (SVGSVGBox<svg>) [259.4375,20 16x16]\n SVGPathPaintable (SVGGeometryBox<path>) [263.4375,25.71875 8x4.953125]\n \n SC for Viewport<#document> [0,0 800x600] [children: 1] (z-index: auto)\n SC for BlockContainer<HTML> [0,0 800x56] [children: 0] (z-index: auto)\n"),
TestLayoutGeometryCase(mode = "layout", html = "<!DOCTYPE html><input type=checkbox><input type=checkbox checked style=\"width: 30px; height: 20px\"><input type=radio><input type=radio checked style=\"margin: 10px\"><label><input type=checkbox> label</label>", css = "", expected = " Viewport <#document> at [0,0] [0+0+0 800 0+0+0] [0+0+0 600 0+0+0] [BFC] children: not-inline\n BlockContainer <html> at [0,0] [0+0+0 800 0+0+0] [0+0+0 52 0+0+0] [BFC] children: not-inline\n BlockContainer <body> at [8,8] [8+0+0 784 0+0+8] [8+0+0 36 0+0+8] children: inline\n frag 0 from CheckBox start: 0, length: 0, rect: [8,27 13x13] baseline: 13\n frag 1 from CheckBox start: 0, length: 0, rect: [21,20 30x20] baseline: 20\n frag 2 from RadioButton start: 0, length: 0, rect: [51,28 12x12] baseline: 12\n frag 3 from RadioButton start: 0, length: 0, rect: [73,18 12x12] baseline: 32\n CheckBox <input> at [8,27] inline-block [0+0+0 13 0+0+0] [0+0+0 13 0+0+0] children: not-inline\n CheckBox <input> at [21,20] inline-block [0+0+0 30 0+0+0] [0+0+0 20 0+0+0] children: not-inline\n RadioButton <input> at [51,28] inline-block [0+0+0 12 0+0+0] [0+0+0 12 0+0+0] children: not-inline\n RadioButton <input> at [73,18] inline-block [10+0+0 12 0+0+10] [10+0+0 12 0+0+10] children: not-inline\n InlineNode <label> at [95,27] [0+0+0 57 0+0+0] [0+0+0 18 0+0+0]\n frag 0 from CheckBox start: 0, length: 0, rect: [95,27 13x13] baseline: 13\n frag 1 from TextNode start: 0, length: 6, rect: [108,26 44x18] baseline: 13.796875\n \" label\"\n CheckBox <input> at [95,27] inline-block [0+0+0 13 0+0+0] [0+0+0 13 0+0+0] children: not-inline\n TextNode <#text> (not painted)\n \n ViewportPaintable (Viewport<#document>) [0,0 800x600]\n PaintableWithLines (BlockContainer<HTML>) [0,0 800x52]\n PaintableWithLines (BlockContainer<BODY>) [8,8 784x36]\n CheckBoxPaintable (CheckBox<INPUT>) [8,27 13x13]\n CheckBoxPaintable (CheckBox<INPUT>) [21,20 30x20]\n RadioButtonPaintable (RadioButton<INPUT>) [51,28 12x12]\n RadioButtonPaintable (RadioButton<INPUT>) [73,18 12x12]\n PaintableWithLines (InlineNode<LABEL>) [95,27 57x18]\n CheckBoxPaintable (CheckBox<INPUT>) [95,27 13x13]\n TextPaintable (TextNode<#text>)\n \n SC for Viewport<#document> [0,0 800x600] [children: 1] (z-index: auto)\n SC for BlockContainer<HTML> [0,0 800x52] [children: 0] (z-index: auto)\n"),
TestLayoutGeometryCase(mode = "svg", html = "<!DOCTYPE html><svg width=\"200\" height=\"100\" viewBox=\"0 0 100 50\"><g transform=\"translate(10 5)\"><rect x=\"5\" y=\"5\" width=\"20\" height=\"10\" stroke=\"black\" stroke-width=\"2\"/><g transform=\"scale(2 0.5)\"><polygon points=\"16,16 24,16 20,24\"/></g></g><path d=\"M 0 0 L 50 25 H 80 V 40 Z\" shape-rendering=\"crispEdges\"/><line x1=\"0\" y1=\"50\" x2=\"100\" y2=\"0\" stroke=\"red\" shape-rendering=\"optimizeSpeed\"/></svg>", css = "", expected = " #3 SVGSVGPaintable rect [8,8 200x100]\n #4 SVGGraphicsPaintable rect [36,26 88x24]\n transforms viewbox [2 0 0 2 0 0] svg [1 0 0 1 10 5] css [2 0 0 2 20 10]\n mask none clip none\n contributes true bounds [38,28 86x20] anti-alias true\n #5 SVGPathPaintable rect [36,26 44x24]\n transforms viewbox [2 0 0 2 0 0] svg [1 0 0 1 10 5] css [2 0 0 2 20 10]\n mask none clip none\n path M5 5L25 5L25 15L5 15L5 5Z\n bbox [5,5 20x10]\n contributes true bounds [38,28 40x20] anti-alias true\n #6 SVGGraphicsPaintable rect [92,34 32x8]\n transforms viewbox [2 0 0 2 0 0] svg [2 0 0 0.5 10 5] css [4 0 0 1 20 10]\n mask none clip none\n contributes true bounds [92,34 32x8] anti-alias true\n #7 SVGPathPaintable rect [92,34 32x8]\n transforms viewbox [2 0 0 2 0 0] svg [2 0 0 0.5 10 5] css [4 0 0 1 20 10]\n mask none clip none\n path M16 16L24 16L20 24L16 16Z\n bbox [16,16 8x8]\n contributes true bounds [92,34 32x8] anti-alias true\n #8 SVGPathPaintable rect [8,8 160x80]\n transforms viewbox [2 0 0 2 0 0] svg [1 0 0 1 0 0] css [2 0 0 2 0 0]\n mask none clip none\n path M0 0L50 25L80 25L80 40L0 0Z\n bbox [0,0 80x40]\n contributes true bounds [8,8 160x80] anti-alias false\n #9 SVGPathPaintable rect [7,7 202x102]\n transforms viewbox [2 0 0 2 0 0] svg [1 0 0 1 0 0] css [2 0 0 2 0 0]\n mask none clip none\n path M0 50L100 0\n bbox [0,0 100x50]\n contributes true bounds [8,8 200x100] anti-alias false\n"),
TestLayoutGeometryCase(mode = "svg", html = "<!DOCTYPE html><div style=\"padding: 13px\"><svg width=\"150\" height=\"150\" viewBox=\"10 20 30 30\" preserveAspectRatio=\"xMaxYMax slice\"><polygon points=\"10,20 40,20 25,50\"/><polyline points=\"12,22 14,30 30,25\" fill=\"none\" stroke=\"blue\"/><svg x=\"20\" y=\"30\" width=\"10\" height=\"10\" viewBox=\"0 0 4 4\"><rect width=\"2\" height=\"2\" style=\"visibility: hidden\"/><rect x=\"2\" y=\"2\" width=\"2\" height=\"2\"/></svg></svg></div>", css = "", expected = " #4 SVGSVGPaintable rect [21,21 150x150]\n #5 SVGPathPaintable rect [21,21 150x150]\n transforms viewbox [5 0 0 5 -50 -100] svg [1 0 0 1 0 0] css [5 0 0 5 -50 -100]\n mask none clip none\n path M10 20L40 20L25 50L10 20Z\n bbox [10,20 30x30]\n contributes true bounds [21,21 150x150] anti-alias true\n #6 SVGPathPaintable rect [28.5,28.5 95x45]\n transforms viewbox [5 0 0 5 -50 -100] svg [1 0 0 1 0 0] css [5 0 0 5 -50 -100]\n mask none clip none\n path M12 22L14 30L30 25\n bbox [12,22 18x8]\n contributes true bounds [31,31 90x40] anti-alias true\n #7 SVGSVGPaintable rect [71,71 50x50]\n #8 SVGPathPaintable rect [71,71 25x25]\n transforms viewbox [12.5 0 0 12.5 0 0] svg [1 0 0 1 0 0] css [12.5 0 0 12.5 0 0]\n mask none clip none\n path M0 0L2 0L2 2L0 2L0 0Z\n bbox [0,0 2x2]\n contributes false bounds none anti-alias true\n #9 SVGPathPaintable rect [96,96 25x25]\n transforms viewbox [12.5 0 0 12.5 0 0] svg [1 0 0 1 0 0] css [12.5 0 0 12.5 0 0]\n mask none clip none\n path M2 2L4 2L4 4L2 4L2 2Z\n bbox [2,2 2x2]\n contributes true bounds [96,96 25x25] anti-alias true\n"),
TestLayoutGeometryCase(mode = "svg", html = "<!DOCTYPE html><svg width=\"120\" height=\"80\"><polygon points=\"10,10 110,10 60,70\" transform=\"matrix(1 0 0 1 3 4)\"/><rect x=\"25%\" y=\"25%\" width=\"50%\" height=\"50%\"/><g style=\"display: none\"><rect width=\"10\" height=\"10\"/></g><path d=\"\"/></svg>", css = "", expected = " #3 SVGSVGPaintable rect [8,8 120x80]\n #4 SVGPathPaintable rect [21,22 100x60]\n transforms viewbox [1 0 0 1 0 0] svg [1 0 0 1 3 4] css [1 0 0 1 3 4]\n mask none clip none\n path M10 10L110 10L60 70L10 10Z\n bbox [10,10 100x60]\n contributes true bounds [21,22 100x60] anti-alias true\n #5 SVGPathPaintable rect [38,28 60x40]\n transforms viewbox [1 0 0 1 0 0] svg [1 0 0 1 0 0] css [1 0 0 1 0 0]\n mask none clip none\n path M30 20L90 20L90 60L30 60L30 20Z\n bbox [30,20 60x40]\n contributes true bounds [38,28 60x40] anti-alias true\n #6 SVGPathPaintable rect [8,8 0x0]\n transforms viewbox [1 0 0 1 0 0] svg [1 0 0 1 0 0] css [1 0 0 1 0 0]\n mask none clip none\n path \n bbox [0,0 0x0]\n contributes true bounds [0,0 0x0] anti-alias true\n"),
TestLayoutGeometryCase(mode = "layout", html = "<!DOCTYPE html><svg width=\"200\" height=\"150\"><mask id=\"m1\"><rect x=\"10\" y=\"10\" width=\"50\" height=\"40\" fill=\"white\"/></mask><mask id=\"m2\" maskUnits=\"userSpaceOnUse\" maskContentUnits=\"objectBoundingBox\" x=\"0\" y=\"0\" width=\"200\" height=\"150\"><rect width=\"0.5\" height=\"0.5\" fill=\"white\"/></mask><rect x=\"5\" y=\"5\" width=\"80\" height=\"60\" mask=\"url(#m1)\"/><rect x=\"100\" y=\"20\" width=\"60\" height=\"100\" mask=\"url(#m2)\"/></svg>", css = "", expected = " Viewport <#document> at [0,0] [0+0+0 800 0+0+0] [0+0+0 600 0+0+0] [BFC] children: not-inline\n BlockContainer <html> at [0,0] [0+0+0 800 0+0+0] [0+0+0 166 0+0+0] [BFC] children: not-inline\n BlockContainer <body> at [8,8] [8+0+0 784 0+0+8] [8+0+0 150 0+0+8] children: inline\n frag 0 from SVGSVGBox start: 0, length: 0, rect: [8,8 200x150] baseline: 150\n SVGSVGBox <svg> at [8,8] [0+0+0 200 0+0+0] [0+0+0 150 0+0+0] [SVG] children: not-inline\n SVGGeometryBox <rect> at [13,13] [0+0+0 80 0+0+0] [0+0+0 60 0+0+0] children: not-inline\n SVGMaskBox <mask#m1> at [8,8] [0+0+0 200 0+0+0] [0+0+0 150 0+0+0] children: not-inline\n SVGGeometryBox <rect> at [18,18] [0+0+0 50 0+0+0] [0+0+0 40 0+0+0] children: not-inline\n SVGGeometryBox <rect> at [108,28] [0+0+0 60 0+0+0] [0+0+0 100 0+0+0] children: not-inline\n SVGMaskBox <mask#m2> at [108,28] [0+0+0 60 0+0+0] [0+0+0 100 0+0+0] children: not-inline\n SVGGeometryBox <rect> at [108,28] [0+0+0 30 0+0+0] [0+0+0 50 0+0+0] children: not-inline\n \n ViewportPaintable (Viewport<#document>) [0,0 800x600]\n PaintableWithLines (BlockContainer<HTML>) [0,0 800x166]\n PaintableWithLines (BlockContainer<BODY>) [8,8 784x150]\n SVGSVGPaintable (SVGSVGBox<svg>) [8,8 200x150]\n SVGPathPaintable (SVGGeometryBox<rect>) [13,13 80x60]\n SVGPathPaintable (SVGGeometryBox<rect>) [108,28 60x100]\n \n SC for Viewport<#document> [0,0 800x600] [children: 1] (z-index: auto)\n SC for BlockContainer<HTML> [0,0 800x166] [children: 0] (z-index: auto)\n"),
TestLayoutGeometryCase(mode = "svg", html = "<!DOCTYPE html><svg width=\"200\" height=\"150\"><mask id=\"m1\"><rect x=\"10\" y=\"10\" width=\"50\" height=\"40\" fill=\"white\"/></mask><mask id=\"m2\" maskUnits=\"userSpaceOnUse\" maskContentUnits=\"objectBoundingBox\" x=\"0\" y=\"0\" width=\"200\" height=\"150\"><rect width=\"0.5\" height=\"0.5\" fill=\"white\"/></mask><rect x=\"5\" y=\"5\" width=\"80\" height=\"60\" mask=\"url(#m1)\"/><rect x=\"100\" y=\"20\" width=\"60\" height=\"100\" mask=\"url(#m2)\"/></svg>", css = "", expected = " #3 SVGSVGPaintable rect [8,8 200x150]\n #4 SVGPathPaintable rect [13,13 80x60]\n transforms viewbox [1 0 0 1 0 0] svg [1 0 0 1 0 0] css [1 0 0 1 0 0]\n mask [-10.75,-6.0625 237.5x178.125] clip none\n path M5 5L85 5L85 65L5 65L5 5Z\n bbox [5,5 80x60]\n contributes true bounds [13,13 80x60] anti-alias true\n #5 SVGMaskPaintable rect [8,8 200x150]\n transforms viewbox [1 0 0 1 0 0] svg [1 0 0 1 0 0] css [1 0 0 1 0 0]\n mask none clip none\n contributes true bounds [18,18 50x40] anti-alias true\n #6 SVGPathPaintable rect [18,18 50x40]\n transforms viewbox [1 0 0 1 0 0] svg [1 0 0 1 0 0] css [1 0 0 1 0 0]\n mask none clip none\n path M10 10L60 10L60 50L10 50L10 10Z\n bbox [10,10 50x40]\n contributes true bounds [18,18 50x40] anti-alias true\n #7 SVGPathPaintable rect [108,28 60x100]\n transforms viewbox [1 0 0 1 0 0] svg [1 0 0 1 0 0] css [1 0 0 1 0 0]\n mask [102.375,18.625 71.25x118.75] clip none\n path M100 20L160 20L160 120L100 120L100 20Z\n bbox [100,20 60x100]\n contributes true bounds [108,28 60x100] anti-alias true\n #8 SVGMaskPaintable rect [108,28 60x100]\n transforms viewbox [1 0 0 1 0 0] svg [1 0 0 1 0 0] css [1 0 0 1 0 0]\n mask none clip none\n contributes true bounds [108,28 30x50] anti-alias true\n #9 SVGPathPaintable rect [108,28 30x50]\n transforms viewbox [60 0 0 100 100 20] svg [1 0 0 1 0 0] css [60 0 0 100 100 20]\n mask none clip none\n path M0 0L0.5 0L0.5 0.5L0 0.5L0 0Z\n bbox [0,0 0.5x0.5]\n contributes true bounds [108,28 30x50] anti-alias true\n"),
TestLayoutGeometryCase(mode = "layout", html = "<!DOCTYPE html><svg width=\"200\" height=\"150\" viewBox=\"0 0 100 75\"><clipPath id=\"c1\"><rect x=\"10\" y=\"10\" width=\"30\" height=\"20\"/><polygon points=\"50,5 90,5 70,40\"/></clipPath><clipPath id=\"c2\" clipPathUnits=\"objectBoundingBox\"><rect x=\"0.25\" y=\"0.25\" width=\"0.5\" height=\"0.5\"/></clipPath><g clip-path=\"url(#c1)\"><rect width=\"100\" height=\"75\" fill=\"green\"/></g><rect x=\"10\" y=\"45\" width=\"40\" height=\"20\" clip-path=\"url(#c2)\"/></svg>", css = "", expected = " Viewport <#document> at [0,0] [0+0+0 800 0+0+0] [0+0+0 600 0+0+0] [BFC] children: not-inline\n BlockContainer <html> at [0,0] [0+0+0 800 0+0+0] [0+0+0 166 0+0+0] [BFC] children: not-inline\n BlockContainer <body> at [8,8] [8+0+0 784 0+0+8] [8+0+0 150 0+0+8] children: inline\n frag 0 from SVGSVGBox start: 0, length: 0, rect: [8,8 200x150] baseline: 150\n SVGSVGBox <svg> at [8,8] [0+0+0 200 0+0+0] [0+0+0 150 0+0+0] [SVG] children: not-inline\n SVGGraphicsBox <g> at [8,8] [0+0+0 200 0+0+0] [0+0+0 150 0+0+0] children: not-inline\n SVGGeometryBox <rect> at [8,8] [0+0+0 200 0+0+0] [0+0+0 150 0+0+0] children: not-inline\n SVGClipBox <clipPath#c1> at [8,8] [0+0+0 200 0+0+0] [0+0+0 150 0+0+0] children: not-inline\n SVGGeometryBox <rect> at [28,28] [0+0+0 60 0+0+0] [0+0+0 40 0+0+0] children: not-inline\n SVGGeometryBox <polygon> at [108,18] [0+0+0 80 0+0+0] [0+0+0 70 0+0+0] children: not-inline\n SVGGeometryBox <rect> at [28,98] [0+0+0 80 0+0+0] [0+0+0 40 0+0+0] children: not-inline\n SVGClipBox <clipPath#c2> at [28,98] [0+0+0 80 0+0+0] [0+0+0 40 0+0+0] children: not-inline\n SVGGeometryBox <rect> at [48,108] [0+0+0 40 0+0+0] [0+0+0 20 0+0+0] children: not-inline\n \n ViewportPaintable (Viewport<#document>) [0,0 800x600]\n PaintableWithLines (BlockContainer<HTML>) [0,0 800x166]\n PaintableWithLines (BlockContainer<BODY>) [8,8 784x150]\n SVGSVGPaintable (SVGSVGBox<svg>) [8,8 200x150]\n SVGGraphicsPaintable (SVGGraphicsBox<g>) [8,8 200x150]\n SVGPathPaintable (SVGGeometryBox<rect>) [8,8 200x150]\n SVGPathPaintable (SVGGeometryBox<rect>) [28,98 80x40]\n \n SC for Viewport<#document> [0,0 800x600] [children: 1] (z-index: auto)\n SC for BlockContainer<HTML> [0,0 800x166] [children: 0] (z-index: auto)\n"),
TestLayoutGeometryCase(mode = "svg", html = "<!DOCTYPE html><svg width=\"200\" height=\"150\" viewBox=\"0 0 100 75\"><clipPath id=\"c1\"><rect x=\"10\" y=\"10\" width=\"30\" height=\"20\"/><polygon points=\"50,5 90,5 70,40\"/></clipPath><clipPath id=\"c2\" clipPathUnits=\"objectBoundingBox\"><rect x=\"0.25\" y=\"0.25\" width=\"0.5\" height=\"0.5\"/></clipPath><g clip-path=\"url(#c1)\"><rect width=\"100\" height=\"75\" fill=\"green\"/></g><rect x=\"10\" y=\"45\" width=\"40\" height=\"20\" clip-path=\"url(#c2)\"/></svg>", css = "", expected = " #3 SVGSVGPaintable rect [8,8 200x150]\n #4 SVGGraphicsPaintable rect [8,8 200x150]\n transforms viewbox [2 0 0 2 0 0] svg [1 0 0 1 0 0] css [2 0 0 2 0 0]\n mask none clip [28,18 160x70]\n contributes true bounds [8,8 200x150] anti-alias true\n #5 SVGPathPaintable rect [8,8 200x150]\n transforms viewbox [2 0 0 2 0 0] svg [1 0 0 1 0 0] css [2 0 0 2 0 0]\n mask none clip none\n path M0 0L100 0L100 75L0 75L0 0Z\n bbox [0,0 100x75]\n contributes true bounds [8,8 200x150] anti-alias true\n #6 SVGClipPaintable rect [8,8 200x150]\n contributes true bounds [28,18 160x70] anti-alias true\n #7 SVGPathPaintable rect [28,28 60x40]\n transforms viewbox [2 0 0 2 0 0] svg [1 0 0 1 0 0] css [2 0 0 2 0 0]\n mask none clip none\n path M10 10L40 10L40 30L10 30L10 10Z\n bbox [10,10 30x20]\n contributes true bounds [28,28 60x40] anti-alias true\n #8 SVGPathPaintable rect [108,18 80x70]\n transforms viewbox [2 0 0 2 0 0] svg [1 0 0 1 0 0] css [2 0 0 2 0 0]\n mask none clip none\n path M50 5L90 5L70 40L50 5Z\n bbox [50,5 40x35]\n contributes true bounds [108,18 80x70] anti-alias true\n #9 SVGPathPaintable rect [28,98 80x40]\n transforms viewbox [2 0 0 2 0 0] svg [1 0 0 1 0 0] css [2 0 0 2 0 0]\n mask none clip [48,108 40x20]\n path M10 45L50 45L50 65L10 65L10 45Z\n bbox [10,45 40x20]\n contributes true bounds [28,98 80x40] anti-alias true\n #10 SVGClipPaintable rect [28,98 80x40]\n contributes true bounds [48,108 40x20] anti-alias true\n #11 SVGPathPaintable rect [48,108 40x20]\n transforms viewbox [80 0 0 40 20 90] svg [1 0 0 1 0 0] css [80 0 0 40 20 90]\n mask none clip none\n path M0.25 0.25L0.75 0.25L0.75 0.75L0.25 0.75L0.25 0.25Z\n bbox [0.25,0.25 0.5x0.5]\n contributes true bounds [48,108 40x20] anti-alias true\n"),
TestLayoutGeometryCase(mode = "layout", html = "<!DOCTYPE html><svg width=\"300\" height=\"200\"><defs><symbol id=\"s\" viewBox=\"0 0 10 10\"><rect x=\"1\" y=\"1\" width=\"8\" height=\"8\"/></symbol><g id=\"g\"><rect width=\"20\" height=\"10\"/><polygon points=\"25,0 35,0 30,10\"/></g></defs><use href=\"#s\" x=\"10\" y=\"10\" width=\"50\" height=\"50\"/><use href=\"#s\" x=\"100\" y=\"10\" width=\"80\" height=\"40\"/><use href=\"#g\" x=\"10\" y=\"100\" transform=\"scale(2)\"/><use xlink:href=\"#g\" x=\"150\" y=\"150\"/></svg>", css = "", expected = " Viewport <#document> at [0,0] [0+0+0 800 0+0+0] [0+0+0 600 0+0+0] [BFC] children: not-inline\n BlockContainer <html> at [0,0] [0+0+0 800 0+0+0] [0+0+0 216 0+0+0] [BFC] children: not-inline\n BlockContainer <body> at [8,8] [8+0+0 784 0+0+8] [8+0+0 200 0+0+8] children: inline\n frag 0 from SVGSVGBox start: 0, length: 0, rect: [8,8 300x200] baseline: 200\n SVGSVGBox <svg> at [8,8] [0+0+0 300 0+0+0] [0+0+0 200 0+0+0] [SVG] children: not-inline\n SVGGraphicsBox <use> at [8,8] [0+0+0 300 0+0+0] [0+0+0 200 0+0+0] children: not-inline\n SVGGraphicsBox <symbol#s> at [8,8] [0+0+0 300 0+0+0] [0+0+0 200 0+0+0] [BFC] children: not-inline\n SVGGeometryBox <rect> at [278,228] [0+0+0 160 0+0+0] [0+0+0 160 0+0+0] children: not-inline\n SVGGraphicsBox <use> at [8,8] [0+0+0 300 0+0+0] [0+0+0 200 0+0+0] children: not-inline\n SVGGraphicsBox <symbol#s> at [8,8] [0+0+0 300 0+0+0] [0+0+0 200 0+0+0] [BFC] children: not-inline\n SVGGeometryBox <rect> at [2078,228] [0+0+0 160 0+0+0] [0+0+0 160 0+0+0] children: not-inline\n SVGGraphicsBox <use> at [28,208] [0+0+0 70 0+0+0] [0+0+0 20 0+0+0] children: not-inline\n SVGGraphicsBox <g#g> at [28,208] [0+0+0 70 0+0+0] [0+0+0 20 0+0+0] children: not-inline\n SVGGeometryBox <rect> at [28,208] [0+0+0 40 0+0+0] [0+0+0 20 0+0+0] children: not-inline\n SVGGeometryBox <polygon> at [78,208] [0+0+0 20 0+0+0] [0+0+0 20 0+0+0] children: not-inline\n SVGGraphicsBox <use> at [158,158] [0+0+0 35 0+0+0] [0+0+0 10 0+0+0] children: not-inline\n SVGGraphicsBox <g#g> at [158,158] [0+0+0 35 0+0+0] [0+0+0 10 0+0+0] children: not-inline\n SVGGeometryBox <rect> at [158,158] [0+0+0 20 0+0+0] [0+0+0 10 0+0+0] children: not-inline\n SVGGeometryBox <polygon> at [183,158] [0+0+0 10 0+0+0] [0+0+0 10 0+0+0] children: not-inline\n \n ViewportPaintable (Viewport<#document>) [0,0 800x600]\n PaintableWithLines (BlockContainer<HTML>) [0,0 800x216]\n PaintableWithLines (BlockContainer<BODY>) [8,8 784x200]\n SVGSVGPaintable (SVGSVGBox<svg>) [8,8 300x200] overflow: [8,8 2230x380]\n SVGGraphicsPaintable (SVGGraphicsBox<use>) [8,8 300x200]\n SVGGraphicsPaintable (SVGGraphicsBox<symbol>#s) [8,8 300x200]\n SVGPathPaintable (SVGGeometryBox<rect>) [278,228 160x160]\n SVGGraphicsPaintable (SVGGraphicsBox<use>) [8,8 300x200]\n SVGGraphicsPaintable (SVGGraphicsBox<symbol>#s) [8,8 300x200]\n SVGPathPaintable (SVGGeometryBox<rect>) [2078,228 160x160]\n SVGGraphicsPaintable (SVGGraphicsBox<use>) [28,208 70x20]\n SVGGraphicsPaintable (SVGGraphicsBox<g>#g) [28,208 70x20]\n SVGPathPaintable (SVGGeometryBox<rect>) [28,208 40x20]\n SVGPathPaintable (SVGGeometryBox<polygon>) [78,208 20x20]\n SVGGraphicsPaintable (SVGGraphicsBox<use>) [158,158 35x10]\n SVGGraphicsPaintable (SVGGraphicsBox<g>#g) [158,158 35x10]\n SVGPathPaintable (SVGGeometryBox<rect>) [158,158 20x10]\n SVGPathPaintable (SVGGeometryBox<polygon>) [183,158 10x10]\n \n SC for Viewport<#document> [0,0 800x600] [children: 1] (z-index: auto)\n SC for BlockContainer<HTML> [0,0 800x216] [children: 0] (z-index: auto)\n"),
TestLayoutGeometryCase(mode = "svg", html = "<!DOCTYPE html><svg width=\"300\" height=\"200\"><defs><symbol id=\"s\" viewBox=\"0 0 10 10\"><rect x=\"1\" y=\"1\" width=\"8\" height=\"8\"/></symbol><g id=\"g\"><rect width=\"20\" height=\"10\"/><polygon points=\"25,0 35,0 30,10\"/></g></defs><use href=\"#s\" x=\"10\" y=\"10\" width=\"50\" height=\"50\"/><use href=\"#s\" x=\"100\" y=\"10\" width=\"80\" height=\"40\"/><use href=\"#g\" x=\"10\" y=\"100\" transform=\"scale(2)\"/><use xlink:href=\"#g\" x=\"150\" y=\"150\"/></svg>", css = "", expected = " #3 SVGSVGPaintable rect [8,8 300x200]\n #4 SVGGraphicsPaintable rect [8,8 300x200]\n transforms viewbox [1 0 0 1 0 0] svg [1 0 0 1 10 10] css [1 0 0 1 10 10]\n mask none clip none\n contributes true bounds [278,228 160x160] anti-alias true\n #5 SVGGraphicsPaintable rect [8,8 300x200]\n transforms viewbox [1 0 0 1 0 0] svg [1 0 0 1 0 0] css [1 0 0 1 0 0]\n mask none clip none\n contributes true bounds [278,228 160x160] anti-alias true\n #6 SVGPathPaintable rect [278,228 160x160]\n transforms viewbox [20 0 0 20 50 0] svg [1 0 0 1 10 10] css [20 0 0 20 250 200]\n mask none clip none\n path M1 1L9 1L9 9L1 9L1 1Z\n bbox [1,1 8x8]\n contributes true bounds [278,228 160x160] anti-alias true\n #7 SVGGraphicsPaintable rect [8,8 300x200]\n transforms viewbox [1 0 0 1 0 0] svg [1 0 0 1 100 10] css [1 0 0 1 100 10]\n mask none clip none\n contributes true bounds [2078,228 160x160] anti-alias true\n #8 SVGGraphicsPaintable rect [8,8 300x200]\n transforms viewbox [1 0 0 1 0 0] svg [1 0 0 1 0 0] css [1 0 0 1 0 0]\n mask none clip none\n contributes true bounds [2078,228 160x160] anti-alias true\n #9 SVGPathPaintable rect [2078,228 160x160]\n transforms viewbox [20 0 0 20 50 0] svg [1 0 0 1 100 10] css [20 0 0 20 2050 200]\n mask none clip none\n path M1 1L9 1L9 9L1 9L1 1Z\n bbox [1,1 8x8]\n contributes true bounds [2078,228 160x160] anti-alias true\n #10 SVGGraphicsPaintable rect [28,208 70x20]\n transforms viewbox [1 0 0 1 0 0] svg [2 0 0 2 20 200] css [2 0 0 2 20 200]\n mask none clip none\n contributes true bounds [28,208 70x20] anti-alias true\n #11 SVGGraphicsPaintable rect [28,208 70x20]\n transforms viewbox [1 0 0 1 0 0] svg [2 0 0 2 20 200] css [2 0 0 2 20 200]\n mask none clip none\n contributes true bounds [28,208 70x20] anti-alias true\n #12 SVGPathPaintable rect [28,208 40x20]\n transforms viewbox [1 0 0 1 0 0] svg [2 0 0 2 20 200] css [2 0 0 2 20 200]\n mask none clip none\n path M0 0L20 0L20 10L0 10L0 0Z\n bbox [0,0 20x10]\n contributes true bounds [28,208 40x20] anti-alias true\n #13 SVGPathPaintable rect [78,208 20x20]\n transforms viewbox [1 0 0 1 0 0] svg [2 0 0 2 20 200] css [2 0 0 2 20 200]\n mask none clip none\n path M25 0L35 0L30 10L25 0Z\n bbox [25,0 10x10]\n contributes true bounds [78,208 20x20] anti-alias true\n #14 SVGGraphicsPaintable rect [158,158 35x10]\n transforms viewbox [1 0 0 1 0 0] svg [1 0 0 1 150 150] css [1 0 0 1 150 150]\n mask none clip none\n contributes true bounds [158,158 35x10] anti-alias true\n #15 SVGGraphicsPaintable rect [158,158 35x10]\n transforms viewbox [1 0 0 1 0 0] svg [1 0 0 1 150 150] css [1 0 0 1 150 150]\n mask none clip none\n contributes true bounds [158,158 35x10] anti-alias true\n #16 SVGPathPaintable rect [158,158 20x10]\n transforms viewbox [1 0 0 1 0 0] svg [1 0 0 1 150 150] css [1 0 0 1 150 150]\n mask none clip none\n path M0 0L20 0L20 10L0 10L0 0Z\n bbox [0,0 20x10]\n contributes true bounds [158,158 20x10] anti-alias true\n #17 SVGPathPaintable rect [183,158 10x10]\n transforms viewbox [1 0 0 1 0 0] svg [1 0 0 1 150 150] css [1 0 0 1 150 150]\n mask none clip none\n path M25 0L35 0L30 10L25 0Z\n bbox [25,0 10x10]\n contributes true bounds [183,158 10x10] anti-alias true\n"),
TestLayoutGeometryCase(mode = "layout", html = "<!DOCTYPE html><svg width=\"200\" height=\"100\"><g id=\"a\"><use href=\"#b\"/></g><g id=\"b\"><use href=\"#a\"/><rect width=\"10\" height=\"10\"/></g><use href=\"#missing\" x=\"5\"/><use href=\"#b\" x=\"50\" y=\"20\"/></svg>", css = "", expected = " Viewport <#document> at [0,0] [0+0+0 800 0+0+0] [0+0+0 600 0+0+0] [BFC] children: not-inline\n BlockContainer <html> at [0,0] [0+0+0 800 0+0+0] [0+0+0 116 0+0+0] [BFC] children: not-inline\n BlockContainer <body> at [8,8] [8+0+0 784 0+0+8] [8+0+0 100 0+0+8] children: inline\n frag 0 from SVGSVGBox start: 0, length: 0, rect: [8,8 200x100] baseline: 100\n SVGSVGBox <svg> at [8,8] [0+0+0 200 0+0+0] [0+0+0 100 0+0+0] [SVG] children: not-inline\n SVGGraphicsBox <g#a> at [8,8] [0+0+0 0 0+0+0] [0+0+0 0 0+0+0] children: not-inline\n SVGGraphicsBox <use> at [8,8] [0+0+0 0 0+0+0] [0+0+0 0 0+0+0] children: not-inline\n SVGGraphicsBox <g#b> at [8,8] [0+0+0 10 0+0+0] [0+0+0 10 0+0+0] children: not-inline\n SVGGraphicsBox <use> at [8,8] [0+0+0 0 0+0+0] [0+0+0 0 0+0+0] children: not-inline\n SVGGraphicsBox <g#a> at [8,8] [0+0+0 0 0+0+0] [0+0+0 0 0+0+0] children: not-inline\n SVGGraphicsBox <use> at [8,8] [0+0+0 0 0+0+0] [0+0+0 0 0+0+0] children: not-inline\n SVGGraphicsBox <g#b> at [8,8] [0+0+0 0 0+0+0] [0+0+0 0 0+0+0] children: not-inline\n SVGGeometryBox <rect> at [8,8] [0+0+0 10 0+0+0] [0+0+0 10 0+0+0] children: not-inline\n SVGGraphicsBox <use> at [8,8] [0+0+0 0 0+0+0] [0+0+0 0 0+0+0] children: not-inline\n SVGGraphicsBox <use> at [8,8] [0+0+0 0 0+0+0] [0+0+0 0 0+0+0] children: not-inline\n \n ViewportPaintable (Viewport<#document>) [0,0 800x600]\n PaintableWithLines (BlockContainer<HTML>) [0,0 800x116]\n PaintableWithLines (BlockContainer<BODY>) [8,8 784x100]\n SVGSVGPaintable (SVGSVGBox<svg>) [8,8 200x100]\n SVGGraphicsPaintable (SVGGraphicsBox<g>#a) [8,8 0x0]\n SVGGraphicsPaintable (SVGGraphicsBox<use>) [8,8 0x0]\n SVGGraphicsPaintable (SVGGraphicsBox<g>#b) [8,8 10x10]\n SVGGraphicsPaintable (SVGGraphicsBox<use>) [8,8 0x0]\n SVGGraphicsPaintable (SVGGraphicsBox<g>#a) [8,8 0x0]\n SVGGraphicsPaintable (SVGGraphicsBox<use>) [8,8 0x0]\n SVGGraphicsPaintable (SVGGraphicsBox<g>#b) [8,8 0x0]\n SVGPathPaintable (SVGGeometryBox<rect>) [8,8 10x10]\n SVGGraphicsPaintable (SVGGraphicsBox<use>) [8,8 0x0]\n SVGGraphicsPaintable (SVGGraphicsBox<use>) [8,8 0x0]\n \n SC for Viewport<#document> [0,0 800x600] [children: 1] (z-index: auto)\n SC for BlockContainer<HTML> [0,0 800x116] [children: 0] (z-index: auto)\n"),
TestLayoutGeometryCase(mode = "svg", html = "<!DOCTYPE html><svg width=\"200\" height=\"100\"><g id=\"a\"><use href=\"#b\"/></g><g id=\"b\"><use href=\"#a\"/><rect width=\"10\" height=\"10\"/></g><use href=\"#missing\" x=\"5\"/><use href=\"#b\" x=\"50\" y=\"20\"/></svg>", css = "", expected = " #3 SVGSVGPaintable rect [8,8 200x100]\n #4 SVGGraphicsPaintable rect [8,8 0x0]\n transforms viewbox [1 0 0 1 0 0] svg [1 0 0 1 0 0] css [1 0 0 1 0 0]\n mask none clip none\n contributes true bounds none anti-alias true\n #5 SVGGraphicsPaintable rect [8,8 0x0]\n transforms viewbox [1 0 0 1 0 0] svg [1 0 0 1 0 0] css [1 0 0 1 0 0]\n mask none clip none\n contributes true bounds none anti-alias true\n #6 SVGGraphicsPaintable rect [8,8 10x10]\n transforms viewbox [1 0 0 1 0 0] svg [1 0 0 1 0 0] css [1 0 0 1 0 0]\n mask none clip none\n contributes true bounds [8,8 10x10] anti-alias true\n #7 SVGGraphicsPaintable rect [8,8 0x0]\n transforms viewbox [1 0 0 1 0 0] svg [1 0 0 1 0 0] css [1 0 0 1 0 0]\n mask none clip none\n contributes true bounds none anti-alias true\n #8 SVGGraphicsPaintable rect [8,8 0x0]\n transforms viewbox [1 0 0 1 0 0] svg [1 0 0 1 0 0] css [1 0 0 1 0 0]\n mask none clip none\n contributes true bounds none anti-alias true\n #9 SVGGraphicsPaintable rect [8,8 0x0]\n transforms viewbox [1 0 0 1 0 0] svg [1 0 0 1 0 0] css [1 0 0 1 0 0]\n mask none clip none\n contributes true bounds none anti-alias true\n #10 SVGGraphicsPaintable rect [8,8 0x0]\n transforms viewbox [1 0 0 1 0 0] svg [1 0 0 1 0 0] css [1 0 0 1 0 0]\n mask none clip none\n contributes true bounds none anti-alias true\n #11 SVGPathPaintable rect [8,8 10x10]\n transforms viewbox [1 0 0 1 0 0] svg [1 0 0 1 0 0] css [1 0 0 1 0 0]\n mask none clip none\n path M0 0L10 0L10 10L0 10L0 0Z\n bbox [0,0 10x10]\n contributes true bounds [8,8 10x10] anti-alias true\n #12 SVGGraphicsPaintable rect [8,8 0x0]\n transforms viewbox [1 0 0 1 0 0] svg [1 0 0 1 5 0] css [1 0 0 1 5 0]\n mask none clip none\n contributes true bounds none anti-alias true\n #13 SVGGraphicsPaintable rect [8,8 0x0]\n transforms viewbox [1 0 0 1 0 0] svg [1 0 0 1 50 20] css [1 0 0 1 50 20]\n mask none clip none\n contributes true bounds none anti-alias true\n"),
TestLayoutGeometryCase(mode = "layout", html = "<!DOCTYPE html><svg width=\"300\" height=\"150\" style=\"font: 16px SerenitySans\"><text x=\"10\" y=\"30\">Hello</text><text x=\"10\" y=\"60\" dx=\"5\" dy=\"-3\">shifted<tspan x=\"120\" dy=\"10\">span</tspan></text><text x=\"45%\" y=\"40%\" text-anchor=\"middle\">middle</text><text x=\"290\" y=\"140\" text-anchor=\"end\">end</text></svg>", css = "", expected = " Viewport <#document> at [0,0] [0+0+0 800 0+0+0] [0+0+0 600 0+0+0] [BFC] children: not-inline\n BlockContainer <html> at [0,0] [0+0+0 800 0+0+0] [0+0+0 166 0+0+0] [BFC] children: not-inline\n BlockContainer <body> at [8,8] [8+0+0 784 0+0+8] [8+0+0 150 0+0+8] children: inline\n frag 0 from SVGSVGBox start: 0, length: 0, rect: [8,8 300x150] baseline: 150\n SVGSVGBox <svg> at [8,8] [0+0+0 300 0+0+0] [0+0+0 150 0+0+0] [SVG] children: not-inline\n SVGTextBox <text> at [18.953125,26.6875] [0+0+0 37.34375 0+0+0] [0+0+0 12.03125 0+0+0] children: inline\n TextNode <#text> (not painted)\n SVGTextBox <text> at [23.78125,52.96875] [0+0+0 51 0+0+0] [0+0+0 12.3125 0+0+0] children: inline\n TextNode <#text> (not painted)\n SVGTextBox <tspan> at [128.78125,64.6875] [0+0+0 34.8125 0+0+0] [0+0+0 11.0625 0+0+0] children: inline\n TextNode <#text> (not painted)\n SVGTextBox <text> at [121.328125,55.96875] [0+0+0 43.78125 0+0+0] [0+0+0 12.375 0+0+0] children: inline\n TextNode <#text> (not painted)\n SVGTextBox <text> at [272.640625,139.21875] [0+0+0 24.953125 0+0+0] [0+0+0 9.53125 0+0+0] children: inline\n TextNode <#text> (not painted)\n \n ViewportPaintable (Viewport<#document>) [0,0 800x600]\n PaintableWithLines (BlockContainer<HTML>) [0,0 800x166]\n PaintableWithLines (BlockContainer<BODY>) [8,8 784x150]\n SVGSVGPaintable (SVGSVGBox<svg>) [8,8 300x150]\n SVGPathPaintable (SVGTextBox<text>) [18.953125,26.6875 37.34375x12.03125]\n SVGPathPaintable (SVGTextBox<text>) [23.78125,52.96875 51x12.3125]\n SVGPathPaintable (SVGTextBox<tspan>) [128.78125,64.6875 34.8125x11.0625]\n SVGPathPaintable (SVGTextBox<text>) [121.328125,55.96875 43.78125x12.375]\n SVGPathPaintable (SVGTextBox<text>) [272.640625,139.21875 24.953125x9.53125]\n \n SC for Viewport<#document> [0,0 800x600] [children: 1] (z-index: auto)\n SC for BlockContainer<HTML> [0,0 800x166] [children: 0] (z-index: auto)\n"),
TestLayoutGeometryCase(mode = "svg", html = "<!DOCTYPE html><svg width=\"300\" height=\"150\" style=\"font: 16px SerenitySans\"><text x=\"10\" y=\"30\">Hello</text><text x=\"10\" y=\"60\" dx=\"5\" dy=\"-3\">shifted<tspan x=\"120\" dy=\"10\">span</tspan></text><text x=\"45%\" y=\"40%\" text-anchor=\"middle\">middle</text><text x=\"290\" y=\"140\" text-anchor=\"end\">end</text></svg>", css = "", expected = " #3 SVGSVGPaintable rect [8,8 300x150]\n #4 SVGPathPaintable rect [18.953125,26.6875 37.34375x12.03125]\n transforms viewbox [1 0 0 1 0 0] svg [1 0 0 1 0 0] css [1 0 0 1 0 0]\n mask none clip none\n path M11.34375 28.6875L10.953125 18.8125L13.328125 18.6875L13.609375 23.3125L18.640625 23.1875L18.234375 18.78125L20.859375 18.8125L21.171875 28.40625L18.796875 28.4375L18.609375 24.71875L13.859375 24.90625L13.875 29.5L11.34375 28.6875ZM25.453125 23.125L25.328125 24.84375L27.921875 24.75L27.421875 23.34375L25.453125 23.125ZM22.828125 25.15625L23.703125 21.921875L27.765625 21.296875L29.828125 24.0625L29.359375 25.71875L25.359375 26.21875L25.46875 27.671875L26.625 28.234375L29.53125 28.234375L29.25 29.640625L25.53125 29.828125L23.578125 28.84375L22.828125 25.15625ZM32.25 21.921875L31.59375 21.90625L31.5 19.890625L33.9375 19.9375L34.125 30L32 29.90625L32.25 21.921875ZM36.25 21.921875L35.59375 21.90625L35.5 19.890625L37.9375 19.9375L38.125 30L36 29.90625L36.25 21.921875ZM41.984375 24.78125L42.984375 28.4375L45.421875 28.96875L46.078125 24.03125L43.734375 22.84375L41.984375 24.78125ZM40.015625 28.5625L40.078125 22.34375L44.015625 20.9375L48.296875 22.90625L48.046875 30.125L45.546875 30.71875L40.015625 28.5625Z\n bbox [10.953125,18.6875 37.34375x12.03125]\n contributes true bounds [18.953125,26.6875 37.34375x12.03125] anti-alias true\n #6 SVGPathPaintable rect [23.78125,52.96875 51x12.3125]\n transforms viewbox [1 0 0 1 0 0] svg [1 0 0 1 0 0] css [1 0 0 1 0 0]\n mask none clip none\n path M22.46875 48.515625L22.46875 51.09375L18.6875 50.078125L17.796875 51.53125L18.734375 52.84375L22.5 53.46875L23.375 54.84375L23.46875 56.78125L21.65625 57.28125L17.40625 57.1875L17.34375 55.84375L21.21875 55.46875L20.09375 54.296875L17.21875 54.3125L15.78125 51.84375L16.90625 48.578125L22.46875 48.515625ZM25.0625 56.75L24.6875 45.015625L26.875 46.046875L27.25 50.390625L29.1875 48.640625L30.90625 48.640625L32.3125 51.203125L32.1875 56.625L30.8125 57L30.0625 51.578125L28.96875 50.890625L27.125 52.140625L27.3125 56.75L25.0625 56.75ZM34.046875 46.875L34.078125 44.96875L36.109375 45L36.515625 47.21875L34.046875 46.875ZM34.015625 56.875L34.046875 48.875L36.265625 48.90625L36.234375 57L34.015625 56.875ZM39.875 56.75L39.921875 50.609375L38.453125 50.546875L38.484375 49.015625L39.921875 48.953125L40.890625 46L43.015625 45.078125L44.421875 45.171875L43.890625 47.40625L42.734375 47.046875L42.140625 48.890625L43.453125 49.078125L43.328125 50.578125L42.015625 50.640625L41.96875 57L39.875 56.75ZM46.4375 48.78125L46.5625 46.53125L48.59375 46.59375L48.34375 48.8125L49.96875 48.96875L49.875 50.40625L48.21875 50.1875L48.3125 57L45.5 57.21875L46.34375 50.625L44.78125 50.15625L44.78125 49.21875L46.4375 48.78125ZM54.453125 50.125L54.328125 51.84375L56.921875 51.75L56.421875 50.34375L54.453125 50.125ZM51.828125 52.15625L52.703125 48.921875L56.765625 48.296875L58.828125 51.0625L58.359375 52.71875L54.359375 53.21875L54.46875 54.671875L55.625 55.234375L58.53125 55.234375L58.25 56.640625L54.53125 56.828125L52.578125 55.84375L51.828125 52.15625ZM62.71875 53.03125L62.59375 55.21875L63.84375 55.21875L64.578125 53.78125L62.71875 53.03125ZM64.5625 51.6875L65.46875 48.34375L66.78125 48.3125L66.5 57L65.375 57L65.34375 56.15625L62.96875 56.8125L60.84375 55.8125L61.46875 51.6875L62.6875 50.6875L64.5625 51.6875Z\n bbox [15.78125,44.96875 51x12.3125]\n contributes true bounds [23.78125,52.96875 51x12.3125] anti-alias true\n #8 SVGPathPaintable rect [128.78125,64.6875 34.8125x11.0625]\n transforms viewbox [1 0 0 1 0 0] svg [1 0 0 1 0 0] css [1 0 0 1 0 0]\n mask none clip none\n path M127.46875 58.515625L127.46875 61.09375L123.6875 60.078125L122.79688 61.53125L123.73438 62.84375L127.5 63.46875L128.375 64.84375L128.46875 66.78125L126.65625 67.28125L122.40625 67.1875L122.34375 65.84375L126.21875 65.46875L125.09375 64.296875L122.21875 64.3125L120.78125 61.84375L121.90625 58.578125L127.46875 58.515625ZM133.46875 62.53125L134.90625 63.5L135.75 60.5L133.9375 60.34375L133.46875 62.53125ZM130.25 67L130 58.3125L132.125 58.25L132.42188 59.703125L135.5625 58.3125L137.1875 60.5L137.5 63.375L135.53125 64.59375L132.6875 64.03125L132.09375 67.53125L130.25 67ZM140.42188 62.546875L140.45312 65.4375L142.42188 65.625L142.90625 62.1875L140.42188 62.546875ZM140.5625 58.953125L140.21875 58.078125L142.17188 56.6875L144.82812 57.640625L145.8125 59.609375L146.26562 67L144.73438 67.125L144.48438 66L142.54688 67.0625L139.92188 67.03125L138.14062 65.375L138.82812 61.015625L142.1875 59.796875L143.6875 60.671875L143.59375 59.390625L142.76562 58.3125L140.5625 58.953125ZM148.5 66.71875L147.89062 58.21875L150.04688 58.3125L150.76562 60.21875L153.07812 58.8125L155.29688 59.59375L155.59375 67.75L153.96875 67.4375L153.04688 60.40625L150.89062 61.875L150.84375 67L148.5 66.71875Z\n bbox [120.78125,56.6875 34.8125x11.0625]\n contributes true bounds [128.78125,64.6875 34.8125x11.0625] anti-alias true\n #10 SVGPathPaintable rect [121.328125,55.96875 43.78125x12.375]\n transforms viewbox [1 0 0 1 0 0] svg [1 0 0 1 0 0] css [1 0 0 1 0 0]\n mask none clip none\n path M121.60938 54.25L120.35938 54.1875L119.9375 60L118.15625 59.9375L117.42188 53.90625L115.54688 54.5625L114.73438 60L113.32812 59.59375L113.45312 51.40625L115.17188 51.40625L115.35938 53.4375L116.48438 51.96875L117.85938 51.8125L118.85938 53.1875L120.70312 52.125L121.73438 52.15625L122.89062 53.8125L123.65625 60.34375L121.78125 60.125L121.60938 54.25ZM125.32812 49.875L125.35938 47.96875L127.39062 48L127.79688 50.21875L125.32812 49.875ZM125.29688 59.875L125.32812 51.875L127.54688 51.90625L127.51562 60L125.29688 59.875ZM132 56.03125L131.875 58.21875L133.125 58.21875L133.85938 56.78125L132 56.03125ZM133.84375 54.6875L134.75 51.34375L136.0625 51.3125L135.78125 60L134.65625 60L134.625 59.15625L132.25 59.8125L130.125 58.8125L130.75 54.6875L131.96875 53.6875L133.84375 54.6875ZM140 56.03125L139.875 58.21875L141.125 58.21875L141.85938 56.78125L140 56.03125ZM141.84375 54.6875L142.75 51.34375L144.0625 51.3125L143.78125 60L142.65625 60L142.625 59.15625L140.25 59.8125L138.125 58.8125L138.75 54.6875L139.96875 53.6875L141.84375 54.6875ZM146.53125 51.921875L145.875 51.90625L145.78125 49.890625L148.21875 49.9375L148.40625 60L146.28125 59.90625L146.53125 51.921875ZM152.73438 53.125L152.60938 54.84375L155.20312 54.75L154.70312 53.34375L152.73438 53.125ZM150.10938 55.15625L150.98438 51.921875L155.04688 51.296875L157.10938 54.0625L156.64062 55.71875L152.64062 56.21875L152.75 57.671875L153.90625 58.234375L156.8125 58.234375L156.53125 59.640625L152.8125 59.828125L150.85938 58.84375L150.10938 55.15625Z\n bbox [113.328125,47.96875 43.78125x12.375]\n contributes true bounds [121.328125,55.96875 43.78125x12.375] anti-alias true\n #12 SVGPathPaintable rect [272.640625,139.21875 24.953125x9.53125]\n transforms viewbox [1 0 0 1 0 0] svg [1 0 0 1 0 0] css [1 0 0 1 0 0]\n mask none clip none\n path M267.26562 133.125L267.14062 134.84375L269.73438 134.75L269.23438 133.34375L267.26562 133.125ZM264.64062 135.15625L265.51562 131.92188L269.57812 131.29688L271.64062 134.0625L271.17188 135.71875L267.17188 136.21875L267.28125 137.67188L268.4375 138.23438L271.34375 138.23438L271.0625 139.64062L267.34375 139.82812L265.39062 138.84375L264.64062 135.15625ZM274.3125 139.71875L273.70312 131.21875L275.85938 131.3125L276.57812 133.21875L278.89062 131.8125L281.10938 132.59375L281.40625 140.75L279.78125 140.4375L278.85938 133.40625L276.70312 134.875L276.65625 140L274.3125 139.71875ZM285.53125 136.03125L285.40625 138.21875L286.65625 138.21875L287.39062 136.78125L285.53125 136.03125ZM287.375 134.6875L288.28125 131.34375L289.59375 131.3125L289.3125 140L288.1875 140L288.15625 139.15625L285.78125 139.8125L283.65625 138.8125L284.28125 134.6875L285.5 133.6875L287.375 134.6875Z\n bbox [264.64062,131.21875 24.953125x9.53125]\n contributes true bounds [272.640625,139.21875 24.953125x9.53125] anti-alias true\n"),
TestLayoutGeometryCase(mode = "layout", html = "<!DOCTYPE html><svg width=\"300\" height=\"150\" style=\"font: 12px SerenitySans\"><path id=\"p\" d=\"M 10 100 L 150 20 L 290 100\" fill=\"none\" stroke=\"black\"/><text><textPath href=\"#p\">along the path</textPath></text></svg>", css = "", expected = " Viewport <#document> at [0,0] [0+0+0 800 0+0+0] [0+0+0 600 0+0+0] [BFC] children: not-inline\n BlockContainer <html> at [0,0] [0+0+0 800 0+0+0] [0+0+0 166 0+0+0] [BFC] children: not-inline\n BlockContainer <body> at [8,8] [8+0+0 784 0+0+8] [8+0+0 150 0+0+8] children: inline\n frag 0 from SVGSVGBox start: 0, length: 0, rect: [8,8 300x150] baseline: 150\n SVGSVGBox <svg> at [8,8] [0+0+0 300 0+0+0] [0+0+0 150 0+0+0] [SVG] children: not-inline\n SVGGeometryBox <path#p> at [17.5,27.5] [0+0+0 281 0+0+0] [0+0+0 81 0+0+0] children: not-inline\n SVGTextBox <text> at [8,8] [0+0+0 0 0+0+0] [0+0+0 0 0+0+0] children: not-inline\n SVGTextPathBox <textPath> at [16.125,59.609375] [0+0+0 77.390625 0+0+0] [0+0+0 47.6875 0+0+0] children: inline\n TextNode <#text> (not painted)\n \n ViewportPaintable (Viewport<#document>) [0,0 800x600]\n PaintableWithLines (BlockContainer<HTML>) [0,0 800x166]\n PaintableWithLines (BlockContainer<BODY>) [8,8 784x150]\n SVGSVGPaintable (SVGSVGBox<svg>) [8,8 300x150]\n SVGPathPaintable (SVGGeometryBox<path>#p) [17.5,27.5 281x81]\n SVGPathPaintable (SVGTextBox<text>) [8,8 0x0]\n SVGPathPaintable (SVGTextPathBox<textPath>) [16.125,59.609375 77.390625x47.6875]\n \n SC for Viewport<#document> [0,0 800x600] [children: 1] (z-index: auto)\n SC for BlockContainer<HTML> [0,0 800x166] [children: 0] (z-index: auto)\n"),
TestLayoutGeometryCase(mode = "svg", html = "<!DOCTYPE html><svg width=\"300\" height=\"150\" style=\"font: 12px SerenitySans\"><path id=\"p\" d=\"M 10 100 L 150 20 L 290 100\" fill=\"none\" stroke=\"black\"/><text><textPath href=\"#p\">along the path</textPath></text></svg>", css = "", expected = " #3 SVGSVGPaintable rect [8,8 300x150]\n #4 SVGPathPaintable rect [17.5,27.5 281x81]\n transforms viewbox [1 0 0 1 0 0] svg [1 0 0 1 0 0] css [1 0 0 1 0 0]\n mask none clip none\n path M10 100L150 20L290 100\n bbox [10,20 280x80]\n contributes true bounds [18,28 280x80] anti-alias true\n #5 SVGPathPaintable rect [8,8 0x0]\n transforms viewbox [1 0 0 1 0 0] svg [1 0 0 1 0 0] css [1 0 0 1 0 0]\n mask none clip none\n path \n bbox [0,0 0x0]\n contributes true bounds [0,0 0x0] anti-alias true\n #6 SVGPathPaintable rect [16.125,59.609375 77.390625x47.6875]\n transforms viewbox [1 0 0 1 0 0] svg [1 0 0 1 0 0] css [1 0 0 1 0 0]\n mask none clip none\n path M9.9200554 96.199013L11.016019 98.06971L12.367804 97.459229L11.404112 95.04055L9.9200554 96.199013ZM8.6743793 93.806503L8.1249437 93.364624L8.8793268 91.732307L10.963692 91.364563L12.33728 92.280289L15.382429 96.924324L14.43182 97.575508L13.850407 96.935951L12.984101 98.348785L11.26312 99.305214L9.4869032 98.889503L8.3124495 95.79493L10.046514 93.751266L11.348878 93.762894L10.811071 92.963455L9.870636 92.569542L8.6743793 93.806503ZM13.885776 90.801559L13.452623 91.035576L12.641552 89.757927L14.246252 88.881447L18.112646 95.364197L16.693998 96.093872L13.885776 90.801559ZM18.683886 90.529755L20.695574 92.538536L22.480511 91.977478L21.070585 88.518066L19.102503 88.616905L18.683886 90.529755ZM18.808889 93.724617L16.535566 89.651825L18.576324 87.270935L22.096779 86.959885L24.62011 91.753632L23.213091 93.070534L18.808889 93.724617ZM26.500496 90.328194L22.940796 85.019897L24.379791 84.278595L25.557154 85.252457L26.539742 83.476242L28.275257 83.159378L31.503551 88.360115L30.329098 88.761284L27.112432 84.525696L26.254848 86.28447L28.131359 89.639221L26.500496 90.328194ZM31.165365 83.62693L32.954662 83.900192L33.123272 82.305672L31.470608 82.602188L31.165365 83.62693ZM32.396507 80.939346L32.687214 80.125374L33.773003 80.962608L35.509972 85.301399L35.399506 86.525276L34.937283 87.464256L32.774426 88.592194L32.536045 88.080551L34.347149 86.856682L34.623318 85.970024L33.658173 84.469978L32.948849 85.118256L30.921173 85.183662L29.322287 82.952492L31.300545 80.86377L32.396507 80.939346ZM40.654022 75.383949L39.898186 73.872276L41.244156 73.157143L41.906967 74.694977L43.023277 74.192055L43.497131 75.163017L42.337212 75.636864L44.93322 80.038162L43.183167 81.22715L41.279041 76.619453L40.087143 76.895622L39.738297 76.285141L40.654022 75.383949ZM47.065067 78.604004L42.454464 71.102325L44.262657 70.959885L46.12318 73.648918L46.733665 71.788391L47.852882 71.148842L49.722126 72.29422L51.65823 75.871368L50.902393 76.627205L48.396503 73.375648L47.428452 73.334953L46.692963 74.834999L48.530228 77.766769L47.065067 78.604004ZM52.234314 69.927391L52.792469 71.093124L54.446587 70.066933L53.597725 69.337257L52.234314 69.927391ZM51.280796 72.226883L50.647057 69.79512L53.059917 67.876457L55.432083 68.90992L55.743141 70.162865L53.324463 71.976875L53.936398 72.882423L54.898636 72.818466L56.791138 71.737038L57.131264 72.757423L54.779446 74.263275L53.141315 74.349037L51.280796 72.226883ZM65.078209 64.666573L66.374756 64.762512L65.807884 62.494999L64.569473 63.067692L65.078209 64.666573ZM64.645058 68.774254L61.249603 63.210136L62.610111 62.378716L63.344143 63.214497L64.871803 61.140305L66.743958 61.960098L68.01725 63.715965L67.188736 65.242172L65.127625 65.934059L66.04335 68.434128L64.645058 68.774254ZM69.828842 61.965424L70.924805 63.836121L72.276588 63.225636L71.312897 60.806961L69.828842 61.965424ZM68.58316 59.57291L68.03373 59.131035L68.788109 57.498718L70.872475 57.130978L72.246063 58.046703L75.291214 62.690739L74.340599 63.341919L73.759186 62.702366L72.892883 64.115196L71.171906 65.071625L69.395683 64.655914L68.22123 61.561344L69.955299 59.517677L71.25766 59.529305L70.719856 58.729862L69.779419 58.335953L68.58316 59.57291ZM74.515503 56.034531L73.759666 54.522858L75.105644 53.807716L75.768448 55.345554L76.884766 54.842632L77.358612 55.813591L76.1987 56.287445L78.794708 60.68874L77.044655 61.877728L75.140526 57.270031L73.948631 57.546204L73.599785 56.935719L74.515503 56.034531ZM80.926552 59.254589L76.315948 51.752907L78.124146 51.610462L79.984665 54.299496L80.595146 52.438976L81.714371 51.799423L83.583611 52.944805L85.519714 56.52195L84.763878 57.277786L82.257988 54.026234L81.289932 53.985535L80.554451 55.48558L82.391716 58.417355L80.926552 59.254589Z\n bbox [8.124944,51.610462 77.39477x47.69475]\n contributes true bounds [16.125,59.609375 77.390625x47.6875] anti-alias true\n"),
TestLayoutGeometryCase(mode = "layout", html = "<!DOCTYPE html><svg width=\"200\" height=\"200\"><foreignObject x=\"20\" y=\"30\" width=\"150\" height=\"80\"><div style=\"width: 100px; height: 40px; background: red\">box</div></foreignObject><g transform=\"translate(10 10)\"><foreignObject width=\"50\" height=\"50\"><span>t</span></foreignObject></g></svg>", css = "", expected = " Viewport <#document> at [0,0] [0+0+0 800 0+0+0] [0+0+0 600 0+0+0] [BFC] children: not-inline\n BlockContainer <html> at [0,0] [0+0+0 800 0+0+0] [0+0+0 216 0+0+0] [BFC] children: not-inline\n BlockContainer <body> at [8,8] [8+0+0 784 0+0+8] [8+0+0 200 0+0+8] children: inline\n frag 0 from SVGSVGBox start: 0, length: 0, rect: [8,8 200x200] baseline: 200\n SVGSVGBox <svg> at [8,8] [0+0+0 200 0+0+0] [0+0+0 200 0+0+0] [SVG] children: not-inline\n SVGForeignObjectBox <foreignObject> at [28,38] [0+0+0 150 0+0+0] [0+0+0 80 0+0+0] [BFC] children: not-inline\n BlockContainer <div> at [28,38] [0+0+0 100 0+0+50] [0+0+0 40 0+0+0] children: inline\n frag 0 from TextNode start: 0, length: 3, rect: [28,38 29.53125x18] baseline: 13.796875\n \"box\"\n TextNode <#text> (not painted)\n SVGGraphicsBox <g> at [8,8] [0+0+0 50 0+0+0] [0+0+0 50 0+0+0] children: not-inline\n SVGForeignObjectBox <foreignObject> at [8,8] [0+0+0 50 0+0+0] [0+0+0 50 0+0+0] [BFC] children: not-inline\n BlockContainer <(anonymous)> at [8,8] [0+0+0 50 0+0+0] [0+0+0 18 0+0+0] children: inline\n InlineNode <span> at [8,8] [0+0+0 6.859375 0+0+0] [0+0+0 18 0+0+0]\n frag 0 from TextNode start: 0, length: 1, rect: [8,8 6.859375x18] baseline: 13.796875\n \"t\"\n TextNode <#text> (not painted)\n \n ViewportPaintable (Viewport<#document>) [0,0 800x600]\n PaintableWithLines (BlockContainer<HTML>) [0,0 800x216]\n PaintableWithLines (BlockContainer<BODY>) [8,8 784x200]\n SVGSVGPaintable (SVGSVGBox<svg>) [8,8 200x200]\n SVGForeignObjectPaintable (SVGForeignObjectBox<foreignObject>) [28,38 150x80]\n PaintableWithLines (BlockContainer<DIV>) [28,38 100x40]\n TextPaintable (TextNode<#text>)\n SVGGraphicsPaintable (SVGGraphicsBox<g>) [8,8 50x50]\n SVGForeignObjectPaintable (SVGForeignObjectBox<foreignObject>) [8,8 50x50]\n PaintableWithLines (BlockContainer(anonymous)) [8,8 50x18]\n PaintableWithLines (InlineNode<SPAN>) [8,8 6.859375x18]\n TextPaintable (TextNode<#text>)\n \n SC for Viewport<#document> [0,0 800x600] [children: 1] (z-index: auto)\n SC for BlockContainer<HTML> [0,0 800x216] [children: 2] (z-index: auto)\n SC for SVGForeignObjectBox<foreignObject> [28,38 150x80] [children: 0] (z-index: auto)\n SC for SVGForeignObjectBox<foreignObject> [8,8 50x50] [children: 0] (z-index: auto)\n"),
TestLayoutGeometryCase(mode = "svg", html = "<!DOCTYPE html><svg width=\"200\" height=\"200\"><foreignObject x=\"20\" y=\"30\" width=\"150\" height=\"80\"><div style=\"width: 100px; height: 40px; background: red\">box</div></foreignObject><g transform=\"translate(10 10)\"><foreignObject width=\"50\" height=\"50\"><span>t</span></foreignObject></g></svg>", css = "", expected = " #3 SVGSVGPaintable rect [8,8 200x200]\n #7 SVGGraphicsPaintable rect [8,8 50x50]\n transforms viewbox [1 0 0 1 0 0] svg [1 0 0 1 10 10] css [1 0 0 1 10 10]\n mask none clip none\n contributes true bounds none anti-alias true\n"),
TestLayoutGeometryCase(mode = "layout", html = "<!DOCTYPE html><svg width=\"200\" height=\"120\"><defs><pattern id=\"pt\" width=\"20\" height=\"20\" patternUnits=\"userSpaceOnUse\"><rect width=\"10\" height=\"10\" fill=\"red\"/><polygon points=\"11,11 19,11 15,19\"/></pattern><pattern id=\"pt2\" href=\"#pt\" x=\"5\" patternTransform=\"rotate(0)\"/><linearGradient id=\"lg\"><stop offset=\"0\" stop-color=\"red\"/><stop offset=\"1\" stop-color=\"blue\"/></linearGradient><radialGradient id=\"rg\" href=\"#lg\"/></defs><rect width=\"90\" height=\"50\" fill=\"url(#pt)\"/><rect x=\"100\" width=\"90\" height=\"50\" fill=\"url(#pt2)\" stroke=\"url(#lg)\"/><rect y=\"60\" width=\"90\" height=\"50\" fill=\"url(#lg)\"/><rect x=\"100\" y=\"60\" width=\"90\" height=\"50\" fill=\"url(#rg)\"/></svg>", css = "", expected = " Viewport <#document> at [0,0] [0+0+0 800 0+0+0] [0+0+0 600 0+0+0] [BFC] children: not-inline\n BlockContainer <html> at [0,0] [0+0+0 800 0+0+0] [0+0+0 136 0+0+0] [BFC] children: not-inline\n BlockContainer <body> at [8,8] [8+0+0 784 0+0+8] [8+0+0 120 0+0+8] children: inline\n frag 0 from SVGSVGBox start: 0, length: 0, rect: [8,8 200x120] baseline: 120\n SVGSVGBox <svg> at [8,8] [0+0+0 200 0+0+0] [0+0+0 120 0+0+0] [SVG] children: not-inline\n SVGGeometryBox <rect> at [8,8] [0+0+0 90 0+0+0] [0+0+0 50 0+0+0] children: not-inline\n SVGPatternBox <pattern#pt> at [8,8] [0+0+0 200 0+0+0] [0+0+0 120 0+0+0] [BFC] children: not-inline\n SVGGeometryBox <rect> at [8,8] [0+0+0 10 0+0+0] [0+0+0 10 0+0+0] children: not-inline\n SVGGeometryBox <polygon> at [19,19] [0+0+0 8 0+0+0] [0+0+0 8 0+0+0] children: not-inline\n SVGGeometryBox <rect> at [108,8] [0+0+0 90 0+0+0] [0+0+0 50 0+0+0] children: not-inline\n SVGPatternBox <pattern#pt> at [8,8] [0+0+0 200 0+0+0] [0+0+0 120 0+0+0] [BFC] children: not-inline\n SVGGeometryBox <rect> at [8,8] [0+0+0 10 0+0+0] [0+0+0 10 0+0+0] children: not-inline\n SVGGeometryBox <polygon> at [19,19] [0+0+0 8 0+0+0] [0+0+0 8 0+0+0] children: not-inline\n SVGGeometryBox <rect> at [8,68] [0+0+0 90 0+0+0] [0+0+0 50 0+0+0] children: not-inline\n SVGGeometryBox <rect> at [108,68] [0+0+0 90 0+0+0] [0+0+0 50 0+0+0] children: not-inline\n \n ViewportPaintable (Viewport<#document>) [0,0 800x600]\n PaintableWithLines (BlockContainer<HTML>) [0,0 800x136]\n PaintableWithLines (BlockContainer<BODY>) [8,8 784x120]\n SVGSVGPaintable (SVGSVGBox<svg>) [8,8 200x120]\n SVGPathPaintable (SVGGeometryBox<rect>) [8,8 90x50]\n SVGPathPaintable (SVGGeometryBox<rect>) [108,8 90x50]\n SVGPathPaintable (SVGGeometryBox<rect>) [8,68 90x50]\n SVGPathPaintable (SVGGeometryBox<rect>) [108,68 90x50]\n \n SC for Viewport<#document> [0,0 800x600] [children: 1] (z-index: auto)\n SC for BlockContainer<HTML> [0,0 800x136] [children: 0] (z-index: auto)\n"),
TestLayoutGeometryCase(mode = "svg", html = "<!DOCTYPE html><svg width=\"200\" height=\"120\"><defs><pattern id=\"pt\" width=\"20\" height=\"20\" patternUnits=\"userSpaceOnUse\"><rect width=\"10\" height=\"10\" fill=\"red\"/><polygon points=\"11,11 19,11 15,19\"/></pattern><pattern id=\"pt2\" href=\"#pt\" x=\"5\" patternTransform=\"rotate(0)\"/><linearGradient id=\"lg\"><stop offset=\"0\" stop-color=\"red\"/><stop offset=\"1\" stop-color=\"blue\"/></linearGradient><radialGradient id=\"rg\" href=\"#lg\"/></defs><rect width=\"90\" height=\"50\" fill=\"url(#pt)\"/><rect x=\"100\" width=\"90\" height=\"50\" fill=\"url(#pt2)\" stroke=\"url(#lg)\"/><rect y=\"60\" width=\"90\" height=\"50\" fill=\"url(#lg)\"/><rect x=\"100\" y=\"60\" width=\"90\" height=\"50\" fill=\"url(#rg)\"/></svg>", css = "", expected = " #3 SVGSVGPaintable rect [8,8 200x120]\n #4 SVGPathPaintable rect [8,8 90x50]\n transforms viewbox [1 0 0 1 0 0] svg [1 0 0 1 0 0] css [1 0 0 1 0 0]\n mask none clip none\n path M0 0L90 0L90 50L0 50L0 0Z\n bbox [0,0 90x50]\n contributes true bounds [8,8 90x50] anti-alias true\n #5 SVGPatternPaintable rect [8,8 200x120]\n contributes true bounds [8,8 19x19] anti-alias true\n #6 SVGPathPaintable rect [8,8 10x10]\n transforms viewbox [1 0 0 1 0 0] svg [1 0 0 1 0 0] css [1 0 0 1 0 0]\n mask none clip none\n path M0 0L10 0L10 10L0 10L0 0Z\n bbox [0,0 10x10]\n contributes true bounds [8,8 10x10] anti-alias true\n #7 SVGPathPaintable rect [19,19 8x8]\n transforms viewbox [1 0 0 1 0 0] svg [1 0 0 1 0 0] css [1 0 0 1 0 0]\n mask none clip none\n path M11 11L19 11L15 19L11 11Z\n bbox [11,11 8x8]\n contributes true bounds [19,19 8x8] anti-alias true\n #8 SVGPathPaintable rect [108,8 90x50]\n transforms viewbox [1 0 0 1 0 0] svg [1 0 0 1 0 0] css [1 0 0 1 0 0]\n mask none clip none\n path M100 0L190 0L190 50L100 50L100 0Z\n bbox [100,0 90x50]\n contributes true bounds [108,8 90x50] anti-alias true\n #9 SVGPatternPaintable rect [8,8 200x120]\n contributes true bounds [8,8 19x19] anti-alias true\n #10 SVGPathPaintable rect [8,8 10x10]\n transforms viewbox [1 0 0 1 0 0] svg [1 0 0 1 0 0] css [1 0 0 1 0 0]\n mask none clip none\n path M0 0L10 0L10 10L0 10L0 0Z\n bbox [0,0 10x10]\n contributes true bounds [8,8 10x10] anti-alias true\n #11 SVGPathPaintable rect [19,19 8x8]\n transforms viewbox [1 0 0 1 0 0] svg [1 0 0 1 0 0] css [1 0 0 1 0 0]\n mask none clip none\n path M11 11L19 11L15 19L11 11Z\n bbox [11,11 8x8]\n contributes true bounds [19,19 8x8] anti-alias true\n #12 SVGPathPaintable rect [8,68 90x50]\n transforms viewbox [1 0 0 1 0 0] svg [1 0 0 1 0 0] css [1 0 0 1 0 0]\n mask none clip none\n path M0 60L90 60L90 110L0 110L0 60Z\n bbox [0,60 90x50]\n contributes true bounds [8,68 90x50] anti-alias true\n #13 SVGPathPaintable rect [108,68 90x50]\n transforms viewbox [1 0 0 1 0 0] svg [1 0 0 1 0 0] css [1 0 0 1 0 0]\n mask none clip none\n path M100 60L190 60L190 110L100 110L100 60Z\n bbox [100,60 90x50]\n contributes true bounds [108,68 90x50] anti-alias true\n"),
TestLayoutGeometryCase(mode = "layout", html = "<!DOCTYPE html><svg width=\"200\" height=\"100\"><filter id=\"f\"><feFlood flood-color=\"green\" result=\"fl\"/><feGaussianBlur in=\"SourceGraphic\" stdDeviation=\"2\"/><feOffset dx=\"3\" dy=\"4\"/><feMerge><feMergeNode in=\"fl\"/><feMergeNode/></feMerge></filter><rect x=\"10\" y=\"10\" width=\"50\" height=\"50\" filter=\"url(#f)\"/><a href=\"#x\"><rect x=\"100\" y=\"10\" width=\"40\" height=\"40\"/></a></svg>", css = "", expected = " Viewport <#document> at [0,0] [0+0+0 800 0+0+0] [0+0+0 600 0+0+0] [BFC] children: not-inline\n BlockContainer <html> at [0,0] [0+0+0 800 0+0+0] [0+0+0 116 0+0+0] [BFC] children: not-inline\n BlockContainer <body> at [8,8] [8+0+0 784 0+0+8] [8+0+0 100 0+0+8] children: inline\n frag 0 from SVGSVGBox start: 0, length: 0, rect: [8,8 200x100] baseline: 100\n SVGSVGBox <svg> at [8,8] [0+0+0 200 0+0+0] [0+0+0 100 0+0+0] [SVG] children: inline\n InlineNode <filter#f> at [8,8] [0+0+0 0 0+0+0] [0+0+0 18 0+0+0]\n SVGBox <feFlood> (not painted) children: not-inline\n InlineNode <feGaussianBlur> at [8,8] [0+0+0 0 0+0+0] [0+0+0 18 0+0+0]\n InlineNode <feOffset> at [8,8] [0+0+0 0 0+0+0] [0+0+0 18 0+0+0]\n InlineNode <feMerge> at [8,8] [0+0+0 0 0+0+0] [0+0+0 18 0+0+0]\n InlineNode <feMergeNode> at [8,8] [0+0+0 0 0+0+0] [0+0+0 18 0+0+0]\n InlineNode <feMergeNode> at [8,8] [0+0+0 0 0+0+0] [0+0+0 18 0+0+0]\n SVGGeometryBox <rect> at [18,18] [0+0+0 50 0+0+0] [0+0+0 50 0+0+0] children: not-inline\n SVGGraphicsBox <a> at [108,18] [0+0+0 40 0+0+0] [0+0+0 40 0+0+0] children: not-inline\n SVGGeometryBox <rect> at [108,18] [0+0+0 40 0+0+0] [0+0+0 40 0+0+0] children: not-inline\n \n ViewportPaintable (Viewport<#document>) [0,0 800x600]\n PaintableWithLines (BlockContainer<HTML>) [0,0 800x116]\n PaintableWithLines (BlockContainer<BODY>) [8,8 784x100]\n SVGSVGPaintable (SVGSVGBox<svg>) [8,8 200x100]\n PaintableWithLines (InlineNode<filter>#f) [8,8 0x18]\n PaintableWithLines (InlineNode<feGaussianBlur>) [8,8 0x18]\n PaintableWithLines (InlineNode<feOffset>) [8,8 0x18]\n PaintableWithLines (InlineNode<feMerge>) [8,8 0x18]\n PaintableWithLines (InlineNode<feMergeNode>) [8,8 0x18]\n PaintableWithLines (InlineNode<feMergeNode>) [8,8 0x18]\n SVGPathPaintable (SVGGeometryBox<rect>) [18,18 50x50]\n SVGGraphicsPaintable (SVGGraphicsBox<a>) [108,18 40x40]\n SVGPathPaintable (SVGGeometryBox<rect>) [108,18 40x40]\n \n SC for Viewport<#document> [0,0 800x600] [children: 1] (z-index: auto)\n SC for BlockContainer<HTML> [0,0 800x116] [children: 0] (z-index: auto)\n"),
TestLayoutGeometryCase(mode = "svg", html = "<!DOCTYPE html><svg width=\"200\" height=\"100\"><filter id=\"f\"><feFlood flood-color=\"green\" result=\"fl\"/><feGaussianBlur in=\"SourceGraphic\" stdDeviation=\"2\"/><feOffset dx=\"3\" dy=\"4\"/><feMerge><feMergeNode in=\"fl\"/><feMergeNode/></feMerge></filter><rect x=\"10\" y=\"10\" width=\"50\" height=\"50\" filter=\"url(#f)\"/><a href=\"#x\"><rect x=\"100\" y=\"10\" width=\"40\" height=\"40\"/></a></svg>", css = "", expected = " #3 SVGSVGPaintable rect [8,8 200x100]\n #11 SVGPathPaintable rect [18,18 50x50]\n transforms viewbox [1 0 0 1 0 0] svg [1 0 0 1 0 0] css [1 0 0 1 0 0]\n mask none clip none\n path M10 10L60 10L60 60L10 60L10 10Z\n bbox [10,10 50x50]\n contributes true bounds [18,18 50x50] anti-alias true\n #12 SVGGraphicsPaintable rect [108,18 40x40]\n transforms viewbox [1 0 0 1 0 0] svg [1 0 0 1 0 0] css [1 0 0 1 0 0]\n mask none clip none\n contributes true bounds [108,18 40x40] anti-alias true\n #13 SVGPathPaintable rect [108,18 40x40]\n transforms viewbox [1 0 0 1 0 0] svg [1 0 0 1 0 0] css [1 0 0 1 0 0]\n mask none clip none\n path M100 10L140 10L140 50L100 50L100 10Z\n bbox [100,10 40x40]\n contributes true bounds [108,18 40x40] anti-alias true\n"),
]