diff --git a/Meta/CMake/libweb_generators.cmake b/Meta/CMake/libweb_generators.cmake index 00889c33c50..4d28dea77dc 100644 --- a/Meta/CMake/libweb_generators.cmake +++ b/Meta/CMake/libweb_generators.cmake @@ -89,6 +89,19 @@ function (generate_css_implementation) add_custom_target(generate_QuirksModeStyleSheetSource.cpp DEPENDS CSS/QuirksModeStyleSheetSource.cpp) add_dependencies(all_generated generate_QuirksModeStyleSheetSource.cpp) + add_custom_command( + OUTPUT MathML/MathMLStyleSheetSource.cpp + COMMAND "${CMAKE_COMMAND}" -E make_directory CSS + COMMAND "${LIBWEB_INPUT_FOLDER}/Scripts/GenerateStyleSheetSource.sh" mathml_stylesheet_source "${LIBWEB_INPUT_FOLDER}/MathML/Default.css" > MathML/MathMLStyleSheetSource.cpp.tmp + COMMAND "${CMAKE_COMMAND}" -E copy_if_different MathML/MathMLStyleSheetSource.cpp.tmp MathML/MathMLStyleSheetSource.cpp + COMMAND "${CMAKE_COMMAND}" -E remove MathML/MathMLStyleSheetSource.cpp.tmp + VERBATIM + DEPENDS "${LIBWEB_INPUT_FOLDER}/Scripts/GenerateStyleSheetSource.sh" + MAIN_DEPENDENCY "${LIBWEB_INPUT_FOLDER}/MathML/Default.css" + ) + add_custom_target(generate_MathMLStyleSheetSource.cpp DEPENDS MathML/MathMLStyleSheetSource.cpp) + add_dependencies(all_generated generate_MathMLStyleSheetSource.cpp) + set(CSS_GENERATED_TO_INSTALL "CSS/EasingFunctions.h" "CSS/Enums.h" diff --git a/Meta/gn/secondary/Userland/Libraries/LibWeb/BUILD.gn b/Meta/gn/secondary/Userland/Libraries/LibWeb/BUILD.gn index db3701b2ff2..a1335d70d73 100644 --- a/Meta/gn/secondary/Userland/Libraries/LibWeb/BUILD.gn +++ b/Meta/gn/secondary/Userland/Libraries/LibWeb/BUILD.gn @@ -213,6 +213,13 @@ embed_as_string_view("generate_quirks_mode_stylesheet_source") { namespace = "Web::CSS" } +embed_as_string_view("generate_mathml_stylesheet_source") { + input = "MathML/Default.css" + output = "$target_gen_dir/MathML/MathMLStyleSheetSource.cpp" + variable_name = "mathml_stylesheet_source" + namespace = "Web::MathML" +} + source_set("all_generated") { generated_deps = [ ":generate_aria_roles", diff --git a/Tests/LibWeb/Layout/expected/css-namespace-tag-name-selector.txt b/Tests/LibWeb/Layout/expected/css-namespace-tag-name-selector.txt index 0c5b96578f3..59c954aa7af 100644 --- a/Tests/LibWeb/Layout/expected/css-namespace-tag-name-selector.txt +++ b/Tests/LibWeb/Layout/expected/css-namespace-tag-name-selector.txt @@ -1,41 +1,41 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline BlockContainer at (0,0) content-size 800x600 [BFC] children: not-inline - BlockContainer
at (8,8) content-size 784x207.3125 children: not-inline - BlockContainer <(anonymous)> at (8,8) content-size 784x161.65625 children: inline - line 0 width: 413.453125, height: 161.65625, bottom: 161.65625, baseline: 152 + BlockContainer at (8,8) content-size 784x299.65625 children: not-inline + BlockContainer <(anonymous)> at (8,8) content-size 784x152 children: inline + line 0 width: 302, height: 152, bottom: 152, baseline: 152 frag 0 from SVGSVGBox start: 0, length: 0, rect: [9,9 300x150] - frag 1 from TextNode start: 0, length: 1, rect: [310,146 8x17.46875] - " " - frag 2 from TextNode start: 0, length: 5, rect: [320,126 99.453125x43.671875] - "Hello" SVGSVGBox