test_computed_style.html fails partly on Fennec because of lack of scrollbars

RESOLVED FIXED in mozilla8

Status

()

Core
Layout
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: Martijn Wargers (dead), Assigned: Martijn Wargers (dead))

Tracking

unspecified
mozilla8
x86
Windows 7
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [inbound])

Attachments

(1 attachment, 2 obsolete attachments)

(Assignee)

Description

6 years ago
Created attachment 549891 [details] [diff] [review]
patch

Firefox has scrollbars and this test assumes scrollbars, which makes the border-radius much smaller (the border width). But Fennec doesn't have scrollbars, so the border-radius isn't clamped at all for overflow:scroll frames. Hence the failing tests there.
The attached patch corrects it.
Attachment #549891 - Flags: review?(jmaher)
Where does the " - 10" come from?  Is that the width of a scrollbar for you?  If so, shouldn't the test be == 0, and for the other branch (or just ==, without -)?

Also, the text probably shouldn't say "clamped" when there's actually no clamping.
Component: Mochitest → Style System (CSS)
Product: Testing → Core
QA Contact: mochitest → style-system
Component: Style System (CSS) → Layout
QA Contact: style-system → layout
(Assignee)

Comment 2

6 years ago
Created attachment 549897 [details] [diff] [review]
patch

The 10 comes from the border-width (5px on both sides), which is not included in the clientWidth value.
Attachment #549897 - Flags: review?(dbaron)
Comment on attachment 549897 [details] [diff] [review]
patch

r=dbaron
Attachment #549897 - Flags: review?(dbaron) → review+
(Assignee)

Updated

6 years ago
Keywords: checkin-needed
(Assignee)

Updated

6 years ago
Keywords: checkin-needed
(Assignee)

Comment 4

6 years ago
Created attachment 549902 [details] [diff] [review]
patch

One change from the previous patch:
Instead of:
  if (p.clientWidth == p.offsetWidth - 10) {
I now use this:
  if (p.clientHeight == p.offsetHeight - 10) {
for overflow-X scroll divs.

Stupid mistake. Instead of only testing this mochitest on Fennec, I should have tested on Firefox too, of course.
Attachment #549891 - Attachment is obsolete: true
Attachment #549897 - Attachment is obsolete: true
Attachment #549891 - Flags: review?(jmaher)
Attachment #549902 - Flags: review?(dbaron)
Attachment #549902 - Flags: review?(dbaron) → review+
(Assignee)

Updated

6 years ago
Keywords: checkin-needed

Updated

6 years ago
Assignee: nobody → martijn.martijn
all green on try server, pushed to mozilla-inbound:
http://hg.mozilla.org/integration/mozilla-inbound/rev/fbf02dd1803e
Keywords: checkin-needed
Whiteboard: [inbound]
http://hg.mozilla.org/mozilla-central/rev/fbf02dd1803e
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla8
(Assignee)

Updated

6 years ago
Duplicate of this bug: 617375
You need to log in before you can comment on or make changes to this bug.