Bug 66311 - Chromium Mac: Fix implementation of wkScrollbarMinimumTotalLengthNeededForThumb to match WebKitSystemInterface
Summary: Chromium Mac: Fix implementation of wkScrollbarMinimumTotalLengthNeededForThu...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac OS X 10.7
: P2 Normal
Assignee: Sailesh Agrawal
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-16 09:56 PDT by Sailesh Agrawal
Modified: 2011-08-17 04:46 PDT (History)
3 users (show)

See Also:


Attachments
Patch (2.16 KB, patch)
2011-08-16 19:08 PDT, Sailesh Agrawal
no flags Details | Formatted Diff | Diff
Patch for landing (2.16 KB, patch)
2011-08-16 22:43 PDT, Sailesh Agrawal
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sailesh Agrawal 2011-08-16 09:56:46 PDT
This bug is to track the work need to update wkScrollbarMinimumTotalLengthNeededForThumb() to match the implementation in WebKitSystemInterface.
Comment 1 Sailesh Agrawal 2011-08-16 19:08:00 PDT
Created attachment 104139 [details]
Patch
Comment 2 Nico Weber 2011-08-16 19:12:25 PDT
Comment on attachment 104139 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=104139&action=review

> Source/WebCore/platform/chromium/ScrollbarOverlayUtilitiesChromiumMac.mm:213
> +           [painter knobOverlapEndInset] +

why are trackOverlapEndInset and knobOverlapEndInset not *2?
Comment 3 Sailesh Agrawal 2011-08-16 20:02:24 PDT
Comment on attachment 104139 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=104139&action=review

>> Source/WebCore/platform/chromium/ScrollbarOverlayUtilitiesChromiumMac.mm:213
>> +           [painter knobOverlapEndInset] +
> 
> why are trackOverlapEndInset and knobOverlapEndInset not *2?

I spent some time running this on Lion to see if I could figure out why the various values meant but I still don't understand it.

When I run this for opaque scrollbars I get the following values:
   - knobMinLenth: 20 
   - knobEndInset: 2
   - everything else: 0

For overlay scrollbars I get:
  - knowMinLength: 26
  - trackOverlapEndInset: 3
  - trackEndInset: 1

At this point I just gave up and copied the code from the disassembly.
Comment 4 Sailesh Agrawal 2011-08-16 20:03:12 PDT
For reference, here's the disassembly:
http://code.google.com/p/chromium/issues/detail?id=74057#c35

and here's what I understood from it:

0xf0(%rbp) <- knobMinLength + trackOverlapEndInset + knobOverlapEndInset

0xe8(%rbp) <- trackEndInset
        movq        0x0010629d(%rip),%rsi         trackEndInset
        movq        %rbx,%rdi
        callq       0x00112d3e                    -[%rdi trackEndInset]
        movsd       %xmm0,0xe8(%rbp)

%xmm0 <- knobEndInset
        movq        0x00106281(%rip),%rsi         knobEndInset
        movq        %rbx,%rdi
        callq       0x00112d3e                    -[%rdi knobEndInset]

%xmm0 <- knobEndInset + trackEndInset
        addsd       0xe8(%rbp),%xmm0

%xmm0 <- (knobEndInset + trackEndInset) * 2
        addsd       %xmm0,%xmm0

%xmm0 <- knobMinLength + trackOverlapEndInset + knobOverlapEndInset + (knobEndInset + trackEndInset) * 2
        addsd       0xf0(%rbp),%xmm0
Comment 5 Nico Weber 2011-08-16 21:12:15 PDT
Comment on attachment 104139 [details]
Patch

LGTM
Comment 6 Dimitri Glazkov (Google) 2011-08-16 21:15:15 PDT
Comment on attachment 104139 [details]
Patch

my rubberstamp is quick like a monkey.
Comment 7 WebKit Review Bot 2011-08-16 22:33:06 PDT
Comment on attachment 104139 [details]
Patch

Rejecting attachment 104139 [details] from commit-queue.

Failed to run "['./Tools/Scripts/webkit-patch', '--status-host=queues.webkit.org', '--bot-id=ec2-cq-02', '--port..." exit_code: 1

Last 500 characters of output:
it-commit-queue/LayoutTests/ChangeLog neither lists a valid reviewer nor contains the string "Unreviewed" or "Rubber stamp" (case insensitive).
Updating OpenSource
From git://git.webkit.org/WebKit
 + 0651a90...54d0520 master     -> origin/master  (forced update)
Current branch master is up to date.
Updating chromium port dependencies using gclient...

________ running '/usr/bin/python gyp_webkit' in '/mnt/git/webkit-commit-queue/Source/WebKit/chromium'
Updating webkit projects from gyp files...

Full output: http://queues.webkit.org/results/9403679
Comment 8 Nico Weber 2011-08-16 22:38:57 PDT
Huh! If you reupload with `land-safely`, the script will hopefully fill in the "reviewed by" line; if not you'll have to do that manually. Weird the commit-queue didn't do that.
Comment 9 Sailesh Agrawal 2011-08-16 22:43:14 PDT
Created attachment 104152 [details]
Patch for landing
Comment 10 WebKit Review Bot 2011-08-16 22:43:39 PDT
Comment on attachment 104152 [details]
Patch for landing

Rejecting attachment 104152 [details] from commit-queue.

sail@chromium.org does not have committer permissions according to http://trac.webkit.org/browser/trunk/Tools/Scripts/webkitpy/common/config/committers.py.

- If you do not have committer rights please read http://webkit.org/coding/contributing.html for instructions on how to use bugzilla flags.

- If you have committer rights please correct the error in Tools/Scripts/webkitpy/common/config/committers.py by adding yourself to the file (no review needed).  The commit-queue restarts itself every 2 hours.  After restart the commit-queue will correctly respect your committer rights.
Comment 11 WebKit Review Bot 2011-08-17 04:45:55 PDT
Comment on attachment 104152 [details]
Patch for landing

Clearing flags on attachment: 104152

Committed r93202: <http://trac.webkit.org/changeset/93202>
Comment 12 WebKit Review Bot 2011-08-17 04:46:00 PDT
All reviewed patches have been landed.  Closing bug.