[webkit-changes] [WebKit/WebKit] 2da4c9: Make Attr.nodeValue/textContent not nullable

Ahmad Saleem noreply at github.com
Wed Jul 5 09:24:26 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 2da4c96001cfb666ae7f6483b464ed5f9b07734b
      https://github.com/WebKit/WebKit/commit/2da4c96001cfb666ae7f6483b464ed5f9b07734b
  Author: Ahmad Saleem <ahmad.saleem792+github at gmail.com>
  Date:   2023-07-05 (Wed, 05 Jul 2023)

  Changed paths:
    M LayoutTests/fast/dom/coreDOM-element-attribute-js-null-expected.txt
    M LayoutTests/fast/dom/coreDOM-element-attribute-js-null.xhtml
    M Source/WebCore/dom/Attr.cpp

  Log Message:
  -----------
  Make Attr.nodeValue/textContent not nullable

https://bugs.webkit.org/show_bug.cgi?id=249323
rdar://problem/103602803

Reviewed by Chris Dumez.

This patch aligns WebKit with Gecko / Firefox and Blink / Chromium.

Inspired: https://chromium.googlesource.com/chromium/blink/+/a7c3bb9f22401c30e906a3ec53595247e707de83

This patch updates Attr value for 'nodeVAlue' and 'textContent' to
return empty string if null.

Web-Spec: https://dom.spec.whatwg.org/#interface-attr

* Source/WebCore/dom/Attr.cpp:
(Attr::setNodeValue): As per commit message
* LayoutTests/fast/dom/coreDOM-element-attribute-js-null.xhtml: Rebaselined
* LayoutTests/fast/dom/coreDOM-element-attribute-js-null-expected.txt: Rebaselined

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




More information about the webkit-changes mailing list