mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +01:00
Implement step 5.13 for dirname correctly
This commit is contained in:
parent
6188116090
commit
ab2aeb6d97
2 changed files with 23 additions and 24 deletions
|
@ -339,14 +339,14 @@ impl HTMLInputElement {
|
|||
}
|
||||
|
||||
pub fn directionality_from_value(value: &str) -> String {
|
||||
if HTMLInputElement::first_strong_character_is_rtl(value) {
|
||||
if HTMLInputElement::is_first_strong_character_rtl(value) {
|
||||
"rtl".to_owned()
|
||||
} else {
|
||||
"ltr".to_owned()
|
||||
}
|
||||
}
|
||||
|
||||
fn first_strong_character_is_rtl(value: &str) -> bool {
|
||||
fn is_first_strong_character_rtl(value: &str) -> bool {
|
||||
for ch in value.chars() {
|
||||
return match bidi_class(ch) {
|
||||
BidiClass::L => false,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue