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)

enhancement

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.
This patch isn't expected to change behavior; it's just some simplification.
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
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
This patch isn't expected to change behavior; it's just some simplification. Depends on D6976
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 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 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+
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
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.

Attachment

General

Created:
Updated:
Size: