Closed
Bug 394109
Opened 17 years ago
Closed 17 years ago
Inconsistent text-decoration positioning
Categories
(Core :: Layout: Text and Fonts, defect)
Core
Layout: Text and Fonts
Tracking
()
RESOLVED
FIXED
People
(Reporter: roc, Assigned: masayuki)
References
Details
(Keywords: regression, testcase)
Attachments
(1 file, 1 obsolete file)
14.85 KB,
patch
|
roc
:
review+
roc
:
superreview+
roc
:
approval1.9+
|
Details | Diff | Splinter Review |
The testcases in bug 365336 no longer work correctly.
Reporter | ||
Comment 1•17 years ago
|
||
I don't know when this broke, but I think it was quite recently.
Reporter | ||
Updated•17 years ago
|
Flags: blocking1.9?
Assignee | ||
Comment 2•17 years ago
|
||
nsTextFrameThebes rounds |y + ascent| in |GetSnappedBaselineY|.
but nsCSSRenering does:
4440 gfxFloat y = NS_round(aPt.y + aAscent - offset);
Should we change it to |NS_round(aPt.y + aAscent) - NS_round(offset)|?
Comment 3•17 years ago
|
||
Related to bug 392425?
Reporter | ||
Comment 4•17 years ago
|
||
> Should we change it to |NS_round(aPt.y + aAscent) - NS_round(offset)|?
Yeah, I think so. Does that fix things?
Assignee | ||
Comment 5•17 years ago
|
||
I'm not in my home, I'll create the patch tonight or tomorrow.
Assignee | ||
Comment 7•17 years ago
|
||
right, this can fix.
Assignee: nobody → masayuki
Status: NEW → ASSIGNED
Attachment #278994 -
Flags: superreview?(roc)
Attachment #278994 -
Flags: review?(roc)
Assignee | ||
Comment 8•17 years ago
|
||
The patch has gfx part. gfxRect::Round is called from nsTextFrameThebes, for snapping to dev units. But the rounding is wrong if the values are negative.
Reporter | ||
Comment 9•17 years ago
|
||
+ textRect.y = presContext->RoundAppUnitsToNearestDevPixels(textRect.y);
What's this for in nsTextBoxFrame? If we need to do something here, we should probably be computing the baseline (y + ascent), rounding it, and then recomputing y by subtracting the ascent.
nsTextFrame::PaintTextDecorations(gfxContext* aCtx, const gfxRect& aDirtyRect,
const gfxPoint& aFramePt,
+ const gfxPoint& aTextBaselinePt,
nsTextPaintStyle& aTextPaintStyle,
Why not just take aTextBaselinePt only?
Assignee | ||
Comment 10•17 years ago
|
||
I changed only nsTextBoxFrame.
I think that I should not remove the |const gfxPoint& aFramePt| in nsTextFrameThebes. Because it needs x point of frame rect for drawing, but if it is removed, for RTL case, we need to recalculate the x point from baselinePt.
Attachment #278994 -
Attachment is obsolete: true
Attachment #279063 -
Flags: superreview?(roc)
Attachment #279063 -
Flags: review?(roc)
Attachment #278994 -
Flags: superreview?(roc)
Attachment #278994 -
Flags: review?(roc)
Reporter | ||
Updated•17 years ago
|
Attachment #279063 -
Flags: superreview?(roc)
Attachment #279063 -
Flags: superreview+
Attachment #279063 -
Flags: review?(roc)
Attachment #279063 -
Flags: review+
Assignee | ||
Updated•17 years ago
|
Attachment #279063 -
Flags: approval1.9?
Reporter | ||
Updated•17 years ago
|
Attachment #279063 -
Flags: approval1.9? → approval1.9+
Assignee | ||
Comment 11•17 years ago
|
||
checked-in.
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Assignee | ||
Updated•17 years ago
|
Flags: blocking1.9?
OS: Mac OS X → All
Hardware: PC → All
You need to log in
before you can comment on or make changes to this bug.
Description
•