Expand description
ยงLogic for text transform in inline formatting contexts
Inline formatting contexts do a variety of text transformations on their text content
including white space collapsing, application of the text-transform CSS property,
and application of the -webkit-text-security property. This module contains code to
handle this as well as code to map from offsets in the original DOM node to the final
IFC text and vice-versa.
Structsยง
- Character
Transform Iteration - A single iteration in a pipeline of character iterators, that handle things like
whitespace collapse and
text-transformprocessing for text in an [InlineFormattingContext]. Each iteration can consume multiple characters and produce zero or more characters (up to 3). Consumption of characters greater than the characters produced byCharacterTransformIterationindicate that those characters have been collapsed. - Offset
Map - Offset
MapKnown ๐Position - Text
Transformation ๐Iterator - Whitespace
Collapse
Constantsยง
- MAX_
CASE_ ๐MAPPING_ LENGTH - https://github.com/rust-lang/rust/blob/1.97.1/library/core/src/char/mod.rs#L523
Staticsยง
Functionsยง
- capitalization_
iterator ๐ - Given an input iterator, a size hint for the number items in the iterator, and a boolean determining whether the start of the input represents a word boundary, return an iterator that capitalizes one-to-one mapped characters from the input iterator.
- map_
character_ ๐for_ webkit_ text_ security - Map a character according to the rules of the
-webkit-text-securityCSS property. - map_
characters_ ๐with_ phf - simple_
case_ ๐transform_ iterator