Closed Bug 905229 Opened 11 years ago Closed 11 years ago

flex item's intrinsic width in initially calculated incorrectly (until you right-click / zoom in / zoom out), with ::first-letter

Categories

(Core :: Layout, defect)

defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 385615

People

(Reporter: mgol, Unassigned)

Details

Attachments

(2 files)

Attached file A test case (deleted) —
There's a span in an anchor tag with text inside and a colon after it, without any space. Firefox displays a space after the span erroneously.

Weirdly, on focus (e.g. right click) the space disappears...

Attached are the test case and a screencast showcasing the issue. No other browsers that I checked (Chrome, Safari, IE) experience the issue.
Attachment #790281 - Attachment description: index.html → A test case
Attachment #790281 - Attachment mime type: text/plain → text/html
Flags: needinfo?(dholbert)
I can reproduce, on Linux 64-bit nightly. (with right-click or just hitting "tab")
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Mac OS X → All
Hardware: x86 → All
Assignee: nobody → dholbert
Status: NEW → ASSIGNED
Flags: needinfo?(dholbert)
I need to load the testcase in the background (without switching directly to the tab) to see the space. Without this step, there is no space on Win 7.

Regerssion range:
good=2012-12-09
bad=2012-12-10
http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=4e83d0987a31&tochange=725eb8792d27
Keywords: regression
Version: Trunk → 20 Branch
set layout.css.flexbox.enabled = false helps

Regressed by
75cab729c971	Daniel Holbert — Bug 783490: Enable "layout.css.flexbox.enabled" pref. r=dbaron

**Note**, the bug # of commit message is wrong, this should be Bug 783409.
Blocks: 783409
I can reproduce the problem
in my case, just click the link in comment#0 of this bug.

http://hg.mozilla.org/mozilla-central/rev/3c61cc01a3b1
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:26.0) Gecko/20100101 Firefox/26.0 ID:20130814030204
That just means this has always been broken, since we enabled flexbox (which the testcase relies on).  Hence, it's a bug in the feature; not a regression.
No longer blocks: 783409
Keywords: regression
Version: 20 Branch → Trunk
There might be a race condition going on - some refreshes of the site in Firefox make the bug present itself but not all. That can explain differences between being reproduce the bug on various platforms.

On the web app I experienced the bug for the first time, the issue occurs every time, though.
This should be related to Bug 385615.

The wrong width calculation if ::first-letter was applied.
redrawing page (such as zoom-in/zoom-out) fixes the problem
Ah, indeed! Looks very likely to be a dupe of Bug 385615, just being exposed in a new context.

Marking as such & unassigning for now.
Assignee: dholbert → nobody
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → DUPLICATE
Summary: An empty space is inserted after span in a link, disappears on some actions → flex item's intrinsic width in initially calculated incorrectly (until you right-click / zoom in / zoom out), with ::first-letter
Frame dump before the tweak:> FlexContainer(a)(1)@0x7fc5278126d0 {0,0,35640,1140} [state=0000120000000210] [content=0x7fc52784f080] [sc=0x7fc5432ced38]<
>   Block(span)(1)@0x7fc527813078 next=0x7fc527813668 {0,0,13920,1140} [state=00001200a0100210] [content=0x7fc527868230] [sc=0x7fc527812888]<
>     line 0x7fc527813628: count=2 state=inline,clean,prevmarginclean,not impacted,wrapped,before:nobr,after:nobr[0x120] {0,0,11100,1140} <
>       Letter(span)(1)@0x7fc5278135b0 next=0x7fc5432d2210 next-in-flow=0x7fc5432d2210 {0,0,720,1140} [content=0x7fc527868230] [sc=0x7fc5278132c0:first-letter]<
>         Text(0)"K"@0x7fc527813540 next-in-flow=0x7fc5432d2188 {0,0,720,1140} [state=00000040a0300000] [content=0x7fc527868740] [sc=0x7fc527813400:-moz-non-element] [run=0x7fc526edb0e0][0,1,F] 
>       > 
>       Letter(span)(1)@0x7fc5432d2210 prev-in-flow=0x7fc5278135b0 {720,0,10380,1140} [state=0000000000000004] [content=0x7fc527868230] [sc=0x7fc5432ceab0:-moz-non-element]<
>         Text(0)"ryteria wyszukiwania"@0x7fc5432d2188 prev-in-flow=0x7fc527813540 {0,0,10380,1140} [state=00000040a0400014] [content=0x7fc527868740] [sc=0x7fc5278131b0:-moz-non-element] [run=0x7fc533e8bf30][1,20,T] 


Frame dump after the tweak:

> FlexContainer(a)(1)@0x7fc5278126d0 {0,0,35640,1140} [state=0000120000000210] [content=0x7fc52784f080] [sc=0x7fc543294818]<
>   Block(span)(1)@0x7fc527813078 next=0x7fc527813668 {0,0,11100,1140} [state=00001200a0100210] [content=0x7fc527868230] [sc=0x7fc543294ac8]<
>     line 0x7fc527813628: count=2 state=inline,clean,prevmarginclean,not impacted,wrapped,before:nobr,after:nobr[0x120] {0,0,11100,1140} <
>       Letter(span)(1)@0x7fc5278135b0 next=0x7fc5432d2210 next-in-flow=0x7fc5432d2210 {0,0,720,1140} [content=0x7fc527868230] [sc=0x7fc5432ceab0:first-letter]<
>         Text(0)"K"@0x7fc527813540 next-in-flow=0x7fc5432d2188 {0,0,720,1140} [state=00000040a0300000] [content=0x7fc527868740] [sc=0x7fc527813360:-moz-non-element] [run=0x7fc526ed2690][0,1,F] 
>       > 
>       Letter(span)(1)@0x7fc5432d2210 prev-in-flow=0x7fc5278135b0 {720,0,10380,1140} [state=0000000000000004] [content=0x7fc527868230] [sc=0x7fc5332f0218:-moz-non-element]<
>         Text(0)"ryteria wyszukiwania"@0x7fc5432d2188 prev-in-flow=0x7fc527813540 {0,0,10380,1140} [state=00000040a0400014] [content=0x7fc527868740] [sc=0x7fc527812d80:-moz-non-element] [run=0x7fc527a1c9d0][1,20,T] 

The only sizing difference is the width of the "Block(span)" (the first flex item).

This confirms that we're initially miscalculating the (intrinsic) width of that element, which supports the assertion that this is bug 385615.
Any chance of getting it fixed soon? Bug 385615 has been open for 6 years and the styling errors caused by this bug are very visible...
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: