summaryrefslogtreecommitdiffstats
path: root/layout/generic
diff options
context:
space:
mode:
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