we (web engine): Experimental web browser project to understand the limits of Claude

Handle <style> elements and style attributes master

Add extract_stylesheets() to the style crate that walks the DOM tree, finds all <style> elements, extracts their text content, and parses each as a CSS stylesheet in document order. Update the browser pipeline to extract CSS from <style> elements and resolve computed styles via the cascade. The styled tree is computed but layout integration is deferred to a separate issue. - extract_stylesheets() in style::computed walks DOM for <style> elements - Browser render_page() now runs: parse HTML → extract CSS → resolve styles → layout → render - Default HTML page updated with <style> block to demonstrate CSS parsing - 10 new unit tests for extract_stylesheets (single/multiple/empty/body) - 6 integration tests using parse_html for full HTML→DOM→CSS→styled tree pipeline - Tests cover: style element extraction, multiple stylesheets cascade, inline style overrides, UA defaults, display:none removal, class selectors Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>


+396 -3
5 changed files