Closed Bug 697899 Opened 13 years ago Closed 10 years ago

outlines are drawn outside (expanded by) overflow of text outside its bounding box

Categories

(Core :: Layout, defect)

x86
All
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 480888

People

(Reporter: leeoniya, Unassigned)

References

Details

(Keywords: regression)

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:10.0a1) Gecko/20111027 Firefox/10.0a1
Build ID: 20111027031040

Steps to reproduce:

a horizontal 2px mystery spacing appears between css "outline" and element background. only happens in FF.

might be related to or dupe of Bug 687311


Actual results:

http://jsfiddle.net/CZKrY/


Expected results:

no white inner space
Mozilla/5.0 (Windows NT 5.1; rv:7.0.1) Gecko/20100101 Firefox/7.0.1
cofirming
Status: UNCONFIRMED → NEW
Component: General → Layout
Ever confirmed: true
Keywords: regression
Product: Firefox → Core
QA Contact: general → layout
Version: 10 Branch → Trunk
Attached file Reporter's testcase
This is a regression (works in Fx3.6) while bug 687311 is not.
Depends on: 687311
OS: Windows 7 → All
I don't see this on Linux, in the 64-bit 2011-10-27-03-10-40-mozilla-central nightly.
It is there on FX 7.01 , recent Aurora & Nightly on 10.6.8
Fx 4.01 and 5.0 display without gaps - I don't have 6.0x.
I do see this on Mac.  It's a 1px gap, not 2px.

The frame dump looks like this:

              Inline(span)(0)@0xc66ba0 {0,96,3703,960} [content=0x1b4d2b00] [vis-overflow=-120,-60,3943,1080] [scr-overflow=0,0,3703,960] [sc=0xc66878]<
                Text(0)@0xc66be8 [run=0x1b4d3310][0,9,T]  {0,0,3703,960} [state=00000000d0600000] [content=0x1b4d2bf0] [vis-overflow=-60,0,3823,960] [scr-overflow=0,0,3703,960] sc=0xc668e0 pst=:-moz-non-element<
                  "some text"
                >

so the textframe's overflow in fact extends to the left and right of the inline's content area by 1px (compare -60 to 0 and 3823 to 3703).  The outline is, of course, drawn around the visual overflow area.

In particular, what's happening is that the text actually paints outside the area it claims to take up (which is pretty common for text, actually, especially when doing subpixel positioning).

So I believe the behavior here is in fact correct, assuming outlines go around visual overflow.
Oh, and of course the gap could well be 2px with different font metrics or a different default font or a different font rasterizer.
yeah, for me it's 1px on the left, 2px on right
Outlines shouldn't really go around the visual overflow. They should go around the border-box and outlines for parts of the same element should be combined somehow.
Summary: css "outline" causes 2px horizontal inner spacing → outlines are drawn outside (expanded by) overflow of text outside its bounding box
Mostly agreed, though I tend to think they should include the border boxes of descendants.  It's probably not worth tracking a third overflow area to do that; perhaps it's cheap enough to compute that at paint time?

That said, maybe we should have this discussion in one bug rather than three...
This should be fixed by bug 480888 (in either Monday's or Tuesday's nightly build, I hope).
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: