mirror of
https://github.com/servo/servo.git
synced 2025-06-28 19:13:41 +01:00
layout: capitalize string for TextTransformCase::Capitalize
in fn rendered_text_collection_steps
(#37486)
Previously, `rendered_text_collection_steps` ignores `TextTransformCase::Capitalize` due to limitation of iterator. Now we handle the case outside. Testing: Added a new test as not covered by existing wpt-test, except for the indirectly related WebDriver test. `./mach test-wpt -r tests\wpt\tests\webdriver\tests\classic\get_element_text\get.py --product servodriver` Fixes: #37469 --------- Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com>
This commit is contained in:
parent
910cc0b687
commit
f60e9cdff5
6 changed files with 87 additions and 16 deletions
|
@ -672,7 +672,7 @@ where
|
|||
|
||||
/// Given a string and whether the start of the string represents a word boundary, create a copy of
|
||||
/// the string with letters after word boundaries capitalized.
|
||||
fn capitalize_string(string: &str, allow_word_at_start: bool) -> String {
|
||||
pub(crate) fn capitalize_string(string: &str, allow_word_at_start: bool) -> String {
|
||||
let mut output_string = String::new();
|
||||
output_string.reserve(string.len());
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue