mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1191109 - Clean up use of writing-modes in GetHypotheticalBoxContainer, eliminating a redundant ConvertTo call. r=dholbert
This commit is contained in:
parent
e2a1a6c621
commit
69a17e7236
@ -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