mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-13 05:15:45 +00:00
Bug 1191109 - Clean up use of writing-modes in GetHypotheticalBoxContainer, eliminating a redundant ConvertTo call. r=dholbert
This commit is contained in:
parent
b8dbdb1dbd
commit
0d98ee0d97
@ -1016,11 +1016,10 @@ nsHTMLReflowState::GetHypotheticalBoxContainer(nsIFrame* aFrame,
|
||||
state = nullptr;
|
||||
}
|
||||
|
||||
WritingMode wm = aFrame->GetWritingMode();
|
||||
if (state) {
|
||||
WritingMode stateWM = state->GetWritingMode();
|
||||
aCBIStartEdge =
|
||||
state->ComputedLogicalBorderPadding().ConvertTo(wm, stateWM).IStart(wm);
|
||||
WritingMode wm = state->GetWritingMode();
|
||||
NS_ASSERTION(wm == aFrame->GetWritingMode(), "unexpected writing mode");
|
||||
aCBIStartEdge = state->ComputedLogicalBorderPadding().IStart(wm);
|
||||
aCBSize = state->ComputedSize(wm);
|
||||
} else {
|
||||
/* Didn't find a reflow state for aFrame. Just compute the information we
|
||||
@ -1028,6 +1027,7 @@ nsHTMLReflowState::GetHypotheticalBoxContainer(nsIFrame* aFrame,
|
||||
ought to be true by now. */
|
||||
NS_ASSERTION(!(aFrame->GetStateBits() & NS_FRAME_IN_REFLOW),
|
||||
"aFrame shouldn't be in reflow; we'll lie if it is");
|
||||
WritingMode wm = aFrame->GetWritingMode();
|
||||
LogicalMargin borderPadding = aFrame->GetLogicalUsedBorderAndPadding(wm);
|
||||
aCBIStartEdge = borderPadding.IStart(wm);
|
||||
aCBSize = aFrame->GetLogicalSize(wm) - borderPadding.Size(wm);
|
||||
|
Loading…
Reference in New Issue
Block a user