Closed Bug 898324 Opened 11 years ago Closed 11 years ago

There is 1px shifting down of selection border

Categories

(Firefox OS Graveyard :: Gaia::Video, defect)

x86
macOS
defect
Not set
normal

Tracking

(blocking-b2g:hd+, b2g18 fixed, b2g-v1.1hd fixed)

VERIFIED FIXED
blocking-b2g hd+
Tracking Status
b2g18 --- fixed
b2g-v1.1hd --- fixed

People

(Reporter: johnhu, Assigned: johnhu)

References

Details

Attachments

(6 files)

Branch: master/v1.1.0hd
Symptom: The border of selected video is shifting 1px
STR:
    1. open video app
    2. tap selection button
    3. select video

Note:
   This bug only happens on HDPI device. If I use non-HDPI device, I can't see this bug. It may be the rounding bug
Attached image screenshot
Hi Patryk, Please have a look about this issue. Our SW scale the border from 4.5px to 3px. And I think now it's fine. But I need to know the standard solution for this kind of problem. (WVGA HD+)
Flags: needinfo?(padamczyk)
The device will show 4px so that the border can't wrap the whole list item. The attachment is this case.

The original css settings is using 3px. When device shows, it render as 3 x 1.5 = 4.5px. I think this case happens on all odd number of border size.
Can we get it to round up... to 5px? This is a big problem if we can't. We should never have instances of half pixels.
Flags: needinfo?(padamczyk)
Assignee: nobody → johu
Attached file change css setting
We use the following css to configure the border which using outline:

  outline: solid #00aacc 0.3rem;
  outline-offset: -0.3rem;

The outline is already round up to 5px. But the key is in the outline-offset: -0.3rem. It rounds up to -4px. This is the root of this bug. To prevent this and have an expected UI. I move this css settings to inner div and change -0.3rem to -0.2rem. The patched result can be found at the attachment list.
Attachment #782390 - Attachment is patch: false
Attachment #782390 - Attachment mime type: text/plain → text/html
Attachment #782390 - Flags: review?(rexboy)
blocking-b2g: --- → hd?
HD+ UI adjustment
blocking-b2g: hd? → hd+
Comment on attachment 782390 [details]
change css setting

The patch looks good to me.

I'm not sure if the behavior to border is expected or need to be fixed in Gecko, but this workaround looks good for me. IMO we can try to discuss if we need to open a bug for that.
Attachment #782390 - Flags: review?(rexboy) → review+
landed to master:

https://github.com/mozilla-b2g/gaia/commit/a3528ad962afb6d7c566b05df5949733e9d4fd21


I will find a time to discuss with you.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Tim,

This bug needs to be uplifted to v1.1.0hd.
Flags: needinfo?(timdream)
For master -> v1.1hd please uplift the code yourself. Thanks.
Flags: needinfo?(timdream)
[2013/10/21 Helix Testing]
Gaia:     c829a2042594b6c3a4899ee27979799a0f301534
Gecko:    http://hg.mozilla.org/releases/mozilla-b2g18_v1_1_0_hd/rev/f7c657f6d019
BuildID   20131015042201
Version   18.0
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: