Differential D214042
Bug 1650944 - Removed ReflowInput.h include from nsIFrame.h r=emilio AbandonedPublic Authored by dholbert on Jun 17 2024, 10:01 PM. Tags None Referenced Files
Details
Diff Detail
Event Timelinelilabivert created this revision.Jun 17 2024, 10:01 PM phab-bot published this revision for review.Jun 17 2024, 10:01 PM phab-bot changed the visibility from "Custom Policy" to "Public (No Login Required)". phab-bot changed the edit policy from "Custom Policy" to "Restricted Project (Project)". phab-bot removed a project: secure-revision. Comment Actions Does this build? As mentioned in https://phabricator.services.mozilla.com/D81845#2501818, I had to keep it because there were files depending on this. lilabivert added a comment.Jun 17 2024, 10:18 PM Comment Actions
This does not build, looks there are still files dependent on this ReflowInput.h include. Built on the latest windows 11 OS. saschanaz added a comment.Jun 17 2024, 10:36 PM Comment ActionsCan you check what those files are and add ReflowInput.h there? lilabivert added a comment.EditedJun 18 2024, 12:37 AM Comment ActionsActually, what I said was wrong earlier. Upon removing the "ReflowInput.h". There are missing types:
But I think these can be remedied if I include their header files, if that is allowed. In the "nsIFrame" class, there are redefinitions that need to be removed: There are some member functions of nsIFrame class that depend on a "ReflowInput::BreakType", but we can copy the definition from ReflowInput.h to nsIFrame.h. Looks like its just a small enum class. Also some member functions of nsIFrame require a passed in an instance of ReflowInput:
saschanaz added a comment.Jun 18 2024, 11:43 AM Comment Actions
Hmm yeah, ReflowInput::BreakType is tricky that it cannot be forward declared. I would argue that any enums that is used for parameters of other class methods should not be inside the struct but should be extracted to a separate declaration. lilabivert added a comment.Jun 19 2024, 12:49 AM Comment Actions
I agree as well, should I extract the definition of "BreakType" in ReflowInput.h and create a separate headerfile containing only that definition. Something like "/layout/generic/BreakType.h" and make the appropriate replacements? For the member functions that still contain a functions needing a "ReflowInput" class, are there replacement functions or should I look into cleaning that up. emilio requested changes to this revision.Jun 19 2024, 8:12 AM Comment ActionsYeah so it seems this would need:
Still it seems it'd be worth it in general, but it's a fair amount of work. This revision now requires changes to proceed.Jun 19 2024, 8:12 AM lilabivert added a comment.Jun 21 2024, 4:26 PM Comment Actions
Just to clarify, by functions do you mean the member functions that take in a reference to "ReflowInput". And by "out of line" do you mean to convert them into local functions within the .h/.cpp file. dholbert commandeered this revision.Jan 31 2026, 1:16 AM dholbert added a reviewer: lilabivert. Comment ActionsCommandeering so that I can mark this as abandoned, so that a newly-arrived contributor can pick this up. dholbert abandoned this revision.Jan 31 2026, 1:16 AM
Revision Contents
Diff 877883 |
