Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: a60e1ec074fd0dcb2abf5203d02328f68b2f789b
      
https://github.com/WebKit/WebKit/commit/a60e1ec074fd0dcb2abf5203d02328f68b2f789b
  Author: Sean Patterson <[email protected]>
  Date:   2026-08-03 (Mon, 03 Aug 2026)

  Changed paths:
    M LayoutTests/fast/dom/Selection/collapseToX-empty-selection-expected.txt
    M Source/WebCore/page/DOMSelection.cpp

  Log Message:
  -----------
  "InvalidStateError: The object is in an invalid state" is not very helpful
https://bugs.webkit.org/show_bug.cgi?id=278290
rdar://134645414

Reviewed by Chris Dumez.

DOMSelection::collapseToEnd() and collapseToStart() threw a bare
InvalidStateError with the generic "The object is in an invalid state."
message, giving developers no indication of which call failed or why.
Provide a descriptive message naming the method and its precondition,
matching the existing convention already used by DOMSelection::extend().

* Source/WebCore/page/DOMSelection.cpp:
(WebCore::DOMSelection::collapseToEnd):
(WebCore::DOMSelection::collapseToStart):
* LayoutTests/fast/dom/Selection/collapseToX-empty-selection-expected.txt:

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to