Bug 59846 - Scrolling causes rounded bottom window corners to become square
Summary: Scrolling causes rounded bottom window corners to become square
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Beth Dakin
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2011-04-29 16:42 PDT by Beth Dakin
Modified: 2011-04-29 18:01 PDT (History)
1 user (show)

See Also:


Attachments
Patch (3.29 KB, patch)
2011-04-29 16:51 PDT, Beth Dakin
no flags Details | Formatted Diff | Diff
Patch that addresses Simon's comments (5.13 KB, patch)
2011-04-29 17:48 PDT, Beth Dakin
simon.fraser: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Beth Dakin 2011-04-29 16:42:55 PDT
In a window with rounded corners, scrolling in WK2 causes the rounded corners to become square.

<rdar://problem/9234239>

Patch forthcoming.
Comment 1 Beth Dakin 2011-04-29 16:51:50 PDT
Created attachment 91767 [details]
Patch
Comment 2 Simon Fraser (smfr) 2011-04-29 16:58:14 PDT
Comment on attachment 91767 [details]
Patch

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

> Source/WebKit2/UIProcess/API/mac/PageClientImpl.mm:145
> +        NSDisableScreenUpdates();

A comment explaining why disabling is required would be good

> Source/WebKit2/UIProcess/API/mac/PageClientImpl.mm:161
> +    m_windowBottomCornerIntersectionRect = NSZeroRect;
> +    m_windowBottomCornerIntersectionRect = [[m_wkView window] _intersectBottomCornersWithRect:[m_wkView convertRect:[m_wkView visibleRect] toView:nil]];

Why the double assignment?
Comment 3 Simon Fraser (smfr) 2011-04-29 17:07:59 PDT
Comment on attachment 91767 [details]
Patch

Maybe move this code to WKView, too?
Comment 4 Beth Dakin 2011-04-29 17:48:10 PDT
Created attachment 91774 [details]
Patch that addresses Simon's comments
Comment 5 Simon Fraser (smfr) 2011-04-29 17:53:30 PDT
Comment on attachment 91774 [details]
Patch that addresses Simon's comments

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

> Source/WebKit2/UIProcess/API/mac/PageClientImpl.h:127
> +    NSRect m_windowBottomCornerIntersectionRect;

This is unused?

> Source/WebKit2/UIProcess/API/mac/WKView.mm:933
> +    BOOL maskWindow = window && !NSIsEmptyRect(_data->_windowBottomCornerIntersectionRect);

Would read better if this was shouldMaskWindow
Comment 6 Beth Dakin 2011-04-29 17:56:55 PDT
(In reply to comment #5)
> (From update of attachment 91774 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=91774&action=review
> 
> > Source/WebKit2/UIProcess/API/mac/PageClientImpl.h:127
> > +    NSRect m_windowBottomCornerIntersectionRect;
> 
> This is unused?
> 

Oops! Meant to remove that.

> > Source/WebKit2/UIProcess/API/mac/WKView.mm:933
> > +    BOOL maskWindow = window && !NSIsEmptyRect(_data->_windowBottomCornerIntersectionRect);
> 
> Would read better if this was shouldMaskWindow

Will change.

Thanks!
Comment 7 Beth Dakin 2011-04-29 18:01:30 PDT
Committed fix with revision 85376.