[webkit-changes] [WebKit/WebKit] f2875a: Fix crash when innerTextElement() can be null when...

Chirag Shah noreply at github.com
Mon May 22 13:57:02 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: f2875a3ad7ac0693e0853f58d7884c85345f89a1
      https://github.com/WebKit/WebKit/commit/f2875a3ad7ac0693e0853f58d7884c85345f89a1
  Author: Chirag M Shah <chirag_m_shah at apple.com>
  Date:   2023-05-22 (Mon, 22 May 2023)

  Changed paths:
    A LayoutTests/fast/rendering/render-text-control-crash-with-designmode-off-expected.txt
    A LayoutTests/fast/rendering/render-text-control-crash-with-designmode-off.html
    M Source/WebCore/rendering/RenderTextControl.cpp
    M Source/WebCore/rendering/RenderTextControlSingleLine.cpp

  Log Message:
  -----------
  Fix crash when innerTextElement() can be null when designMode="off"
https://bugs.webkit.org/show_bug.cgi?id=255423
rdar://107985448

Reviewed by Antti Koivisto.

This change guards against innerTextElement() being null. The file
already checked for this in some places, but it wasn't consistent.

* LayoutTests/fast/rendering/render-text-control-crash-with-designmode-off-expected.txt: Added.
* LayoutTests/fast/rendering/render-text-control-crash-with-designmode-off.html: Added.
* Source/WebCore/rendering/RenderTextControl.cpp:
(WebCore::RenderTextControl::textBlockLogicalWidth const):
(WebCore::RenderTextControl::computeLogicalHeight const):
(WebCore::RenderTextControl::computeIntrinsicLogicalWidths const):
* Source/WebCore/rendering/RenderTextControlSingleLine.cpp:
(WebCore::RenderTextControlSingleLine::layout):
(WebCore::RenderTextControlSingleLine::preferredContentLogicalWidth const):

Originally-landed-as: 259548.635 at safari-7615-branch (064579d997ae). rdar://107985448
Canonical link: https://commits.webkit.org/264372@main




More information about the webkit-changes mailing list