From 4d0cbdc7f858fab95991f2e33543a4e834b814ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wies=C5=82aw=20=C5=A0olt=C3=A9s?= Date: Sat, 19 Sep 2026 21:49:44 +0200 Subject: [PATCH] Implement bounded placeholder pseudo paint (#237) --- .../css-placeholder-pseudo-paint-237-235.md | 66 +++++++++++++++++++ .../native/webscene_css_native_cascade.h | 7 ++ .../native/webscene_css_pseudo_application.h | 61 +++++++++++++++++ .../native/webscene_css_rule_operations.h | 2 +- .../native/webscene_native_dom.h | 27 ++++++-- .../native/webscene_native_dom_scene.inc | 14 +++- .../webscene_v8_runtime_css_cascade.inc | 28 ++++++++ .../webscene_v8_runtime_css_parsing.inc | 8 ++- .../native_v8_runtime_css_layout_tests.inc | 55 ++++++++++++++++ .../tests/native_v8_runtime_tests.cpp | 7 ++ tests/NativeWeb/css_service.cpp | 13 +++- tests/WebPlatformSubset/capabilities.json | 8 +++ .../css-placeholder-pseudo-paint.html | 41 ++++++++++++ .../webscene-component-profile.json | 7 ++ 14 files changed, 336 insertions(+), 8 deletions(-) create mode 100644 docs/validation/css-placeholder-pseudo-paint-237-235.md create mode 100644 tests/WebPlatformSubset/contracts/css-placeholder-pseudo-paint.html diff --git a/docs/validation/css-placeholder-pseudo-paint-237-235.md b/docs/validation/css-placeholder-pseudo-paint-237-235.md new file mode 100644 index 000000000..556676904 --- /dev/null +++ b/docs/validation/css-placeholder-pseudo-paint-237-235.md @@ -0,0 +1,66 @@ +# Bounded placeholder pseudo-element paint + +Issues: WebScene #237, parent #235 + +Base: `2112a6d7e53844d3c1a461fa9937dc5063fa4bfe` + +Unchanged Code OSS: `645f29cc3176500b4b5762ba887cf2a7f0ffdf2c` + +## Selected inventory gap + +The pinned unchanged Code OSS core CSS contains twelve standard +`::placeholder` selectors across the workbench shell, action widget, mobile +picker, issue reporter, chat, plan review, and agent-feedback controls. Every +one authors `color`; one also authors `opacity: 1`. WebScene already parsed the +pseudo-element and painted live `input`/`textarea` placeholder strings, but the +runtime pseudo classifier dropped those rules before cascade. + +This slice assigns `::placeholder` its own compiled pseudo kind and retains only +the two observed paint components: resolved color and bounded opacity. The +state lives in the existing copy-on-write pseudo allocation and is created only +for a matching authored rule. It creates no generated box and does not affect +control geometry. Empty-value paint reads the retained state while nonempty +values continue to suppress the placeholder. Re-cascade replaces the complete +record, so class, custom-property, stylesheet, detach, and navigation changes +cannot retain stale placeholder paint. + +The selector uses the ordinary compiled origin and its existing subject, +functional, combinator, and attribute dependency routes. Cascade does not scan +the document, parse during paint, poll, request frames, or add visual-tree +nodes. Scene publication performs one color selection and alpha multiplication +only when an eligible empty text control already paints its placeholder. + +## Contracts and remaining inventory + +The V8 scene contract checks custom-property color, fractional opacity, class +mutation, live-value suppression, restoration, and cleanup. The shared CSS +contract checks pseudo classification plus bounded color/opacity application. +The browser candidate checks the corresponding computed pseudo style. + +The unchanged Code OSS core pseudo-class forms in its authored CSS are already +covered by the compiled matcher; `:visited` remains deliberately privacy-closed. +The remaining core pseudo-element inventory is: + +- ten `::details-content` rules, which require a disclosure-content pseudo box, + open-state layout and discrete/auto-size transition behavior; +- two functional `::highlight()` rules, which require named Highlight ranges, + functional pseudo parsing, range paint, mutation, and teardown; +- two `::-webkit-details-marker` rules and six internal form-control part + rules (`::-webkit-inner-spin-button`, `::-webkit-outer-spin-button`, + `::-ms-clear`, and `::-webkit-search-cancel-button`), which require bounded + native control-part ownership before their declarations can have an + observable effect. + +The two legacy WebKit/Mozilla placeholder aliases duplicate adjacent standard +rules and remain unclaimed. Extension-bundled CSS additionally uses named +highlights and one `::marker`; shadow-only `::part`/`::slotted`, complete marker +styling, first-line/first-letter layout, and cumulative browser/package/ +performance evidence remain outside this slice. No Code OSS source changes. + +The remaining parser-recognized but runtime-unmaterialized pseudo-elements are +`::first-letter`, `::first-line`, `::marker`, `::file-selector-button`, `::cue`, +`::cue-region`, `::grammar-error`, `::spelling-error`, and `::target-text`. +Functional `::highlight()`, `::details-content`, `::part()`, and `::slotted()` +also still require parser and ownership work. The inventory diagnostics now +report the already implemented selection, backdrop, and WebKit scrollbar kinds +as supported instead of grouping them with those remaining gaps. diff --git a/experiments/WebScene.NativeEngine.Probe/native/webscene_css_native_cascade.h b/experiments/WebScene.NativeEngine.Probe/native/webscene_css_native_cascade.h index 49ccc13cd..1c99355b5 100644 --- a/experiments/WebScene.NativeEngine.Probe/native/webscene_css_native_cascade.h +++ b/experiments/WebScene.NativeEngine.Probe/native/webscene_css_native_cascade.h @@ -68,6 +68,13 @@ bool apply_native_cascade(native_document& document,dom_node& node, const auto result=apply_backdrop_declaration(node,declaration,variables,backdrop_important); observe(declaration,result); } + else if(kind==8) { + property_result result; + apply_placeholder_declaration( + node,node.style.mutable_placeholder_pseudo(),declaration, + variables,result,[](bool) {}); + observe(declaration,result); + } else if(kind>=3) apply_scrollbar_declaration(node,kind,declaration,variables); else { auto& pseudo=kind==1?node.style.mutable_before_pseudo():node.style.mutable_after_pseudo(); diff --git a/experiments/WebScene.NativeEngine.Probe/native/webscene_css_pseudo_application.h b/experiments/WebScene.NativeEngine.Probe/native/webscene_css_pseudo_application.h index 61fbbb853..ea4edab4e 100644 --- a/experiments/WebScene.NativeEngine.Probe/native/webscene_css_pseudo_application.h +++ b/experiments/WebScene.NativeEngine.Probe/native/webscene_css_pseudo_application.h @@ -28,6 +28,7 @@ inline int split_pseudo_element_selector(const std::string& selector, std::strin }; if (const auto kind = split_suffix("::before", 1); kind != 0) return kind; if (const auto kind = split_suffix("::after", 2); kind != 0) return kind; + if (const auto kind = split_suffix("::placeholder", 8); kind != 0) return kind; if (const auto kind = split_suffix("::backdrop", 7); kind != 0) return kind; if (const auto kind = split_suffix("::-webkit-scrollbar-thumb", 4); kind != 0) return kind; if (const auto kind = split_suffix("::-webkit-scrollbar-track", 5); kind != 0) return kind; @@ -36,6 +37,66 @@ inline int split_pseudo_element_selector(const std::string& selector, std::strin if (const auto kind = split_suffix(":before", 1); kind != 0) return kind; return split_suffix(":after", 2); } + +template +void apply_placeholder_declaration( + dom_node& node, + node_style::pseudo_element_pair::placeholder_element& placeholder, + const css_declaration& declaration, + const std::unordered_map& variables, + Decision& decision, + Resolved&& on_resolved) +{ + decision.classification = "unsupported"; + const auto contains_variable = declaration.value.find("var(") != std::string::npos; + auto resolved_value = std::string{}; + const auto& value = contains_variable + ? (resolved_value = resolve_value(node,declaration.value,variables)) + : declaration.value; + if (value.empty() && contains_variable) { + decision.classification = "invalid-authoring"; + decision.semantic_slice = "unresolved custom property at computed-value time"; + return; + } + on_resolved(contains_variable); + const auto lower = ascii_lower(trim_value(value)); + if (declaration.name == "color") { + if (lower == "currentcolor" || lower == "inherit" || lower == "unset") { + placeholder.foreground_specified = false; + placeholder.foreground_rgba = 0U; + decision.classification = "supported"; + } else { + const auto color = native_document::parse_color(value); + if (is_explicit_color_token(value,color)) { + placeholder.foreground_specified = true; + placeholder.foreground_rgba = color; + decision.classification = "supported"; + } else { + decision.classification = "invalid-authoring"; + } + } + } else if (declaration.name == "opacity") { + if (lower == "initial" || lower == "unset" || lower == "revert") { + placeholder.opacity = 1; + decision.classification = "supported"; + return; + } + if (lower == "inherit") { + placeholder.opacity = std::clamp(node.style.opacity, 0.0F, 1.0F); + decision.classification = "supported"; + return; + } + char* end = nullptr; + const auto parsed = std::strtof(lower.c_str(), &end); + if (end != lower.c_str() && end == lower.c_str() + lower.size() + && std::isfinite(parsed)) { + placeholder.opacity = std::clamp(parsed, 0.0F, 1.0F); + decision.classification = "supported"; + } else { + decision.classification = "invalid-authoring"; + } + } +} inline void apply_scrollbar_declaration( dom_node& node, int pseudo_kind, diff --git a/experiments/WebScene.NativeEngine.Probe/native/webscene_css_rule_operations.h b/experiments/WebScene.NativeEngine.Probe/native/webscene_css_rule_operations.h index 7b7871afc..cd1cc0feb 100644 --- a/experiments/WebScene.NativeEngine.Probe/native/webscene_css_rule_operations.h +++ b/experiments/WebScene.NativeEngine.Probe/native/webscene_css_rule_operations.h @@ -310,7 +310,7 @@ void for_each_cascaded_pseudo_declaration( // kind prevents a high-priority ::before declaration from affecting // ::after while reusing the same layer/importance/rollback machinery // as the originating element. - std::array, 8> rules_by_kind; + std::array, 9> rules_by_kind; for (const auto& [kind, rule] : matched_rules) { if (kind > 0 && static_cast(kind) < rules_by_kind.size()) rules_by_kind[static_cast(kind)].push_back(rule); diff --git a/experiments/WebScene.NativeEngine.Probe/native/webscene_native_dom.h b/experiments/WebScene.NativeEngine.Probe/native/webscene_native_dom.h index 89f580c64..ddba0284b 100644 --- a/experiments/WebScene.NativeEngine.Probe/native/webscene_native_dom.h +++ b/experiments/WebScene.NativeEngine.Probe/native/webscene_native_dom.h @@ -572,8 +572,15 @@ struct node_style final { }; struct pseudo_element_pair final { + struct placeholder_element final { + uint32_t foreground_rgba{0}; + float opacity{1}; + bool foreground_specified{false}; + }; + pseudo_element before; pseudo_element after; + placeholder_element placeholder; }; const pseudo_element& before_pseudo() const noexcept @@ -600,6 +607,18 @@ struct node_style final { return pseudo_elements->after; } + const pseudo_element_pair::placeholder_element& placeholder_pseudo() const noexcept + { + static const pseudo_element_pair::placeholder_element empty; + return pseudo_elements == nullptr ? empty : pseudo_elements->placeholder; + } + + pseudo_element_pair::placeholder_element& mutable_placeholder_pseudo() + { + ensure_unique_pseudo_elements(); + return pseudo_elements->placeholder; + } + void clear_pseudo_elements() noexcept { pseudo_elements.reset(); @@ -959,10 +978,10 @@ struct node_style final { } } - // Generated pseudo-elements are absent from most DOM nodes. Keeping two - // complete pseudo boxes inline cost 496 bytes on every element. Copy-on- - // write preserves cheap style cloning while paying for this cold state - // only when ::before or ::after participates in the cascade. + // Generated pseudo-elements and authored placeholder paint are absent from + // most DOM nodes. Keeping complete pseudo boxes inline cost 496 bytes on + // every element. Copy-on-write preserves cheap style cloning while paying + // for this cold state only when a supported pseudo participates in cascade. std::shared_ptr pseudo_elements; // Transition/keyframe state is similarly cold. A complete animation_data // block is retained only for styles that author transition/animation diff --git a/experiments/WebScene.NativeEngine.Probe/native/webscene_native_dom_scene.inc b/experiments/WebScene.NativeEngine.Probe/native/webscene_native_dom_scene.inc index bfaa4f680..81dd883f5 100644 --- a/experiments/WebScene.NativeEngine.Probe/native/webscene_native_dom_scene.inc +++ b/experiments/WebScene.NativeEngine.Probe/native/webscene_native_dom_scene.inc @@ -2831,6 +2831,18 @@ void native_document::append_scene( if (!node.form_control().value.empty() || show_placeholder) { const auto painted_value = resolved_text_transform( node, show_placeholder ? placeholder->second : node.form_control().value); + auto text_color = resolved_foreground(node); + if (show_placeholder) { + const auto& placeholder_style = node.style.placeholder_pseudo(); + if (placeholder_style.foreground_specified) + text_color = placeholder_style.foreground_rgba; + const auto alpha = static_cast(std::clamp( + std::lround(static_cast(text_color & 0xFFU) + * placeholder_style.opacity), + 0L, + 255L)); + text_color = (text_color & 0xFFFFFF00U) | alpha; + } std::ostringstream resource; resource << font_size << '\t' << line_height << '\t' << resolved_font_weight(node) << '\t' << "start" << '\t' @@ -2843,7 +2855,7 @@ void native_document::append_scene( text_y, text_width, line_height, - with_opacity(resolved_foreground(node)), + with_opacity(text_color), node.id, resolved_letter_spacing(node), resolved_word_spacing(node), diff --git a/experiments/WebScene.NativeEngine.Probe/native/webscene_v8_runtime_css_cascade.inc b/experiments/WebScene.NativeEngine.Probe/native/webscene_v8_runtime_css_cascade.inc index be5873b3f..1891e7d8b 100644 --- a/experiments/WebScene.NativeEngine.Probe/native/webscene_v8_runtime_css_cascade.inc +++ b/experiments/WebScene.NativeEngine.Probe/native/webscene_v8_runtime_css_cascade.inc @@ -37,6 +37,24 @@ }); } + void apply_placeholder_css_declaration( + dom_node& node, + node_style::pseudo_element_pair::placeholder_element& placeholder, + const css_declaration& declaration) + { + feature_decision decision( + *this, + "css", + "placeholder-property:" + declaration.name, + "pseudo-style-application"); + css::apply_placeholder_declaration( + node,placeholder,declaration,css_variables,decision, + [&](bool contains_variable) { + if(contains_variable && is_paint_property(declaration.name)) + record_composition("css-custom-property-to-paint",node.id); + }); + } + static std::optional first_css_url(const std::string& value) { return css::first_css_url(value); } @@ -388,6 +406,11 @@ node,declaration,css_variables,backdrop_important); return; } + if (pseudo_kind == 8) { + apply_placeholder_css_declaration( + node,node.style.mutable_placeholder_pseudo(),declaration); + return; + } if (pseudo_kind >= 3 && pseudo_kind <= 6) { apply_scrollbar_css_declaration(node, pseudo_kind, declaration); return; @@ -603,6 +626,11 @@ node,declaration,css_variables,backdrop_important); return; } + if (pseudo_kind == 8) { + apply_placeholder_css_declaration( + node,node.style.mutable_placeholder_pseudo(),declaration); + return; + } if (pseudo_kind >= 3 && pseudo_kind <= 6) { apply_scrollbar_css_declaration(node, pseudo_kind, declaration); return; diff --git a/experiments/WebScene.NativeEngine.Probe/native/webscene_v8_runtime_css_parsing.inc b/experiments/WebScene.NativeEngine.Probe/native/webscene_v8_runtime_css_parsing.inc index 834604874..d39e3b99f 100644 --- a/experiments/WebScene.NativeEngine.Probe/native/webscene_v8_runtime_css_parsing.inc +++ b/experiments/WebScene.NativeEngine.Probe/native/webscene_v8_runtime_css_parsing.inc @@ -846,9 +846,15 @@ || name == "before" || name == "after" || name == "first-letter" || name == "first-line"; if (pseudo_element) { + const auto supported = name == "before" || name == "after" + || name == "selection" || name == "placeholder" + || name == "backdrop" || name == "-webkit-scrollbar" + || name == "-webkit-scrollbar-thumb" + || name == "-webkit-scrollbar-track" + || name == "-webkit-scrollbar-corner"; record_selector_feature( "selector:pseudo-element:" + name, - name == "before" || name == "after" ? "supported" : "unsupported"); + supported ? "supported" : "unsupported"); } else { static const std::unordered_set supported_pseudo_classes{ "root", "first-child", "last-child", "only-child", diff --git a/experiments/WebScene.NativeEngine.Probe/tests/native_v8_runtime_css_layout_tests.inc b/experiments/WebScene.NativeEngine.Probe/tests/native_v8_runtime_css_layout_tests.inc index 6372981a4..e92ad6d00 100644 --- a/experiments/WebScene.NativeEngine.Probe/tests/native_v8_runtime_css_layout_tests.inc +++ b/experiments/WebScene.NativeEngine.Probe/tests/native_v8_runtime_css_layout_tests.inc @@ -36,6 +36,61 @@ void test_modal_backdrop_scene(webscene_engine* engine) execute(engine,"document.body.innerHTML='';","backdrop-cleanup.js"); } +void test_placeholder_pseudo_color_and_opacity_reach_scene(webscene_engine* engine) +{ + resize(engine,320,120,1); + execute(engine,R"JS( + document.body.innerHTML=` + + + `; + globalThis.placeholderProbe=document.getElementById('placeholder-probe'); + )JS","placeholder-pseudo-setup.js"); + uint64_t revision=0; + const auto expect_color=[&](uint32_t expected,bool present) { + webscene_engine_request_scene_checkpoint(engine); + for(int attempt=0;attempt<100;++attempt) { + const auto* scene=webscene_engine_acquire_latest_scene(engine); + bool matched=false; + if(scene) { + if(scene->header.revision>revision) { + unsigned count=0; + for(uint32_t i=0;iheader.command_count;++i) { + const auto& command=scene->commands[i]; + if(command.kind==3U && command.rgba==expected)++count; + } + matched=count==(present?1U:0U); + if(matched)revision=scene->header.revision; + } + webscene_scene_acknowledge(scene);webscene_scene_release(scene); + } + if(matched)return; + std::this_thread::sleep_for(std::chrono::milliseconds(2)); + } + fail("placeholder pseudo color/opacity did not reach retained scene"); + }; + expect_color(0x2468AC80U,true); + execute(engine,"placeholderProbe.className='alternate';","placeholder-pseudo-class.js"); + expect_color(0x112233FFU,true); + execute(engine,"placeholderProbe.value='typed';","placeholder-pseudo-value.js"); + expect_color(0x112233FFU,false); + execute(engine, + "placeholderProbe.value='';placeholderProbe.className='';", + "placeholder-pseudo-restore.js"); + expect_color(0x2468AC80U,true); + execute(engine,"document.body.innerHTML='';","placeholder-pseudo-cleanup.js"); +} + void test_responsive_positioned_sizing(webscene_engine* engine) { resize(engine, 1280, 720, 1); diff --git a/experiments/WebScene.NativeEngine.Probe/tests/native_v8_runtime_tests.cpp b/experiments/WebScene.NativeEngine.Probe/tests/native_v8_runtime_tests.cpp index d71157552..570c75b15 100644 --- a/experiments/WebScene.NativeEngine.Probe/tests/native_v8_runtime_tests.cpp +++ b/experiments/WebScene.NativeEngine.Probe/tests/native_v8_runtime_tests.cpp @@ -370,6 +370,12 @@ int main() test_modal_backdrop_scene(focused_engine); webscene_engine_destroy(focused_engine);return 0; } + if(selected=="placeholder-pseudo") { + auto* focused_engine=webscene_engine_create(0); + require(focused_engine!=nullptr,"placeholder pseudo engine creation failed"); + test_placeholder_pseudo_color_and_opacity_reach_scene(focused_engine); + webscene_engine_destroy(focused_engine);return 0; + } if (selected == "fragment-attach") { auto* focused_engine = webscene_engine_create(0); require(focused_engine != nullptr, "fragment attach engine creation failed"); @@ -1361,6 +1367,7 @@ int main() test_dimension_custom_property_inheritance(engine); test_geometry_variable_positions(engine); test_modal_backdrop_scene(engine); + test_placeholder_pseudo_color_and_opacity_reach_scene(engine); test_responsive_positioned_sizing(engine); test_compact_go_to_fixed_grid_tracks_preserve_trailing_space(engine); test_named_grid_template_areas_layout_cssom_and_mutation(engine); diff --git a/tests/NativeWeb/css_service.cpp b/tests/NativeWeb/css_service.cpp index 8750cd7c5..1e42084eb 100644 --- a/tests/NativeWeb/css_service.cpp +++ b/tests/NativeWeb/css_service.cpp @@ -714,7 +714,8 @@ int main(int argc,char** argv) { {".base::after",2},{".base:after",2}, {".base::-webkit-scrollbar",3},{".base::-webkit-scrollbar-thumb",4}, {".base::-webkit-scrollbar-track",5},{".base::-webkit-scrollbar-corner",6}, - {".base::backdrop",7},{".base[data-label='::before']",0} + {".base::backdrop",7},{".base::placeholder",8}, + {".base[data-label='::before']",0} }; for(const auto& [selector,kind]:classified_selectors) { const auto payload=payload_for(selector,"red"); @@ -1072,6 +1073,16 @@ int main(int argc,char** argv) { webscene_native::css::apply_pseudo_declaration(ordered_node,before,{"color","var(--tone)",false}, variable_root,pseudo_result,[](bool) {}); if(!before.generated || before.content!="label" || before.foreground_rgba!=0xFF0000FF) return 130; + auto& placeholder=ordered_node.style.mutable_placeholder_pseudo(); + webscene_native::css::apply_placeholder_declaration( + ordered_node,placeholder,{"color","var(--tone)",false}, + variable_root,pseudo_result,[](bool) {}); + webscene_native::css::apply_placeholder_declaration( + ordered_node,placeholder,{"opacity",".5",false}, + variable_root,pseudo_result,[](bool) {}); + if(!placeholder.foreground_specified + || placeholder.foreground_rgba!=0xFF0000FF + || placeholder.opacity!=.5F) return 179; webscene_native::css::apply_scrollbar_declaration(ordered_node,3,{"display","none",true},variable_root); webscene_native::css::apply_scrollbar_declaration(ordered_node,3,{"display","block",false},variable_root); if(!ordered_node.style.scrollbar_hidden || ordered_node.style.display==webscene_native::display_mode::none) return 131; diff --git a/tests/WebPlatformSubset/capabilities.json b/tests/WebPlatformSubset/capabilities.json index 6c957235a..4cb9cb4c0 100644 --- a/tests/WebPlatformSubset/capabilities.json +++ b/tests/WebPlatformSubset/capabilities.json @@ -224,6 +224,14 @@ "coverage": ["contracts/css-pseudo-positioned-box-primitives.html", "css/CSS2/generated-content/before-content-display-002.xht", "css/CSS2/generated-content/before-after-positioned-003.html", "css/css-flexbox/flexbox-with-pseudo-elements-001.html", "css/CSS2/visufx/visibility-layout-001.xht", "CssGeneratedPseudoElementTests", "CssGeneratedPseudoElementStackingTests", "CssPositionedOverlayTests", "test_positive_z_before_paints_above_lower_z_child"], "gap": "Native now passes the unchanged exact in-flow, flex, and positioned generated-content reftests plus the required exact-pixel positioned/rounded/stacked pseudo primitive in the native runner. WPT visibility-layout-001.xht remains a self-verifying visual test that does not compose visibility with generated content; the inherited-hidden generated-content composition remains covered by the focused native/portable spike. Evidence: artifacts/web-platform-pseudo-positioned-v3/{native,managed}/results.json, artifacts/wpt-generated-regression-v2/results.json, and artifacts/wpt-flex-pseudo-regression-v2/results.json." }, + { + "family": "text-control-placeholder-paint", + "required": [], + "candidate": ["::placeholder color", "::placeholder opacity", "custom-property resolution", "class mutation recascade", "live-value paint suppression"], + "productEvidence": ["unchanged Code OSS workbench inputs", "chat and feedback textareas", "issue reporter and mobile picker inputs"], + "coverage": ["contracts/css-placeholder-pseudo-paint.html", "test_placeholder_pseudo_color_and_opacity_reach_scene", "V8-free shared CSS pseudo classification/application contract"], + "gap": "Implementation-first candidate for WebScene #237. The standard pseudo stores only the color and opacity used by the twelve unchanged Code OSS core rules in lazy copy-on-write pseudo state, resolves custom properties during cascade, and changes retained placeholder text paint without generating a box, changing layout, scanning, polling, or requesting frames. Direct browser/native profile execution, additional placeholder properties, legacy vendor aliases, internal form-control parts, and broader pseudo-element qualification remain open." + }, { "family": "list-formatting", "required": ["list-item marker paint", "ordered counters", "outside marker geometry", "inside marker first-line participation", "marker-before-block-child anonymous line"], diff --git a/tests/WebPlatformSubset/contracts/css-placeholder-pseudo-paint.html b/tests/WebPlatformSubset/contracts/css-placeholder-pseudo-paint.html new file mode 100644 index 000000000..0a3f469d8 --- /dev/null +++ b/tests/WebPlatformSubset/contracts/css-placeholder-pseudo-paint.html @@ -0,0 +1,41 @@ + + +Placeholder pseudo-element retains bounded authored paint + + + + + diff --git a/tests/WebPlatformSubset/webscene-component-profile.json b/tests/WebPlatformSubset/webscene-component-profile.json index 90a1e5bf5..b7a013def 100644 --- a/tests/WebPlatformSubset/webscene-component-profile.json +++ b/tests/WebPlatformSubset/webscene-component-profile.json @@ -1310,6 +1310,13 @@ } ], "candidate": [ + { + "path": "contracts/css-placeholder-pseudo-paint.html", + "type": "testharness", + "capabilities": ["placeholder-pseudo-color", "placeholder-pseudo-opacity", "placeholder-pseudo-mutation", "placeholder-value-suppression"], + "evidence": ["css-pseudo-elements-4-placeholder", "native-retained-scene-contract", "vscode-oss-645f29c-placeholder-ledger"], + "reason": "Implementation-first WebScene #237 slice for the twelve standard ::placeholder selectors in unchanged Code OSS core CSS. Native companion coverage requires custom-property color and fractional opacity to reach retained text paint, class mutation to recascade, live values to suppress placeholder paint, and empty-value restoration without layout or frame demand. Direct browser/native profile execution remains validation debt; additional placeholder properties and vendor aliases remain outside this bounded candidate." + }, { "path": "contracts/css-checkbox-required-validity.html", "type": "testharness",