Skip to content

[clippy] Rename enum FormSubmitter and its elements - #32791

Merged
mrobinson merged 2 commits into
servo:mainfrom
optician:clippy-rename-enum-FormSubmitter
Jul 17, 2024
Merged

mrobinson merged 2 commits into
servo:mainfrom
optician:clippy-rename-enum-FormSubmitter

Conversation

@optician

@optician optician commented Jul 17, 2024 •

Copy link
Copy Markdown
Contributor

Fix clippy warning

all variants have the same postfix: `Element`

for enum FormSubmitter. Naming problem is tough but in this case renaming is convenient, imho. The only uncertainty - can it break logging or some logic that dependents on string representation? I found that it used mostly as a wrapper for a html element but I could miss something.

I aggregated clippy output before and after with ./mach cargo-clippy 2>&1 | rg 'warning:' | sort | uniq -c. The diff is:

*** before	Wed Jul 17 18:05:02 2024
--- after	Wed Jul 17 18:30:14 2024
***************
*** 5,13 ****
     1 warning: `libservo` (lib) generated 3 warnings (run `cargo clippy --fix --lib -p libservo` to apply 1 suggestion)
!    1 warning: `script` (lib) generated 47 warnings
     1 warning: `servoshell` (lib) generated 1 warning
-    1 warning: all variants have the same postfix: `Element`
     1 warning: all variants have the same postfix: `Error`
--- 5,12 ----
     1 warning: `libservo` (lib) generated 3 warnings (run `cargo clippy --fix --lib -p libservo` to apply 1 suggestion)
!    1 warning: `script` (lib) generated 46 warnings
     1 warning: `servoshell` (lib) generated 1 warning

  • These changes do not require tests because they only rename enum

optician added 2 commits July 17, 2024 19:20
Signed-off-by: Danila Matveev <[email protected]>
@optician
optician requested a review from gterzian as a code owner July 17, 2024 15:44
@optician optician changed the title Clippy rename enum form submitter [clippy] Rename enum FormSubmitter and its elements Jul 17, 2024
@mrobinson mrobinson added the T-linux-wpt Do a try run of the WPT label Jul 17, 2024
@github-actions github-actions Bot removed the T-linux-wpt Do a try run of the WPT label Jul 17, 2024
@github-actions

Copy link
Copy Markdown

🔨 Triggering try run (#9977541841) for Linux WPT

@github-actions

Copy link
Copy Markdown

Test results for linux-wpt-layout-2020 from try job (#9977541841):

Flaky unexpected result (16)
  • TIMEOUT [expected PASS] /css/compositing/mix-blend-mode/mix-blend-mode-video-sibling.html
  • TIMEOUT [expected PASS] /css/compositing/mix-blend-mode/mix-blend-mode-video.html (#32763)
  • OK /css/css-values/calc-in-media-queries-with-mixed-units.html (#31731)
    • FAIL [expected PASS] subtest: box should be orange if the calc between vh+em in @media was correct

      assert_equals: expected "rgb(255, 165, 0)" but got "rgb(0, 0, 255)"
      

  • OK /html/browsers/history/the-history-interface/traverse_the_history_3.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 3 but got 2 (expected array [6, 3] got [6, 2])
      

  • OK /html/browsers/history/the-history-interface/traverse_the_history_5.html (#21383)
    • PASS [expected FAIL] subtest: Multiple history traversals, last would be aborted
  • CRASH [expected OK] /html/browsers/windows/embedded-opener-remove-frame.html (#23867)
  • ERROR [expected TIMEOUT] /html/canvas/element/manual/imagebitmap/createImageBitmap-flipY.html (#32745)
  • TIMEOUT [expected OK] /html/interaction/focus/the-autofocus-attribute/autofocus-dialog.html (#29087)
    • TIMEOUT [expected FAIL] subtest: &lt;dialog&gt;-contained autofocus element gets focused when the dialog is shown

      Test timed out
      

  • OK /html/semantics/forms/form-submission-0/text-plain.window.html (#28687)
    • PASS [expected FAIL] subtest: text/plain: \r\n in name (normal form)
  • OK /html/semantics/forms/form-submission-0/urlencoded2.window.html (#28687)
    • PASS [expected FAIL] subtest: application/x-www-form-urlencoded: Basic test (formdata event)
    • PASS [expected FAIL] subtest: application/x-www-form-urlencoded: Basic File test (formdata event)
    • PASS [expected FAIL] subtest: application/x-www-form-urlencoded: 0x00 in value (normal form)
  • OK /html/semantics/links/links-created-by-a-and-area-elements/htmlanchorelement_noopener.html (#23205)
    • PASS [expected FAIL] subtest: Check that rel=noopener with target=_self does a normal load
  • OK /html/webappapis/dynamic-markup-insertion/document-write/module-delayed.html (#27659)
    • FAIL [expected PASS] subtest: async document.write in a module

      assert_true: onload must be called expected true got false
      

  • TIMEOUT [expected OK] /referrer-policy/css-integration/svg/internal-stylesheet.html
    • TIMEOUT [expected FAIL] subtest: Styling SVG from internal styles mask-image

      Test timed out
      

  • ERROR /resource-timing/content-type-parsing.html (#29131)
    • FAIL [expected TIMEOUT] subtest: mime-type 16 : text/html;charset=�gbk

      assert_equals: expected (string) "text/html" but got (undefined) undefined
      

    • TIMEOUT [expected NOTRUN] subtest: mime-type 17 : text/html;charset= gbk

      Test timed out
      

  • TIMEOUT [expected OK] /resource-timing/nested-context-navigations-iframe.html (#24311)
    • TIMEOUT [expected PASS] subtest: Test that iframe navigations are not observable by the parent, even after history navigations by the parent

      Test timed out
      

    • NOTRUN [expected PASS] subtest: Test that crossorigin iframe navigations are not observable by the parent, even after history navigations by the parent
    • NOTRUN [expected PASS] subtest: Test that cross-site iframe navigations are not observable by the parent, even after history navigations by the parent
    • NOTRUN [expected PASS] subtest: Test that iframe navigations are not observable by the parent
    • NOTRUN [expected PASS] subtest: Test that crossorigin iframe navigations are not observable by the parent
    • NOTRUN [expected PASS] subtest: Test that cross-site iframe navigations are not observable by the parent
    • NOTRUN [expected PASS] subtest: Test that iframe refreshes are not observable by the parent
    • NOTRUN [expected PASS] subtest: Test that crossorigin iframe refreshes are not observable by the parent
    • NOTRUN [expected PASS] subtest: Test that cross-site iframe refreshes are not observable by the parent
  • OK [expected ERROR] /workers/constructors/Worker/Worker-constructor.html (#22991)
Stable unexpected results that are known to be intermittent (13)
  • TIMEOUT /css/cssom-view/MediaQueryList-addListener-handleEvent.html (#24571)
    • PASS [expected TIMEOUT] subtest: looks up handleEvent method on every event dispatch
    • TIMEOUT [expected NOTRUN] subtest: doesn't look up handleEvent method on callable event listeners

      Test timed out
      

  • TIMEOUT /css/cssom-view/MediaQueryList-addListener-removeListener.html (#24569)
    • TIMEOUT [expected PASS] subtest: listeners are called in order they were added

      Test timed out
      

  • OK [expected TIMEOUT] /css/cssom-view/MediaQueryList-extends-EventTarget-interop.html (#25285)
    • PASS [expected TIMEOUT] subtest: listener added with addListener and addEventListener (capture) is called twice
    • PASS [expected NOTRUN] subtest: removeEventListener removes listener added with addListener
    • FAIL [expected NOTRUN] subtest: removeEventListener (capture) doesn't remove listener added with addListener

      assert_equals: triggerMQLEvent expected 1 but got 0
      

    • PASS [expected NOTRUN] subtest: removeListener removes listener added with addEventListener
    • FAIL [expected NOTRUN] subtest: removeListener doesn't remove listener added with addEventListener (capture)

      assert_equals: triggerMQLEvent expected 1 but got 0
      

    • FAIL [expected NOTRUN] subtest: capturing event listener fires before non-capturing listener at target

      assert_array_equals: triggerMQLEvent lengths differ, expected array ["addEventListener", "addListener"] length 2, got [] length 0
      

  • TIMEOUT /css/cssom-view/MediaQueryList-extends-EventTarget.html (#25269)
    • TIMEOUT [expected PASS] subtest: onchange removes listener

      Test timed out
      

    • NOTRUN [expected TIMEOUT] subtest: listeners for "change" type are called
  • OK /custom-elements/form-associated/ElementInternals-setFormValue.html (#29174)
    • PASS [expected FAIL] subtest: Newline normalization - \r\n in filename (urlencoded)
  • TIMEOUT /fetch/metadata/generated/css-images.sub.tentative.html (#29047)
    • TIMEOUT [expected PASS] subtest: background-image sec-fetch-site - HTTPS downgrade (header not sent)

      Test timed out
      

  • OK /html/browsers/browsing-the-web/navigating-across-documents/navigation-unload-same-origin.window.html (#29049)
    • PASS [expected FAIL] subtest: Same-origin navigation started from unload handler must be ignored
  • TIMEOUT /html/interaction/focus/the-autofocus-attribute/supported-elements.html (#24145)
    • FAIL [expected TIMEOUT] subtest: Element with tabindex should support autofocus

      assert_equals: expected "SPAN" but got "BODY"
      

    • TIMEOUT [expected NOTRUN] subtest: Non-HTMLElement should not support autofocus

      Test timed out
      

  • OK /html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-reload-location-reload.html (#32595)
    • PASS [expected FAIL] subtest: Reloading iframe loading='lazy' before it is loaded: location.reload
  • TIMEOUT [expected OK] /html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-1.html (#24066)
    • NOTRUN [expected FAIL] subtest: Check that popups from a sandboxed iframe do not escape the sandbox
  • TIMEOUT /html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-2.html (#22154)
    • NOTRUN [expected FAIL] subtest: Check that popups from a sandboxed iframe do not escape the sandbox
  • TIMEOUT [expected OK] /html/semantics/forms/form-submission-0/reparent-form-during-planned-navigation-task.html (#29724)
    • TIMEOUT [expected PASS] subtest: reparent-form-during-planned-navigation-task

      Test timed out
      

  • TIMEOUT [expected OK] /webstorage/localstorage-about-blank-3P-iframe-opens-3P-window.partitioned.tentative.html (#29053)
    • TIMEOUT [expected PASS] subtest: StorageKey: test 3P about:blank window opened from a 3P iframe

      Test timed out
      

@github-actions

Copy link
Copy Markdown

✨ Try run (#9977541841) succeeded.

@mrobinson
mrobinson added this pull request to the merge queue Jul 17, 2024
Merged via the queue into servo:main with commit e4ad1d3 Jul 17, 2024
Gae24 pushed a commit to Gae24/servo that referenced this pull request Jul 26, 2024
* [clippy] Renames enum FormSubmitter and its elements

Signed-off-by: Danila Matveev <[email protected]>

* fmt

Signed-off-by: Danila Matveev <[email protected]>

---------

Signed-off-by: Danila Matveev <[email protected]>
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.

2 participants