Bug 28125

Summary: [Haiku] Adding ScrollbarTheme to WebCore.
Product: WebKit Reporter: Maxime Simon <simon.maxime>
Component: WebCore Misc.Assignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: eric, leavengood
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: Other   
Attachments:
Description Flags
Patch to add the ScrollbarTheme files for Haiku.
eric: review+
Patch to add the ScrollbarTheme files for Haiku.
none
Patch to add the ScrollbarTheme files for Haiku. none

Maxime Simon
Reported 2009-08-09 05:23:21 PDT
Patch to add the ScrollbarThemeHaiku.* files to WebCore.
Attachments
Patch to add the ScrollbarTheme files for Haiku. (10.42 KB, patch)
2009-08-09 05:28 PDT, Maxime Simon
eric: review+
Patch to add the ScrollbarTheme files for Haiku. (10.76 KB, patch)
2009-08-11 05:27 PDT, Maxime Simon
no flags
Patch to add the ScrollbarTheme files for Haiku. (10.76 KB, patch)
2009-08-11 09:12 PDT, Maxime Simon
no flags
Maxime Simon
Comment 1 2009-08-09 05:28:42 PDT
Created attachment 34410 [details] Patch to add the ScrollbarTheme files for Haiku.
Eric Seidel (no email)
Comment 2 2009-08-09 08:00:41 PDT
Comment on attachment 34410 [details] Patch to add the ScrollbarTheme files for Haiku. I would have written: return IntRect(scrollbar->x(), scrollbar->y(), 77 scrollbar->width() < 2 * thickness ? scrollbar->width() / 2 : thickness, thickness); 78 return IntRect(scrollbar->x(), scrollbar->y(), 79 thickness, scrollbar->height() < 2 * thickness ? scrollbar->height() / 2 : thickness); As: int buttonWidth(int scrollbarWidth, int thickness) { return scrollbarWidth < 2 * thickness ? scrollbarWidth / 2 : thickness; } IntPoint buttonOrigin(scrollbar->x(), scrollbar->y()); IntSize buttonSize = scrollbar->orientation() == HorizontalScrollbar ? IntSize(buttonWidth(scrollbar->width()), thickness) : IntSize(thickness, buttonWidth(scrollbar->width()); return IntRect(buttonOrigin, buttonSize); That way you can re-use buttonWidth() on the next function too. The code looks OK as is though.
Ryan Leavengood
Comment 3 2009-08-10 19:44:45 PDT
Maxime, You should also add yourself above Apple in the copyright section of this code (and other code you have written or modified.) Though since Eric alread r+ this, you can make some new patches later to fix up the copyrights. Or consider also making the change Eric suggested and make a new patch. It's up to you ;)
Maxime Simon
Comment 4 2009-08-11 05:27:46 PDT
Created attachment 34550 [details] Patch to add the ScrollbarTheme files for Haiku. Make some changes as suggested by Eric and Ryan, even if the previous patches was r+. I also made some style cleanup.
Maxime Simon
Comment 5 2009-08-11 09:12:37 PDT
Created attachment 34564 [details] Patch to add the ScrollbarTheme files for Haiku. Sorry, the previous had a mistake. I changed scrollbar->height() to scrollbar->width(), so it didn't display correctly the back button.
Eric Seidel (no email)
Comment 6 2009-08-12 10:35:15 PDT
Comment on attachment 34564 [details] Patch to add the ScrollbarTheme files for Haiku. I wouldn't have bothered to create this variable: 83 IntRect buttonRect(buttonOrigin, buttonSize); 84 85 return buttonRect; Looks fine though.
Eric Seidel (no email)
Comment 7 2009-08-12 13:23:19 PDT
Comment on attachment 34564 [details] Patch to add the ScrollbarTheme files for Haiku. Clearing flags on attachment: 34564 Committing to http://svn.webkit.org/repository/webkit/trunk ... M WebCore/ChangeLog A WebCore/platform/haiku/ScrollbarThemeHaiku.cpp A WebCore/platform/haiku/ScrollbarThemeHaiku.h Committed r47143 M WebCore/ChangeLog A WebCore/platform/haiku/ScrollbarThemeHaiku.cpp A WebCore/platform/haiku/ScrollbarThemeHaiku.h r47143 = 1e5acb63da2fefd1e799f6c31987d9899a34e057 (trunk) No changes between current HEAD and refs/remotes/trunk Resetting to the latest refs/remotes/trunk http://trac.webkit.org/changeset/47143
Eric Seidel (no email)
Comment 8 2009-08-12 13:23:22 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.