File tree 1 file changed +12
-4
lines changed
1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -3275,10 +3275,18 @@ Element::Directionality Element::directionality() const
3275
3275
// -> undefined
3276
3276
VERIFY (!maybe_dir.has_value ());
3277
3277
3278
- // FIXME: If element is a bdi element:
3279
- // FIXME: 1. Let result be the auto directionality of element.
3280
- // FIXME: 2. If result is null, then return 'ltr'.
3281
- // FIXME: 3. Return result.
3278
+ // If element is a bdi element:
3279
+ if (local_name () == HTML::TagNames::bdi) {
3280
+ // 1. Let result be the auto directionality of element.
3281
+ auto result = auto_directionality ();
3282
+
3283
+ // 2. If result is null, then return 'ltr'.
3284
+ if (!result.has_value ())
3285
+ return Directionality::Ltr;
3286
+
3287
+ // 3. Return result.
3288
+ return result.release_value ();
3289
+ }
3282
3290
3283
3291
// If element is an input element whose type attribute is in the Telephone state:
3284
3292
if (is<HTML::HTMLInputElement>(this ) && static_cast <HTML::HTMLInputElement const &>(*this ).type_state () == HTML::HTMLInputElement::TypeAttributeState::Telephone) {
You can’t perform that action at this time.
0 commit comments