Visual glitches with focus ring on display:block IMG as sole child of A

RESOLVED DUPLICATE of bug 434301

Status

()

Core
Layout: Block and Inline
--
minor
RESOLVED DUPLICATE of bug 434301
7 years ago
4 years ago

People

(Reporter: zwol, Unassigned)

Tracking

({polish})

Trunk
polish
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

(Reporter)

Description

7 years ago
Created attachment 504022 [details]
test case

The attached test case applies keyboard focus to the lone A element on page load (if there is a way to do this without JS I would love to know what it is).  That A element has one child element, which is an IMG, styled display:block.

As part of the focus ring, Firefox draws two irregular dots, slightly larger than the dots being used for the dotted line around the image.  One of these dots is roughly in the middle of the left-hand side of the focus ring, and the other one is directly above it.  These dots do not appear if the IMG is display:inline-block (but then the dimensions of the A element are different).  If you zoom the page way in, the irregular dots turn into squares precisely twice the width of the focus ring on each side.

IMO these dots should not appear.
(Reporter)

Comment 1

7 years ago
Created attachment 504023 [details]
reference for hypothetical future reftest

This is how I think the test should look.
(Reporter)

Comment 2

7 years ago
Frame tree dump, current trunk, content only, HTML adjusted so there are absolutely no text nodes - this last does not affect the bug:

    Canvas(html)(-1)@0x7fbbcf8d5a38 {0,0,36600,22020} [state=0000000000000010] [content=0x7fbbcfeb2660] [sc=0x7fbbcecd8638] pst=:-moz-scrolled-canvas<
      Block(html)(-1)@0x7fbbcecd8940 [content=0x7fbbcfeb2660] {0,0,36600,3660} [state=0000000008d00010] sc=0x7fbbcecd8890(i=0,b=1)<
        line 0x7fbbcecda020: count=1 state=block,clean,prevmarginclean,not impacted,not wrapped,before:nobr,after:nobr[0x48] bm=480 {480,480,35640,2700} vis-overflow={420,480,35760,2760} scr-overflow={480,480,35640,2700} <
          Block(body)(1)@0x7fbbcecd8f68 [content=0x7fbbceca0e00] {480,480,35640,2700} [state=0000000008100010] [vis-overflow=-60,0,35760,2760] [scr-overflow=0,0,35640,2700] sc=0x7fbbcecd8d78(i=2,b=1)<
            line 0x7fbbcecdad38: count=1 state=inline,clean,prevmarginclean,not impacted,not wrapped,before:nobr,after:nobr[0x340] {0,1200,0,0} vis-overflow={-60,240,120,120} scr-overflow={0,1200,0,0} <
              Inline(a)(0)@0x7fbbcecda630 next=0x7fbbcecdabd0 IBSplitSpecialSibling=0x7fbbcecdabd0 {0,300,0,1140} [state=0000000000008010] [content=0x7fbbcfeb2d40] [vis-overflow=-60,-60,120,120] [scr-overflow=0,0,0,0] [sc=0x7fbbcecbb130]<>
            >
            line 0x7fbbcecdad78: count=1 state=block,clean,prevmarginclean,not impacted,not wrapped,before:nobr,after:nobr[0x148] {0,1200,35640,1500} vis-overflow={-60,1140,35760,1620} scr-overflow={0,1200,35640,1500} <
              Block(a)(0)@0x7fbbcecdabd0 next=0x7fbbcecdacc8 IBSplitSpecialSibling=0x7fbbcecdacc8 IBSplitSpecialPrevSibling=0x7fbbcecda630 [content=0x7fbbcfeb2d40] {0,1200,35640,1500} [state=0000000008108010] [vis-overflow=-60,-60,35760,1620] [scr-overflow=0,0,35640,1500] sc=0x7fbbcecfac30(i=0,b=1) pst=:-moz-anonymous-block<
                line 0x7fbbcecdac88: count=1 state=block,clean,prevmarginclean,not impacted,not wrapped,before:nobr,after:nobr[0x108] {0,0,9720,1500} <
                  ImageFrame(img)(0)@0x7fbbcecda6a0 {0,0,9720,1500} [state=0000000000200010] [content=0x7fbbcfe5b440] [sc=0x7fbbcecda960] [src=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKIAAAAZAQMAAACIMWfuAAAABlBMVEX///8AAABVwtN+AAAAvklEQVQoz2NgoCtg/8vgwKAAYgmA+UwOTCDKEYcoCmBigIhWuB9QfsDefUDo88EHXyyYvA9xgERbPBRUBDjOKAjLJBnyuDD5KIGMcmTyYFBhYPAQEOJQEGJpYvIQUgCL+jCoMfCfAIoqfwKLOoBF3RuUD0iA1KoJsfxj8hBuAIs6JCgYCIBEVYRYGuBqHRQUBJBFIeaC3CABMlfNkMcJKApxA8i9/CC1yhe+2ABFOdBDhQVbUDFyYA3BDwwDAABKyimKxl0dggAAAABJRU5ErkJggg==]
                >
              >
            >
            line 0x7fbbcecdadb8: count=1 state=inline,clean,prevmarginclean,not impacted,not wrapped,before:nobr,after:nobr[0x340] {0,2700,0,0} vis-overflow={-60,1740,120,120} scr-overflow={0,2700,0,0} <
              Inline(a)(0)@0x7fbbcecdacc8 IBSplitSpecialPrevSibling=0x7fbbcecdabd0 {0,1800,0,1140} [state=0000000000008000] [content=0x7fbbcfeb2d40] [vis-overflow=-60,-60,120,120] [scr-overflow=0,0,0,0] [sc=0x7fbbcecbb130]<>
            >
          >
        >
      >
    >

I suspect the problem to have something to do with the existence of three "line" frames and two "Inline(a)" frames in addition to the "Block(a)" frame that actually contains the ImageFrame.
(Reporter)

Comment 3

7 years ago
FTR: not a regression, we've been doing this at least as far back as FF3.0; and I wouldn't be at all surprised if it'd been reported before, but I couldn't find anything that looked relevant.
Whiteboard: dupeme
Status: NEW → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 434301

Updated

4 years ago
Whiteboard: dupeme
You need to log in before you can comment on or make changes to this bug.