Closed
Bug 774835
Opened 12 years ago
Closed 12 years ago
Refactor ApplyMinMaxConstraints in nsBlockFrame
Categories
(Core :: Layout, defect)
Core
Layout
Tracking
()
RESOLVED
FIXED
mozilla17
People
(Reporter: jwir3, Assigned: fantasai.bugs)
References
Details
Attachments
(1 file, 1 obsolete file)
8.47 KB,
patch
|
Details | Diff | Splinter Review |
ApplyMinMaxConstraints in nsBlockFrame applies computed min/max height and width. We want to do these together in only one place. Instead, we should refactor this to be two functions: ApplyMinMaxHeight and ApplyMinMaxWidth.
Attachment #643127 -
Flags: review?(roc)
Comment on attachment 643127 [details] [diff] [review] patch Review of attachment 643127 [details] [diff] [review]: ----------------------------------------------------------------- ::: layout/generic/nsHTMLReflowState.h @@ +418,4 @@ > */ > + nscoord ApplyMinMaxWidth(nscoord aWidth) const { > + if (NS_UNCONSTRAINEDSIZE != mComputedMaxWidth) > + aWidth = NS_MIN(aWidth, mComputedMaxWidth); {} @@ +426,5 @@ > + * size computed so far. > + */ > + nscoord ApplyMinMaxHeight(nscoord aHeight) const { > + if (NS_UNCONSTRAINEDSIZE != mComputedMaxHeight) > + aHeight = NS_MIN(aHeight, mComputedMaxHeight); {}
Attachment #643127 -
Flags: review?(roc) → review+
I left out the extra braces to keep it extra compact since it's inlined in the header. Are you sure you want them in?
Yes. Keeping it compact doesn't matter.
Attachment #643127 -
Attachment is obsolete: true
Keywords: checkin-needed
Reporter | ||
Comment 6•12 years ago
|
||
fantasai, if you add a commit message to your patch, I'll check it in for you.
Reporter | ||
Comment 7•12 years ago
|
||
Nevermind, I've added it and pushed to inbound: https://hg.mozilla.org/integration/mozilla-inbound/rev/1e038e82f416
Keywords: checkin-needed
Target Milestone: --- → mozilla17
Comment 8•12 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/1e038e82f416
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•