Need Help with basic CSS for Issue 1313088 and rebuilding Chromium

167 views
Skip to first unread message

Yash Joshi

unread,
Dec 22, 2022, 2:14:36 PM12/22/22
to Chromium-discuss
Hi all,
I was working on   1313088 - Issue with table body translate-internals/#detection-logs - chromium and have successfully located the HTML and CSS files responsible for the above issue at  translate_internals.css - Chromium Code Search.
On Inspecting the CSS file, I saw that the table layout property for the table set to fixed in line 15. .So Added an auto-overflow property to get the horizontal scroll bar in case of small screens and along with the min-width being set for the whole table as advised in the bug. A little tinkering with the width percentages for other rows gave the expected result.
 Please let me know if I am comprehending this correctly or need to approach it differently.
 I tried the same on my local machine by implementing the said Properties using the styles tab in inspect element window and also by moving the  HTML and CSS file to a new folder, and am attaching the relevant result screenshots of the appropriate results here in the pdf form.

 Another Doubt I had was regarding rebuilding chromium after making the required changes. Do I again need to follow the process from the start from Chromium Docs - Checking out and Building Chromium for Windows (googlesource.com), or is there a less time-consuming process for such cases when I have made very small changes in a single file for initially checking out if everything is working as intended?

PS:  Wasn't sure which mailing list I should post this to, so mailed it to this list. I am new to contributing, so I am not very well-versed in the workflow here.
Regards,
Yash Joshi

Results.pdf

PhistucK

unread,
Dec 22, 2022, 2:31:10 PM12/22/22
to yashjoshi_...@dtu.ac.in, Chromium-discuss
I think your solution makes sense (but I am not a Googler). With that said, I think pretty much any solution would be acceptable, as long as it does not "suck" hehe, since this is not an official feature of the browser, visible to a lot of users. This is an internal part used primarily by Chromium developers and maybe rarely by some web developers, so the bar should be pretty low - unless your fix makes this page inconvenient to use (which I doubt), it is probably fine.

Regarding rebuilding - are you using the component build? Rebuilding after a change should be considerably faster with the component build because it splits the giant chrome.dll and chrome_child.dll to many smaller DLLs and thus you usually only need to rebuild a smaller DLL rather than everything.
Note that switching from the regular build to the component build is effectively building everything from scratch and so it will take around as much time as the initial build took, but rebuild-after-change is significantly faster, so it is worth it.

Ninja takes care of only building what actually changed, regardless of the build mode (regular/static or component), so the initial build command is fine for rebuild-after-change as well.


PhistucK


--
--
Chromium Discussion mailing list: chromium...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-discuss

---
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-discu...@chromium.org.

Yash Joshi

unread,
Dec 24, 2022, 8:39:49 AM12/24/22
to Chromium-discuss, PhistucK, Chromium-discuss, Yash Joshi
Hi,
Yes, I used the component build argument and still, it took around 14 hours to rebuild the chromium browser . I am not sure whether this is common and thus have attached the logs summary of the original build and the latest rebuild after the changes with this mail for you to take a look once and suggest If there are configuration changes I can make on my side to make this process faster ,then it would be really awsome. 
One point I am not sure that may have made the process slow could be that I specified different directory in the ' gn gen out/Default" command as 'default' was already containing the latest version fetched directly from the site without any changes so was not sure if I should replace it by again building in the default folder. 
Also, I have confirmed that the new build works as expected with the changes in the said CSS file but am not sure where to go from now. Are there any tests that I should run for this case as the modifications are just limited to single CSS files and that too minor.Or I should go ahead with setting the git and upload the changes for review by following the docs @ Chromium Docs - Contributing to Chromium (googlesource.com) ?
I am really grateful for your time.
Regards,
Yash Joshi
Build Comparison Logs.pdf

PhistucK

unread,
Dec 24, 2022, 9:07:45 AM12/24/22
to yashjoshi_...@dtu.ac.in, Chromium-discuss
To make sure you actually build the component build, look for .dll files in your output folder. chrome.dll, if it exists at all, should weigh significantly less than 200 MB (and probably significantly less than 100 MB, sorry, I do not have a build handy right now).

If you change the folder in the various build commands (gn gen out/Default or autoninja -C out/Default), then I believe this is effectively a rebuild from scratch. You have to use the exact same gn/build folder every time you rebuild in order to only build your modifications, otherwise it builds everything from scratch.

Not sure what you mean by "'default' was already containing the latest version fetched directly from the site", but if you want to keep the original output before your modifications for reference, you will have to copy the files to a different folder (not all of them, for example, any .obj, .lib and .pdb files are not needed). The built browser should be around 250 - 300 MB, I guess (judging by Chrome, which may contain a bit more than what Chromium contains). I believe .dll, .pak, .bin, .json, .sig, .manifest and .exe files are relevant to the browser, as well as some folders like locales (compare with your installed Chrome).

I believe CSS changes have no tests, so I think you can just upload your change.


PhistucK

Yash Joshi

unread,
Dec 24, 2022, 11:49:46 AM12/24/22
to Chromium-discuss, PhistucK, Chromium-discuss, Yash Joshi
I think I now get what you meant. My Chrome.dll is currently of 244MB, but that may be because I accidentally rebuild chrome from scratch.
My commands were [ gn gen out/Improved_CSS and  autoninja -C out/Improved_CSS ], which means at present, there are 2 folders in my out directory.
1. Default (this was built when I was just following the commands to initially build the chromium . No modifications, and all steps followed from docs) and contained unmodified Browser
2. Improved_CSS (this was made today when I rebuild(accidentally from scratch again ig)  after I made the relevant changes in the CSS files.

I had one more doubt regarding this If I work on a new bug and make a few more changes and then want to rebuild can I pass the commands ["gn gen out/Improved_CSS and  autoninja -C out/Improved_CSS"] ? Will this trigger component build and make rebuilding faster, or do I need to stick to " gn gen out/Default or autoninja -C out/Default". If I could utilise the first set of commands then, i.e.  [" gn gen out/Improved_CSS and  autoninja -C out/Improved_CSS"]  then I can always have a default folder containing unmodified Chromium Browser and modified rebuild in Impoved_CSS folder inside the out directory for seeing the changes that I have made.
What do you think about this?

Thanks and Regards,
Yash Joshi

PhistucK

unread,
Dec 24, 2022, 12:14:55 PM12/24/22
to Yash Joshi, Chromium-discuss
I think some tools assume out/Default as the output folder and you will have to start passing arguments to various tools for other output folders to work (for example, the Blink web tests), so I recommend that you use out/Default as the working output.

For the unmodified Chromium, I advise you to use a different output folder (out/baseline, perhaps?). You can even rename out/Default to out/baseline just to keep that output if you want. 
With that said, Chromium publishes unofficial snapshot builds (the resulting binaries). While they are not snapshot-per-commit, they are snapshot-per-some-commits, so it might not be as accurate as your unmodified Chromium, but I think it is good enough.
This will save you the time building an unmodified Chromium just to have a reference point (keep in mind that the project moves fast, with something like over 100 commits per day in normal days, so you will have to keep building unmodified Chromium frequently to keep up. This is why it is better to just use an already built snapshot)

Regarding the component build, you need to run gn args out/FolderName once per output folder (unless you delete it/completely evict it and then you need to run it again) and put is_component_build = true in the file the editor shows (this will save a file in the output directory that gn will read every time it is run). This will make chrome.dll either much smaller, or not exist at all and building modifications should take significantly less time.

Note that even with 16/32/64 GB RAM, I believe your build will still be somewhat slow, as your CPU is not as strong (Googlers usually either have dozens of cores via Intel Xeon, or they use a corporate highly distributed build tool called GOMA, unavailable externally, or both).



PhistucK

Yash Joshi

unread,
Dec 27, 2022, 12:18:58 PM12/27/22
to Chromium-discuss, PhistucK, Chromium-discuss, Yash Joshi
Hi,
The build is failing after I worked on some different things (not related to chromium), which required me to install a few different software (such as python 3.11 and google cloud SDK) over the weekend and made a commit and uploaded it to gerrit. Not sure what is causing the issue so listed all possible reasons.
Things Tried :
Deleted out/Default folder to try building it from scratch but still no progress.
Ran client sync in chromium/src folder to fix any missing or broken files.
Ran "where python" command to make sure depot_tools come on top of all listing.
Check whether the environment variables are correct.
And desktop development tools with C++ are installed in Visual Studio.

All logs and outputs are attached below for your reference. Would appreciate any help in getting this resolved.
Thanks and Regards as always :)
Yash Joshi
Command Sequence and Logs.pdf

PhistucK

unread,
Dec 27, 2022, 12:39:02 PM12/27/22
to yashjoshi_...@dtu.ac.in, Chromium-discuss
I found this thread which may be of help (though the conclusion is somewhat disappointing ;)) -

chromium-dev (which is where the link above leads) is a better group for discussing build issues and development processes, by the way. :)

PhistucK

Reply all
Reply to author
Forward
0 new messages