Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: eac201ada8db46bfc8ca0f453e24c2a1203732b1
      
https://github.com/WebKit/WebKit/commit/eac201ada8db46bfc8ca0f453e24c2a1203732b1
  Author: Devin Rousso <[email protected]>
  Date:   2026-07-19 (Sun, 19 Jul 2026)

  Changed paths:
    A 
LayoutTests/inspector/css/add-css-property-without-source-range-expected.txt
    A LayoutTests/inspector/css/add-css-property-without-source-range.html
    M Source/WebInspectorUI/UserInterface/Models/CSSStyleDeclaration.js

  Log Message:
  -----------
  Uncaught Exception: Uncaught TypeError: Cannot read properties of null 
(reading 'collapseToEnd')
https://bugs.webkit.org/show_bug.cgi?id=273760
<rdar://problem/127991410>

Reviewed by Taher Ali.

This can happen when a property to a style that has no source range (e.g. 
UserAgent styles).

Match the existing guard in `WI.DOMNodeStyles.prototype.changeStyleText` that 
allows for this.

* Source/WebInspectorUI/UserInterface/Models/CSSStyleDeclaration.js:
(WI.CSSStyleDeclaration.prototype._rangeAfterPropertyAtIndex):

* LayoutTests/inspector/css/add-css-property-without-source-range.html: Added.
* LayoutTests/inspector/css/add-css-property-without-source-range-expected.txt: 
Added.

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



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

Reply via email to