Summary: | Simplify isOverlayScrollbar() logic | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Simon Fraser (smfr) <simon.fraser> | ||||
Component: | New Bugs | Assignee: | Simon Fraser (smfr) <simon.fraser> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | bdakin, simon.fraser, thorton | ||||
Priority: | P2 | ||||||
Version: | WebKit Nightly Build | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Attachments: |
|
Description
Simon Fraser (smfr)
2015-12-16 14:48:05 PST
Created attachment 267493 [details]
Patch
Comment on attachment 267493 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=267493&action=review > Source/WebCore/platform/ScrollableArea.cpp:523 > + return IntSize( > + verticalScrollbar() ? verticalScrollbar()->occupiedWidth() : 0, > + horizontalScrollbar() ? horizontalScrollbar()->occupiedHeight() : 0); Here’s how I would write this: return { verticalScrollbar() ? verticalScrollbar()->occupiedWidth() : 0, horizontalScrollbar() ? horizontalScrollbar()->occupiedHeight() : 0 }; I like reducing the number of times we have to utter the type name IntSize, and I also like the formatting better with the braces. |