Last Comment Bug 675711 - test_computed_style.html fails partly on Fennec because of lack of scrollbars
: test_computed_style.html fails partly on Fennec because of lack of scrollbars
Status: RESOLVED FIXED
[inbound]
:
Product: Core
Classification: Components
Component: Layout (show other bugs)
: unspecified
: x86 Windows 7
: -- normal (vote)
: mozilla8
Assigned To: Martijn Wargers [:mwargers] (not working for Mozilla)
:
:
Mentors:
: 617375 (view as bug list)
Depends on:
Blocks: 595651
  Show dependency treegraph
 
Reported: 2011-08-01 12:51 PDT by Martijn Wargers [:mwargers] (not working for Mozilla)
Modified: 2011-08-31 05:42 PDT (History)
3 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
patch (2.86 KB, patch)
2011-08-01 12:51 PDT, Martijn Wargers [:mwargers] (not working for Mozilla)
no flags Details | Diff | Splinter Review
patch (2.83 KB, patch)
2011-08-01 13:10 PDT, Martijn Wargers [:mwargers] (not working for Mozilla)
dbaron: review+
Details | Diff | Splinter Review
patch (2.83 KB, patch)
2011-08-01 13:31 PDT, Martijn Wargers [:mwargers] (not working for Mozilla)
dbaron: review+
Details | Diff | Splinter Review

Description Martijn Wargers [:mwargers] (not working for Mozilla) 2011-08-01 12:51:15 PDT
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.
Comment 1 David Baron :dbaron: ⌚️UTC-7 2011-08-01 12:56:14 PDT
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.
Comment 2 Martijn Wargers [:mwargers] (not working for Mozilla) 2011-08-01 13:10:31 PDT
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.
Comment 3 David Baron :dbaron: ⌚️UTC-7 2011-08-01 13:16:35 PDT
Comment on attachment 549897 [details] [diff] [review]
patch

r=dbaron
Comment 4 Martijn Wargers [:mwargers] (not working for Mozilla) 2011-08-01 13:31:01 PDT
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.
Comment 5 Joel Maher ( :jmaher) 2011-08-04 11:11:42 PDT
all green on try server, pushed to mozilla-inbound:
http://hg.mozilla.org/integration/mozilla-inbound/rev/fbf02dd1803e
Comment 6 Marco Bonardo [::mak] 2011-08-05 08:54:42 PDT
http://hg.mozilla.org/mozilla-central/rev/fbf02dd1803e
Comment 7 Martijn Wargers [:mwargers] (not working for Mozilla) 2011-08-31 05:42:30 PDT
*** Bug 617375 has been marked as a duplicate of this bug. ***

Note You need to log in before you can comment on or make changes to this bug.