[webkit-changes] [WebKit/WebKit] 3c7518: Fix calculation of direction for text form control...

Frédéric Wang noreply at github.com
Tue Sep 27 21:42:44 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 3c75189741bc8cd3c2be86fa3e299ba977ab2b9c
      https://github.com/WebKit/WebKit/commit/3c75189741bc8cd3c2be86fa3e299ba977ab2b9c
  Author: Frédéric Wang <fred.wang at free.fr>
  Date:   2022-09-27 (Tue, 27 Sep 2022)

  Changed paths:
    M Source/WebCore/html/HTMLTextFormControlElement.cpp

  Log Message:
  -----------
  Fix calculation of direction for text form control elements with dir="auto"
https://bugs.webkit.org/show_bug.cgi?id=245718

Reviewed by Ryosuke Niwa.

For elements with dir="auto", HTMLTextFormControlElement::directionForFormData()
is relying on HTMLElement::directionalityIfDirIsAuto() but this function may
sometimes return a nullopt, so add a fallback value.

* Source/WebCore/html/HTMLTextFormControlElement.cpp:
(WebCore::HTMLTextFormControlElement::directionForFormData const): Fallback to
  LTR when directionalityIfDirIsAuto() returns a nullopt.

Canonical link: https://commits.webkit.org/254943@main




More information about the webkit-changes mailing list