[webkit-changes] [WebKit/WebKit] 8e5e36: HTMLTableSectionElement.insertRow(0) / HTMLTableRo...

Ahmad Saleem noreply at github.com
Wed Jul 5 09:18:51 PDT 2023


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

  Changed paths:
    A LayoutTests/fast/dom/HTMLTableRowElement/insertCell-skips-non-td-th-expected.txt
    A LayoutTests/fast/dom/HTMLTableRowElement/insertCell-skips-non-td-th.html
    A LayoutTests/fast/dom/HTMLTableSectionElement/insertRow-skips-non-tr-expected.txt
    A LayoutTests/fast/dom/HTMLTableSectionElement/insertRow-skips-non-tr.html
    M Source/WebCore/html/HTMLTableRowElement.cpp
    M Source/WebCore/html/HTMLTableSectionElement.cpp

  Log Message:
  -----------
  HTMLTableSectionElement.insertRow(0) / HTMLTableRowElement.insertCell(0) do not behave correctly

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

Reviewed by Chris Dumez.

This patch aligns WebKit with Gecko / Firefox, Blink / Chromium and Web-Spec [1] [2].

Merge: https://chromium.googlesource.com/chromium/blink/+/2f46be9abd9350909c03b95b2597ee164d1c38b8

Previously, WebKit was adding the new element before the first node, instead
of before the first `tr` (for insertRow) or `td` / `th` (for insertCell)
element.

[1] https://html.spec.whatwg.org/multipage/tables.html#dom-tbody-insertrow
[2] https://html.spec.whatwg.org/multipage/tables.html#dom-tr-insertcell

* Source/WebCore/html/HTMLTableRowElement.cpp:
(HTMLTableRowElement::insertCell): As commit log
* Source/WebCore/html/HTMLTableSectionElement.cpp:
(HTMLTableSectionElement::insertRow): As commit log
* LayoutTests/fast/dom/HTMLTableSectionElement/insertRow-skips-non-tr.html: Add Test Case
* LayoutTests/fast/dom/HTMLTableSectionElement/insertRow-skips-non-tr-expected.txt: Add Test Case Expectation
* LayoutTests/fast/dom/HTMLTableRowElement/insertCell-skips-non-td-th.html: Add Test Case
* LayoutTests/fast/dom/HTMLTableRowElement/insertCell-skips-non-td-th-expected.txt: Add Test Case Expectation

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




More information about the webkit-changes mailing list