Remove getters in ReflowInput that return writable references
Categories
(Core :: Layout, task)
Tracking
()
Tracking | Status | |
---|---|---|
firefox108 | --- | fixed |
People
(Reporter: TYLin, Assigned: TYLin)
References
Details
Attachments
(3 files)
+++ This bug was initially created as a clone of Bug #1778178 +++
In this bug, I'm planning to get rid of all these getters that return writable references.
nscoord& ComputedISize() { return mComputedSize.ISize(mWritingMode); }
nscoord& ComputedBSize() { return mComputedSize.BSize(mWritingMode); }
nscoord& ComputedMinISize() { return mComputedMinSize.ISize(mWritingMode); }
nscoord& ComputedMaxISize() { return mComputedMaxSize.ISize(mWritingMode); }
nscoord& ComputedMinBSize() { return mComputedMinSize.BSize(mWritingMode); }
nscoord& ComputedMaxBSize() { return mComputedMaxSize.BSize(mWritingMode); }
Assignee | ||
Comment 1•2 years ago
|
||
Users of these two getters should use setters such as SetComputedISize() instead.
Note: for ReflowInput's internal usages, we don't want to call
SetComputedISize/SetComputedBSize because they tweak the resize flags. Also, if
we move the two getters to private section for ReflowInput's internal usage, the
external callers won't be able to call the const version of them because C++
resolves the function calls to the private ones.
Updated•2 years ago
|
Assignee | ||
Comment 2•2 years ago
|
||
Depends on D159352
Assignee | ||
Comment 3•2 years ago
|
||
Depends on D159353
Pushed by aethanyc@gmail.com: https://hg.mozilla.org/integration/autoland/rev/ae2be22b628b Part 1 - Remove ComputedISize() and ComputedBSize() that return writable references. r=emilio https://hg.mozilla.org/integration/autoland/rev/2f1ca35b216c Part 2 - Convert ComputedMin{I|B}Size() and ComputedMax{I|B}Size() that return writable references to setters. r=emilio https://hg.mozilla.org/integration/autoland/rev/72d7c4f11f49 Part 3 - Remove the special case for viewport in SetComputedISize(). r=emilio
Comment 5•2 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/ae2be22b628b
https://hg.mozilla.org/mozilla-central/rev/2f1ca35b216c
https://hg.mozilla.org/mozilla-central/rev/72d7c4f11f49
Description
•