WorryFree Computers   »   [go: up one dir, main page]

Closed Bug 1885693 Opened 3 months ago Closed 2 months ago

Convert LogicalSide to enum class in WritingMode.h

Categories

(Core :: Layout, task)

task

Tracking

()

RESOLVED FIXED
126 Branch
Tracking Status
firefox126 --- fixed

People

(Reporter: TYLin, Assigned: flowejam, Mentored)

References

Details

(Keywords: good-first-bug, Whiteboard: [lang=C++] )

Attachments

(1 file, 2 obsolete files)

Could someone please assign me this bug? If it is possible to be mentored for it as well, that would be very much appreciated (it would be my first contribution to Firefox).

Flags: needinfo?(aethanyc)

Once you upload a patch for review, this bug will be assigned to you automatically by a bot. You can start from https://firefox-source-docs.mozilla.org/contributing/contribution_quickref.html, and bug 1885691 is a similar bug you can reference. Feel free to ask any questions.

Flags: needinfo?(aethanyc)
Keywords: good-first-bug

Sorry, perhaps this is a silly question, but for the enum LogicalSideBits, is it acceptable to leave it as is for now, just inserting static_casts for the bitwise operations?
I’ve managed to build Firefox and am making changes to WritingMode.h, and will take a look at the other areas of the codebase that are impacted.

Yes, we should leave LogicalSideBits [1] as it for now. It can be converted to an enum class in a separate bug if needed.

[1] https://searchfox.org/mozilla-central/rev/f63ca2952da98e0817bdae0ddf1314281a497106/layout/generic/WritingModes.h#114-123

Assignee: nobody → 1flowejam
Status: NEW → ASSIGNED

Re. my submitted patch, I did run the local tests but can't yet assess the (many) results properly. I built the project and entered ./mach run without issue though.

Regarding the first commit, the changes spanned a number of files and sections - I was wondering if you have any guidance for such situations? Is it better to try to fix all the sections and include in one commit (as I've done here), or commit more frequently?

(In reply to [:flowejam] from comment #7)

Re. my submitted patch, I did run the local tests but can't yet assess the (many) results properly. I built the project and entered ./mach run without issue though.

I don't know if you have sufficient privilege to run tests on Firefox CI. You might want to try ./mach try auto per https://firefox-source-docs.mozilla.org/contributing/contribution_quickref.html#to-test-a-change-remotely

If you encounter any error, I can submit the tests for you.

Regarding the first commit, the changes spanned a number of files and sections - I was wondering if you have any guidance for such situations? Is it better to try to fix all the sections and include in one commit (as I've done here), or commit more frequently?

Yes, in this case, it would be better to include all the fix in one commit because there should be no whitespace and lint error/warning in the first place.

Attachment #9392876 - Attachment description: Bug 1885693 Converted LogicalSide to an enum class, and renamed variables accordingly. Values were static_casted where required. Some functions in WritingModes.h were rewritten such that bitwise operations aren't being used. r=TYLin → Bug 1885693: Converted LogicalSide to an enum class, and renamed variables accordingly. r=TYLin

Thanks for the guidance Ting-Yu! I think I've incorporated all of your suggestions in the patch update. I tried running "./mach try auto", but I encountered a permission denied error. Could you please submit the tests for me?

Sure. Here is the try run on CI. https://treeherder.mozilla.org/jobs?repo=try&revision=7e43edc1c4e3b7a3a30d9a61d37708a113403327

The debug builds are broken. Could you fix it in https://phabricator.services.mozilla.com/D205510? You might want to configure a debug build locally via adding ac_add_options --enable-debug to the mozcofig. See https://firefox-source-docs.mozilla.org/setup/configuring_build_options.html#configuring-build-options for details.

Flags: needinfo?(1flowejam)
Attachment #9392877 - Attachment is obsolete: true
Attachment #9392881 - Attachment is obsolete: true

:TYLin, here are some notes from my recent submission:

  • I tested with a debug build and didn't notice any errors this time

  • Although I don't have access to run the try auto tests, I ran the test "./mach wpt testing/web-platform/tests/webrtc-extensions/" locally, and I couldn't find the same error in the log that occurred for the test for "TEST-START | /webrtc-extensions/RTCRtpReceiver-video-jitterBufferTarget-stats.html". From what I could tell, these are performance tests, and I was a bit puzzled because changing to enum class, the static_casts etc. don't seem like changes that would impact performance.

Flags: needinfo?(1flowejam)

From what I could tell, these are performance tests, and I was a bit puzzled because changing to enum class, the static_casts etc. don't seem like changes that would impact performance.

I think you are right. Your patch shouldn't have any impact on that test suites. It can just be an "intermittent" test failures on CI, which happens from time to time on certain tests.

Pushed by tlin@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/e6295494089b
Converted LogicalSide to an enum class, and renamed variables accordingly. r=TYLin

Thanks, Ting-Yu, for landing the patch for me while I don't yet have access. This has been a very interesting experience for me, and your mentorship for this bug was much appreciated!

Blocks: 1885695
Status: ASSIGNED → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → 126 Branch

Congrats on landing your first patch in Firefox, :flowejam!

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: