Skip to content

script: Complete basic implementation of delete command#43082

Merged
TimvdLippe merged 1 commit into
servo:mainfrom
TimvdLippe:finish-delete-implementation
Mar 11, 2026
Merged

script: Complete basic implementation of delete command#43082
TimvdLippe merged 1 commit into
servo:mainfrom
TimvdLippe:finish-delete-implementation

Conversation

@TimvdLippe

Copy link
Copy Markdown
Contributor

While we are not there yet, this is the majority of the implementation of the delete command.

What's missing:

  1. Handling of style attributes (most of the test failures)
  2. Handling of lists

Since these are quite complicated on their own, deferring that to their own PR.

Also added more assertions regarding parent nodes, which should always exist in the spec. By adding those, discovered that the logic for is_visible was wrong where its display value wasn't checked for "none".

Part of #25005

@TimvdLippe TimvdLippe requested a review from gterzian as a code owner March 7, 2026 13:13
@TimvdLippe TimvdLippe added the T-linux-wpt Do a try run of the WPT label Mar 7, 2026
@servo-highfive servo-highfive added the S-awaiting-review There is new code that needs to be reviewed. label Mar 7, 2026
@github-actions github-actions Bot removed the T-linux-wpt Do a try run of the WPT label Mar 7, 2026
@github-actions

github-actions Bot commented Mar 7, 2026

Copy link
Copy Markdown

🔨 Triggering try run (#22799697773) for Linux (WPT)

@TimvdLippe TimvdLippe force-pushed the finish-delete-implementation branch from 804a73a to 1168f1a Compare March 7, 2026 13:16
@github-actions

github-actions Bot commented Mar 7, 2026

Copy link
Copy Markdown

Test results for linux-wpt from try job (#22799697773):

Flaky unexpected result (26)
  • TIMEOUT /FileAPI/url/url-in-tags-revoke.window.html (#19978)
    • TIMEOUT [expected PASS] subtest: Fetching a blob URL immediately before revoking it works in <script> tags.

      Test timed out
      

  • OK /IndexedDB/idbtransaction-oncomplete.any.worker.html (#42804)
    • FAIL [expected PASS] subtest: IDBTransaction - complete event

      assert_array_equals: lengths differ, expected array ["upgradeneeded", "complete", "success", "opencursor"] length 4, got ["upgradeneeded", "complete", "success"] length 3
      

  • OK /_mozilla/css/offset_properties_inline.html (#40543)
    • FAIL [expected PASS] subtest: offsetTop

      assert_equals: offsetTop of #inline-1 should be 0. expected 0 but got -1
      

    • FAIL [expected PASS] subtest: offsetLeft

      assert_equals: offsetLeft of #inline-2 should be 40. expected 40 but got 25
      

  • OK /_mozilla/mozilla/getBoundingClientRect.html (#39668)
    • FAIL [expected PASS] subtest: getBoundingClientRect 1

      assert_equals: expected 62 but got 60.35
      

  • CRASH [expected OK] /_webgl/conformance2/wasm/readpixels-2gb-in-4gb-wasm-memory.html
  • OK /css/css-animations/event-order.tentative.html (#39000)
    • PASS [expected FAIL] subtest: Same events on pseudo-elements follow the prescribed order
  • FAIL [expected PASS] /css/css-backgrounds/background-size-041.html
  • OK /css/css-fonts/generic-family-keywords-002.html (#40929)
    • FAIL [expected PASS] subtest: font-family: -webkit-serif treated as <font-family>, not <generic-name>

      assert_equals: expected 30 but got 50
      

    • FAIL [expected PASS] subtest: font-family: -webkit-sans-serif treated as <font-family>, not <generic-name>

      assert_equals: expected 30 but got 50
      

    • FAIL [expected PASS] subtest: font-family: -webkit-cursive treated as <font-family>, not <generic-name>

      assert_equals: expected 30 but got 50
      

    • FAIL [expected PASS] subtest: font-family: -webkit-fantasy treated as <font-family>, not <generic-name>

      assert_equals: expected 30 but got 50
      

    • FAIL [expected PASS] subtest: font-family: -webkit-monospace treated as <font-family>, not <generic-name>

      assert_equals: expected 30 but got 50
      

    • FAIL [expected PASS] subtest: font-family: -webkit-system-ui treated as <font-family>, not <generic-name>

      assert_equals: expected 30 but got 50
      

    • FAIL [expected PASS] subtest: font-family: -webkit-math treated as <font-family>, not <generic-name>

      assert_equals: expected 30 but got 50
      

    • PASS [expected FAIL] subtest: font-family: -webkit-generic(fangsong) treated as <font-family>, not <generic-name>
    • PASS [expected FAIL] subtest: font-family: -webkit-generic(kai) treated as <font-family>, not <generic-name>
    • PASS [expected FAIL] subtest: font-family: -webkit-generic(khmer-mul) treated as <font-family>, not <generic-name>
    • And 12 more unexpected results...
  • OK [expected ERROR] /fetch/fetch-later/quota/cross-origin-iframe/multiple-iframes.https.window.html
  • ERROR [expected OK] /fetch/fetch-later/quota/same-origin-iframe/accumulated-oversized-payload.https.window.html (#41705)
  • ERROR /fetch/metadata/generated/serviceworker.https.sub.html (#36247)
    • PASS [expected FAIL] subtest: sec-fetch-site - Same origin, no options - registration
  • OK /fetch/metadata/window-open.https.sub.html (#40339)
    • FAIL [expected PASS] subtest: Same-site window, forced, reloaded

      The operation is insecure.
      

  • OK /html/browsers/history/the-history-interface/traverse_the_history_5.html (#21383)
    • FAIL [expected PASS] subtest: Multiple history traversals, last would be aborted

      assert_array_equals: Pages opened during history navigation expected property 1 to be 5 but got 3 (expected array [6, 5] got [6, 3])
      

  • TIMEOUT /html/semantics/embedded-content/media-elements/autoplay-allowed-by-feature-policy.https.sub.html (#41404)
    • PASS [expected TIMEOUT] subtest: Feature-Policy header: autoplay * allows same-origin iframes.
  • OK /html/semantics/embedded-content/media-elements/playing-the-media-resource/loop-from-ended.tentative.html (#33778)
    • FAIL [expected PASS] subtest: play() with loop set to true after playback ended

      this argument is not a finite floating-point value
      

  • TIMEOUT [expected OK] /html/semantics/embedded-content/the-iframe-element/iframe_sandbox_navigate_other_frame_popup.sub.html (#39702)
    • TIMEOUT [expected FAIL] subtest: Sandboxed iframe can not navigate other frame's popup

      Test timed out
      

  • OK /html/semantics/forms/form-submission-0/jsurl-form-submit.tentative.html (#36489)
    • PASS [expected FAIL] subtest: Verifies that form submissions scheduled inside javascript: urls take precedence over the javascript: url's return value.
  • OK /html/semantics/scripting-1/the-script-element/execution-timing/077.html (#22139)
    • FAIL [expected PASS] subtest: adding several types of scripts through the DOM and removing some of them confuses scheduler

      assert_array_equals: expected property 1 to be "Script #1 ran" but got "Script #3 ran" (expected array ["Script #2 ran", "Script #1 ran", "Script #3 ran", "Script #4 ran"] got ["Script #2 ran", "Script #3 ran", "Script #4 ran", "Script #1 ran"])
      

  • OK /html/webappapis/dynamic-markup-insertion/document-write/module-dynamic-import.html
    • FAIL [expected PASS] subtest: document.write in an imported module

      assert_true: onload must be called expected true got false
      

  • CRASH [expected OK] /html/webappapis/system-state-and-capabilities/the-navigator-object/secure_context.html
  • OK /mixed-content/tentative/autoupgrades/video-upgrade.https.sub.html (#41135)
    • FAIL [expected PASS] subtest: Video autoupgraded

      assert_equals: Length. expected 1 but got Infinity
      

  • OK /preload/link-header-preload-delay-onload.html (#39622)
    • FAIL [expected PASS] subtest: Makes sure that Link headers preload resources and block window.onload after resource discovery

      assert_true: expected true got false
      

  • CRASH [expected OK] /resource-timing/tentative/initiator-url/set-timeout.html
  • OK /touch-events/single-tap-when-touchend-listener-use-sync-xhr.html (#41175)
    • PASS [expected FAIL] subtest: Click event should be fired when touchend opens synchronous XHR
  • OK [expected TIMEOUT] /trusted-types/trusted-types-navigation.html?06-10 (#37920)
    • PASS [expected TIMEOUT] subtest: Navigate a frame via anchor with javascript:-urls w/ default policy in report-only mode.
    • FAIL [expected NOTRUN] subtest: Navigate a window via anchor with javascript:-urls w/ a default policy throwing an exception in enforcing mode.

      promise_test: Unhandled rejection with value: "Unexpected message received: \"No securitypolicyviolation reported!\""
      

    • FAIL [expected NOTRUN] subtest: Navigate a window via anchor with javascript:-urls w/ a default policy throwing an exception in report-only mode.

      promise_test: Unhandled rejection with value: "Unexpected message received: \"No securitypolicyviolation reported!\""
      

  • OK [expected TIMEOUT] /trusted-types/trusted-types-navigation.html?31-35 (#38034)
    • PASS [expected TIMEOUT] subtest: Navigate a frame via form-submission with javascript:-urls w/ default policy in report-only mode.
    • FAIL [expected NOTRUN] subtest: Navigate a window via form-submission with javascript:-urls w/ a default policy throwing an exception in enforcing mode.

      promise_test: Unhandled rejection with value: "Unexpected message received: \"No securitypolicyviolation reported!\""
      

    • FAIL [expected NOTRUN] subtest: Navigate a window via form-submission with javascript:-urls w/ a default policy throwing an exception in report-only mode.

      promise_test: Unhandled rejection with value: "Unexpected message received: \"No securitypolicyviolation reported!\""
      

    • FAIL [expected NOTRUN] subtest: Navigate a window via form-submission with javascript:-urls w/ a default policy making the URL invalid in enforcing mode.

      promise_test: Unhandled rejection with value: "Unexpected message received: \"No securitypolicyviolation reported!\""
      

Stable unexpected results that are known to be intermittent (14)
  • FAIL [expected PASS] /_mozilla/mozilla/sslfail.html (#10760)
  • TIMEOUT [expected OK] /_mozilla/mozilla/window_resize_event.html (#36741)
    • TIMEOUT [expected PASS] subtest: Popup onresize event fires after resizeTo

      Test timed out
      

  • OK /_webgl/conformance/textures/misc/texture-upload-size.html (#21770)
    • PASS [expected FAIL] subtest: WebGL test #45
    • PASS [expected FAIL] subtest: WebGL test #47
    • PASS [expected FAIL] subtest: WebGL test #49
    • PASS [expected FAIL] subtest: WebGL test #51
    • FAIL [expected PASS] subtest: WebGL test #53

      assert_true: Texture was smaller than the expected size 2x2 expected true got false
      

    • FAIL [expected PASS] subtest: WebGL test #55

      assert_true: getError expected: INVALID_VALUE. Was NO_ERROR : when calling texSubImage2D with the same texture upload with offset 1, 1 expected true got false
      

    • FAIL [expected PASS] subtest: WebGL test #57

      assert_true: Texture was smaller than the expected size 2x2 expected true got false
      

    • FAIL [expected PASS] subtest: WebGL test #59

      assert_true: getError expected: INVALID_VALUE. Was NO_ERROR : when calling texSubImage2D with the same texture upload with offset 1, 1 expected true got false
      

    • PASS [expected FAIL] subtest: WebGL test #61
    • PASS [expected FAIL] subtest: WebGL test #63
    • And 10 more unexpected results...
  • OK /css/css-cascade/layer-cssom-order-reverse.html (#36094)
    • PASS [expected FAIL] subtest: Delete layer invalidates @font-face
  • OK /css/css-fonts/generic-family-keywords-003.html (#38994)
    • PASS [expected FAIL] subtest: @font-face matching for quoted and unquoted cursive (drawing text in a canvas)
    • PASS [expected FAIL] subtest: @font-face matching for quoted and unquoted fantasy (drawing text in a canvas)
    • PASS [expected FAIL] subtest: @font-face matching for quoted and unquoted monospace (drawing text in a canvas)
    • PASS [expected FAIL] subtest: @font-face matching for quoted and unquoted system-ui (drawing text in a canvas)
    • PASS [expected FAIL] subtest: @font-face matching for quoted and unquoted generic(fangsong) (drawing text in a canvas)
    • PASS [expected FAIL] subtest: @font-face matching for quoted and unquoted generic(kai) (drawing text in a canvas)
    • FAIL [expected PASS] subtest: @font-face matching for quoted and unquoted generic(nastaliq) (drawing text in a canvas)

      assert_equals: quoted generic(nastaliq) matches  @font-face rule expected 125 but got 40
      

  • OK /fetch/metadata/generated/css-font-face.https.sub.tentative.html (#32732)
    • PASS [expected FAIL] subtest: sec-fetch-storage-access - Cross-site
  • OK [expected TIMEOUT] /html/anonymous-iframe/indexeddb.tentative.https.window.html (#39254)
    • FAIL [expected TIMEOUT] subtest: indexeddb

      assert_equals: expected (undefined) undefined but got (string) "eaaf3ff4-0eb3-4595-a82f-7ce9d7314456"
      

  • OK /html/browsers/browsing-the-web/navigating-across-documents/navigation-unload-cross-origin.sub.window.html (#29056)
    • PASS [expected FAIL] subtest: Cross-origin navigation started from unload handler must be ignored
  • OK /html/browsers/history/the-history-interface/traverse_the_history_4.html (#21383)
    • FAIL [expected PASS] subtest: Multiple history traversals, last would be aborted

      assert_array_equals: Pages opened during history navigation expected property 1 to be 5 but got 3 (expected array [6, 5] got [6, 3])
      

  • OK [expected TIMEOUT] /html/interaction/focus/the-autofocus-attribute/supported-elements.html (#24145)
    • FAIL [expected TIMEOUT] subtest: Host element with delegatesFocus should support autofocus

      assert_equals: expected Element node <div autofocus=""></div> but got Element node <body></body>
      

    • FAIL [expected NOTRUN] subtest: Host element with delegatesFocus including no focusable descendants should be skipped

      assert_equals: expected Element node <input autofocus=""></input> but got Element node <body><div autofocus=""></div><input autofocus=""></body>
      

    • FAIL [expected NOTRUN] subtest: Area element should support autofocus

      promise_test: Unhandled rejection with value: object "TypeError: can't access property "appendChild", w.document.querySelector(...) is null"
      

  • OK /resource-timing/buffer-full-add-then-clear.html (#40819)
    • FAIL [expected PASS] subtest: Test that if the buffer is cleared after entries were added to the secondary buffer, those entries make it into the primary one

      assert_equals: Number of entries does not match the expected value. expected 3 but got 0
      

  • OK [expected CRASH] /resource-timing/render-blocking-status-link.html (#41664)
  • OK /resource-timing/test_resource_timing.html (#25720)
    • FAIL [expected PASS] subtest: PerformanceEntry has correct name, initiatorType, startTime, and duration (link)

      assert_equals: expected 4.979999999999997 but got 4.98
      

  • ERROR [expected OK] /webxr/render_state_update.https.html (#27535)
Stable unexpected results (24)
  • OK /editing/other/br-tag-not-added-with-inline-root-editable-element.html
    • FAIL [expected PASS] subtest: BR tag is not inserted after deleting the text node content since root editable element is inline

      assert_not_equals: First child is not a <br> tag got disallowed value "BR"
      

  • OK /editing/other/delete.html
    • FAIL [expected PASS] subtest: 0: "<p><br></p><p><br></p>" 1,0 delete

      assert_equals: innerHTML expected "<p><br></p>" but got "<p></p>"
      

    • PASS [expected FAIL] subtest: 6: "<p>x<br></p><p><br></p>" 1,0 delete
    • FAIL [expected PASS] subtest: 13: "<p><br></p><p><br></p>\n" 1,0 delete

      assert_in_array: innerHTML value "<p></p>\n" not in array ["<p><br></p>\n", "<p><br></p>"]
      

  • TIMEOUT [expected OK] /editing/other/editing-around-select-element.tentative.html?delete
  • OK /editing/other/editing-div-outside-body.html?body
    • PASS [expected FAIL] subtest: Test for execCommand("delete", false, undefined) in "<div>abc[]</div>"
  • OK /editing/other/editing-div-outside-body.html?designMode
    • PASS [expected FAIL] subtest: Test for execCommand("delete", false, undefined) in "<div>abc[]</div>"
  • OK /editing/other/editing-div-outside-body.html?div-in-body
    • PASS [expected FAIL] subtest: Test for execCommand("delete", false, undefined) in "<div>abc[]</div>"
  • OK /editing/other/editing-div-outside-body.html?html
    • PASS [expected FAIL] subtest: Test for execCommand("delete", false, undefined) in "<div>abc[]</div>"
  • OK /editing/other/editing-div-outside-body.html?nothing
    • PASS [expected FAIL] subtest: Test for execCommand("delete", false, undefined) in "<div>abc[]</div>"
  • TIMEOUT [expected OK] /editing/other/inline-editing-host-has-placeholder-with-after-pseudo-element.html
  • TIMEOUT [expected OK] /editing/other/inline-editing-host-has-placeholder-with-before-pseudo-element.html
  • OK /editing/plaintext-only/delete-part-of-white-spaces.html?white-space=pre
    • PASS [expected FAIL] subtest: document.execCommand("delete") when <p>A []B</p>
    • PASS [expected FAIL] subtest: document.execCommand("delete") when <p>A [] B</p>
    • PASS [expected FAIL] subtest: document.execCommand("delete") when <p>A []B</p>
    • PASS [expected FAIL] subtest: document.execCommand("delete") when <p>A [] B</p>
    • PASS [expected FAIL] subtest: document.execCommand("delete") when <p>A [] B</p>
    • PASS [expected FAIL] subtest: document.execCommand("delete") when <p>A  []B</p>
    • PASS [expected FAIL] subtest: document.execCommand("delete") when <p>A [] B</p>
  • OK /editing/plaintext-only/delete-part-of-white-spaces.html?white-space=pre-wrap
    • PASS [expected FAIL] subtest: document.execCommand("delete") when <p>A []B</p>
    • PASS [expected FAIL] subtest: document.execCommand("delete") when <p>A [] B</p>
    • PASS [expected FAIL] subtest: document.execCommand("delete") when <p>A []B</p>
    • PASS [expected FAIL] subtest: document.execCommand("delete") when <p>A [] B</p>
    • PASS [expected FAIL] subtest: document.execCommand("delete") when <p>A [] B</p>
    • PASS [expected FAIL] subtest: document.execCommand("delete") when <p>A  []B</p>
    • PASS [expected FAIL] subtest: document.execCommand("delete") when <p>A [] B</p>
  • OK /editing/run/delete-list-items-in-table-cell.html
    • PASS [expected FAIL] subtest: [["delete",""]] "<div contenteditable=\"true\"><table><tr><td><ol><li>a</li><li>{}</li></ol></td><td>b</td></tr></table></div>" compare innerHTML
    • PASS [expected FAIL] subtest: [["delete",""]] "<div contenteditable=\"true\"><table><tr><td><ul><li>a</li><li>{}</li></ul></td><td>b</td></tr></table></div>" compare innerHTML
  • OK /editing/run/multitest.html?1-1000
    • PASS [expected FAIL] subtest: [["bold",""],["delete",""]] "foo[]bar" compare innerHTML
    • PASS [expected FAIL] subtest: [["italic",""],["delete",""]] "foo[]bar" compare innerHTML
  • OK /editing/run/multitest.html?1001-2000
    • PASS [expected FAIL] subtest: [["strikethrough",""],["delete",""]] "foo[]bar" compare innerHTML
    • PASS [expected FAIL] subtest: [["subscript",""],["delete",""]] "foo[]bar" compare innerHTML
  • OK /editing/run/multitest.html?2001-3000
    • PASS [expected FAIL] subtest: [["superscript",""],["delete",""]] "foo[]bar" compare innerHTML
  • OK /editing/run/multitest.html?3001-4000
    • PASS [expected FAIL] subtest: [["underline",""],["delete",""]] "foo[]bar" compare innerHTML
    • PASS [expected FAIL] subtest: [["backcolor","#00FFFF"],["delete",""]] "foo[]bar" compare innerHTML
  • OK /editing/run/multitest.html?4001-5000
    • PASS [expected FAIL] subtest: [["createlink","http://www.google.com/"],["delete",""]] "foo[]bar" compare innerHTML
  • OK /editing/run/multitest.html?5001-6000
    • PASS [expected FAIL] subtest: [["fontname","sans-serif"],["delete",""]] "foo[]bar" compare innerHTML
    • PASS [expected FAIL] subtest: [["fontsize","4"],["delete",""]] "foo[]bar" compare innerHTML
  • OK /editing/run/multitest.html?6001-7000
    • PASS [expected FAIL] subtest: [["forecolor","#0000FF"],["delete",""]] "foo[]bar" compare innerHTML
  • OK /editing/run/multitest.html?7001-8000
    • PASS [expected FAIL] subtest: [["hilitecolor","#00FFFF"],["delete",""]] "foo[]bar" compare innerHTML
  • OK /editing/whitespaces/chrome-compat/delete-img.tentative.html
    • FAIL [expected PASS] subtest: document.execCommand("delete") when "<img src="${src}">[]   "

      assert_equals: expected "   " but got "  "
      

  • OK /editing/whitespaces/chrome-compat/delete-to-join-blocks.tentative.html
    • FAIL [expected PASS] subtest: document.execCommand("delete") when "<div><div><br></div>[]   </div>"

      assert_equals: expected "<div>   </div>" but got "<div><div></div>   </div>"
      

  • OK /editing/whitespaces/chrome-compat/delete.tentative.html
    • PASS [expected FAIL] subtest: execCommand("delete", false, ""): "a [] " (length of whiteSpace sequence: 2)
    • PASS [expected FAIL] subtest: execCommand("delete", false, ""): "a [] " (length of whiteSpace sequence: 2)
    • PASS [expected FAIL] subtest: execCommand("delete", false, ""): "a   [] " (length of whiteSpace sequence: 4)
    • PASS [expected FAIL] subtest: execCommand("delete", false, ""): "a   [] " (length of whiteSpace sequence: 4)
    • PASS [expected FAIL] subtest: execCommand("delete", false, ""): "a   [] " (length of whiteSpace sequence: 4)
    • PASS [expected FAIL] subtest: execCommand("delete", false, ""): "a   []  " (length of whiteSpace sequence: 5)
    • PASS [expected FAIL] subtest: execCommand("delete", false, ""): "a   []  " (length of whiteSpace sequence: 5)
    • PASS [expected FAIL] subtest: execCommand("delete", false, ""): "a   []  " (length of whiteSpace sequence: 5)
    • PASS [expected FAIL] subtest: execCommand("delete", false, ""): "a   []  " (length of whiteSpace sequence: 5)
    • PASS [expected FAIL] subtest: execCommand("delete", false, ""): "a   []  " (length of whiteSpace sequence: 5)
    • And 138 more unexpected results...

@github-actions

github-actions Bot commented Mar 7, 2026

Copy link
Copy Markdown

⚠️ Try run (#22799697773) failed!

While we are not there yet, this is the majority of the
implementation of the delete command.

What's missing:
1. Handling of style attributes (most of the test failures)
2. Handling of lists

Since these are quite complicated on their own, deferring
that to their own PR.

Also added more assertions regarding parent nodes, which
should always exist in the spec. By adding those, discovered
that the logic for `is_visible` was wrong where its
display value wasn't checked for `"none"`.

Part of servo#25005

Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com>
@TimvdLippe TimvdLippe force-pushed the finish-delete-implementation branch from 1168f1a to cf9b1c2 Compare March 7, 2026 14:14
@TimvdLippe TimvdLippe requested review from jdm and sebsebmc March 10, 2026 07:50
Comment on lines +237 to +248
if offset == 0 &&
(start_offset > 0 &&
start_node
.children()
.nth(start_offset as usize - 1)
.is_some_and(|child| {
child.is::<HTMLHRElement>() ||
(child.is::<HTMLBRElement>() &&
child.GetPreviousSibling().is_some_and(|previous| {
previous.is::<HTMLBRElement>() || !previous.is_inline_node()
}))
}))

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good lord.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, this spec ain't pretty

}) {
if self.is::<Element>() &&
self.resolved_display_value().is_some_and(|display| {
display != DisplayOutside::Inline && display != DisplayOutside::None

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI, we should be checking the inside value too:

  • inline -> inline & flow
  • inline-block -> inline & flow-root
  • inline-table -> inline & table
  • none -> none

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm I am not sure. Since there are two possibilities (it's block or it's inline), I think the intention of the spec is to check for the latter. The spec is old and predates flex/grid, hence I don't think it knew about it back then. Other browsers also only check the outside value as far as I know.

I will keep this as-is for now and once I implement the other missing pieces, revisit this to see if there's test coverage. If there is and we are passing, we are good to go. Otherwise I fix it.

@servo-highfive servo-highfive removed the S-awaiting-review There is new code that needs to be reviewed. label Mar 11, 2026
@TimvdLippe TimvdLippe added this pull request to the merge queue Mar 11, 2026
@servo-highfive servo-highfive added the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Mar 11, 2026
Merged via the queue into servo:main with commit c1c5e93 Mar 11, 2026
30 checks passed
@TimvdLippe TimvdLippe deleted the finish-delete-implementation branch March 11, 2026 06:41
@servo-highfive servo-highfive removed the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Mar 11, 2026
offline-ant pushed a commit to offline-ant/havi that referenced this pull request Jun 4, 2026
While we are not there yet, this is the majority of the implementation
of the delete command.

What's missing:
1. Handling of style attributes (most of the test failures)
2. Handling of lists

Since these are quite complicated on their own, deferring that to their
own PR.

Also added more assertions regarding parent nodes, which should always
exist in the spec. By adding those, discovered that the logic for
`is_visible` was wrong where its display value wasn't checked for
`"none"`.

Part of servo#25005

Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com>
(cherry picked from commit c1c5e93)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants