Repository navigation
Conversation
blitz-dom gains a text module that holds what Blitz asks of a text backend: the fonts documents lay text out with (TextFonts), a document's text context (DocumentText), an inline formatting context's layout and readback (InlineText, InlineLayoutEngine), form-control editing (EditableText, EditEngine, with an Edit enum of editing operations) and outside list markers (MarkerEngine). Aliases name the backend's types: FontContext, TextLayout, TextEditor, MarkerLayout and FaceDescriptors. text::parley implements them with the code that was spread through the crate: building the Parley layout, breaking and placing its lines, PlainEditor, the font metrics provider, @font-face registration and the Stylo conversions. The rest of Blitz now goes through the boundary: the document keeps one TextContext; deferred construction and inline layout call the backend; the key, IME and pointer handling of text inputs speak Edit; hit testing, selected text, innerText, Selection offsets and inline fragment rects read InlineText. blitz-paint's text painting splits into the decorations any backend's lines share and a Parley module behind paint_inline_layout, paint_text_input and paint_marker, selected by blitz-dom's cfg_text_backend! macro. Behaviour is unchanged.
blitz-dom's parley feature enables the Parley backend and makes Parley an optional dependency. build.rs reads it into the text_parley cfg, which the code uses in its place, and without it blitz-dom stops with a compile error asking for it. system-fonts and complex-scripts enable Parley's equivalents only where Parley is enabled. blitz-paint takes its backend from blitz-dom, through blitz-dom's cfg_text_backend! macro and its re-export of Parley, so the two never disagree. Every crate with text features forwards parley, in its defaults: blitz, blitz-shell, blitz-html, blitz-paint, blitz-vibey-script, blitz-test-harness, dioxus-native, dioxus-native-dom, the browser, readme, the WPT runner, the tests and the examples. A CI job checks the default build and that blitz-dom without parley fails to compile.
Contributor
|
I'll fix CI failures and address comments from users with write access that start with 'Devin'.
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Open Chad's
text-boundary-parleybranch to run CI and WPT comparison againstmain.parleyfeature, with CI checks for the default backend and rejection of builds without a text backend.Preserves Chad's two original commits at
0d9d809c26c968cee080e135378902c67bc9fbfd, followed by merges ofmainto unblock CI. Workflow resolution retains main's removal of redundant jobs and the new backend check. Inline-layout resolution retains the backend delegation and carries main's anonymous-block percentage-height and margin-storage fixes into the relocated code.Latest local verification: formatting and strict Clippy pass; DOM/paint/script checks with floats, writing-mode and parallel construction pass; 81 blitz-dom unit tests, 266 integration tests (3 ignored), and 27 script DOM tests pass. All 15 CI checks pass on the updated branch; the WPT workflow reports no changes in test results compared to main. Readback allocation/performance changes remain under separate investigation.
Link to Devin session: https://dioxus.staging.devinenterprise.com/sessions/6f48224df7114b2983881a081641004e
Open in Devin Desktop: https://dioxus.staging.devinenterprise.com/desktop/session/6f48224df7114b2983881a081641004e?variant=devin-insiders
Requested by: @nicoburns
WPT results
No changes in test results compared to
main.Generated by the WPT workflow.