summaryrefslogtreecommitdiffstats
path: root/layout/generic
diff options
context:
space:
mode:
authorathenian200 <athenian200@outlook.com>2020-10-23 19:45:52 -0500
committerathenian200 <athenian200@outlook.com>2020-10-28 14:17:02 -0500
commit7c2bcc48c455d4e4441b12834c3bd4c5bb33c9ba (patch)
tree57de1c4a48f24c57b36610d5e3a60ef639f5f8a0 /layout/generic
parent49765b53af01284a5d5479dfb8bb56da0ba87ca5 (diff)
downloadUXP-7c2bcc48c455d4e4441b12834c3bd4c5bb33c9ba.tar
UXP-7c2bcc48c455d4e4441b12834c3bd4c5bb33c9ba.tar.gz
UXP-7c2bcc48c455d4e4441b12834c3bd4c5bb33c9ba.tar.lz
UXP-7c2bcc48c455d4e4441b12834c3bd4c5bb33c9ba.tar.xz
UXP-7c2bcc48c455d4e4441b12834c3bd4c5bb33c9ba.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.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/layout/generic/nsTextFrame.cpp b/layout/generic/nsTextFrame.cpp
index 663002ba1..0aab2717f 100644
--- a/layout/generic/nsTextFrame.cpp
+++ b/layout/generic/nsTextFrame.cpp
@@ -3435,7 +3435,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(),
@@ -3466,13 +3466,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