diff options
author | athenian200 <athenian200@outlook.com> | 2020-10-23 19:45:52 -0500 |
---|---|---|
committer | Moonchild <moonchild@palemoon.org> | 2020-11-18 10:51:22 +0000 |
commit | 4de0e9c68d3f1a04d5d6c236d5f06fff7244c074 (patch) | |
tree | 74a729c2baee1bb1836939dc33c4b136d6a91aa3 /layout/generic | |
parent | 4dae04e594f6662dcfb03fd304494841ca542091 (diff) | |
download | UXP-4de0e9c68d3f1a04d5d6c236d5f06fff7244c074.tar UXP-4de0e9c68d3f1a04d5d6c236d5f06fff7244c074.tar.gz UXP-4de0e9c68d3f1a04d5d6c236d5f06fff7244c074.tar.lz UXP-4de0e9c68d3f1a04d5d6c236d5f06fff7244c074.tar.xz UXP-4de0e9c68d3f1a04d5d6c236d5f06fff7244c074.zip |
Issue #1673 - Part 2: Make tab-size animatable and fix typos.
There were a few typos in the previous patch and this patch also makes tab-size animatable which didn't really require much of a change at all.
Diffstat (limited to 'layout/generic')
-rw-r--r-- | layout/generic/nsTextFrame.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/layout/generic/nsTextFrame.cpp b/layout/generic/nsTextFrame.cpp index 749b8b944..83e50ca43 100644 --- a/layout/generic/nsTextFrame.cpp +++ b/layout/generic/nsTextFrame.cpp @@ -3437,7 +3437,7 @@ PropertyProvider::GetSpacingInternal(Range aRange, Spacing* aSpacing, if (!aIgnoreTabs) { gfxFloat tabWidth = ComputeTabWidthAppUnits(mFrame, mTextRun); if (tabWidth > 0) { - CalcTabWidths(aRange); + CalcTabWidths(aRange, tabWidth); if (mTabWidths) { mTabWidths->ApplySpacing(aSpacing, aRange.start - mStart.GetSkippedOffset(), @@ -3468,13 +3468,13 @@ PropertyProvider::GetSpacingInternal(Range aRange, Spacing* aSpacing, // aX and the result are in whole appunits. static gfxFloat AdvanceToNextTab(gfxFloat aX, nsIFrame* aFrame, - gfxTextRun* aTextRun, gfxFloat* aTabWidth) + gfxTextRun* aTextRun, gfxFloat aTabWidth) { // Advance aX to the next multiple of *aCachedTabWidth. We must advance // by at least 1 appunit. // XXX should we make this 1 CSS pixel? - return ceil((aX + 1)/ aTabWidth) * aTabWidth; + return NS_round((aX + 1) / aTabWidth) * aTabWidth; } void |