зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1631941 - Make nsIFrame::ContentSize and nsIFrame::SynthesizeBaselineBOffsetFromContentBox apply skip sides correctly for orthogonal writing modes. r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D71884
This commit is contained in:
Родитель
c94de28dad
Коммит
b3bbfa3a41
|
@ -1021,8 +1021,10 @@ class nsIFrame : public nsQueryFrame {
|
|||
return ContentSize(GetWritingMode());
|
||||
}
|
||||
mozilla::LogicalSize ContentSize(mozilla::WritingMode aWritingMode) const {
|
||||
const auto bp = GetLogicalUsedBorderAndPadding(aWritingMode)
|
||||
.ApplySkipSides(GetLogicalSkipSides());
|
||||
mozilla::WritingMode wm = GetWritingMode();
|
||||
const auto bp = GetLogicalUsedBorderAndPadding(wm)
|
||||
.ApplySkipSides(GetLogicalSkipSides())
|
||||
.ConvertTo(aWritingMode, wm);
|
||||
const auto size = GetLogicalSize(aWritingMode);
|
||||
return mozilla::LogicalSize(
|
||||
aWritingMode,
|
||||
|
|
|
@ -135,9 +135,11 @@ nscoord nsIFrame::SynthesizeBaselineBOffsetFromBorderBox(
|
|||
|
||||
nscoord nsIFrame::SynthesizeBaselineBOffsetFromContentBox(
|
||||
mozilla::WritingMode aWM, BaselineSharingGroup aGroup) const {
|
||||
MOZ_ASSERT(!aWM.IsOrthogonalTo(GetWritingMode()));
|
||||
const auto bp =
|
||||
GetLogicalUsedBorderAndPadding(aWM).ApplySkipSides(GetLogicalSkipSides());
|
||||
mozilla::WritingMode wm = GetWritingMode();
|
||||
MOZ_ASSERT(!aWM.IsOrthogonalTo(wm));
|
||||
const auto bp = GetLogicalUsedBorderAndPadding(wm)
|
||||
.ApplySkipSides(GetLogicalSkipSides())
|
||||
.ConvertTo(aWM, wm);
|
||||
|
||||
if (MOZ_UNLIKELY(aWM.IsCentralBaseline())) {
|
||||
nscoord contentBoxBSize = BSize(aWM) - bp.BStartEnd(aWM);
|
||||
|
|
Загрузка…
Ссылка в новой задаче