diff options
author | janekptacijarabaci <janekptacijarabaci@seznam.cz> | 2018-07-20 09:13:56 +0200 |
---|---|---|
committer | janekptacijarabaci <janekptacijarabaci@seznam.cz> | 2018-07-20 09:13:56 +0200 |
commit | 83459c927715bd6d2be1e339ff723b4feb3e5fe7 (patch) | |
tree | 9188193a4a5c4d3591ffee3e5b2bcaedc77e4ea1 /layout/generic/nsFrame.cpp | |
parent | b12973bc9aa26f548549306eaec4146bf60d65d5 (diff) | |
download | UXP-83459c927715bd6d2be1e339ff723b4feb3e5fe7.tar UXP-83459c927715bd6d2be1e339ff723b4feb3e5fe7.tar.gz UXP-83459c927715bd6d2be1e339ff723b4feb3e5fe7.tar.lz UXP-83459c927715bd6d2be1e339ff723b4feb3e5fe7.tar.xz UXP-83459c927715bd6d2be1e339ff723b4feb3e5fe7.zip |
Bug 958714 Simplify percent-margin/padding resolution code to pass around a single length as the percent basis
Diffstat (limited to 'layout/generic/nsFrame.cpp')
-rw-r--r-- | layout/generic/nsFrame.cpp | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/layout/generic/nsFrame.cpp b/layout/generic/nsFrame.cpp index 418fa16b7..fa5b24d40 100644 --- a/layout/generic/nsFrame.cpp +++ b/layout/generic/nsFrame.cpp @@ -10289,8 +10289,8 @@ DR_init_constraints_cookie::~DR_init_constraints_cookie() DR_init_offsets_cookie::DR_init_offsets_cookie( nsIFrame* aFrame, - SizeComputationInput* aState, - const LogicalSize& aPercentBasis, + SizeComputationInput* aState, + nscoord aPercentBasis, const nsMargin* aMargin, const nsMargin* aPadding) : mFrame(aFrame) @@ -11243,7 +11243,7 @@ ReflowInput::DisplayInitConstraintsExit(nsIFrame* aFrame, /* static */ void* SizeComputationInput::DisplayInitOffsetsEnter(nsIFrame* aFrame, SizeComputationInput* aState, - const LogicalSize& aPercentBasis, + nscoord aPercentBasis, const nsMargin* aBorder, const nsMargin* aPadding) { @@ -11258,12 +11258,10 @@ SizeComputationInput::DisplayInitOffsetsEnter(nsIFrame* aFrame, if (treeNode && treeNode->mDisplay) { DR_state->DisplayFrameTypeInfo(aFrame, treeNode->mIndent); - char horizPctBasisStr[16]; - char vertPctBasisStr[16]; + char pctBasisStr[16]; WritingMode wm = aState->GetWritingMode(); - DR_state->PrettyUC(aPercentBasis.ISize(wm), horizPctBasisStr, 16); - DR_state->PrettyUC(aPercentBasis.BSize(wm), vertPctBasisStr, 16); - printf("InitOffsets pct_basis=%s,%s", horizPctBasisStr, vertPctBasisStr); + DR_state->PrettyUC(aPercentBasis, pctBasisStr, 16); + printf("InitOffsets pct_basis=%s", pctBasisStr); DR_state->PrintMargin("b", aBorder); DR_state->PrintMargin("p", aPadding); |