Provide a convenient API to get a frame's logical content size
Categories
(Core :: Layout, task)
Tracking
()
Tracking | Status | |
---|---|---|
firefox76 | --- | fixed |
People
(Reporter: TYLin, Assigned: TYLin)
References
Details
Attachments
(2 files)
We have at least two use cases [1] [2] that use GetContentRectRelativeToSelf().Size()
and then convert the physical size to logical size. We can provide an API for this.
[1] https://searchfox.org/mozilla-central/rev/202a285024f174c2d2bf2152d9cba90a03723eab/layout/base/RestyleManager.cpp#748
[2] https://searchfox.org/mozilla-central/rev/202a285024f174c2d2bf2152d9cba90a03723eab/layout/generic/nsFlexContainerFrame.cpp#4829-4830
Assignee | ||
Comment 1•5 years ago
|
||
Let's make these methods more coherent and discoverable by moving them
closer to GetRect().
Assignee | ||
Comment 2•5 years ago
|
||
To get the logical content size of a frame, some callers use
GetContentRectRelativeToSelf().Size() and then convert it to
LogicalRect. We really should generalize ContentBSize(), and provide
ContentSize() for such purpose.
Depends on D68064
Comment 3•5 years ago
|
||
These changes look sane to me (I gave them a quick skim and nothing jumped out at me).
Perhaps we could have AlaskanEmily pick these reviews up, though?
Assignee | ||
Comment 4•5 years ago
|
||
Sure. I'll redirect the review to Emily.
Comment 6•5 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/d4477b1bcc43
https://hg.mozilla.org/mozilla-central/rev/d2cd2c812a95
Description
•