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
ae1c75cb4e
commit
98815c8022
@ -1016,11 +1016,10 @@ nsHTMLReflowState::GetHypotheticalBoxContainer(nsIFrame* aFrame,
|
|||||||
state = nullptr;
|
state = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
WritingMode wm = aFrame->GetWritingMode();
|
|
||||||
if (state) {
|
if (state) {
|
||||||
WritingMode stateWM = state->GetWritingMode();
|
WritingMode wm = state->GetWritingMode();
|
||||||
aCBIStartEdge =
|
NS_ASSERTION(wm == aFrame->GetWritingMode(), "unexpected writing mode");
|
||||||
state->ComputedLogicalBorderPadding().ConvertTo(wm, stateWM).IStart(wm);
|
aCBIStartEdge = state->ComputedLogicalBorderPadding().IStart(wm);
|
||||||
aCBSize = state->ComputedSize(wm);
|
aCBSize = state->ComputedSize(wm);
|
||||||
} else {
|
} else {
|
||||||
/* Didn't find a reflow state for aFrame. Just compute the information we
|
/* 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. */
|
ought to be true by now. */
|
||||||
NS_ASSERTION(!(aFrame->GetStateBits() & NS_FRAME_IN_REFLOW),
|
NS_ASSERTION(!(aFrame->GetStateBits() & NS_FRAME_IN_REFLOW),
|
||||||
"aFrame shouldn't be in reflow; we'll lie if it is");
|
"aFrame shouldn't be in reflow; we'll lie if it is");
|
||||||
|
WritingMode wm = aFrame->GetWritingMode();
|
||||||
LogicalMargin borderPadding = aFrame->GetLogicalUsedBorderAndPadding(wm);
|
LogicalMargin borderPadding = aFrame->GetLogicalUsedBorderAndPadding(wm);
|
||||||
aCBIStartEdge = borderPadding.IStart(wm);
|
aCBIStartEdge = borderPadding.IStart(wm);
|
||||||
aCBSize = aFrame->GetLogicalSize(wm) - borderPadding.Size(wm);
|
aCBSize = aFrame->GetLogicalSize(wm) - borderPadding.Size(wm);
|
||||||
|
Loading…
Reference in New Issue
Block a user