Closed
Bug 1494426
Opened 6 years ago
Closed 6 years ago
Use ReflowInput::AvailableSize() and ComputedSize() convenience methods in a few more places
Categories
(Core :: Layout, enhancement, P3)
Core
Layout
Tracking
()
RESOLVED
FIXED
mozilla64
Tracking | Status | |
---|---|---|
firefox64 | --- | fixed |
People
(Reporter: dholbert, Assigned: dholbert)
Details
Attachments
(2 files)
I noticed a few places where we do something like this:
=======
WritingMode wm = aReflowInput.GetWritingMode();
LogicalSize availSize(wm, aReflowInput.AvailableISize(),
aReflowInput.AvailableBSize());
=======
ReflowInput has an "AvailableSize" method that does this internally. We should take advantage of it.
Assignee | ||
Comment 1•6 years ago
|
||
This patch isn't expected to change behavior; it's just some simplification.
Assignee | ||
Comment 2•6 years ago
|
||
The convenience method is defined here BTW:
> mozilla::LogicalSize AvailableSize() const {
> return mozilla::LogicalSize(mWritingMode,
> AvailableISize(), AvailableBSize());
> }
https://dxr.mozilla.org/mozilla-central/rev/d03b538b6b417ba892d0a92fd693945b741246e1/layout/generic/ReflowInput.h#426
Assignee | ||
Comment 3•6 years ago
|
||
actually, I might as well do this for ReflowInput::ComputedSize() as well. Adding a second patch to do that.
Summary: Use ReflowInput::AvailableSize() convenience method in a few more places → Use ReflowInput::AvailableSize() and ComputedSize() convenience methods in a few more places
Assignee | ||
Comment 4•6 years ago
|
||
This patch isn't expected to change behavior; it's just some simplification.
Depends on D6976
Updated•6 years ago
|
Attachment #9012326 -
Attachment description: Bug 1494426: Use ReflowInput::AvailableSize() convenience method in a few more places. r?TYLin → Bug 1494426 part 1: Use ReflowInput::AvailableSize() convenience method in a few more places. r?TYLin
Comment 5•6 years ago
|
||
Comment on attachment 9012326 [details]
Bug 1494426 part 1: Use ReflowInput::AvailableSize() convenience method in a few more places. r?TYLin
Ting-Yu Lin [:TYLin] (UTC-7) has approved the revision.
Attachment #9012326 -
Flags: review+
Comment 6•6 years ago
|
||
Comment on attachment 9012330 [details]
Bug 1494426 part 2: Use ReflowInput::ComputedSize() convenience method in a few more places. r?TYLin
Ting-Yu Lin [:TYLin] (UTC-7) has approved the revision.
Attachment #9012330 -
Flags: review+
Assignee | ||
Comment 7•6 years ago
|
||
Thanks for the reviews!
Small try run just in case I made a stupid test-detectable typo or something:
https://treeherder.mozilla.org/#/jobs?repo=try&revision=802c3ae9bf9f6dfcffe6735ee555ad02e4fac9bb
Pushed by dholbert@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/c98839475735
part 1: Use ReflowInput::AvailableSize() convenience method in a few more places. r=TYLin
https://hg.mozilla.org/integration/autoland/rev/d5e6ec65686c
part 2: Use ReflowInput::ComputedSize() convenience method in a few more places. r=TYLin
Comment 9•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/c98839475735
https://hg.mozilla.org/mozilla-central/rev/d5e6ec65686c
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla64
You need to log in
before you can comment on or make changes to this bug.
Description
•