[webkit-changes] [WebKit/WebKit] eed535: Avoid duplicate null check in ReplaceSelectionComm...

Ahmad Saleem noreply at github.com
Thu Jan 4 15:37:28 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: eed5354f0af639be61de79c2c1f00a8a1af496b1
      https://github.com/WebKit/WebKit/commit/eed5354f0af639be61de79c2c1f00a8a1af496b1
  Author: Ahmad Saleem <ahmad.saleem792+github at gmail.com>
  Date:   2024-01-04 (Thu, 04 Jan 2024)

  Changed paths:
    M Source/WebCore/editing/ReplaceSelectionCommand.h

  Log Message:
  -----------
  Avoid duplicate null check in ReplaceSelectionCommand::pastLastLeaf()

https://bugs.webkit.org/show_bug.cgi?id=267067

Reviewed by Ryosuke Niwa.

Merge: https://chromium.googlesource.com/chromium/blink/+/4c63691bebc58be7ff827759a489286b71e6d314

Avoid duplicate null check in ReplaceSelectionCommand::pastLastLeaf() by
calling m_lastNodeInserted->lastDescendant() directly instead of
lastLeafInserted(). This also makes it clearer by we are checking that
m_lastNodeInserted is not null as it is now explicitly use right after.
This avoid avoids dereferencing a pointer as we now get a reference
directly.

* Source/WebCore/editing/ReplaceSelectionCommand.h:
(pastLastLeaf):

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




More information about the webkit-changes mailing list