Conflict-Driven Synthesis for Layout Engines
Junrui Liu, Yanju Chen, Eric Atkinson, Yu Feng, Rastislav Bodík
Abstract
Modern web browsers rely on layout engines to convert HTML documents to layout trees that specify color, size, and position. However, existing layout engines are notoriously difficult to maintain because of the complexity of web standards. This is especially true for incremental layout engines, which are designed to improve performance by updating only the parts of the layout tree that need to be changed. In this paper, we propose Medea, a new framework for automatically generating incremental layout engines. Medea separates the specification of the layout engine from its incremental implementation, and guarantees correctness through layout engine synthesis. The synthesis is driven by a new iterative algorithm based on detecting conflicts that prevent optimality of the incremental algorithm. We evaluated Medea on a fragment of HTML layout that includes challenging features such as margin collapse, floating layout, and absolute positioning. Medea successfully synthesized an incremental layout engine for this fragment. The synthesized layout engine is both correct and efficient. In particular, we demonstrated that it avoids real-world bugs that have been reported in the layout engines of Chrome, Firefox, and Safari. The incremental layout engine synthesized by Medea is up to 1.82× faster than a naive incremental baseline. We also demonstrated that our conflict-driven algorithm produces engines that are 2.74× faster than a baseline without conflict analysis.
Ask about this paper
Ask your agent about it.
Lune has read the top-tier papers around this one, so every answer names the papers it rests on.
Your agent calls
Lunesearch_papers
Free to start. No credit card required.
Terminal
Install the CLIlune papers get c618c370-2921-4570-8b82-20b5308ea85aCited by top-tier papers5
- FORAY: Towards Effective Attack Synthesis against Deep Logical Vulnerabilities in DeFi ProtocolsHongbo Wen, Hanzhi Liu, Jiaxin Song, Yanju Chen et al.CCS 2024 · 6 citations
- D-VSync: Decoupled Rendering and Displaying for Smartphone GraphicsYuanpei Wu, Dong Du, Chao Xu, Yubin Xia et al.ASPLOS 2025 · 3 citations
- Spineless Traversal for Layout InvalidationMarisa Kirisame, Tiezhi Wang, Pavel PanchekhaPLDI 2025
- Diagramming Program Values by Spatial RefinementSiddhartha Prasad, Michael Tu, Karan Kashyap, Tim Nelson et al.PLDI 2026
- Semantics for 2D RasterizationBhargav Kulkarni, Henry Whiting, Pavel PanchekhaOOPSLA 2026
Related papers
- MulFCoder: Framework-conditioned Multi-agent for MLLM-based Multi-framework Front-end Code GenerationJie Wu, Haoran Ma, Shisong Tang, Yulin Xu et al.ICML 2026
- Automated Fixing of Web UI Tests via Iterative Element MatchingYuanzhang Lin, Guoyao Wen, Xiang GaoASE 2023 · 8 citations
- Janus: Detecting Rendering Bugs in Web Browsers via Visual Delta ConsistencyChijin Zhou, Quan Zhang, Bingzhou Qian, Yu JiangICSE 2025 · 2 citations
- PTDETECTOR: An Automated JavaScript Front-end Library DetectorXinyue Liu, Lukasz ZiarekASE 2023 · 2 citations
- Metamong: Detecting Render-Update Bugs in Web Browsers through FuzzingSuhwan Song, Byoungyoung LeeFSE 2023 · 2 citations
